http://linus.bkbits.net/linux-2.5 olof@austin.ibm.com[torvalds]|ChangeSet|20040328192810|45993 olof # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/28 11:28:10-08:00 olof@austin.ibm.com # [PATCH] ppc64: Use full DART table on G5 # # This increases the DART table to use the full size. We allocate a full # 16MB page anyway, so there's no difference in memory consumption. # # Thanks to Ben for spotting this, it was left over from debugging... # # arch/ppc64/kernel/prom.c # 2004/03/28 03:54:59-08:00 olof@austin.ibm.com +2 -2 # ppc64: Use full DART table on G5 # # ChangeSet # 2004/03/28 11:27:55-08:00 olof@austin.ibm.com # [PATCH] ppc64: Fix thinko in iommu allocator # # This fixes a bug in the iommu allocator that causes it to behave # strangely when a fair size of the table is allocated. # # Thanks to Andrew Gallatin for finding this. # # arch/ppc64/kernel/iommu.c # 2004/03/25 09:37:04-08:00 olof@austin.ibm.com +2 -1 # ppc64: Fix thinko in iommu allocator # # ChangeSet # 2004/03/28 11:16:38-08:00 greg@kroah.com # [PATCH] USB: Eliminate wait following interface unregistration # # This patch from Alan Stern fixes a bug in # the current USB code that causes khubd to hang when a device is removed # from the system, thereby preventing any future USB device changes (like # adding or removing other devices) from happening. # # Both Andrew and I can easily duplicate this bug against the current -bk # tree. # # It's not a perfect fix, but it works for now, and I will spend the next # week working on restructuring the code so this is handled properly. # # drivers/usb/core/message.c # 2004/03/24 02:17:04-08:00 greg@kroah.com +0 -7 # USB: Eliminate wait following interface unregistration # # ChangeSet # 2004/03/28 01:22:46-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix one last cast-as-lvalue, present in uniprocessor builds. # # arch/sparc64/mm/init.c # 2004/03/28 01:19:29-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Fix one last cast-as-lvalue, present in uniprocessor builds. # # ChangeSet # 2004/03/27 19:13:30-08:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] remove unused ide_hwif_t->pnp_dev # # include/linux/ide.h # 2004/03/23 10:26:40-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -2 # remove unused ide_hwif_t->pnp_dev # # drivers/ide/ide-pnp.c # 2004/03/23 10:26:40-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused ide_hwif_t->pnp_dev # # ChangeSet # 2004/03/27 18:51:03-08:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] remove unused CONFIG_DMA_NONPCI # # It has been dead since kernel 2.5.18. # # drivers/ide/ide.c # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +1 -4 # remove unused CONFIG_DMA_NONPCI # # drivers/ide/ide-iops.c # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +7 -9 # remove unused CONFIG_DMA_NONPCI # # arch/x86_64/defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/sparc64/defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/sh/defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc64/defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc64/configs/pSeries_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc64/configs/g5_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc/defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc/configs/redwood5_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc/configs/pplus_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc/configs/pmac_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc/configs/cpci405_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ppc/configs/common_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/parisc/configs/c3000_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/workpad_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/tb0226_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/pb1500_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/lasat200_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/ivr_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/it8172_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/hp-lj_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/eagle_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/e55_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/ddb5476_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/db1500_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/cobalt_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/mips/configs/capcella_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ia64/defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ia64/configs/zx1_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ia64/configs/sn2_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/ia64/configs/generic_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/i386/defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/arm/configs/trizeps_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/arm/configs/shark_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/arm/configs/netwinder_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/arm/configs/lart_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/arm/configs/cerfcube_defconfig # 2004/03/23 10:18:46-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # arch/alpha/defconfig # 2004/03/23 10:24:34-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # remove unused CONFIG_DMA_NONPCI # # ChangeSet # 2004/03/27 18:50:49-08:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] remove unused CONFIG_BLK_DEV_TIVO # # TiVo IDE support was never merged only this option was (in 2.4.0-test2), sigh. # # drivers/ide/Kconfig # 2004/03/23 10:18:41-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -3 # remove unused CONFIG_BLK_DEV_TIVO # # ChangeSet # 2004/03/27 18:48:42-08:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] ide.c: remove unused code for hwif->mmio == 1 # # include/linux/ide.h # 2004/03/23 10:18:38-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +1 -1 # ide.c: remove unused code for hwif->mmio == 1 # # drivers/ide/ide.c # 2004/03/23 10:18:38-08:00 B.Zolnierkiewicz@elka.pw.edu.pl +9 -17 # ide.c: remove unused code for hwif->mmio == 1 # # ChangeSet # 2004/03/27 18:41:19-08:00 anton@samba.org # [PATCH] [PPC64] make compat filldir/getdents check for errors # # filldir and getdents should check return values of put_user etc. The # generic code has been fixed but the ppc64 compat versions have not. # # arch/ppc64/kernel/sys_ppc32.c # 2004/03/24 04:24:38-08:00 anton@samba.org +37 -21 # [PPC64] make compat filldir/getdents check for errors # # ChangeSet # 2004/03/27 13:46:55-08:00 torvalds@ppc970.osdl.org # Merge # # arch/x86_64/ia32/sys_ia32.c # 2004/03/27 13:46:54-08:00 torvalds@ppc970.osdl.org +0 -0 # SCCS merged # # arch/sparc64/kernel/sys_sparc32.c # 2004/03/27 13:46:54-08:00 torvalds@ppc970.osdl.org +0 -0 # SCCS merged # # arch/s390/kernel/compat_linux.c # 2004/03/27 13:46:54-08:00 torvalds@ppc970.osdl.org +0 -0 # SCCS merged # # arch/ppc64/kernel/sys_ppc32.c # 2004/03/27 13:46:54-08:00 torvalds@ppc970.osdl.org +0 -0 # SCCS merged # # arch/s390/kernel/compat_wrapper.S # 2004/03/27 13:43:12-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/03/27 13:42:42-08:00 willy@debian.org # [PATCH] consolidate compat_sys_mount # # This replaces six duplicated implementations of various quality of # sys32_mount with a shiny new compat_sys_mount(). # # It's been tested on parisc64 and sparc64 and fixes a bug exposed by the # latest revision of Debian's initscripts. Thanks to Arnd Bergmann and # Dave Miller for their suggestions, fixes and testing. Please apply. # # include/net/scm.h # 2004/03/26 11:05:31-08:00 willy@debian.org +1 -0 # consolidate compat_sys_mount # # fs/namespace.c # 2004/03/26 11:05:31-08:00 willy@debian.org +1 -1 # consolidate compat_sys_mount # # fs/compat.c # 2004/03/26 11:05:31-08:00 willy@debian.org +152 -0 # consolidate compat_sys_mount # # arch/x86_64/ia32/sys_ia32.c # 2004/03/26 11:05:28-08:00 willy@debian.org +0 -36 # consolidate compat_sys_mount # # arch/x86_64/ia32/ia32entry.S # 2004/03/26 11:05:27-08:00 willy@debian.org +1 -1 # consolidate compat_sys_mount # # arch/sparc64/kernel/systbls.S # 2004/03/26 11:05:27-08:00 willy@debian.org +1 -1 # consolidate compat_sys_mount # # arch/sparc64/kernel/sys_sparc32.c # 2004/03/26 11:05:27-08:00 willy@debian.org +0 -206 # consolidate compat_sys_mount # # arch/s390/kernel/compat_wrapper.S # 2004/03/26 11:05:26-08:00 willy@debian.org +1 -1 # consolidate compat_sys_mount # # arch/s390/kernel/compat_linux.c # 2004/03/26 11:05:26-08:00 willy@debian.org +0 -154 # consolidate compat_sys_mount # # arch/ppc64/kernel/sys_ppc32.c # 2004/03/26 11:05:26-08:00 willy@debian.org +0 -206 # consolidate compat_sys_mount # # arch/ppc64/kernel/misc.S # 2004/03/26 11:05:26-08:00 willy@debian.org +1 -1 # consolidate compat_sys_mount # # arch/parisc/kernel/syscall_table.S # 2004/03/26 11:05:25-08:00 willy@debian.org +1 -1 # consolidate compat_sys_mount # # arch/parisc/kernel/sys_parisc32.c # 2004/03/26 11:05:25-08:00 willy@debian.org +0 -99 # consolidate compat_sys_mount # # arch/ia64/ia32/sys_ia32.c # 2004/03/26 11:05:24-08:00 willy@debian.org +0 -154 # consolidate compat_sys_mount # # arch/ia64/ia32/ia32_entry.S # 2004/03/26 11:05:24-08:00 willy@debian.org +1 -1 # consolidate compat_sys_mount # # ChangeSet # 2004/03/27 13:02:33-08:00 akpm@osdl.org # [PATCH] Remove from cmdlinepart.c # # From: Bjorn Helgaas # # Remove include of from cmdlinepart.c. This is not be needed # for i386 (it builds fine with this patch), and ia64 doesn't supply a # setup.h. # # asm/setup.h contains a hodge-podge of stuff with no real # consistency between architectures. It appears to be # included mainly by arch-specific drivers: # acsi (Atari disks) # amiflop (Amiga floppy) # z2ram (ZorroII ram disk) # amiserial (Amiga serial) # ... # and under arch-specific #ifdefs: # fbcon (under __mc68000__ or CONFIG_APUS) # fonts (ditto) # logo (CONFIG_M68K) # ... # # drivers/mtd/cmdlinepart.c # 2004/03/27 03:43:44-08:00 akpm@osdl.org +0 -1 # Remove from cmdlinepart.c # # ChangeSet # 2004/03/27 13:02:21-08:00 akpm@osdl.org # [PATCH] Fix uninitialized data in EFI RTC /proc interface # # From: Bjorn Helgaas # # The problem is that we don't clear out the efi_time_t buffer before asking # EFI to fill it in. EFI doesn't always write the entire buffer (in # particular, the alarm time only supports one second resolution, so the # nanosecond field is often untouched). # # The effect is that 'cat /proc/driver/efirtc' shows garbage in the # nanoseconds part of the alarm time, and sometimes artifacts like bogus # alarm date and junk after the actual end of the text. # # drivers/char/efirtc.c # 2004/03/27 03:43:20-08:00 akpm@osdl.org +7 -3 # Fix uninitialized data in EFI RTC /proc interface # # ChangeSet # 2004/03/27 13:02:08-08:00 akpm@osdl.org # [PATCH] selinux: check return value for receive node permission # # From: James Morris # # This patch fixes a bug where the return value for a permission call is not # checked. # # The bug was introduced when I added some code in the following changeset: # # # # Code was added after this line: # # err = avc_has_perm(isec->sid, node_sid, SECCLASS_NODE, node_perm, NULL, &ad); # # without adding an explicit check of 'err', which was previously returned # from the function rather than being checked. i.e. it would drop through # to: # # out: # return err; # # } # # With the new code added, err can (and typically would) be overwritten with # a successful value, causing the permission check to not deny permission if # needed. The intended denial would have been logged. # # The patch below fixes this problem. # # security/selinux/hooks.c # 2004/03/27 03:40:47-08:00 akpm@osdl.org +2 -0 # selinux: check return value for receive node permission # # ChangeSet # 2004/03/27 13:01:55-08:00 akpm@osdl.org # [PATCH] adjuct cpu_khz in response to cpufreq changes # # From: john stultz # # This patch ensures that cpu_khz is adjusted on cpufreq notifications even # when the tsc timesource is not in use. It fixes the mostly cosmetic issue # when using the ACPI PM timesource of /proc/cpuinfo not being properly # updated when cpu frequency was lowered. # # arch/i386/kernel/timers/timer_tsc.c # 2004/03/27 03:40:47-08:00 akpm@osdl.org +2 -1 # adjuct cpu_khz in response to cpufreq changes # # ChangeSet # 2004/03/27 13:01:42-08:00 akpm@osdl.org # [PATCH] s390: system call speedup part 2. # # From: Martin Schwidefsky # # System call speedup part 2. # # include/asm-s390/uaccess.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +197 -406 # s390: system call speedup part 2. # # include/asm-s390/system.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +19 -0 # s390: system call speedup part 2. # # include/asm-s390/ptrace.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +4 -6 # s390: system call speedup part 2. # # include/asm-s390/processor.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +5 -4 # s390: system call speedup part 2. # # include/asm-s390/mmu_context.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +10 -12 # s390: system call speedup part 2. # # include/asm-s390/lowcore.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +19 -8 # s390: system call speedup part 2. # # include/asm-s390/elf.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +24 -2 # s390: system call speedup part 2. # # ChangeSet # 2004/03/27 13:01:29-08:00 akpm@osdl.org # [PATCH] s390: system call speedup part 1. # # From: Martin Schwidefsky # # The purpose of this is to speed up system calls on s390. I managed to # squeeze about 65 cycles from each system call. This improved e.g. getpid() # from 232 to 157 cycles. As a nice side-effect it simplified the uaccess # functions considerably. # # arch/s390/mm/init.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +4 -0 # s390: system call speedup part 1. # # arch/s390/mm/fault.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +5 -3 # s390: system call speedup part 1. # # arch/s390/lib/uaccess64.S # 2004/03/27 03:40:46-08:00 akpm@osdl.org +153 -98 # s390: system call speedup part 1. # # arch/s390/lib/uaccess.S # 2004/03/27 03:40:46-08:00 akpm@osdl.org +154 -98 # s390: system call speedup part 1. # # arch/s390/kernel/traps.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +13 -8 # s390: system call speedup part 1. # # arch/s390/kernel/signal.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +15 -2 # s390: system call speedup part 1. # # arch/s390/kernel/setup.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +2 -1 # s390: system call speedup part 1. # # arch/s390/kernel/s390_ksyms.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +2 -0 # s390: system call speedup part 1. # # arch/s390/kernel/ptrace.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +69 -38 # s390: system call speedup part 1. # # arch/s390/kernel/process.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +11 -9 # s390: system call speedup part 1. # # arch/s390/kernel/entry64.S # 2004/03/27 03:40:46-08:00 akpm@osdl.org +205 -117 # s390: system call speedup part 1. # # arch/s390/kernel/entry.S # 2004/03/27 03:40:46-08:00 akpm@osdl.org +217 -129 # s390: system call speedup part 1. # # arch/s390/kernel/compat_signal.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +4 -2 # s390: system call speedup part 1. # # arch/s390/kernel/binfmt_elf32.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +13 -12 # s390: system call speedup part 1. # # arch/s390/kernel/asm-offsets.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +9 -2 # s390: system call speedup part 1. # # ChangeSet # 2004/03/27 13:01:16-08:00 akpm@osdl.org # [PATCH] s390: tape driver. # # From: Martin Schwidefsky # # s390 tape driver changes: # - Prevent offline while device is in use. # - Do not use bus_id string in debug feature messages. # - Check for IS_ERR(irb) error conditions in interrupt handler. # - Fix removing tape discipline modules. # # drivers/s390/char/tape_std.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +15 -7 # s390: tape driver. # # drivers/s390/char/tape_core.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +161 -35 # s390: tape driver. # # drivers/s390/char/tape_block.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +7 -0 # s390: tape driver. # # drivers/s390/char/tape_34xx.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +12 -12 # s390: tape driver. # # drivers/s390/char/tape.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +3 -2 # s390: tape driver. # # ChangeSet # 2004/03/27 13:01:03-08:00 akpm@osdl.org # [PATCH] s390: network driver. # # From: Martin Schwidefsky # # s390 network driver changes: # - ctc/lcs/qeth: prevent a ccw-device to be grouped multiple times. # - icuv: clear correct field in iucv_register_program if no userid is specified. # - lcs: fix online/offline cycle again. # - lcs: fix ungrouping of lcs group device. The channels of the lcs card # should be offline afterwards. # - lcs: don't do netif_stop_queue if no tx buffer is available, just # return -EBUSY and drop the packets. # # drivers/s390/net/qeth.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +2 -0 # s390: network driver. # # drivers/s390/net/qeth.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +4 -7 # s390: network driver. # # drivers/s390/net/netiucv.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +6 -5 # s390: network driver. # # drivers/s390/net/lcs.h # 2004/03/27 03:40:46-08:00 akpm@osdl.org +20 -1 # s390: network driver. # # drivers/s390/net/lcs.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +196 -130 # s390: network driver. # # drivers/s390/net/iucv.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +7 -7 # s390: network driver. # # drivers/s390/net/ctcmain.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +5 -6 # s390: network driver. # # drivers/s390/cio/ccwgroup.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +24 -36 # s390: network driver. # # ChangeSet # 2004/03/27 13:00:49-08:00 akpm@osdl.org # [PATCH] s390: z/VM monitor stream. # # From: Martin Schwidefsky # # z/VM monitor stream changes: # - Correct sysctl vs. module ref-counting. # # arch/s390/appldata/appldata_base.c # 2004/03/27 03:40:46-08:00 akpm@osdl.org +35 -8 # s390: z/VM monitor stream. # # ChangeSet # 2004/03/27 13:00:37-08:00 akpm@osdl.org # [PATCH] s390: dasd driver. # # From: Martin Schwidefsky # # dasd device driver changes: # - After a state change interrupt restart all running i/o on queue # and reset device timer. # - Improve some debug messages. # - Lower timeout of reserve/release/steal_lock to 2 seconds. # - Fix BIODASDPSRD ioctl. # - Replace ro_flag, use_diag_flag and disconnect_error_flag words by bits. # - Use BLKPG_DEL_PARTITION ioctl instead of a call to delete_partition because # delete_partition is not an exported function. Since dasd_destroy_partitions # can't do blkdev_get because dasd_open would fail, keep the block device # open as long as partitions exist. This in turn requires a different # approach to the open vs. offline race. # # drivers/s390/block/dasd_proc.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +2 -2 # s390: dasd driver. # # drivers/s390/block/dasd_ioctl.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +7 -4 # s390: dasd driver. # # drivers/s390/block/dasd_int.h # 2004/03/27 03:40:45-08:00 akpm@osdl.org +9 -6 # s390: dasd driver. # # drivers/s390/block/dasd_genhd.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +46 -16 # s390: dasd driver. # # drivers/s390/block/dasd_eckd.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +5 -4 # s390: dasd driver. # # drivers/s390/block/dasd_devmap.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +13 -6 # s390: dasd driver. # # drivers/s390/block/dasd_3990_erp.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +12 -10 # s390: dasd driver. # # drivers/s390/block/dasd.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +64 -44 # s390: dasd driver. # # ChangeSet # 2004/03/27 13:00:23-08:00 akpm@osdl.org # [PATCH] s390: core fixes. # # From: Martin Schwidefsky # # s390 core changes: # - Fix return type of some system call functions (long vs. int). # - Fix prototypes for compat system call handlers. # - Correct some bugs in the compat system call wrappers. # - Fix broken pointer arithmetic which causes problems with # gcc 3.4 and -march=z990 # - Remove unnecessary #ifndef & optimize inline assemblies in spinlock.h. # - Improve handling of deferred condition code 1. # - New default configuration. # # include/asm-s390/unistd.h # 2004/03/27 03:40:45-08:00 akpm@osdl.org +7 -12 # s390: core fixes. # # include/asm-s390/spinlock.h # 2004/03/27 03:40:45-08:00 akpm@osdl.org +5 -13 # s390: core fixes. # # drivers/s390/cio/device_fsm.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +8 -0 # s390: core fixes. # # arch/s390/kernel/sys_s390.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +8 -14 # s390: core fixes. # # arch/s390/kernel/setup.c # 2004/03/27 03:49:23-08:00 akpm@osdl.org +6 -6 # s390: core fixes. # # arch/s390/kernel/ptrace.c # 2004/03/27 03:49:23-08:00 akpm@osdl.org +1 -1 # s390: core fixes. # # arch/s390/kernel/process.c # 2004/03/27 03:49:23-08:00 akpm@osdl.org +4 -4 # s390: core fixes. # # arch/s390/kernel/compat_wrapper.S # 2004/03/27 03:40:45-08:00 akpm@osdl.org +16 -17 # s390: core fixes. # # arch/s390/kernel/compat_signal.c # 2004/03/27 03:49:23-08:00 akpm@osdl.org +2 -2 # s390: core fixes. # # arch/s390/kernel/compat_linux.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +42 -42 # s390: core fixes. # # arch/s390/defconfig # 2004/03/27 03:40:45-08:00 akpm@osdl.org +23 -8 # s390: core fixes. # # ChangeSet # 2004/03/27 13:00:07-08:00 akpm@osdl.org # [PATCH] ipc locking fix # # From: badari # # I ran into an ipc hang while trying to shutdown a database. The problem is # due to missing sem_unlock() in find_undo(). # # ipc/sem.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +4 -3 # ipc locking fix # # ChangeSet # 2004/03/27 12:59:54-08:00 akpm@osdl.org # [PATCH] write_kmem() fix # # copy_from_user() returns non-zero on faults.. # # drivers/char/mem.c # 2004/03/27 03:40:45-08:00 akpm@osdl.org +1 -1 # write_kmem() fix # # ChangeSet # 2004/03/27 12:56:57-08:00 marcelo.tosatti@cyclades.com # [PATCH] Fix cyclades async driver timeout miscalculation # # This fixes a problem where cy_wait_until_sent() miscalculates (calculate # -1 on a unsigned long) the "char_time" parameter passed to # schedule_timeout(). # # Fix that by making it a signed long, and checking for negative value. # # drivers/char/cyclades.c # 2004/03/26 21:30:45-08:00 marcelo.tosatti@cyclades.com +3 -2 # Fix cyclades async driver timeout miscalculation # # ChangeSet # 2004/03/27 12:56:44-08:00 ak@suse.de # [PATCH] Emulate deviceless bridge ioctls # # This helps vmware users running vmware on x86-64 - vmnet tries to set up a bridge. # Emulate these ioctls. The bridge has more ioctls on its bridge device, but these # don't seem to be needed here. # # include/linux/compat_ioctl.h # 2004/03/24 17:13:00-08:00 ak@suse.de +0 -4 # Emulate deviceless bridge ioctls # # fs/compat_ioctl.c # 2004/03/24 17:14:27-08:00 ak@suse.de +16 -0 # Emulate deviceless bridge ioctls # # ChangeSet # 2004/03/27 12:56:32-08:00 ak@suse.de # [PATCH] Don't register disabled nodes # # Don't register disabled nodes. Hits on x86-64 when there is a node with no memory. # X86-64 shares this code with i386. # # include/asm-i386/node.h # 2004/03/26 03:31:18-08:00 ak@suse.de +5 -1 # Don't register disabled nodes # # ChangeSet # 2004/03/27 12:56:18-08:00 ak@suse.de # [PATCH] Fix x86-64 32bit getdents for new glibc # # The newest CVS glibc assumes that Linux >=2.6.4 always passes d_type. # This patch adds this to the 32bit getdents on x86-64 too # # Patch originally from Marcus Meissner # # arch/x86_64/ia32/sys_ia32.c # 2004/03/23 21:05:56-08:00 ak@suse.de +6 -2 # Fix x86-64 32bit getdents for new glibc # # ChangeSet # 2004/03/26 19:31:19-05:00 len.brown@intel.com # [ACPI] Linux specific updates from ACPICA 20040326 # "acpi_wake_gpes_always_on" boot flag for old GPE behaviour # # drivers/acpi/osl.c # 2004/03/26 14:31:03-05:00 len.brown@intel.com +21 -0 # add "acpi_wake_gpes_always_on" flag # # drivers/acpi/ec.c # 2004/03/26 14:31:03-05:00 len.brown@intel.com +2 -2 # fix build error resulting from ACPICA update # # ChangeSet # 2004/03/26 18:49:28-05:00 len.brown@intel.com # [ACPI] ACPICA 20040326 from Bob Moore # # Implemented support for "wake" GPEs via interaction between # GPEs and the _PRW methods. Every GPE that is pointed to by # one or more _PRWs is identified as a WAKE GPE and by default # will no longer be enabled at runtime. Previously, we were # blindly enabling all GPEs with a corresponding _Lxx or _Exx # method - but most of these turn out to be WAKE GPEs anyway. # We believe this has been the cause of thousands of # "spurious" GPEs on some systems. # # This new GPE behavior is can be reverted to the original # behavior (enable ALL GPEs at runtime) via a runtime flag. # # Fixed a problem where aliased control methods could not # access objects properly. The proper scope within the # namespace was not initialized (transferred to the target of # the aliased method) before executing the target method. # # Fixed a potential race condition on internal object # deletion on the return object in AcpiEvaluateObject. # # Integrated a fix for resource descriptors where both # _MEM and _MTP were being extracted instead of just _MEM. # (i.e. bitmask was incorrectly too wide, 0x0F instead of 0x03.) # # Added a special case for ACPI_ROOT_OBJECT in AcpiUtGetNodeName, # preventing a fault in some cases. # # Updated Notify() values for debug statements in evmisc.c # # Return proper status from AcpiUtMutexInitialize, # not just simply AE_OK. # # include/acpi/acutils.h # 2004/03/26 13:47:07-05:00 len.brown@intel.com +1 -0 # Import ACPICA 20040326 # # include/acpi/actypes.h # 2004/03/26 13:47:08-05:00 len.brown@intel.com +53 -31 # Import ACPICA 20040326 # # include/acpi/aclocal.h # 2004/03/26 13:47:07-05:00 len.brown@intel.com +7 -0 # Import ACPICA 20040326 # # include/acpi/achware.h # 2004/03/26 13:47:07-05:00 len.brown@intel.com +2 -2 # Import ACPICA 20040326 # # include/acpi/acglobal.h # 2004/03/26 13:47:07-05:00 len.brown@intel.com +2 -0 # Import ACPICA 20040326 # # include/acpi/acconfig.h # 2004/03/26 13:47:07-05:00 len.brown@intel.com +1 -1 # Import ACPICA 20040326 # # drivers/acpi/utilities/utmisc.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +2 -3 # Import ACPICA 20040326 # # drivers/acpi/utilities/utglobal.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +24 -18 # Import ACPICA 20040326 # # drivers/acpi/resources/rsaddr.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +7 -6 # Import ACPICA 20040326 # # drivers/acpi/namespace/nsxfeval.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +17 -9 # Import ACPICA 20040326 # # drivers/acpi/namespace/nsutils.c # 2004/03/26 13:47:08-05:00 len.brown@intel.com +1 -1 # Import ACPICA 20040326 # # drivers/acpi/namespace/nssearch.c # 2004/03/26 13:47:08-05:00 len.brown@intel.com +6 -0 # Import ACPICA 20040326 # # drivers/acpi/namespace/nseval.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +9 -0 # Import ACPICA 20040326 # # drivers/acpi/namespace/nsdump.c # 2004/03/26 13:47:08-05:00 len.brown@intel.com +1 -0 # Import ACPICA 20040326 # # drivers/acpi/namespace/nsaccess.c # 2004/03/26 13:47:08-05:00 len.brown@intel.com +9 -0 # Import ACPICA 20040326 # # drivers/acpi/hardware/hwsleep.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +17 -5 # Import ACPICA 20040326 # # drivers/acpi/hardware/hwgpe.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +57 -41 # Import ACPICA 20040326 # # drivers/acpi/executer/exstoren.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +1 -0 # Import ACPICA 20040326 # # drivers/acpi/executer/exresnte.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +3 -2 # Import ACPICA 20040326 # # drivers/acpi/executer/exdump.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +1 -0 # Import ACPICA 20040326 # # drivers/acpi/executer/excreate.c # 2004/03/26 13:47:08-05:00 len.brown@intel.com +14 -2 # Import ACPICA 20040326 # # drivers/acpi/events/evxfevnt.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +19 -6 # Import ACPICA 20040326 # # drivers/acpi/events/evmisc.c # 2004/03/26 13:47:08-05:00 len.brown@intel.com +22 -21 # Import ACPICA 20040326 # # drivers/acpi/events/evgpeblk.c # 2004/03/26 13:47:07-05:00 len.brown@intel.com +209 -33 # Import ACPICA 20040326 # # drivers/acpi/events/evgpe.c # 2004/03/26 13:47:08-05:00 len.brown@intel.com +5 -6 # Import ACPICA 20040326 # # ChangeSet # 2004/03/26 15:00:55-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix lvalue casting in sys_sparc32.c # # arch/sparc64/kernel/sys_sparc32.c # 2004/03/26 15:00:38-08:00 davem@nuts.davemloft.net +12 -5 # [SPARC64]: Fix lvalue casting in sys_sparc32.c # # ChangeSet # 2004/03/26 17:52:32-05:00 len.brown@intel.com # [ACPI] proposed fix for non-identity-mapped SCI override # http://bugme.osdl.org/show_bug.cgi?id=2366 # # arch/i386/kernel/acpi/boot.c # 2004/03/26 17:50:48-05:00 len.brown@intel.com +11 -7 # proposed fix for non-identity-mapped SCI override # # ChangeSet # 2004/03/26 14:17:12-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix svr4_stack_t typing in svr4.h # # include/asm-sparc64/svr4.h # 2004/03/26 14:16:56-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Fix svr4_stack_t typing in svr4.h # # ChangeSet # 2004/03/26 14:16:43-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix lvalue casting in sys_sunos32.c # # arch/sparc64/kernel/sys_sunos32.c # 2004/03/26 14:16:26-08:00 davem@nuts.davemloft.net +5 -3 # [SPARC64]: Fix lvalue casting in sys_sunos32.c # # ChangeSet # 2004/03/26 14:16:17-08:00 davem@nuts.davemloft.net # [SPARC64]: Fix lvalue casting in signal32.c # # arch/sparc64/kernel/signal32.c # 2004/03/26 14:16:00-08:00 davem@nuts.davemloft.net +11 -7 # [SPARC64]: Fix lvalue casting in signal32.c # # ChangeSet # 2004/03/26 14:15:22-08:00 davem@nuts.davemloft.net # [SPARC64]: Do not lvalue cast in pgd/pmd macros. # # include/asm-sparc64/page.h # 2004/03/26 14:12:13-08:00 davem@nuts.davemloft.net +4 -4 # [SPARC64]: Do not lvalue cast in pgd/pmd macros. # # ChangeSet # 2004/03/26 06:47:49-08:00 axboe@suse.de # [PATCH] ide-cd capacity fix # # Only allow get_last_written() to override get_capacity(), if it is # bigger. # # drivers/ide/ide-cd.c # 2004/03/26 01:19:33-08:00 axboe@suse.de +1 -1 # ide-cd capacity fix # # ChangeSet # 2004/03/25 22:07:08-08:00 benh@kernel.crashing.org # [PATCH] ppc32: arch code preempt fixes # # I figured the best way to stop beeing bothered by users trying to run # preempt was to fix it ;) # # Here's a first batch that close some races we had when testing regs->msr # for altivec or FPU enable, then doing the giveup_* function. A preempt # in between those would have caused us to save a stale altivec or FPU # context. # # arch/ppc/kernel/traps.c # 2004/03/24 18:21:47-08:00 benh@kernel.crashing.org +21 -0 # ppc32: arch code preempt fixes # # arch/ppc/kernel/process.c # 2004/03/24 19:35:07-08:00 benh@kernel.crashing.org +11 -1 # ppc32: arch code preempt fixes # # ChangeSet # 2004/03/25 22:00:32-08:00 benh@kernel.crashing.org # [PATCH] dmasound close timeout # # The dmasound driver occasionally hangs a process on exit. # # Apparently there is a possible case where the sound HW stops draining # output samples and the driver waits forever in its release() callback. # It should check for signals(), but it seems signal_pending() never # returns 1 when the process is beeing killed (implicit release() of files # on exit). # # This patch adds a safety timeout to the release() function to make sure # we can at least close the driver. I'll try to find the reason we aren't # driving samples later, but it is better to have a safety just incase the # sound clock goes berserk for some reason. # # sound/oss/dmasound/dmasound_core.c # 2004/03/24 23:41:02-08:00 benh@kernel.crashing.org +7 -0 # dmasound close timeout # # ChangeSet # 2004/03/25 22:00:19-08:00 benh@kernel.crashing.org # [PATCH] powerbook via-pmu races # # This fixes some racy code in the management of asynchronous brightness # and battery requests in the via-pmu driver used on powerbooks. This # should fix some preempt related problems (there is no SMP powerbook yet :) # # drivers/macintosh/via-pmu.c # 2004/03/24 23:52:00-08:00 benh@kernel.crashing.org +30 -10 # powerbook via-pmu races # # ChangeSet # 2004/03/25 22:00:08-08:00 benh@kernel.crashing.org # [PATCH] adbhid preempt/smp races # # This fixes a few races in the LED code of the adbhid driver that would # affect SMP or preempt. # # drivers/macintosh/adbhid.c # 2004/03/24 21:16:56-08:00 benh@kernel.crashing.org +42 -28 # adbhid preempt/smp races # # ChangeSet # 2004/03/25 21:59:54-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Fix racy access to TI_FLAGS # # The ppc32 syscall entry code could access the thread info flags in a # racy way, thus potentially losing bits sets there at interrupt time or # by another CPU, like NEED_RESCHED or SIGPENDING (ouch !). # # This fixes it by moving the potentially racy bit to a different field (I # preferred that rather than turning the access into an atomic operation # for performances reasons). # # include/asm-ppc/thread_info.h # 2004/03/24 19:03:56-08:00 benh@kernel.crashing.org +15 -6 # ppc32: Fix racy access to TI_FLAGS # # include/asm-ppc/ptrace.h # 2004/03/24 19:02:44-08:00 benh@kernel.crashing.org +4 -1 # ppc32: Fix racy access to TI_FLAGS # # arch/ppc/kernel/entry.S # 2004/03/24 19:10:41-08:00 benh@kernel.crashing.org +5 -4 # ppc32: Fix racy access to TI_FLAGS # # ChangeSet # 2004/03/25 16:43:33-08:00 bjorn.helgaas@hp.com # [PATCH] ia64: fix kernel NULL-pointer message # # Add missing newline to kernel version of NULL-pointer message and also print # the address while we're at it. # # arch/ia64/mm/fault.c # 2004/03/25 07:23:45-08:00 bjorn.helgaas@hp.com +1 -1 # ia64: fix kernel NULL-pointer message # # ChangeSet # 2004/03/25 16:37:55-08:00 jbarnes@sgi.com # [PATCH] ia64: update sn2_defconfig # # # arch/ia64/configs/sn2_defconfig # 2004/03/25 06:18:56-08:00 jbarnes@sgi.com +48 -34 # ia64: update sn2_defconfig # # ChangeSet # 2004/03/25 16:37:02-08:00 davidm@tiger.hpl.hp.com # ia64: Fix typo in unwinder which could cause NULL-pointer dereferences. # # arch/ia64/kernel/unwind.c # 2004/03/25 16:36:55-08:00 davidm@tiger.hpl.hp.com +1 -1 # (run_script): Fix typo which could result in NULL-pointer dereferences # when accessing r4-r7. # # ChangeSet # 2004/03/25 15:06:22-08:00 davem@nuts.davemloft.net # [IGMP]: Do nothing in ip_mc_down() if ip_mc_up() was not called previously. # # net/ipv4/igmp.c # 2004/03/25 15:06:10-08:00 davem@nuts.davemloft.net +5 -0 # [IGMP]: Do nothing in ip_mc_down() if ip_mc_up() was not called previously. # # include/linux/inetdevice.h # 2004/03/25 15:06:10-08:00 davem@nuts.davemloft.net +2 -0 # [IGMP]: Do nothing in ip_mc_down() if ip_mc_up() was not called previously. # # ChangeSet # 2004/03/25 15:06:05-08:00 chas@cmf.nrl.navy.mil # [ATM]: [nicstar] use kernel min/max (by Randy.Dunlap ) # # drivers/atm/nicstar.c # 2004/03/25 15:05:52-08:00 chas@cmf.nrl.navy.mil +1 -4 # [ATM]: [nicstar] use kernel min/max (by Randy.Dunlap ) # # ChangeSet # 2004/03/25 15:05:34-08:00 chas@cmf.nrl.navy.mil # [ATM]: [lec] lec_push() races with vcc->proto_data # # net/atm/lec.c # 2004/03/25 15:02:11-08:00 chas@cmf.nrl.navy.mil +1 -1 # [ATM]: [lec] lec_push() races with vcc->proto_data # # ChangeSet # 2004/03/25 17:40:31-05:00 len.brown@intel.com # [ACPI] PCI interrupt link routing (Luming Yu) # use _PRS to determine resource type for _SRS # fixes HP Proliant servers # http://bugzilla.kernel.org/show_bug.cgi?id=1590 # # drivers/acpi/pci_link.c # 2004/03/25 17:34:37-05:00 len.brown@intel.com +13 -5 # determine resource type from _PRS for benefit of _SRS # todo: retry_programming can probably be deleted # # ChangeSet # 2004/03/25 13:21:41-08:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # arch/sparc64/defconfig # 2004/03/25 13:16:37-08:00 davem@nuts.davemloft.net +3 -3 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/03/25 12:24:52-08:00 davidm@tiger.hpl.hp.com # ia64: Correct value for PREFETCH_STRIDE. # # include/asm-ia64/processor.h # 2004/03/25 12:24:43-08:00 davidm@tiger.hpl.hp.com +1 -1 # (PREFETCH_STRIDE): Correct from 256 to L1_CACHE_BYTES. # # ChangeSet # 2004/03/25 11:54:51-08:00 davidm@tiger.hpl.hp.com # ia64: Minor formatting fix for two earlier patches. # # include/asm-ia64/machvec.h # 2004/03/25 11:54:44-08:00 davidm@tiger.hpl.hp.com +1 -1 # Minor formatting fix. # # arch/ia64/kernel/process.c # 2004/03/25 11:54:44-08:00 davidm@tiger.hpl.hp.com +2 -2 # (default_idle): Minor formatting fix. # # ChangeSet # 2004/03/25 11:53:10-08:00 davidm@tiger.hpl.hp.com # ia64: Improve layout of cpuinfo_ia64 # # Stephane made some measurements on the access-pattern of the cpuinfo_ia64 # members and based on those results, this patch reorganizes the structure # for better cache-line sharing. # # include/asm-ia64/processor.h # 2004/03/25 11:53:03-08:00 davidm@tiger.hpl.hp.com +16 -16 # (cpuinfo_ia64): Restructure to move commonly used members closer together. # Remove unnecessary members "prof_counter", "prof_multiplier", and # "ipi_count". # # arch/ia64/kernel/time.c # 2004/03/25 11:53:03-08:00 davidm@tiger.hpl.hp.com +19 -13 # (timer_interrupt): Replace smp_do_timer() call with a direct call to # update_process_times(). # Fix formatting. # # arch/ia64/kernel/smpboot.c # 2004/03/25 11:53:03-08:00 davidm@tiger.hpl.hp.com +0 -2 # (smp-setup_percpu_timer): Don't bother setting up variables that contain # constant values. # # arch/ia64/kernel/smp.c # 2004/03/25 11:53:03-08:00 davidm@tiger.hpl.hp.com +0 -14 # (handle_IPI): Don't bother incrementing a counter which nobody ever # reads. # (smp_do_timer): Remove. # # ChangeSet # 2004/03/25 19:52:07+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add dma_mapping_error() definition. # # include/asm-arm/dma-mapping.h # 2004/03/25 19:50:12+00:00 rmk@flint.arm.linux.org.uk +8 -0 # Add dma_mapping_error() for ARM. # # ChangeSet # 2004/03/25 10:13:24-08:00 jgarzik@pobox.com # [PATCH] SATA: fix and enable sata-sil # # sata_sil: it's a widely deployed chipset. Now that we've fixed it, let # users use it. # # sata_via: Disk detection via SATA phy registers appear problematic. # Until that problem is identified and fixed, used the old PATA detection # code -- that was used in 2.6.4 -- instead. # # drivers/scsi/sata_via.c # 2004/03/25 04:30:08-08:00 jgarzik@pobox.com +1 -1 # SATA: fix and enable sata-sil # # drivers/scsi/Kconfig # 2004/03/25 04:29:40-08:00 jgarzik@pobox.com +1 -1 # SATA: fix and enable sata-sil # # ChangeSet # 2004/03/25 10:13:09-08:00 akpm@osdl.org # [PATCH] con_close() deadlock fix # # I'd assumed that vcs_remove_devfs() could not possibly take console_sem(). # Seems I was wrong. # # drivers/char/vt.c # 2004/03/25 09:21:46-08:00 akpm@osdl.org +3 -1 # con_close() deadlock fix # # ChangeSet # 2004/03/25 17:58:50+00:00 rmk@flint.arm.linux.org.uk # [ARM] Remove Anakin machine support. # # Anakin has not been maintained since it was (partially) merged, and # the maintainers appear to ignore mail about it. No one appears # willing to maintain it either. However, some unrelated kernel # maintainers have been updating various files while they've been # working in the area - which is wasted work for something which # isn't maintained. # # Therefore, this cset removes Anakin completely from the kernel. # # drivers/video/fbmem.c # 2004/03/25 17:57:01+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin code. # # drivers/video/Makefile # 2004/03/25 17:57:01+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin LCD object. # # drivers/video/Kconfig # 2004/03/25 17:57:01+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin LCD configuration. # # drivers/serial/Makefile # 2004/03/25 17:57:00+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin serial driver object. # # drivers/serial/Kconfig # 2004/03/25 17:57:00+00:00 rmk@flint.arm.linux.org.uk +0 -26 # Remove Anakin serial driver configuration. # # arch/arm26/defconfig # 2004/03/25 17:57:00+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove Anakin default configuration bits. # # arch/arm/mm/Kconfig # 2004/03/25 17:57:00+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Remove Anakin configuration. # # arch/arm/kernel/entry-armv.S # 2004/03/25 17:56:59+00:00 rmk@flint.arm.linux.org.uk +0 -27 # Remove Anakin IRQ entry code. # # arch/arm/kernel/debug.S # 2004/03/25 17:56:59+00:00 rmk@flint.arm.linux.org.uk +0 -31 # Remove Anakin debugging code. # # arch/arm/configs/trizeps_defconfig # 2004/03/25 17:56:59+00:00 rmk@flint.arm.linux.org.uk +0 -3 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/system3_defconfig # 2004/03/25 17:56:59+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/stork_defconfig # 2004/03/25 17:56:59+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/shark_defconfig # 2004/03/25 17:56:58+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/shannon_defconfig # 2004/03/25 17:56:58+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/rpc_defconfig # 2004/03/25 17:56:58+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/pleb_defconfig # 2004/03/25 17:56:58+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/pangolin_defconfig # 2004/03/25 17:56:58+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/netwinder_defconfig # 2004/03/25 17:56:58+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/neponset_defconfig # 2004/03/25 17:56:57+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/lusl7200_defconfig # 2004/03/25 17:56:57+00:00 rmk@flint.arm.linux.org.uk +0 -3 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/lubbock_defconfig # 2004/03/25 17:56:57+00:00 rmk@flint.arm.linux.org.uk +0 -3 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/lart_defconfig # 2004/03/25 17:56:57+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/jornada720_defconfig # 2004/03/25 17:56:57+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/iq80321_defconfig # 2004/03/25 17:56:56+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/iq80310_defconfig # 2004/03/25 17:56:56+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/integrator_defconfig # 2004/03/25 17:56:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/hackkit_defconfig # 2004/03/25 17:56:56+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/h3600_defconfig # 2004/03/25 17:56:56+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/graphicsmaster_defconfig # 2004/03/25 17:56:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/graphicsclient_defconfig # 2004/03/25 17:56:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/fortunet_defconfig # 2004/03/25 17:56:55+00:00 rmk@flint.arm.linux.org.uk +0 -3 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/flexanet_defconfig # 2004/03/25 17:56:55+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/epxa10db_defconfig # 2004/03/25 17:56:55+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/ebsa110_defconfig # 2004/03/25 17:56:55+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/cerfcube_defconfig # 2004/03/25 17:56:55+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/badge4_defconfig # 2004/03/25 17:56:54+00:00 rmk@flint.arm.linux.org.uk +0 -3 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/assabet_defconfig # 2004/03/25 17:56:54+00:00 rmk@flint.arm.linux.org.uk +0 -4 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/adsbitsy_defconfig # 2004/03/25 17:56:54+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove Anakin configuration bits from default configuration file. # # arch/arm/configs/adi_evb_defconfig # 2004/03/25 17:56:54+00:00 rmk@flint.arm.linux.org.uk +0 -3 # Remove Anakin configuration bits from default configuration file. # # arch/arm/boot/Makefile # 2004/03/25 17:56:54+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin makefile bits. # # arch/arm/Makefile # 2004/03/25 17:56:53+00:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove Anakin makefile bits. # # arch/arm/Kconfig # 2004/03/25 17:56:53+00:00 rmk@flint.arm.linux.org.uk +0 -22 # Remove Anakin configuration. # # ChangeSet # 2004/03/25 17:44:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add support for dev->coherent_dma_mask # # This adds AMBA and SA11xx support for dev->coherent_dma_mask. # # include/asm-arm/hardware/amba.h # 2004/03/25 17:43:01+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add dma_mask member to amba_device. # # arch/arm/mach-sa1100/xp860.c # 2004/03/25 17:43:01+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/mach-sa1100/system3.c # 2004/03/25 17:43:01+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/mach-sa1100/pfs168.c # 2004/03/25 17:43:01+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/mach-sa1100/neponset.c # 2004/03/25 17:43:01+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/mach-sa1100/jornada720.c # 2004/03/25 17:43:01+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/mach-sa1100/graphicsmaster.c # 2004/03/25 17:43:01+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/mach-sa1100/generic.c # 2004/03/25 17:43:00+00:00 rmk@flint.arm.linux.org.uk +6 -0 # Add coherent_dma_mask for SA11x0 UDC, MCP, framebuffer and SSP devices. # # arch/arm/mach-sa1100/badge4.c # 2004/03/25 17:43:00+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/mach-sa1100/adsbitsy.c # 2004/03/25 17:43:00+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Set coherent_dma_mask. # # arch/arm/common/sa1111.c # 2004/03/25 17:43:00+00:00 rmk@flint.arm.linux.org.uk +3 -0 # Ensure coherent_dma_mask has the correct bits cleared for the SDRAM # DMA workaround. # # arch/arm/common/amba.c # 2004/03/25 17:43:00+00:00 rmk@flint.arm.linux.org.uk +4 -0 # Warn if AMBA device has coherent_dma_mask unset, but has dma_mask set. # Add dma_mask. # # BitKeeper/deleted/.del-anakinfb.c~de86e30b6863991b # 2004/03/25 17:23:04+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: drivers/video/anakinfb.c # # BitKeeper/deleted/.del-anakin.c~9defb3cd814905cb # 2004/03/25 17:22:58+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: drivers/serial/anakin.c # # BitKeeper/deleted/.del-vmalloc.h~162b484bdcea43e6 # 2004/03/25 17:22:41+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/vmalloc.h # # BitKeeper/deleted/.del-uncompress.h~2f548f4c5c73949a # 2004/03/25 17:22:40+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/uncompress.h # # BitKeeper/deleted/.del-timex.h~11f72c6c7cad4940 # 2004/03/25 17:22:39+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/timex.h # # BitKeeper/deleted/.del-time.h~e0fe1bde6ab852a9 # 2004/03/25 17:22:38+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/time.h # # BitKeeper/deleted/.del-system.h~5a13cc9993df0fc # 2004/03/25 17:22:37+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/system.h # # BitKeeper/deleted/.del-serial_reg.h~e361aa7e9c49f238 # 2004/03/25 17:22:36+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/serial_reg.h # # BitKeeper/deleted/.del-serial.h~b16cf3f756566827 # 2004/03/25 17:22:35+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/serial.h # # BitKeeper/deleted/.del-param.h~7876b9de36cec217 # 2004/03/25 17:22:34+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/param.h # # BitKeeper/deleted/.del-memory.h~740cf083d0518ead # 2004/03/25 17:22:33+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/memory.h # # BitKeeper/deleted/.del-irqs.h~6d7835c736dbb630 # 2004/03/25 17:22:32+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/irqs.h # # BitKeeper/deleted/.del-io.h~d34adb1075ba2c99 # 2004/03/25 17:22:30+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/io.h # # BitKeeper/deleted/.del-ide.h~1243606cf080d7df # 2004/03/25 17:22:30+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/ide.h # # BitKeeper/deleted/.del-hardware.h~a035fc9a27b33ebf # 2004/03/25 17:22:29+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/hardware.h # # BitKeeper/deleted/.del-dma.h~39364be8c26f5d83 # 2004/03/25 17:22:28+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: include/asm-arm/arch-anakin/dma.h # # BitKeeper/deleted/.del-Makefile~8c542153d97a29d2 # 2004/03/25 17:22:01+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: arch/arm/mach-anakin/Makefile # # BitKeeper/deleted/.del-mm.c~1c08b797e1e67483 # 2004/03/25 17:22:00+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: arch/arm/mach-anakin/mm.c # # BitKeeper/deleted/.del-irq.c~5304e86038c05148 # 2004/03/25 17:21:59+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: arch/arm/mach-anakin/irq.c # # BitKeeper/deleted/.del-arch.c~787af8b2a2577ffa # 2004/03/25 17:21:58+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: arch/arm/mach-anakin/arch.c # # ChangeSet # 2004/03/25 09:06:31-08:00 jgarzik@pobox.com # [PATCH] forgotten pci_dma_mapping_error on x86-64 # # x86-64 needs this (obvious) patch, due to the rename. # # include/asm-x86_64/pci.h # 2004/03/25 03:52:35-08:00 jgarzik@pobox.com +1 -1 # forgotten pci_dma_mapping_error on x86-64 # # ChangeSet # 2004/03/25 08:13:41-08:00 wesolows@foobazco.org # Merge foobazco.org:/sources/2.5-sparc-smp # into foobazco.org:/sources/2.5-sparc-todave # # arch/sparc/kernel/entry.S # 2004/03/25 08:13:38-08:00 wesolows@foobazco.org +0 -0 # Auto merged # # ChangeSet # 2004/03/25 08:11:23-08:00 wesolows@foobazco.org # [SPARC32]: Use correct atomic initializer for semaphore counters # # Semaphores use 24-bit atomics, not 32. Using the wrong initializer # causes immediate deadlock under SMP, and incorrect results under UP. # # ChangeSet # 2004/03/25 08:09:28-08:00 akpm@osdl.org # [PATCH] ia64: don't prompt for the floppy driver # # From: David Mosberger # # From: Bjorn Helgaas # # We can't build floppy.o on ia64, so why bother asking? # # drivers/block/Kconfig # 2004/03/25 00:39:56-08:00 akpm@osdl.org +1 -1 # ia64: don't prompt for the floppy driver # # ChangeSet # 2004/03/25 08:09:13-08:00 akpm@osdl.org # [PATCH] don't show cdroms in /proc/partitions # # From: Jens Axboe # # Currently SCSI cdroms show up in /proc/partitions in 2.6, they didn't in # 2.4. And ATAPI cdroms don't show up either. Mark both as genhd removable # for now, when they are partionable this can be updated. # # include/asm-sparc/semaphore.h # 2004/03/25 08:09:10-08:00 wesolows@foobazco.org +1 -1 # [SPARC32]: Use correct atomic initializer for semaphore counters. # # drivers/scsi/sr.c # 2004/03/25 00:39:55-08:00 akpm@osdl.org +1 -0 # don't show cdroms in /proc/partitions # # drivers/ide/ide-cd.c # 2004/03/25 00:39:55-08:00 akpm@osdl.org +1 -0 # don't show cdroms in /proc/partitions # # ChangeSet # 2004/03/25 08:08:59-08:00 akpm@osdl.org # [PATCH] Broken CDROMs default to writeable # # From: Jens Axboe # # If the drive doesn't support GPCMD_READ_DISC_INFO at all, permit writeable # opens. # # drivers/cdrom/cdrom.c # 2004/03/25 00:39:55-08:00 akpm@osdl.org +11 -2 # Broken CDROMs default to writeable # # ChangeSet # 2004/03/25 08:08:43-08:00 akpm@osdl.org # [PATCH] ext2&3: use the right i_flags in find_group_orlov() # # Spotted by Jorn Engel : both the generic and # fs-specific parts of the inode have an i_flags. find_group_orlov() is using # the wrong one. # # fs/ext3/ialloc.c # 2004/03/25 00:39:55-08:00 akpm@osdl.org +1 -1 # ext2&3: use the right i_flags in find_group_orlov() # # fs/ext2/ialloc.c # 2004/03/25 00:39:55-08:00 akpm@osdl.org +1 -1 # ext2&3: use the right i_flags in find_group_orlov() # # ChangeSet # 2004/03/25 08:08:29-08:00 akpm@osdl.org # [PATCH] null-terminate sb->s_id # # strncpy() may not null-terminate the destination. # # fs/super.c # 2004/03/25 00:39:55-08:00 akpm@osdl.org +1 -1 # null-terminate sb->s_id # # ChangeSet # 2004/03/25 08:08:17-08:00 akpm@osdl.org # [PATCH] ppc64: SMT snooze fix in idle loop # # From: Olof Johansson # # A smt_snooze_delay of 0 is supposed to mean "disabled", but current idle # loop logic doesn't take that into account and snoozes immediately instead. # # Below patch fixes the logic in the idle loop, as well as cleans up the test # a bit. An idling processor might no longer see a snooze change # immediately, but that's not needed anyway. # # arch/ppc64/kernel/idle.c # 2004/03/25 00:39:55-08:00 akpm@osdl.org +4 -4 # ppc64: SMT snooze fix in idle loop # # ChangeSet # 2004/03/25 08:08:02-08:00 akpm@osdl.org # [PATCH] ppc64: getdents patch for 32 -> 64 converter # # From: Anton Blanchard # # From: Marcus Meissner # # With 2.6.4 we now have the glorious hidden d_type passing in getdents. # # glibc CVS expects this to be passed if we have a kernel version after # 2.6.4, so we have to also handle it in the 32bit syscall converter. # # arch/ppc64/kernel/sys_ppc32.c # 2004/03/25 00:40:38-08:00 akpm@osdl.org +2 -1 # ppc64: getdents patch for 32 -> 64 converter # # arch/ppc64/kernel/sys_ppc32.c # 2004/03/25 06:12:16-08:00 anton@samba.org +5 -6 # ppc64: fix mount compat translation bug # # ChangeSet # 2004/03/25 10:26:12+00:00 daniel.ritz@ch.rmk.(none) # [PCMCIA] attack of the clones # # Patch from: Daniel Ritz # # This patch adds the TI clones from ENE to the override list # in yenta_socket.c. # # include/linux/pci_ids.h # 2004/03/25 10:20:52+00:00 daniel.ritz@ch.rmk.(none) +6 -0 # [PATCH] attack of the clones # # drivers/pcmcia/yenta_socket.c # 2004/03/25 10:20:36+00:00 daniel.ritz@ch.rmk.(none) +5 -0 # [PATCH] attack of the clones # # ChangeSet # 2004/03/25 10:11:59+00:00 a.othieno@ch.rmk.(none) # [ARM] arch/arm/boot/Makefile: s/quite_cmd_mknote/quiet_cmd_mknote/ # # Patch from: Arthur Othieno # # This fixes a typo in arch/arm/boot/Makefile. # # arch/arm/boot/Makefile # 2004/03/25 10:08:41+00:00 a.othieno@ch.rmk.(none) +1 -1 # [PATCH] arch/arm/boot/Makefile: s/quite_cmd_mknote/quiet_cmd_mknote/ # # ChangeSet # 2004/03/25 10:07:15+00:00 rmk@flint.arm.linux.org.uk # [ARM] arch_arm_mach-sa1100_Kconfig URL update # # Patch from: Rusty Russell # # From: Petri Koistinen # # URL updates. # # arch/arm/mach-sa1100/Kconfig # 2004/03/25 10:03:35+00:00 rusty@au.rmk.(none) +6 -6 # [PATCH] arch_arm_mach-sa1100_Kconfig URL update # # ChangeSet # 2004/03/24 21:44:16-08:00 anton@samba.org # [PATCH] ppc64: fix mount compat translation bug # # From Dave Miller: # # We weren't handling a NULL 'type' argument to mount() properly, # f.e. this happens legitimately when changing the options of an # existing mount. # # ChangeSet # 2004/03/24 14:18:54-08:00 floroiu@fokus.fraunhofer.de # [IPSEC]: Missing family settings in af_key and xfrm_user. # # net/xfrm/xfrm_user.c # 2004/03/24 14:18:34-08:00 floroiu@fokus.fraunhofer.de +1 -0 # [IPSEC]: Missing family settings in af_key and xfrm_user. # # net/key/af_key.c # 2004/03/24 14:18:34-08:00 floroiu@fokus.fraunhofer.de +1 -0 # [IPSEC]: Missing family settings in af_key and xfrm_user. # # ChangeSet # 2004/03/24 14:05:05-08:00 krkumar@us.ibm.com # [IPV6]: Error is option length increases amidst corking. # # net/ipv6/ip6_output.c # 2004/03/24 14:04:52-08:00 krkumar@us.ibm.com +3 -0 # [IPV6]: Error is option length increases amidst corking. # # ChangeSet # 2004/03/24 14:01:20-08:00 bjorn.helgaas@hp.com # [PATCH] ia64: fix name conflict with handle_exception() # # I tried to build usb/gadget/file_storage.c (CONFIG_USB_FILE_STORAGE=y), # but it uses "handle_exception()" for its own purposes, which conflicts # with the ia64 definition. ia64 only uses handle_exception() within # arch code, so it seems like we ought to rename it to be ia64-specific. # done_with_exception() looks similar, so I renamed it as well, although # there's no actual conflict. # # include/asm-ia64/uaccess.h # 2004/03/24 04:39:48-08:00 bjorn.helgaas@hp.com +3 -3 # ia64: fix name conflict with handle_exception() # # arch/ia64/mm/fault.c # 2004/03/24 04:40:32-08:00 bjorn.helgaas@hp.com +1 -1 # ia64: fix name conflict with handle_exception() # # arch/ia64/mm/extable.c # 2004/03/24 04:41:13-08:00 bjorn.helgaas@hp.com +1 -1 # ia64: fix name conflict with handle_exception() # # arch/ia64/kernel/unaligned.c # 2004/03/24 05:05:41-08:00 bjorn.helgaas@hp.com +1 -1 # ia64: fix name conflict with handle_exception() # # arch/ia64/kernel/traps.c # 2004/03/24 04:40:30-08:00 bjorn.helgaas@hp.com +1 -1 # ia64: fix name conflict with handle_exception() # # ChangeSet # 2004/03/24 13:57:06-08:00 dtor_core@ameritech.net # [NET_SCHED]: Trailing whitespace cleanup in TBF qdisc. # # net/sched/sch_tbf.c # 2004/03/24 13:56:54-08:00 dtor_core@ameritech.net +34 -34 # [NET_SCHED]: Trailing whitespace cleanup in TBF qdisc. # # ChangeSet # 2004/03/24 13:55:48-08:00 dtor_core@ameritech.net # [NET_SCHED]: Fix class reporting in TBF qdisc. # # The patch below fixes issue with 'tc class show dev ' not showing any # classes when TBF qdisc is present in the chain. PLease consider for # inclusion. # # net/sched/sch_tbf.c # 2004/03/24 13:55:35-08:00 dtor_core@ameritech.net +3 -6 # [NET_SCHED]: Fix class reporting in TBF qdisc. # # The patch below fixes issue with 'tc class show dev ' not showing any # classes when TBF qdisc is present in the chain. PLease consider for # inclusion. # # ChangeSet # 2004/03/24 13:54:40-08:00 wensong@linux-vs.org # [IPVS]: Fix to hold the lock before updating a service # # Brett E. noticed the missing service lock # for editing dest. # # Julian Anastasov provided the patch. # # net/ipv4/ipvs/ip_vs_ctl.c # 2004/03/24 13:54:27-08:00 wensong@linux-vs.org +7 -0 # [IPVS]: Fix to hold the lock before updating a service # # Brett E. noticed the missing service lock # for editing dest. # # Julian Anastasov provided the patch. # # ChangeSet # 2004/03/24 13:53:57-08:00 davem@nuts.davemloft.net # [IPV4]: Zap CONFIG_INET_ECN, just always off by default. # # net/ipv4/tcp_input.c # 2004/03/24 13:48:43-08:00 davem@nuts.davemloft.net +0 -4 # [IPV4]: Zap CONFIG_INET_ECN, just always off by default. # # net/ipv4/tcp_diag.c # 2004/03/24 13:48:43-08:00 davem@nuts.davemloft.net +0 -2 # [IPV4]: Zap CONFIG_INET_ECN, just always off by default. # # net/ipv4/Kconfig # 2004/03/24 13:48:42-08:00 davem@nuts.davemloft.net +0 -19 # [IPV4]: Zap CONFIG_INET_ECN, just always off by default. # # ChangeSet # 2004/03/24 14:17:44-06:00 shaggy@austin.ibm.com # JFS: don't use global lock in lmLogSync when local lock is sufficient # # I stupidly used the global jfs_log_sem to protect log->sb_list when # implementing the shared journal stuff. Since we already hold # LOG_LOCK, it makes more sense to use that to protect log->sb_list. # This caused horrible serialization when running on lots of jfs # volumes. # # fs/jfs/jfs_logmgr.c # 2004/03/24 14:17:37-06:00 shaggy@austin.ibm.com +6 -2 # Remove stupid global lock in lmLogSync # # ChangeSet # 2004/03/24 12:16:41-08:00 davem@nuts.davemloft.net # [SPARC64]: Do not use cast exprs as lvalues. # # include/asm-sparc64/pgalloc.h # 2004/03/24 12:16:19-08:00 davem@nuts.davemloft.net +7 -6 # [SPARC64]: Do not use cast exprs as lvalues. # # ChangeSet # 2004/03/24 12:13:47-08:00 davem@nuts.davemloft.net # [SPARC64]: Provide d_type in sys32_getdents(). # # ChangeSet # 2004/03/24 14:11:52-06:00 shaggy@austin.ibm.com # JFS: Prevent hang in __lock_metapage # # Remove the hold_metapage call from txLog to prevent a hang. # While investigating this one, I audited all functions that held # metapage locks and found several error paths that did not release # them correctly. These are fixed as well. # # fs/jfs/jfs_xtree.c # 2004/03/24 14:11:46-06:00 shaggy@austin.ibm.com +116 -95 # Make sure metapages are properly released in error paths # # fs/jfs/jfs_txnmgr.c # 2004/03/24 14:11:46-06:00 shaggy@austin.ibm.com +1 -5 # There is no need to hold_metapage during txLog. Other locking is # sufficient to keep other threads from changing the page. Holding # the metapage can cause a hang. # # fs/jfs/jfs_imap.c # 2004/03/24 14:11:46-06:00 shaggy@austin.ibm.com +7 -0 # Make sure metapages are properly released in error paths # # fs/jfs/jfs_dtree.c # 2004/03/24 14:11:46-06:00 shaggy@austin.ibm.com +12 -4 # Make sure metapages are properly released in error paths # # fs/jfs/jfs_dmap.c # 2004/03/24 14:11:45-06:00 shaggy@austin.ibm.com +11 -5 # Make sure metapages are properly released in error paths # # arch/sparc64/kernel/sys_sparc32.c # 2004/03/24 12:08:42-08:00 davem@nuts.davemloft.net +2 -1 # [SPARC64]: Provide d_type in sys32_getdents(). # # ChangeSet # 2004/03/24 07:27:03-08:00 paulus@samba.org # [PATCH] fix ppc32 sys_swapcontext # # This fixes a bug in the swapcontext system call on ppc32. # # On ppc32, the system call entry only saves the volatile registers, # except in the case of a few system calls (e.g. fork) which need all the # registers saved. Swapcontext needs all the registers but we weren't # saving them all. So fixes that. # # arch/ppc/kernel/misc.S # 2004/03/23 14:46:40-08:00 paulus@samba.org +1 -1 # fix ppc32 sys_swapcontext # # arch/ppc/kernel/entry.S # 2004/03/23 14:47:12-08:00 paulus@samba.org +8 -0 # fix ppc32 sys_swapcontext # # ChangeSet # 2004/03/24 07:26:51-08:00 paulus@samba.org # [PATCH] Threaded core dumps for PPC32 # # At the moment, ppc32 kernels will oops if a threaded program tries to # dump core. We call dump_fpu with a NULL regs pointer, which it tries # to dereference. # # This fixes the issue by implementing the hooks used in doing threaded # core dumps properly. # # include/asm-ppc/elf.h # 2004/03/23 18:49:17-08:00 paulus@samba.org +10 -4 # Threaded core dumps for PPC32 # # arch/ppc/kernel/process.c # 2004/03/23 17:55:33-08:00 paulus@samba.org +4 -5 # Threaded core dumps for PPC32 # # drivers/net/bmac.c # 2004/03/24 02:05:20-08:00 benh@kernel.crashing.org +3 -3 # Cosmetic fix of BMAC boot messages # # drivers/serial/pmac_zilog.c # 2004/03/24 02:01:17-08:00 benh@kernel.crashing.org +1 -1 # More pmac-zilog sleep fix # # ChangeSet # 2004/03/24 00:26:40-08:00 davem@nuts.davemloft.net # [SPARC64]: Handle NULL type arg properly in sys32_mount(). # # arch/sparc64/kernel/sys_sparc32.c # 2004/03/24 00:21:42-08:00 davem@nuts.davemloft.net +5 -6 # [SPARC64]: Handle NULL type arg properly in sys32_mount(). # # ChangeSet # 2004/03/23 18:05:17-08:00 willy@debian.org # [PATCH] ia64: Fix SAL 3.2 detection # # This important fix checks the SAl *revision* rather than # the *version*. I carefully documented which was which, then used the # wrong one. # # arch/ia64/pci/pci.c # 2004/03/23 17:55:32-08:00 willy@debian.org +2 -1 # ia64: Fix SAL 3.2 detection # # ChangeSet # 2004/03/23 17:31:57-08:00 benh@kernel.crashing.org # [PATCH] Cosmetic fix of BMAC boot messages # # This fixes the display of the boot messages on the BMAC driver (pmac # only). It used to be messed up in 2.6 # # ChangeSet # 2004/03/23 17:31:46-08:00 benh@kernel.crashing.org # [PATCH] More pmac-zilog sleep fix # # In the long story of "BenH can't get a simple fix right the first time", # please add this one to pmac_zilog, and now people should enjoy really # working sleep again on pmac laptops ... # # If the serial port was closed, we could use an uninitialized "pwr_delay" # and pass that to schedule_timeout(). # # ChangeSet # 2004/03/23 17:14:03-08:00 markgw@sgi.com # [PATCH] ia64: deprecate SN2 linkstatd # # This patch against 2.6.5-rc2 affects the SGI/SN platform only. It deprecates # a kernel daemon for our interconnect traffic statistics which has been # replaced by a userland tool. # # include/asm-ia64/sn/sndrv.h # 2004/03/23 06:36:53-08:00 markgw@sgi.com +5 -0 # ia64: deprecate SN2 linkstatd # # arch/ia64/sn/kernel/sn2/sn_proc_fs.c # 2004/03/23 06:36:53-08:00 markgw@sgi.com +0 -48 # ia64: deprecate SN2 linkstatd # # arch/ia64/sn/io/sn2/shub.c # 2004/03/23 06:45:27-08:00 markgw@sgi.com +37 -255 # ia64: deprecate SN2 linkstatd # # ChangeSet # 2004/03/23 16:56:33-08:00 alex.williamson@hp.com # [PATCH] ia64: lost sx1000 naming in sba_iommu # # Mainly cosmetic, but Bjorn noticed I got a little over zealous in # cleaning out the sx1000 specific init routines in sba_iommu. This adds # back in the ID->name mapping so it doesn't show up as "Unknown". # # arch/ia64/hp/common/sba_iommu.c # 2004/03/22 02:52:38-08:00 alex.williamson@hp.com +1 -0 # ia64: lost sx1000 naming in sba_iommu # # ChangeSet # 2004/03/23 16:55:38-08:00 jbarnes@sgi.com # [PATCH] ia64: quiet sn_serial driver # # Bjorn pointed out that the sn console driver will spew printks if # compiled in even if no hardware is present. In addition to fixing # that, I took the opportunity to cleanup/correct a few other printks in # that driver. # # drivers/char/sn_serial.c # 2004/03/22 02:29:18-08:00 jbarnes@sgi.com +9 -9 # ia64: quiet sn_serial driver # # ChangeSet # 2004/03/23 16:54:17-08:00 kaos@sgi.com # [PATCH] ia64: SN2 salinfo oemdata race fix # # sn_oemdata_* variables must only be used under the sn_oemdata_mutex. # # arch/ia64/sn/kernel/mca.c # 2004/03/23 16:00:00-08:00 kaos@sgi.com +1 -1 # ia64: SN2 salinfo oemdata race fix # # ChangeSet # 2004/03/23 16:28:56-08:00 davidm@tiger.hpl.hp.com # ia64: Manual merge of Andrew/Alex/Bjorn's dma_mapping_error() changes. # # include/asm-ia64/machvec_hpzx1.h # 2004/03/23 16:28:49-08:00 davidm@tiger.hpl.hp.com +3 -1 # (sba_dma_mapping_error): New function. # (platform_dma_mapping_error): New macro. # # include/asm-ia64/dma-mapping.h # 2004/03/23 16:28:49-08:00 davidm@tiger.hpl.hp.com +2 -1 # (dma_mapping_error): New macro. # # ChangeSet # 2004/03/23 16:27:06-08:00 akpm@osdl.org # [PATCH] ia64: add dma_mapping_error() support # # # include/asm-ia64/machvec_sn2.h # 2004/03/22 06:34:46-08:00 akpm@osdl.org +2 -0 # ia64: add dma_mapping_error() support # # include/asm-ia64/machvec.h # 2004/03/22 06:34:46-08:00 akpm@osdl.org +8 -0 # ia64: add dma_mapping_error() support # # arch/ia64/sn/io/machvec/pci_dma.c # 2004/03/22 06:34:46-08:00 akpm@osdl.org +7 -0 # ia64: add dma_mapping_error() support # # arch/ia64/lib/swiotlb.c # 2004/03/22 06:34:46-08:00 akpm@osdl.org +7 -0 # ia64: add dma_mapping_error() support # # arch/ia64/hp/common/sba_iommu.c # 2004/03/22 06:34:46-08:00 akpm@osdl.org +7 -0 # ia64: add dma_mapping_error() support # # ChangeSet # 2004/03/23 10:58:31-08:00 sri@us.ibm.com # [SCTP] Avoid the use of hackish CONFIG_IPV6_SCTP__ option. # # net/sctp/Kconfig # 2004/03/23 10:58:14-08:00 sri@us.ibm.com +2 -6 # [SCTP] Avoid the use of hackish CONFIG_IPV6_SCTP__ option. # # ChangeSet # 2004/03/23 10:50:56-08:00 sri@us.ibm.com # [SCTP] Don't do any ppid byte-order conversions as it is opaque to SCTP. # # net/sctp/ulpevent.c # 2004/03/23 10:50:38-08:00 sri@us.ibm.com +1 -1 # [SCTP] Don't do any ppid byte-order conversions as it is opaque to SCTP. # # net/sctp/sm_make_chunk.c # 2004/03/23 10:50:38-08:00 sri@us.ibm.com +1 -1 # [SCTP] Don't do any ppid byte-order conversions as it is opaque to SCTP. # # ChangeSet # 2004/03/23 10:32:21-08:00 akpm@osdl.org # [PATCH] rename dma_error() # # We're getting namespace collisions from the new dma_error(), and it wasn't a # well-chosen identifier. Rename it to dma_mapping_error(). # # include/asm-sparc64/pci.h # 2004/03/23 10:15:42-08:00 akpm@osdl.org +1 -1 # rename dma_error() # # include/asm-ppc64/pci.h # 2004/03/23 10:12:38-08:00 akpm@osdl.org +1 -1 # rename dma_error() # # include/asm-i386/dma-mapping.h # 2004/03/23 10:12:38-08:00 akpm@osdl.org +1 -1 # rename dma_error() # # include/asm-generic/pci-dma-compat.h # 2004/03/23 10:12:38-08:00 akpm@osdl.org +2 -2 # rename dma_error() # # include/asm-generic/dma-mapping.h # 2004/03/23 10:12:38-08:00 akpm@osdl.org +2 -2 # rename dma_error() # # Documentation/DMA-mapping.txt # 2004/03/23 10:12:38-08:00 akpm@osdl.org +2 -2 # rename dma_error() # # Documentation/DMA-API.txt # 2004/03/23 10:12:38-08:00 akpm@osdl.org +3 -3 # rename dma_error() # # ChangeSet # 2004/03/23 10:09:08-08:00 jsimmons@infradead.org # [PATCH] tgafb: missing include # # This is a temporary fix, pending fuller TGA updates. # # From: Christian Vogel: # # drivers/video/tgafb.c is missing a include, complaining about # color_table[] and others not being defined. # # drivers/video/tgafb.c # 2004/03/22 08:15:38-08:00 jsimmons@infradead.org +1 -0 # tgafb: missing include # # ChangeSet # 2004/03/23 07:25:52-08:00 akpm@osdl.org # [PATCH] i386 Kconfig typo fix # # From: Armin Schindler # # just a small patch to fix a typo. # # arch/i386/Kconfig # 2004/03/23 02:05:27-08:00 akpm@osdl.org +1 -1 # i386 Kconfig typo fix # # ChangeSet # 2004/03/23 07:25:38-08:00 akpm@osdl.org # [PATCH] fbcon font cloning fix # # From: Petr Baudis # # This patch fixes a bug which I hit when migrating from 2.4. Basically, # when I do setfont during the system boot, the then-spawned ttys do not # retain the new font but fall back to the default one. # # I've tracked that down to a clearly bogus test in fbcon_set_display(), # because vc->vc_font.width is not set at that time yet (no font has been # loaded for the new vc). But even if it would (or this was meant to test # against tmp->vc_font.width), it would mean only *HUGE* fonts would be # retained. And even if there were *two* bugs there and it was supposed to # be less-than there, I couldn't make a sense of the test. # # drivers/video/console/fbcon.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +10 -12 # fbcon font cloning fix # # ChangeSet # 2004/03/23 07:25:24-08:00 akpm@osdl.org # [PATCH] Work around compiler error in proc_misc.c # # From: Alan Stern # # A change which was recently applied to fs/proc/proc_misc.c included a comment # about splitting a seq_printf into two pieces to work around a bug in # gcc-2.95.3. Unfortunately gcc-2.96 still chokes on the statements. The # patch below makes it work better and tidies the code up a bit. # # fs/proc/proc_misc.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +17 -17 # Work around compiler error in proc_misc.c # # ChangeSet # 2004/03/23 07:25:10-08:00 akpm@osdl.org # [PATCH] sh: various fixes # # From: Paul Mundt # # This is the rest of the sh update, which includes everything else # sh-specific, general cleanups, bugfixes, etc. Nothing really eventful. # # include/linux/miscdevice.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +1 -0 # sh: various fixes # # include/asm-sh/signal.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +12 -0 # sh: various fixes # # include/asm-sh/processor.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +1 -0 # sh: various fixes # # include/asm-sh/pgtable.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -0 # sh: various fixes # # include/asm-sh/irq.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +6 -1 # sh: various fixes # # include/asm-sh/hp6xx/hp6xx.h # 2004/03/23 07:25:04-08:00 akpm@osdl.org +19 -0 # # include/asm-sh/hd64461/io.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +9 -3 # sh: various fixes # # include/asm-sh/hd64461/hd64461.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +91 -12 # sh: various fixes # # include/asm-sh/cpu-sh3/dac.h # 2004/03/23 07:25:04-08:00 akpm@osdl.org +42 -0 # # include/asm-sh/cpu-sh3/cacheflush.h # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -0 # sh: various fixes # # drivers/net/stnic.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +1 -1 # sh: various fixes # # drivers/input/mouse/maplemouse.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +5 -9 # sh: various fixes # # drivers/input/keyboard/maple_keyb.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +5 -8 # sh: various fixes # # drivers/char/watchdog/shwdt.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +1 -1 # sh: various fixes # # arch/sh/mm/ioremap.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -2 # sh: various fixes # # arch/sh/mm/init.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +3 -2 # sh: various fixes # # arch/sh/mm/cache-sh4.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +49 -20 # sh: various fixes # # arch/sh/kernel/traps.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +5 -1 # sh: various fixes # # arch/sh/kernel/time.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +12 -8 # sh: various fixes # # arch/sh/kernel/sys_sh.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +34 -8 # sh: various fixes # # arch/sh/kernel/sh_ksyms.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -0 # sh: various fixes # # arch/sh/kernel/process.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +8 -11 # sh: various fixes # # arch/sh/kernel/module.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +8 -6 # sh: various fixes # # arch/sh/kernel/io.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +6 -4 # sh: various fixes # # arch/sh/kernel/entry.S # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -5 # sh: various fixes # # arch/sh/kernel/cpu/sh4/sq.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +46 -66 # sh: various fixes # # arch/sh/kernel/cpu/irq_ipr.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +1 -0 # sh: various fixes # # arch/sh/kernel/cf-enabler.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -2 # sh: various fixes # # arch/sh/cchips/hd6446x/hd64461/setup.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +43 -19 # sh: various fixes # # arch/sh/cchips/hd6446x/hd64461/io.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +17 -2 # sh: various fixes # # arch/sh/cchips/Kconfig # 2004/03/23 02:05:27-08:00 akpm@osdl.org +8 -1 # sh: various fixes # # arch/sh/boards/se/770x/irq.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -2 # sh: various fixes # # arch/sh/boards/se/770x/io.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +13 -9 # sh: various fixes # # arch/sh/Kconfig # 2004/03/23 02:05:27-08:00 akpm@osdl.org +17 -346 # sh: various fixes # # include/asm-sh/hp6xx/hp6xx.h # 2004/03/23 07:25:04-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-sh/hp6xx/hp6xx.h # # include/asm-sh/cpu-sh3/dac.h # 2004/03/23 07:25:04-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-sh/cpu-sh3/dac.h # # arch/sh/boards/hp6xx/hp680/setup.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +16 -2 # sh: various fixes # # arch/sh/boards/hp6xx/hp680/mach.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +26 -22 # sh: various fixes # # BitKeeper/deleted/.del-io.h~f29a470dccc35883 # 2004/03/23 07:25:04-08:00 akpm@osdl.org +0 -0 # Delete: include/asm-sh/sh2000/io.h # # BitKeeper/deleted/.del-io.h~ef516e92706ccf1b # 2004/03/23 07:25:04-08:00 akpm@osdl.org +0 -0 # Delete: include/asm-sh/dreamcast/io.h # # ChangeSet # 2004/03/23 07:24:24-08:00 akpm@osdl.org # [PATCH] sh: sh-specific framebuffer updates # # From: Paul Mundt # # This includes sh-specific framebuffer updates, including updates to hitfb and # pvr2fb, as well as adding sh to the pgprot_writecombine() users in fb_mmap(). # # drivers/video/pvr2fb.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +2 -0 # sh: sh-specific framebuffer updates # # drivers/video/hitfb.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +169 -173 # sh: sh-specific framebuffer updates # # drivers/video/fbmem.c # 2004/03/23 02:05:27-08:00 akpm@osdl.org +1 -3 # sh: sh-specific framebuffer updates # # ChangeSet # 2004/03/23 07:24:11-08:00 akpm@osdl.org # [PATCH] sh: hugetlb support # # From: Paul Mundt # # This implements hugetlb support for SH-4. SH-4 supports 1k/4k/64k/1MB pages, # since we're only interested in the 64k/1MB sizes, this is what we support. # # The sh hugetlbpage code borrows heavily off of the sparc64 port, which works # fine for these cases at this point in time. # # arch/sh/mm/hugetlbpage.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +519 -0 # sh: hugetlb support # # include/asm-sh/pgtable.h # 2004/03/23 02:05:42-08:00 akpm@osdl.org +18 -9 # sh: hugetlb support # # include/asm-sh/page.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +12 -0 # sh: hugetlb support # # fs/Kconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1 -1 # sh: hugetlb support # # arch/sh/mm/tlb-sh4.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1 -1 # sh: hugetlb support # # arch/sh/mm/hugetlbpage.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/sh/mm/hugetlbpage.c # # arch/sh/mm/Makefile # 2004/03/23 02:05:26-08:00 akpm@osdl.org +2 -1 # sh: hugetlb support # # arch/sh/Kconfig # 2004/03/23 02:05:42-08:00 akpm@osdl.org +13 -0 # sh: hugetlb support # # ChangeSet # 2004/03/23 07:23:59-08:00 akpm@osdl.org # [PATCH] sh: DMA Mapping API # # From: Paul Mundt # # This implements the DMA mapping API for sh, as well as cleaning up some # sh-specific DMA drivers. # # include/asm-sh/pci.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +4 -170 # sh: DMA Mapping API # # include/asm-sh/dma.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +4 -1 # sh: DMA Mapping API # # include/asm-sh/dma-mapping.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +165 -1 # sh: DMA Mapping API # # include/asm-sh/cpu-sh4/dma.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1 -1 # sh: DMA Mapping API # # arch/sh/mm/pg-dma.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1 -1 # sh: DMA Mapping API # # arch/sh/mm/consistent.c # 2004/03/23 07:23:53-08:00 akpm@osdl.org +79 -0 # # arch/sh/drivers/pci/dma-dreamcast.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +2 -2 # sh: DMA Mapping API # # arch/sh/drivers/pci/Makefile # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -1 # sh: DMA Mapping API # # arch/sh/drivers/pci/Kconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1 -5 # sh: DMA Mapping API # # arch/sh/drivers/dma/dma-sh.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +5 -1 # sh: DMA Mapping API # # arch/sh/drivers/dma/dma-sh.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +49 -61 # sh: DMA Mapping API # # arch/sh/drivers/dma/dma-api.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +6 -0 # sh: DMA Mapping API # # arch/sh/drivers/dma/Kconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +14 -1 # sh: DMA Mapping API # # arch/sh/mm/consistent.c # 2004/03/23 07:23:53-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/sh/mm/consistent.c # # BitKeeper/deleted/.del-pci-dma.c~df5a80b3bc68220a # 2004/03/23 07:23:53-08:00 akpm@osdl.org +0 -0 # Delete: arch/sh/drivers/pci/pci-dma.c # # ChangeSet # 2004/03/23 07:23:33-08:00 akpm@osdl.org # [PATCH] sh: DAC ODD driver # # From: Paul Mundt # # SuperH DAC OSS driver. # # sound/oss/sh_dac_audio.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +325 -0 # sh: DAC ODD driver # # sound/oss/sh_dac_audio.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/sound/oss/sh_dac_audio.c # # sound/oss/Makefile # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1 -0 # sh: DAC ODD driver # # sound/oss/Kconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +8 -0 # sh: DAC ODD driver # # ChangeSet # 2004/03/23 07:23:22-08:00 akpm@osdl.org # [PATCH] sh: port sh-sci driver to the new API # # From: Paul Mundt # # This ports the sh-sci driver to the new API. sh and h8 both use this. The # intention is to leave the drivers/char sh-sci in place for a short period of # time until all the h8 people are on the new driver (sh no longer uses the # drivers/char version). # # drivers/serial/sh-sci.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +435 -0 # sh: port sh-sci driver to the new API # # drivers/serial/sh-sci.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1503 -0 # sh: port sh-sci driver to the new API # # include/linux/serial_core.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +5 -0 # sh: port sh-sci driver to the new API # # drivers/serial/sh-sci.h # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/sh-sci.h # # drivers/serial/sh-sci.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/sh-sci.c # # drivers/serial/Makefile # 2004/03/23 02:05:26-08:00 akpm@osdl.org +1 -0 # sh: port sh-sci driver to the new API # # drivers/serial/Kconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +11 -1 # sh: port sh-sci driver to the new API # # ChangeSet # 2004/03/23 07:23:07-08:00 akpm@osdl.org # [PATCH] sh: update defconfigs # # From: Paul Mundt # # This patch updates the sh defconfigs to use the board_defconfig format # instead of the defconfig-board format that sh was using before. Since Sam # Ravnborg already added the automated archhelp stuff that sh was using to the # top-level Makefile, the sh version can be killed off. # # arch/sh/configs/systemh_defconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # sh: update defconfigs # # arch/sh/configs/snapgear_defconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # sh: update defconfigs # # arch/sh/configs/se7751_defconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # sh: update defconfigs # # arch/sh/configs/hp680_defconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +8 -18 # sh: update defconfigs # # arch/sh/configs/dreamcast_defconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +216 -85 # sh: update defconfigs # # arch/sh/configs/cqreek_defconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # sh: update defconfigs # # arch/sh/configs/adx_defconfig # 2004/03/23 02:05:26-08:00 akpm@osdl.org +0 -0 # sh: update defconfigs # # arch/sh/Makefile # 2004/03/23 02:05:26-08:00 akpm@osdl.org +2 -15 # sh: update defconfigs # # Documentation/sh/new-machine.txt # 2004/03/23 02:05:26-08:00 akpm@osdl.org +6 -6 # sh: update defconfigs # # ChangeSet # 2004/03/23 07:22:26-08:00 akpm@osdl.org # [PATCH] ppc64: iSeries virtual console cleanup (part 1) # # From: Stephen Rothwell # # This patch starts cleaing up (and paring down) the virtual console driver. # It does: # # - viocons is NOT a serial driver # # - remove unneeded empty methods # # - change the console name # # drivers/char/viocons.c # 2004/03/23 02:05:26-08:00 akpm@osdl.org +3 -86 # ppc64: iSeries virtual console cleanup (part 1) # # ChangeSet # 2004/03/23 07:22:11-08:00 akpm@osdl.org # [PATCH] ppc64: iSeries virtual cd fix # # From: Stephen Rothwell # # This patch stops an oops caused by certain ioctls being performed on the # virtual cdrom. In particular, the eject and tray close operations were # affected. # # drivers/cdrom/viocd.c # 2004/03/23 02:05:25-08:00 akpm@osdl.org +3 -2 # ppc64: iSeries virtual cd fix # # ChangeSet # 2004/03/23 07:21:59-08:00 akpm@osdl.org # [PATCH] ppc32: fix build with CONFIG_MODVERSIONS # # From: Paul Mackerras # Olaf Hering # # This adds __kcrctab to the discard list for the link script for the boot # wrapper, and is needed if you compile with CONFIG_MODVERSIONS. # # With this patch applied, we need to update makefile dependencies. Otherwise # the bootfiles will remain untouched because they do not depend on the changed # linker script. # # arch/ppc/boot/openfirmware/Makefile # 2004/03/23 02:05:25-08:00 akpm@osdl.org +6 -6 # ppc32: fix build with CONFIG_MODVERSIONS # # arch/ppc/boot/ld.script # 2004/03/23 02:05:25-08:00 akpm@osdl.org +1 -0 # ppc32: fix build with CONFIG_MODVERSIONS # # ChangeSet # 2004/03/23 01:53:15-05:00 len.brown@intel.com # Merge # # include/asm-x86_64/mpspec.h # 2004/03/23 01:53:14-05:00 len.brown@intel.com +0 -0 # SCCS merged # # arch/x86_64/kernel/setup.c # 2004/03/23 01:53:14-05:00 len.brown@intel.com +0 -0 # SCCS merged # # arch/x86_64/kernel/mpparse.c # 2004/03/23 01:53:14-05:00 len.brown@intel.com +0 -0 # SCCS merged # # arch/x86_64/kernel/Makefile # 2004/03/23 01:53:14-05:00 len.brown@intel.com +0 -0 # SCCS merged # # BitKeeper/deleted/.del-boot.c~a0dfed61fc52b053 # 2004/03/23 01:41:55-05:00 len.brown@intel.com +0 -0 # Auto merged # # BitKeeper/deleted/.del-boot.c~a0dfed61fc52b053 # 2004/03/23 01:41:55-05:00 len.brown@intel.com +0 -0 # Merge rename: arch/x86_64/kernel/acpi/boot.c -> BitKeeper/deleted/.del-boot.c~a0dfed61fc52b053 # # ChangeSet # 2004/03/23 01:33:54-05:00 len.brown@intel.com # [ACPI] share i386/kernel/acpi/boot.c with x86_64 # # include/asm-x86_64/mpspec.h # 2004/03/23 01:32:11-05:00 len.brown@intel.com +0 -2 # use i386/kernel/acpi/boot.c for x86_64 # # drivers/acpi/bus.c # 2004/03/23 01:32:11-05:00 len.brown@intel.com +3 -10 # use i386/kernel/acpi/boot.c for x86_64 # # drivers/acpi/Kconfig # 2004/03/23 01:32:11-05:00 len.brown@intel.com +1 -0 # no PM_TIMER on x86_64, yet # # arch/x86_64/kernel/setup.c # 2004/03/23 01:32:11-05:00 len.brown@intel.com +12 -0 # use i386/kernel/acpi/boot.c for x86_64 # # arch/x86_64/kernel/mpparse.c # 2004/03/23 01:32:11-05:00 len.brown@intel.com +0 -63 # use i386/kernel/acpi/boot.c for x86_64 # # arch/x86_64/kernel/acpi/Makefile # 2004/03/23 01:32:11-05:00 len.brown@intel.com +1 -1 # use i386/kernel/acpi/boot.c for x86_64 # # arch/x86_64/kernel/Makefile # 2004/03/23 01:32:11-05:00 len.brown@intel.com +1 -1 # use i386/kernel/acpi/boot.c for x86_64 # # arch/i386/kernel/acpi/boot.c # 2004/03/23 01:32:11-05:00 len.brown@intel.com +49 -9 # use i386/kernel/acpi/boot.c for x86_64 # # ChangeSet # 2004/03/23 01:18:29-05:00 len.brown@intel.com # [ACPI] toshiba_acpi 0.18 from John Belmonte # add missing copyin # # drivers/acpi/toshiba_acpi.c # 2004/03/23 01:17:28-05:00 len.brown@intel.com +27 -28 # toshiba_acpi 0.18 from John Belmonte # fixes copyin bug # # ChangeSet # 2004/03/22 18:44:23-08:00 davem@nuts.davemloft.net # [B44]: Restore PCI state in b44_resume(). # # drivers/net/b44.c # 2004/03/22 18:44:05-08:00 davem@nuts.davemloft.net +2 -0 # [B44]: Restore PCI state in b44_resume(). # # ChangeSet # 2004/03/22 18:42:30-08:00 torvalds@ppc970.osdl.org # Update ppc64 G5-config to something more uptodate. # # (And more sane. Turn off ECN by default, add # netfilter, and make sure we always support msdos # partitions for external drives). # # arch/ppc64/configs/g5_defconfig # 2004/03/22 18:42:25-08:00 torvalds@ppc970.osdl.org +110 -20 # Update ppc64 G5-config to something more uptodate. # # (And more sane. Turn off ECN by default, add # netfilter, and make sure we always support msdos # partitions for external drives). # # ChangeSet # 2004/03/22 18:38:15-08:00 ja@ssi.bg # [IPVS] Fix connection rehashing with new cport # # net/ipv4/ipvs/ip_vs_conn.c # 2004/03/22 18:38:03-08:00 ja@ssi.bg +44 -32 # [IPVS] Fix connection rehashing with new cport # # ChangeSet # 2004/03/22 17:55:33-08:00 akpm@osdl.org # [PATCH] fix device open return values # # The recent conversion of the open-of-a-nonexistent-blockdev return value from # ENXO to ENODEV was wrong. We should have converted the chardev code to # return -ENXIO too. # # fs/char_dev.c # 2004/03/21 20:13:19-08:00 akpm@osdl.org +4 -4 # fix device open return values # # fs/block_dev.c # 2004/03/21 20:13:30-08:00 akpm@osdl.org +1 -2 # fix device open return values # # ChangeSet # 2004/03/22 17:55:21-08:00 akpm@osdl.org # [PATCH] ppc64: implement pci_dma_error # # From: Anton Blanchard # # Implement pci_dma_error. Create PCI_DMA_ERROR_CODE like sparc64, it will # allow us to find and fix out of tree drivers using NO_TCE directly. # # ibmveth needs some surgery, fix it temporarily until the guys come up with # a decent fix. # # include/asm-ppc64/pci.h # 2004/03/22 02:44:59-08:00 akpm@osdl.org +6 -0 # ppc64: implement pci_dma_error # # include/asm-ppc64/iommu.h # 2004/03/22 02:44:59-08:00 akpm@osdl.org +0 -2 # ppc64: implement pci_dma_error # # drivers/net/ibmveth.c # 2004/03/22 02:44:59-08:00 akpm@osdl.org +3 -0 # ppc64: implement pci_dma_error # # arch/ppc64/kernel/vio.c # 2004/03/22 02:44:59-08:00 akpm@osdl.org +3 -3 # ppc64: implement pci_dma_error # # arch/ppc64/kernel/pci_iommu.c # 2004/03/22 02:44:59-08:00 akpm@osdl.org +4 -4 # ppc64: implement pci_dma_error # # arch/ppc64/kernel/iommu.c # 2004/03/22 02:44:59-08:00 akpm@osdl.org +7 -7 # ppc64: implement pci_dma_error # # ChangeSet # 2004/03/22 17:55:07-08:00 akpm@osdl.org # [PATCH] ppc64: clean up boot messaegs # # From: Anton Blanchard # # Clean up early boot messages. # # arch/ppc64/kernel/prom.c # 2004/03/22 02:17:13-08:00 akpm@osdl.org +8 -10 # ppc64: clean up boot messaegs # # ChangeSet # 2004/03/22 17:54:55-08:00 akpm@osdl.org # [PATCH] pmac_zilog: sleep fix # # From: Benjamin Herrenschmidt # # This patch fix a problem with semaphore usage on wakeup from sleep in # pmac_zilog (crashing some laptops on wakeup). # # drivers/serial/pmac_zilog.c # 2004/03/21 21:48:53-08:00 akpm@osdl.org +18 -4 # pmac_zilog: sleep fix # # ChangeSet # 2004/03/22 17:54:41-08:00 akpm@osdl.org # [PATCH] ppc64: implement iommu=off for pseries # # From: Anton Blanchard # # Implement iommu=off for pseries. We limit memory to 2GB as pmac does, # however the default for < 2GB remains iommu=on unlike pmac. # # include/asm-ppc64/iommu.h # 2004/03/21 21:48:50-08:00 akpm@osdl.org +2 -0 # ppc64: implement iommu=off for pseries # # arch/ppc64/kernel/prom.c # 2004/03/21 21:48:50-08:00 akpm@osdl.org +43 -29 # ppc64: implement iommu=off for pseries # # arch/ppc64/kernel/pSeries_pci.c # 2004/03/21 21:48:50-08:00 akpm@osdl.org +2 -1 # ppc64: implement iommu=off for pseries # # arch/ppc64/kernel/chrp_setup.c # 2004/03/21 21:48:50-08:00 akpm@osdl.org +5 -4 # ppc64: implement iommu=off for pseries # # ChangeSet # 2004/03/22 17:54:30-08:00 akpm@osdl.org # [PATCH] ppc64: fix timebase bugs # # From: Anton Blanchard # # - Consolidate printing of timebase and cpuinfo in /proc/cpuinfo, there were # many trivial differences between pseries/iseries/pmac. # # - Remove ppc_md.setup_residual, no longer needed # # - Fix for processors over 2.147GHz, from Jake Moilanen. We were using a # signed int to parse the OF property. # # - Set some sane defaults for timebase and processor frequency if we fail to # get the correct values from OF. # # include/asm-ppc64/machdep.h # 2004/03/21 02:27:41-08:00 akpm@osdl.org +0 -2 # ppc64: fix timebase bugs # # arch/ppc64/kernel/setup.c # 2004/03/21 02:27:41-08:00 akpm@osdl.org +3 -19 # ppc64: fix timebase bugs # # arch/ppc64/kernel/pmac_time.c # 2004/03/21 02:27:41-08:00 akpm@osdl.org +6 -0 # ppc64: fix timebase bugs # # arch/ppc64/kernel/pmac_setup.c # 2004/03/21 02:27:41-08:00 akpm@osdl.org +0 -4 # ppc64: fix timebase bugs # # arch/ppc64/kernel/iSeries_setup.c # 2004/03/21 02:27:41-08:00 akpm@osdl.org +0 -24 # ppc64: fix timebase bugs # # arch/ppc64/kernel/chrp_setup.c # 2004/03/21 02:27:41-08:00 akpm@osdl.org +40 -26 # ppc64: fix timebase bugs # # ChangeSet # 2004/03/22 17:54:15-08:00 akpm@osdl.org # [PATCH] ppc64: Remove some stale iseries code # # From: Anton Blanchard # # While scanning for the last few users of udbg, I found this. Its old # code that we dont use, so remove it. # # arch/ppc64/kernel/iSeries_pci.c # 2004/03/21 02:27:39-08:00 akpm@osdl.org +0 -41 # ppc64: Remove some stale iseries code # # ChangeSet # 2004/03/22 17:54:03-08:00 akpm@osdl.org # [PATCH] ppc64: Fix log_rtas_error # # From: Anton Blanchard # # From: Santiago Leon # # Fix log_rtas_error bug where the results from the call that resulted in an # error where lost due the attempt to log the error. # # arch/ppc64/kernel/rtas.c # 2004/03/21 02:27:37-08:00 akpm@osdl.org +4 -2 # ppc64: Fix log_rtas_error # # ChangeSet # 2004/03/22 17:53:49-08:00 akpm@osdl.org # [PATCH] ppc64: Add eeh calls to hotplug driver # # From: Anton Blanchard # # The ppc64 hotplug code must register and deregister devices with the extended # error handling (EEH) subsystem. # # drivers/pci/hotplug/rpaphp_pci.c # 2004/03/21 02:27:21-08:00 akpm@osdl.org +2 -0 # ppc64: Add eeh calls to hotplug driver # # ChangeSet # 2004/03/22 17:53:36-08:00 akpm@osdl.org # [PATCH] ppc64: remove duplicate FBIOBLANK ioctl translation # # From: Anton Blanchard # # Linus just added it to the generic compat layer, we can remove this # (commented out) version. # # arch/ppc64/kernel/ioctl32.c # 2004/03/21 02:27:18-08:00 akpm@osdl.org +0 -3 # ppc64: remove duplicate FBIOBLANK ioctl translation # # ChangeSet # 2004/03/22 17:52:26-08:00 sfr@canb.auug.org.au # [PATCH] PPC64 iSeries kernel messages cleanup # # This patch cleans up and makes more consistent the messages produced by # some of the iSeries virtual device drivers. It also make them less # verbose. # # include/asm-ppc64/iSeries/vio.h # 2004/03/18 23:10:25-08:00 sfr@canb.auug.org.au +5 -10 # PPC64 iSeries kernel messages cleanup # # drivers/char/viotape.c # 2004/03/18 23:10:24-08:00 sfr@canb.auug.org.au +3 -4 # PPC64 iSeries kernel messages cleanup # # drivers/char/viocons.c # 2004/03/18 23:10:24-08:00 sfr@canb.auug.org.au +47 -53 # PPC64 iSeries kernel messages cleanup # # arch/ppc64/kernel/viopath.c # 2004/03/18 23:10:24-08:00 sfr@canb.auug.org.au +23 -22 # PPC64 iSeries kernel messages cleanup # # ChangeSet # 2004/03/22 17:49:44-08:00 torvalds@ppc970.osdl.org # Revert the input layer change that assumes the i8042 # controller is always in XLATE mode. # # That's not true on at least some ppc64 boxes, and we # shouldn't break those just because apparently some # IBM PS/2 model 70 has something strange here. # # Cset exclude: vojtech@suse.cz|ChangeSet|20040303141401|00802 # # drivers/input/serio/i8042.c # 2004/03/22 17:49:43-08:00 torvalds@ppc970.osdl.org +0 -0 # Revert the input layer change that assumes the i8042 # controller is always in XLATE mode. # # That's not true on at least some ppc64 boxes, and we # shouldn't break those just because apparently some # IBM PS/2 model 70 has something strange here. # # ChangeSet # 2004/03/22 17:47:53-08:00 armin@melware.de # [PATCH] ISDN Eicon driver: fix compilation with non __exit function # # Function divacapi_remove_cards() is now used for __init as well, # so it may not be marked __exit. # # drivers/isdn/hardware/eicon/capifunc.c # 2004/03/22 08:45:23-08:00 armin@melware.de +2 -2 # ISDN Eicon driver: fix compilation with non __exit function # # ChangeSet # 2004/03/22 17:47:39-08:00 armin@melware.de # [PATCH] ISDN Eicon driver: linked-list handling by kernel api list.h # # Removed own implementations for linked-list handling, use # Linus kernel API of list.h instead. # # drivers/isdn/hardware/eicon/xdi_adapter.h # 2004/03/21 10:34:18-08:00 armin@melware.de +2 -2 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/um_idi.h # 2004/03/21 10:34:18-08:00 armin@melware.de +1 -2 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/um_idi.c # 2004/03/21 10:34:18-08:00 armin@melware.de +30 -55 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/os_pri.c # 2004/03/21 10:34:18-08:00 armin@melware.de +1 -2 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/os_bri.c # 2004/03/21 10:34:18-08:00 armin@melware.de +1 -2 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/os_4bri.c # 2004/03/21 10:34:18-08:00 armin@melware.de +1 -2 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/idifunc.c # 2004/03/21 10:34:18-08:00 armin@melware.de +22 -55 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/entity.h # 2004/03/21 10:34:18-08:00 armin@melware.de +2 -2 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/divasproc.c # 2004/03/21 10:34:18-08:00 armin@melware.de +2 -3 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/divasmain.c # 2004/03/21 10:34:18-08:00 armin@melware.de +3 -3 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/diva.c # 2004/03/21 10:34:18-08:00 armin@melware.de +31 -31 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/capifunc.c # 2004/03/21 10:34:18-08:00 armin@melware.de +9 -17 # ISDN Eicon driver: linked-list handling by kernel api list.h # # drivers/isdn/hardware/eicon/adapter.h # 2004/03/21 10:34:18-08:00 armin@melware.de +3 -3 # ISDN Eicon driver: linked-list handling by kernel api list.h # # BitKeeper/deleted/.del-dlist.h~a4cde2638c627fdb # 2004/03/22 17:47:34-08:00 armin@melware.de +0 -0 # Delete: drivers/isdn/hardware/eicon/dlist.h # # BitKeeper/deleted/.del-dlist.c~8fe4efbc2e4fba3a # 2004/03/22 17:47:34-08:00 armin@melware.de +0 -0 # Delete: drivers/isdn/hardware/eicon/dlist.c # # ChangeSet # 2004/03/22 17:17:53-08:00 janitor@sternwelten.at # [NETFILTER]: Add MODULE_AUTHOR to ipchains_core.c # # net/ipv4/netfilter/ipchains_core.c # 2004/03/22 17:17:40-08:00 janitor@sternwelten.at +1 -0 # [NETFILTER]: Add MODULE_AUTHOR to ipchains_core.c # # ChangeSet # 2004/03/22 17:17:16-08:00 lathiat@sixlabs.org # [NETFILTER]: Fix typo in ip_fw_compat_masq.c # # net/ipv4/netfilter/ip_fw_compat_masq.c # 2004/03/22 17:17:04-08:00 lathiat@sixlabs.org +1 -1 # [NETFILTER]: Fix typo in ip_fw_compat_masq.c # # ChangeSet # 2004/03/22 17:16:27-08:00 petri.koistinen@iki.fi # [NETFILTER]: ipv4 Kconfig URL updates. # # net/ipv4/netfilter/Kconfig # 2004/03/22 17:16:13-08:00 petri.koistinen@iki.fi +2 -2 # [NETFILTER]: ipv4 Kconfig URL updates. # # ChangeSet # 2004/03/22 19:51:11-05:00 len.brown@intel.com # [ACPI] delete POWER_OF_TWO array (Pavel Machek) # # drivers/acpi/processor.c # 2004/03/22 19:49:34-05:00 len.brown@intel.com +1 -3 # delete POWER_OF_TWO array (Pavel Machek) # # BitKeeper/deleted/.del-boot.c~a0dfed61fc52b053 # 2004/03/22 16:44:17-05:00 len.brown@intel.com +0 -0 # Delete: arch/x86_64/kernel/acpi/boot.c # # ChangeSet # 2004/03/22 16:03:24-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/linux-acpi-test-2.6.4 # into intel.com:/home/lenb/src/linux-acpi-test-2.6.5 # # arch/i386/kernel/setup.c # 2004/03/22 16:03:22-05:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/03/22 16:03:22-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/03/22 16:02:16-05:00 len.brown@intel.com # [ACPI] ACPI SCI shall be level/low unless explicit over-ride # http://bugzilla.kernel.org/show_bug.cgi?id=1622 # add "acpi_sci=edge" and "acpi_sci=high" manual over-ride # # include/asm-i386/mpspec.h # 2004/03/22 16:00:03-05:00 len.brown@intel.com +0 -7 # delete mp_config_ioapic_for_sci() # # drivers/acpi/bus.c # 2004/03/22 16:00:03-05:00 len.brown@intel.com +18 -2 # delete mp_config_ioapic_for_sci() # add param to acpi_pic_sci_set_trigger. # # arch/i386/kernel/setup.c # 2004/03/22 16:00:03-05:00 len.brown@intel.com +13 -0 # add acpi_sci= -- they need to be early to preceed MADT table parsing # # arch/i386/kernel/mpparse.c # 2004/03/22 16:00:03-05:00 len.brown@intel.com +0 -63 # delete mp_config_ioapic_for_sci() -- it had several problems. # walking the MADT was redundant # not setting flags for no-override case to level/low was incorrect # calling io_apic_set_pci_routing() on a legacy IRQ was incorrect # # arch/i386/kernel/acpi/boot.c # 2004/03/22 16:00:03-05:00 len.brown@intel.com +67 -33 # add acpi_parse_sci_int_src_ovr() for handling SCI interrupt flags # grab the SCI from the early FADT parse # fix typo in acpi_pic_sci_set_triger() that allowed it only to set for level trigger # # Documentation/kernel-parameters.txt # 2004/03/22 16:00:03-05:00 len.brown@intel.com +2 -4 # replace acpi_pic_sci= with acpi_sci= # # ChangeSet # 2004/03/22 21:50:25+01:00 wim@iguana.be # [WATCHDOG] v2.6.5-rc2 Kconfig-patch # # Update Kconfig info to reflect the changes in wdt.c and wdt_pci.c # # drivers/char/watchdog/Kconfig # 2004/03/22 21:49:16+01:00 wim@iguana.be +13 -19 # Update Kconfig info to reflect the changes in wdt.c and wdt_pci.c # # ChangeSet # 2004/03/21 22:53:33-08:00 davem@nuts.davemloft.net # Merge http://linux-mh.bkbits.net/bluetooth-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # include/linux/compat_ioctl.h # 2004/03/21 22:53:25-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # fs/compat_ioctl.c # 2004/03/21 22:53:25-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/03/21 22:51:33-08:00 devik@cdi.cz # [NET_SCHED]: HTB scheduler updates. # # Fixes: # * Fix to htb_requeue routine. # * Debug mode related oops fixes. # # net/sched/sch_htb.c # 2004/03/21 22:51:20-08:00 devik@cdi.cz +14 -10 # [NET_SCHED]: HTB scheduler updates. # # Fixes: # * Fix to htb_requeue routine. # * Debug mode related oops fixes. # # ChangeSet # 2004/03/21 22:43:38-08:00 jon@focalhost.com # [CRYPTO]: Remove confusing TODO comment in arc4.c # # crypto/arc4.c # 2004/03/21 22:43:23-08:00 jon@focalhost.com +0 -4 # [CRYPTO]: Remove confusing TODO comment in arc4.c # # ChangeSet # 2004/03/21 22:38:44-08:00 jmorris@redhat.com # [CRYPTO]: Add Michael MIC algorithm. # # From Jouni Malinen # # Added Michael MIC keyed digest for TKIP (IEEE 802.11i/WPA). This algorithm # is quite weak due to the requirements for compatibility with old legacy # wireless LAN hardware that does not have much CPU power. Consequently, this # should not really be used with anything else than TKIP. # # Michael MIC is calculated over the payload of the IEEE 802.11 header which # makes it easier to add TKIP support for old wireless LAN cards. An additional # authenticated data area is used (but not send separately) to authenticate # source and destination addresses. # # crypto/tcrypt.h # 2004/03/21 22:38:12-08:00 jmorris@redhat.com +50 -0 # [CRYPTO]: Add Michael MIC algorithm. # # crypto/tcrypt.c # 2004/03/21 22:38:12-08:00 jmorris@redhat.com +7 -1 # [CRYPTO]: Add Michael MIC algorithm. # # crypto/Makefile # 2004/03/21 22:38:12-08:00 jmorris@redhat.com +1 -0 # [CRYPTO]: Add Michael MIC algorithm. # # crypto/Kconfig # 2004/03/21 22:38:12-08:00 jmorris@redhat.com +9 -0 # [CRYPTO]: Add Michael MIC algorithm. # # Documentation/crypto/api-intro.txt # 2004/03/21 22:38:12-08:00 jmorris@redhat.com +1 -0 # [CRYPTO]: Add Michael MIC algorithm. # # crypto/michael_mic.c # 2004/03/21 22:38:08-08:00 jmorris@redhat.com +193 -0 # [CRYPTO]: Add Michael MIC algorithm. # # crypto/michael_mic.c # 2004/03/21 22:38:08-08:00 jmorris@redhat.com +0 -0 # BitKeeper file /disk1/BK/net-2.6/crypto/michael_mic.c # # ChangeSet # 2004/03/21 22:36:22-08:00 jmorris@redhat.com # [CRYPTO]: Add setkey operation for digests. # # From Jouni Malinen # # Added support for using keyed digest with an optional dit_setkey handler. # This does not change the behavior of the existing digest algorithms, but # allows new ones to add setkey handler that can be used to initialize the # algorithm with a key or seed. setkey is to be called after init, but before # any of the update call(s). # # include/linux/crypto.h # 2004/03/21 22:31:09-08:00 jmorris@redhat.com +13 -0 # [CRYPTO]: Add setkey operation for digests. # # crypto/tcrypt.h # 2004/03/21 22:31:09-08:00 jmorris@redhat.com +2 -0 # [CRYPTO]: Add setkey operation for digests. # # crypto/tcrypt.c # 2004/03/21 22:31:09-08:00 jmorris@redhat.com +4 -0 # [CRYPTO]: Add setkey operation for digests. # # crypto/digest.c # 2004/03/21 22:31:09-08:00 jmorris@redhat.com +10 -0 # [CRYPTO]: Add setkey operation for digests. # # ChangeSet # 2004/03/21 22:03:03-08:00 wesolows@foobazco.org # Merge foobazco.org:/sources/2.5-bk # into foobazco.org:/sources/2.5-sparc-smp # # arch/sparc/kernel/entry.S # 2004/03/21 22:02:59-08:00 wesolows@foobazco.org +0 -0 # Auto merged # # ChangeSet # 2004/03/21 20:26:39-08:00 torvalds@ppc970.osdl.org # Remove stale legacy ISDN files. # # From Armin Schindler : # # "These files were added in the first place for the compat # driver to the legacy isdn4linux module. Since the Eicon # driver now uses CAPI only, these files are obsolete." # # BitKeeper/deleted/.del-i4lididrv.h~d561988bf6f6836f # 2004/03/21 20:25:22-08:00 torvalds@ppc970.osdl.org +0 -0 # Delete: drivers/isdn/hardware/eicon/i4lididrv.h # # BitKeeper/deleted/.del-i4lididrv.c~64e68716df2e303e # 2004/03/21 20:25:22-08:00 torvalds@ppc970.osdl.org +0 -0 # Delete: drivers/isdn/hardware/eicon/i4lididrv.c # # BitKeeper/deleted/.del-i4l_idi.h~15b07d188d548e5 # 2004/03/21 20:25:22-08:00 torvalds@ppc970.osdl.org +0 -0 # Delete: drivers/isdn/hardware/eicon/i4l_idi.h # # BitKeeper/deleted/.del-i4l_idi.c~926751ba144aae05 # 2004/03/21 20:25:21-08:00 torvalds@ppc970.osdl.org +0 -0 # Delete: drivers/isdn/hardware/eicon/i4l_idi.c # # ChangeSet # 2004/03/21 19:31:24-08:00 arnd@arndb.de # [PATCH] Fix missing "noinline" on x86-64 # # The gcc-3.5 patch broke building on x86_64 and possibly # others, because inflate.c does not pull in the definition # for noinline. # # lib/inflate.c # 2004/03/21 15:53:16-08:00 arnd@arndb.de +1 -0 # Fix missing "noinline" on x86-64 # # ChangeSet # 2004/03/21 19:31:12-08:00 ak@suse.de # [PATCH] Two more x86-64 fixes # # - Fix CONFIG_DEBUG_INFO build again # - Fix user exploitable oops in ia32 ioctl emulation # # include/asm-x86_64/calling.h # 2004/03/21 12:35:48-08:00 ak@suse.de +1 -1 # Two more x86-64 fixes # # arch/x86_64/ia32/ia32_ioctl.c # 2004/03/21 12:12:10-08:00 ak@suse.de +1 -1 # Two more x86-64 fixes # # ChangeSet # 2004/03/21 21:34:35-05:00 len.brown@intel.com # [ACPI] fix interrupts behind yenta cardbus bridge (David Shaohua Li) # http://bugzilla.kernel.org/show_bug.cgi?id=1564 # # drivers/acpi/pci_irq.c # 2004/03/21 21:32:47-05:00 len.brown@intel.com +13 -1 # fix interrupts for dev behind cardbus bridge (David Shaohua Li) # http://bugzilla.kernel.org/show_bug.cgi?id=1564 # # ChangeSet # 2004/03/21 17:40:05-08:00 wesolows@foobazco.org # Merge foobazco.org:/sources/2.5-sparc-smp # into foobazco.org:/sources/2.5-sparc-todave # # arch/sparc/kernel/sparc_ksyms.c # 2004/03/21 17:40:02-08:00 wesolows@foobazco.org +0 -0 # Auto merged # # arch/sparc/kernel/entry.S # 2004/03/21 17:40:01-08:00 wesolows@foobazco.org +0 -0 # Auto merged # # ChangeSet # 2004/03/21 16:57:36-08:00 wesolows@foobazco.org # [SPARC32]: Clean up secondary System.map # # From: Stefan Holst # # The clean target is never called, so instead add this to CLEAN_FILES. # # arch/sparc/boot/Makefile # 2004/03/21 16:57:30-08:00 wesolows@foobazco.org +0 -3 # [SPARC32]: Clean up secondary System.map # # arch/sparc/Makefile # 2004/03/21 16:57:30-08:00 wesolows@foobazco.org +2 -1 # [SPARC32]: Clean up secondary System.map # # ChangeSet # 2004/03/21 15:23:11-08:00 petero2@telia.com # [PATCH] Revert UDF inode semaphore locking # # For some reason I don't understand, the last UDF filesystem update makes # the UDF deadlock when I write a bunch of mp3 files to a CDRW using the # packet writing patch. Both "cp" and pdflush get stuck in __down. # # Reverting the semaphore changes makes the problem go away. Use the # kernel lock again, until whatever recursive offender gets fixed. # # (The offensive recursion seems to be: write() takes the inode semaphore, # causes memory pressure, and then trying to write back the inode or dirty # data to disk tries to get the semaphore again and deadlocks.) # # fs/udf/inode.c # 2004/03/21 14:26:21-08:00 petero2@telia.com +2 -2 # Revert UDF inode semaphore locking # # fs/udf/file.c # 2004/03/21 14:26:46-08:00 petero2@telia.com +2 -2 # Revert UDF inode semaphore locking # # ChangeSet # 2004/03/21 14:55:49-08:00 wesolows@foobazco.org # [SPARC32]: Restore a.out binary format capability # # This depended on CONFIG_SPARC, which is obsolete. Use SPARC32 instead. # # fs/Kconfig.binfmt # 2004/03/21 14:55:43-08:00 wesolows@foobazco.org +1 -1 # [SPARC32]: Restore a.out binary format capability # # ChangeSet # 2004/03/21 14:43:40-08:00 wesolows@foobazco.org # [SPARC32]: Support memory starting at physical address other than 0 # # From: Stefan Holst # # Allow physical memory to start at almost arbitrary addresses. LEON # needs it, so do SPARCstation 10/20 without slot 0 populated. Although # Sun do not support this configuration, at least some such systems can # boot with this patch. # # Physical memory starting at or above 0xF4000000 is not supported. # # include/asm-sparc/pgtable.h # 2004/03/21 14:43:34-08:00 wesolows@foobazco.org +1 -0 # [SPARC32]: Support memory starting at physical address other than 0 # # include/asm-sparc/page.h # 2004/03/21 14:43:34-08:00 wesolows@foobazco.org +14 -9 # [SPARC32]: Support memory starting at physical address other than 0 # # arch/sparc/mm/sun4c.c # 2004/03/21 14:43:34-08:00 wesolows@foobazco.org +2 -2 # [SPARC32]: Support memory starting at physical address other than 0 # # arch/sparc/mm/srmmu.c # 2004/03/21 14:43:34-08:00 wesolows@foobazco.org +6 -10 # [SPARC32]: Support memory starting at physical address other than 0 # # arch/sparc/mm/init.c # 2004/03/21 14:43:34-08:00 wesolows@foobazco.org +10 -13 # [SPARC32]: Support memory starting at physical address other than 0 # # arch/sparc/kernel/sparc_ksyms.c # 2004/03/21 14:43:34-08:00 wesolows@foobazco.org +1 -0 # [SPARC32]: Support memory starting at physical address other than 0 # # arch/sparc/kernel/setup.c # 2004/03/21 14:43:34-08:00 wesolows@foobazco.org +1 -0 # [SPARC32]: Support memory starting at physical address other than 0 # # ChangeSet # 2004/03/21 15:18:01-05:00 jgarzik@redhat.com # Set PCI DMA masks in old-OSS via82cxxx audio driver. # # sound/oss/via82cxxx_audio.c # 2004/03/21 15:16:37-05:00 jgarzik@redhat.com +7 -1 # Set PCI DMA masks in old-OSS via82cxxx audio driver. # # ChangeSet # 2004/03/21 20:33:23+01:00 wim@iguana.be # [WATCHDOG] v2.6.5-rc2 pcwd.c-patch1 # # Version 1.14 of pcwd.c - Changes that were made are: # * Extract the start code in a seperate function (pcwd_start) # * Extract the stop code in a seperate function (pcwd_stop) # * Extract the get_temperature code in a seperate function (pcwd_get_temperature) # * Make /dev/watchdog and /dev/temperature to different misc devices with their own fops # * Small clean-up's # # Tested on pcwd card with temperature option. # # drivers/char/watchdog/pcwd.c # 2004/03/21 20:32:20+01:00 wim@iguana.be +131 -89 # Version 1.14 of pcwd.c - Changes that were made are: # * Extract the start code in a seperate function (pcwd_start) # * Extract the stop code in a seperate function (pcwd_stop) # * Extract the get_temperature code in a seperate function (pcwd_get_temperature) # * Make /dev/watchdog and /dev/temperature to different misc devices with their own fops # * Small clean-up's # # ChangeSet # 2004/03/21 08:55:36-08:00 armin@melware.de # [PATCH] ISDN Eicon driver: move workqueue to tasklet for divas dpc # # Use tasklet instead of workqueue for the divas main dpc. # # drivers/isdn/hardware/eicon/divasmain.c # 2004/03/21 03:23:50-08:00 armin@melware.de +14 -6 # ISDN Eicon driver: move workqueue to tasklet for divas dpc # # ChangeSet # 2004/03/21 08:55:24-08:00 armin@melware.de # [PATCH] ISDN Eicon driver: restructured capi list and lock handling # # Restructered the CAPI code of list handling and lock. # # Removed obsolete code. # # drivers/isdn/hardware/eicon/platform.h # 2004/03/20 10:18:26-08:00 armin@melware.de +2 -3 # ISDN Eicon driver: restructured capi list and lock handling # # drivers/isdn/hardware/eicon/capifunc.h # 2004/03/20 10:18:26-08:00 armin@melware.de +3 -2 # ISDN Eicon driver: restructured capi list and lock handling # # drivers/isdn/hardware/eicon/capifunc.c # 2004/03/20 10:18:26-08:00 armin@melware.de +146 -140 # ISDN Eicon driver: restructured capi list and lock handling # # ChangeSet # 2004/03/21 08:38:39-08:00 akpm@osdl.org # [PATCH] mprotect return value fix # # From: Marc-Christian Petersen # # 2.4 patch from Adrian Bunk. # # ERRORS # # The mprotect() function shall fail if: # # ... # # [ENOMEM] # Addresses in the range [addr,addr+len) are invalid for the # address space of a process, or specify one or more pages which are # not mapped. # # mm/mprotect.c # 2004/03/21 00:00:58-08:00 akpm@osdl.org +1 -1 # mprotect return value fix # # ChangeSet # 2004/03/21 08:38:26-08:00 akpm@osdl.org # [PATCH] make inflate use less stack space with gcc3.5 # # From: Matt Mackall # # Quick fix to work around gcc3.5's automatic inline and broken stack # requirements calculation. Without this, I see stack overflows at boot # with 4k stacks. # # lib/inflate.c # 2004/03/21 00:00:58-08:00 akpm@osdl.org +8 -4 # make inflate use less stack space with gcc3.5 # # ChangeSet # 2004/03/21 08:38:10-08:00 akpm@osdl.org # [PATCH] Add missing uacccess checks for sysctl.c # # From: Marc-Christian Petersen # # Kernel 2.6 lacks two -EFAULT returns in get_user() in kernel/sysctl.c. # # kernel/sysctl.c # 2004/03/21 00:00:57-08:00 akpm@osdl.org +8 -6 # Add missing uacccess checks for sysctl.c # # ChangeSet # 2004/03/21 08:37:56-08:00 akpm@osdl.org # [PATCH] Fix error value for opening block devices # # From: Ulrich Drepper # # Opening a non-existing block device currently yields an ENXIO error. Doing # the same for char devices produces the correct error ENODEV. # # fs/block_dev.c # 2004/03/21 00:00:57-08:00 akpm@osdl.org +2 -1 # Fix error value for opening block devices # # ChangeSet # 2004/03/21 08:37:44-08:00 akpm@osdl.org # [PATCH] kbuild ordering fix # # From: Sam Ravnborg # # In the i386 case we need to generate asm-offset.h, before starting building # the kernel tree. Building asm-offset.h causes us to use one of the # shorthands in the top-level makefile, namely the one for .s files. The one # that allows us to do: make some/dir/file.s # # And this shorthand happens to have a dependency to scripts, therefore I did # not see this problem on i386. But David hit it with sparc64, because there # is no asm-offset.h file. No parallel stuff involved here, just an ordinary # error. # # Makefile # 2004/03/21 00:00:57-08:00 akpm@osdl.org +1 -1 # kbuild ordering fix # # ChangeSet # 2004/03/21 08:37:31-08:00 akpm@osdl.org # [PATCH] start_cpu_timer() cannot be __init # # It's now called from the CPU hot-add notifier. # # mm/slab.c # 2004/03/20 23:49:49-08:00 akpm@osdl.org +1 -1 # start_cpu_timer() cannot be __init # # ChangeSet # 2004/03/21 09:17:28-05:00 ak@muc.de # [PATCH] Hack mptfusion to work on >4GB machines # # fusion needs several separately allocated coherent regions and # requires that they all be in the same 4GB segment. Obviously this may # fail. The hack is to force the coherent_dma_mask to 0xffffffff thus # ensuring that all the allocations occur within the first 4GB. This # hack breaks Altix entirely. # # drivers/message/fusion/mptbase.c # 2004/03/19 22:11:24-05:00 ak@muc.de +5 -0 # Hack mptfusion to work on >4GB machines # # ChangeSet # 2004/03/21 11:28:25+01:00 wim@iguana.be # [WATCHDOG] v2.6.5-rc2 softdog.c-patch # # Version 0.07 of softdog.c - Changes that were made are: # * Extract the start/keepalive code in a seperate function (softdog_keepalive) # * Extract the stop code in a seperate function (softdog_stop) # * Add notifier support # * Extract softdog_set_heartbeat code to seperate subroutine # * Small clean-up's # # drivers/char/watchdog/softdog.c # 2004/03/21 11:27:22+01:00 wim@iguana.be +105 -32 # Version 0.07 of softdog.c - Changes that were made are: # * Extract the start/keepalive code in a seperate function (softdog_keepalive) # * Extract the stop code in a seperate function (softdog_stop) # * Add notifier support # * Extract softdog_set_heartbeat code to seperate subroutine # * Small clean-up's # # ChangeSet # 2004/03/21 11:24:59+01:00 wim@iguana.be # [WATCHDOG] v2.6.5-rc2 wd501p.h-patch # # Cleanup header file after changes to wdt.c and wdt_pci.c # # drivers/char/watchdog/wd501p.h # 2004/03/21 11:23:55+01:00 wim@iguana.be +10 -49 # Cleanup header file after changes to wdt.c and wdt_pci.c # # ChangeSet # 2004/03/21 11:22:23+01:00 wim@iguana.be # [WATCHDOG] v2.6.5-rc2 wdt_pci.c-patch # # Version 0.10 of wdt_pci.c - Changes that were made are: # * Extract the start code in a seperate function (wdtpci_start) # * Extract the stop code in a seperate function (wdtpci_stop) # * Convert wdtpci_ping so that it return an int value (0=succes). # * Extract the get_temperature code in a seperate function (wdtpci_get_temperature) # * Make /dev/watchdog and /dev/temperature to different misc devices with their own fops. # * Reorganize init and exit functions # * Make heartbeat (the emulated heartbeat) a module parameter # * Rewrite status flag code so that we could add a new tachometer module parameter # + make clear distinction between PCI-WDT500 and PCI-WDT501. # * Small clean-up's # # drivers/char/watchdog/wdt_pci.c # 2004/03/21 11:21:19+01:00 wim@iguana.be +336 -224 # Version 0.10 of wdt_pci.c - Changes that were made are: # * Extract the start code in a seperate function (wdtpci_start) # * Extract the stop code in a seperate function (wdtpci_stop) # * Convert wdtpci_ping so that it return an int value (0=succes). # * Extract the get_temperature code in a seperate function (wdtpci_get_temperature) # * Make /dev/watchdog and /dev/temperature to different misc devices with their own fops. # * Reorganize init and exit functions # * Make heartbeat (the emulated heartbeat) a module parameter # * Rewrite status flag code so that we could add a new tachometer module parameter # + make clear distinction between PCI-WDT500 and PCI-WDT501. # * Small clean-up's # # ChangeSet # 2004/03/21 11:18:43+01:00 wim@iguana.be # [WATCHDOG] v2.6.5-rc2 wdt.c-patch # # Version 0.10 of wdt.c - Changes that were made are: # * Extract the start code in a seperate function (wdt_start) # * Extract the stop code in a seperate function (wdt_stop) # * Convert wdt_ping so that it return an int value (0=succes). # * Extract the get_temperature code in a seperate function (wdt_get_temperature) # * Make /dev/watchdog and /dev/temperature to different misc devices with their own fops. # * Reorganize init and exit functions # * Make heartbeat (the emulated heartbeat) a module parameter # * Rewrite status flag code so that we could add a new tachometer module parameter # * Small clean-up's # # drivers/char/watchdog/wdt.c # 2004/03/21 11:07:44+01:00 wim@iguana.be +284 -183 # Version 0.10 of wdt.c - Changes that were made are: # * Extract the start code in a seperate function (wdt_start) # * Extract the stop code in a seperate function (wdt_stop) # * Convert wdt_ping so that it return an int value (0=succes). # * Extract the get_temperature code in a seperate function (wdt_get_temperature) # * Make /dev/watchdog and /dev/temperature to different misc devices with their own fops. # * Reorganize init and exit functions # * Make heartbeat (the emulated heartbeat) a module parameter # * Rewrite status flag code so that we could add a new tachometer module parameter # * Small clean-up's # # ChangeSet # 2004/03/21 01:10:21-05:00 bjorn.helgaas@hp.com # [PATCH] clean up ACPI GSI/IRQ conversions (i386 part) # # Add "acpi_gsi_to_irq()" as a generic replacement for "acpi_irq_to_vector()". # This converts from an ACPI global system interrupt number to a Linux IRQ. # Also, convert i386-specific terminology to use GSI when appropriate. # # include/asm-i386/mpspec.h # 2004/03/18 14:45:38-05:00 bjorn.helgaas@hp.com +4 -4 # clean up ACPI GSI/IRQ conversions (i386 part) # # include/asm-i386/acpi.h # 2004/03/18 14:45:38-05:00 bjorn.helgaas@hp.com +2 -1 # clean up ACPI GSI/IRQ conversions (i386 part) # # arch/i386/kernel/mpparse.c # 2004/03/18 14:45:38-05:00 bjorn.helgaas@hp.com +47 -47 # clean up ACPI GSI/IRQ conversions (i386 part) # # arch/i386/kernel/acpi/boot.c # 2004/03/18 15:04:47-05:00 bjorn.helgaas@hp.com +12 -0 # clean up ACPI GSI/IRQ conversions (i386 part) # # ChangeSet # 2004/03/21 00:33:11-05:00 len.brown@intel.com # merge # # arch/i386/kernel/dmi_scan.c # 2004/03/21 00:33:07-05:00 len.brown@intel.com +0 -2 # handle name conflict with dmi_disable_acpi() # # include/asm-x86_64/acpi.h # 2004/03/21 00:28:40-05:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-ia64/acpi.h # 2004/03/21 00:28:40-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/char/sonypi.h # 2004/03/21 00:28:40-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/acpi.c # 2004/03/21 00:28:40-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/setup.c # 2004/03/21 00:28:40-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/03/21 00:23:27-05:00 len.brown@intel.com # [ACPI] create disable_acpi() # # include/asm-x86_64/acpi.h # 2004/03/21 00:18:40-05:00 len.brown@intel.com +3 -0 # create disable_acpi() # # include/asm-ia64/acpi.h # 2004/03/21 00:18:40-05:00 len.brown@intel.com +2 -0 # create disable_acpi() # # include/asm-i386/acpi.h # 2004/03/21 00:18:40-05:00 len.brown@intel.com +3 -0 # create disable_acpi() # # include/acpi/acpi_bus.h # 2004/03/21 00:18:40-05:00 len.brown@intel.com +0 -2 # create disable_acpi() # # drivers/char/sonypi.h # 2004/03/21 00:18:40-05:00 len.brown@intel.com +0 -1 # create disable_acpi() # # drivers/acpi/bus.c # 2004/03/21 00:18:40-05:00 len.brown@intel.com +2 -17 # create disable_acpi() # # arch/ia64/kernel/acpi.c # 2004/03/21 00:18:40-05:00 len.brown@intel.com +0 -2 # create disable_acpi() # # arch/i386/kernel/setup.c # 2004/03/21 00:18:40-05:00 len.brown@intel.com +4 -5 # create disable_acpi() # # arch/i386/kernel/dmi_scan.c # 2004/03/21 00:18:40-05:00 len.brown@intel.com +6 -9 # create disable_acpi() # # arch/i386/kernel/acpi/boot.c # 2004/03/21 00:18:40-05:00 len.brown@intel.com +2 -2 # create disable_acpi() # # ChangeSet # 2004/03/20 23:44:51-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/linux-2.6.5 # into intel.com:/home/lenb/src/linux-acpi-test-2.6.5 # # arch/x86_64/kernel/setup.c # 2004/03/20 23:44:43-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/mpparse.c # 2004/03/20 23:44:43-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/setup.c # 2004/03/20 23:44:43-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/03/20 19:40:02-08:00 benh@kernel.crashing.org # [PATCH] pmac: Improved G4 "windtunnel" fan controller # # This is an improved version of the G4 "windtunnel" fan controller. It # depends on the keywest bugfix... # # drivers/macintosh/therm_windtunnel.c # 2004/03/20 06:45:16-08:00 benh@kernel.crashing.org +276 -196 # pmac: Improved G4 "windtunnel" fan controller # # ChangeSet # 2004/03/20 19:39:50-08:00 samuel@ibrium.se # [PATCH] keywest bugfix # # This fixes a deadlock in I2C probing. # # - keywest holds the pmac_low_i2c_lock while registering the i2c adapter. # - i2c_add_adapter() notifies registered drivers by calling # driver->attach_adapter(). # - a driver might access the i2c bus from attach_adapter() which # deadlocks since all xfer routines take the lock. # # drivers/i2c/busses/i2c-keywest.c # 2004/03/20 06:33:07-08:00 samuel@ibrium.se +1 -1 # keywest bugfix # # ChangeSet # 2004/03/20 11:20:25-08:00 torvalds@osdl.org # [PATCH] Fix missing part of x86-64 update, part 2 # # One more missing doc-file update # # Documentation/x86_64/boot-options.txt # 2004/03/20 11:16:19-08:00 torvalds@osdl.org +5 -1 # Fix missing part of x86-64 update, part 2 # # ChangeSet # 2004/03/20 11:01:39-08:00 torvalds@osdl.org # [PATCH] Fix missing part of x86-64 update # # Three quarters of the update from Andi was uncommitted due to a bad # patch date and a bug in "bk import -temail".. # # Here are the missing parts.. # # include/asm-x86_64/mpspec.h # 2004/03/19 10:37:08-08:00 torvalds@osdl.org +3 -3 # Fix missing part of x86-64 update # # include/asm-x86_64/hpet.h # 2004/03/19 10:37:08-08:00 torvalds@osdl.org +0 -3 # Fix missing part of x86-64 update # # include/asm-x86_64/hardirq.h # 2004/03/19 10:03:21-08:00 torvalds@osdl.org +1 -0 # Fix missing part of x86-64 update # # include/asm-x86_64/calling.h # 2004/03/17 07:52:48-08:00 torvalds@osdl.org +15 -15 # Fix missing part of x86-64 update # # include/asm-x86_64/acpi.h # 2004/03/16 06:05:14-08:00 torvalds@osdl.org +2 -0 # Fix missing part of x86-64 update # # drivers/char/rtc.c # 2004/03/19 10:19:28-08:00 torvalds@osdl.org +2 -0 # Fix missing part of x86-64 update # # arch/x86_64/pci/mmconfig.c # 2004/03/16 06:53:50-08:00 torvalds@osdl.org +1 -1 # Fix missing part of x86-64 update # # arch/x86_64/mm/init.c # 2004/03/18 13:03:55-08:00 torvalds@osdl.org +3 -3 # Fix missing part of x86-64 update # # arch/x86_64/kernel/setup.c # 2004/03/16 19:45:56-08:00 torvalds@osdl.org +2 -4 # Fix missing part of x86-64 update # # arch/x86_64/kernel/process.c # 2004/03/16 06:05:14-08:00 torvalds@osdl.org +3 -1 # Fix missing part of x86-64 update # # arch/x86_64/kernel/pci-gart.c # 2004/03/19 10:38:17-08:00 torvalds@osdl.org +36 -21 # Fix missing part of x86-64 update # # arch/x86_64/kernel/mpparse.c # 2004/03/19 10:38:17-08:00 torvalds@osdl.org +40 -44 # Fix missing part of x86-64 update # # ChangeSet # 2004/03/20 10:29:59-08:00 torvalds@ppc970.osdl.org # Merge alpha Kconfig # # arch/alpha/Kconfig # 2004/03/20 10:29:54-08:00 torvalds@ppc970.osdl.org +0 -2 # Merge alpha Kconfig # # ChangeSet # 2004/03/20 10:02:00-08:00 rth@kanga.twiddle.home # [ALPHA] Update defconfig. # # arch/alpha/defconfig # 2004/03/20 10:01:44-08:00 rth@kanga.twiddle.home +308 -137 # Update. # # ChangeSet # 2004/03/20 17:53:21+00:00 ambx1@neo.rr.com # [ISAPNP] Unmark experimental status # # ISAPnP support has been stable with the new pnp layer for a while. # This patch removes the experimental dependency. # # drivers/pnp/isapnp/Kconfig # 2004/03/20 17:53:00+00:00 ambx1@neo.rr.com +2 -2 # [ISAPNP] Unmark experimental status # # ChangeSet # 2004/03/20 09:48:18-08:00 bunk@fs.tum.de # [PATCH] fix scsi_transport_spi.c compile with gcc 2.95 # # Fix token pasting to work with older gcc versions. # # We need a space before the "," that may get pasted away. # # drivers/scsi/scsi_transport_spi.c # 2004/03/14 02:45:30-08:00 bunk@fs.tum.de +1 -1 # fix scsi_transport_spi.c compile with gcc 2.95 # # ChangeSet # 2004/03/20 17:47:54+00:00 ambx1@neo.rr.com # [PNP] Add some more modem IDs # # This patch allows the serial driver to bind to three additional modems. # # drivers/serial/8250_pnp.c # 2004/03/20 17:47:29+00:00 ambx1@neo.rr.com +6 -0 # [PNP] Add some more modem IDs # # ChangeSet # 2004/03/20 09:45:57-08:00 akpm@osdl.org # [PATCH] fix console oops/race # # Finally nailed this sucker. # # con_close() checks the tty->count and then sleeps in acquire_console_sem(). # But another process can come in and grab a ref against the tty while # con_close() dropped the BKL. But con_close() then proceeds to deallocate the # tty->driver_data anyway, even though the tty now has ->count == 2. # # Fix that by moving the check for ->tty_count inside console_sem. # # drivers/char/vt.c # 2004/03/20 02:16:46-08:00 akpm@osdl.org +10 -11 # fix console oops/race # # ChangeSet # 2004/03/20 09:44:56-08:00 ak@suse.de # [PATCH] critical x86-64 merge # # There were some nasty bugs in the x86-64 code, including one race that # could cause random reboots, especially on Intel machines, with the NMI # watchdog. This patch fixes them and also includes some harmless # cleanups. # # Main fixes were for some buglets in the IOMMU code and the plugging of a # race in the exception stack handling. Also disables an broken MCE on K8 # explicitely. # # Also finally the preempt compile issues are fixed. # # - Declare hpet interrupt separately in drivers/char/rtc.c # - Fix rtc.h/hpet.h to not depend on interrupt.h # - Finally include smp_lock.h in hardirq.h # - Update defconfig # - Export bad_dma_address # - Merge with 2.6.5rc2 # - Never schedule on interrupt stacks. # - Add option to force software iotlb (iommu=soft) # - Add ifdefs to gsi patch to match i386 (Bjorn Helgaas) # - Fix K8 GART TLB MCE workaround to actually work # - Fix dwarf2 unwind table in SAVE_ARGS (Jim Houston) # - Disable APIC on VIA/NVidia even with acpi=off (Gwenole Beauchesne) # - Fix parsing bug in "apic" option (Gwenole Beauchesne) # - Fix dma mask handling in pci_alloc_consistent # - Make pci_alloc_consistent more robust in low memory situations. # - Print version number in oopses (from i386) # - ACPI GSI cleanup (Bjorn Helgaas) # - Disable K8 GART TLB walk error MCE explicitely # - Add support to disable individual MCEs in the various banks. # # arch/x86_64/kernel/mce.c # 2004/03/19 19:10:05-08:00 ak@suse.de +37 -26 # critical x86-64 merge # # arch/x86_64/kernel/entry.S # 2004/03/18 19:56:27-08:00 ak@suse.de +9 -5 # critical x86-64 merge # # arch/x86_64/kernel/acpi/boot.c # 2004/03/18 14:25:51-08:00 ak@suse.de +11 -0 # critical x86-64 merge # # arch/x86_64/defconfig # 2004/03/19 17:36:01-08:00 ak@suse.de +89 -392 # critical x86-64 merge # # ChangeSet # 2004/03/20 09:42:56-08:00 torvalds@ppc970.osdl.org # Rename therm_adt7467.c to match the new reality. # # drivers/macintosh/therm_adt746x.c # 2004/03/20 09:42:13-08:00 torvalds@ppc970.osdl.org +0 -0 # Rename: drivers/macintosh/therm_adt7467.c -> drivers/macintosh/therm_adt746x.c # # ChangeSet # 2004/03/20 09:41:51-08:00 akpm@osdl.org # [PATCH] therm_adt7467 update # # From: "Colin Leroy" # # The fan driver I wrote for adt746x looks like it only handles the adt7467 # chip found in iBooks G4; but it also handles the adt7460 chip found in the # Powerbook G4 Alu. Here's a patch that updates therm_adt7467.c, Kconfig and # Makefile. # # drivers/macintosh/therm_adt7467.c # 2004/03/19 10:32:33-08:00 akpm@osdl.org +2 -5 # therm_adt7467 update # # drivers/macintosh/Makefile # 2004/03/19 10:32:33-08:00 akpm@osdl.org +1 -1 # therm_adt7467 update # # drivers/macintosh/Kconfig # 2004/03/19 10:32:33-08:00 akpm@osdl.org +2 -2 # therm_adt7467 update # # CREDITS # 2004/03/19 10:32:33-08:00 akpm@osdl.org +7 -0 # therm_adt7467 update # # ChangeSet # 2004/03/20 17:12:57+00:00 hch@lst.de # [ISAPNP] Remove uneeded MOD_INC/DEC_USE_COUNT # # isapnp_cfg_begin and isapnp_cfg_end are exported symbols, so if any # module using them is loaded isapnp.o can't be unloaded anyway # # drivers/pnp/isapnp/core.c # 2004/03/20 17:10:01+00:00 hch@lst.de +0 -2 # [ISAPNP] Remove uneeded MOD_INC/DEC_USE_COUNT # # ChangeSet # 2004/03/20 16:39:38+00:00 rddunlap@osdl.org # [PNP] remove __init from system.c # # // Linux 2.6.4-rc2 # // These 2 functions shouldn't be __init for general PNP use # # drivers/pnp/system.c # 2004/03/20 16:38:56+00:00 rddunlap@osdl.org +2 -2 # [PNP] remove __init from system.c # # ChangeSet # 2004/03/20 13:49:10+00:00 ambx1@neo.rr.com # [ISAPNP] MEM Config Fix # # This patch fixes a bug in the resource configuration function. If # there are more than one memory ranges, the isapnp driver will write # into the incorrect configuration register. # # ChangeSet # 2004/03/20 08:48:59-05:00 brking@us.ibm.com # [PATCH] SCSI: Fix Oops in sg with lots of SG_IO activity # # Attached is a patch to fix an oops in sg_cmd_done. Please apply. # # drivers/pnp/isapnp/core.c # 2004/03/20 13:48:47+00:00 ambx1@neo.rr.com +1 -1 # [ISAPNP] MEM Config Fix # # drivers/scsi/sg.c # 2004/03/20 08:48:28-05:00 brking@us.ibm.com +2 -2 # SCSI: Fix Oops in sg with lots of SG_IO activity # # ChangeSet # 2004/03/20 08:48:03-05:00 Kai.Makisara@kolumbus.fi # [PATCH] Fix SCSI + st regressions problem # # remove dependency on kobj.name. # # drivers/scsi/st.c # 2004/03/20 08:47:27-05:00 Kai.Makisara@kolumbus.fi +10 -5 # Fix SCSI + st regressions problem # # ChangeSet # 2004/03/20 11:41:40+01:00 marcel@holtmann.org # [Bluetooth] Fix display for class of device # # The class of device is displayed in wrong byte order. This patch swaps it # and now the inquiry_cache attribute shows the same as the userspace tools. # # net/bluetooth/hci_sysfs.c # 2004/03/20 11:39:10+01:00 marcel@holtmann.org +1 -1 # Fix display for class of device # # ChangeSet # 2004/03/20 11:35:39+01:00 marcel@holtmann.org # [Bluetooth] Add support for AVM BlueFRITZ! USB v2.0 # # This patch adds the vendor and product id for the AVM BlueFRITZ! USB v2.0 # dongle which don't uses the USB Bluetooth class id. # # drivers/bluetooth/hci_usb.c # 2004/03/20 11:33:14+01:00 marcel@holtmann.org +3 -0 # Add support for AVM BlueFRITZ! USB v2.0 # # ChangeSet # 2004/03/20 11:25:53+01:00 marcel@holtmann.org # [Bluetooth] Add missing compat ioctl's for CMTP # # This patch adds the missing compat ioctl's for the CAPI Message Transport # Protocol. # # include/linux/compat_ioctl.h # 2004/03/20 11:25:22+01:00 marcel@holtmann.org +4 -0 # Add missing compat ioctl's for CMTP # # fs/compat_ioctl.c # 2004/03/20 11:25:05+01:00 marcel@holtmann.org +11 -6 # Add missing compat ioctl's for CMTP # # ChangeSet # 2004/03/20 12:35:40+09:00 yoshfuji@linux-ipv6.org # [XFRM] remove unused argument for (*find_bundle)(). # # net/xfrm/xfrm_policy.c # 2004/03/20 12:35:32+09:00 yoshfuji@linux-ipv6.org +3 -3 # [XFRM] remove unused argument for (*find_bundle)(). # # net/ipv6/xfrm6_policy.c # 2004/03/20 12:35:32+09:00 yoshfuji@linux-ipv6.org +1 -1 # [XFRM] remove unused argument for (*find_bundle)(). # # net/ipv4/xfrm4_policy.c # 2004/03/20 12:35:32+09:00 yoshfuji@linux-ipv6.org +1 -1 # [XFRM] remove unused argument for (*find_bundle)(). # # include/net/xfrm.h # 2004/03/20 12:35:32+09:00 yoshfuji@linux-ipv6.org +1 -1 # [XFRM] remove unused argument for (*find_bundle)(). # # ChangeSet # 2004/03/20 12:34:37+09:00 yoshfuji@linux-ipv6.org # [XFRM] remove duplicated lines; fl->fl4_{src,dst} is already filled in xfrm_lookup(). # # net/ipv4/xfrm4_policy.c # 2004/03/20 12:31:15+09:00 yoshfuji@linux-ipv6.org +0 -4 # [XFRM] remove duplicated lines; fl->fl4_{src,dst} is already filled in xfrm_lookup(). # # ChangeSet # 2004/03/20 00:36:51+00:00 ambx1@neo.rr.com # [ISAPNP] Fix Device Detection Issue # # Some isapnp devices were not getting detected as a result of a bug in the isapnp # driver. It was not following the specifications and calculating a checksum when # it was not reliable. This problem was originally discovered by Paul L. Rogers # . He made an initial patch. This release has some small # modifications, including a check to see if we run out of CSNs. # # drivers/pnp/isapnp/core.c # 2004/03/20 00:36:33+00:00 ambx1@neo.rr.com +6 -8 # [ISAPNP] Fix Device Detection Issue # # ChangeSet # 2004/03/20 00:33:35+00:00 ambx1@neo.rr.com # [PARPORT] Update PC Parport Detection Code # # This patch updates the parport_pc driver's probing code to better # detect PnP devices. It also removes an extra MODULE_AUTHOR. # # drivers/parport/parport_pc.c # 2004/03/20 00:33:15+00:00 ambx1@neo.rr.com +72 -28 # [PARPORT] Update PC Parport Detection Code # # ChangeSet # 2004/03/20 00:29:38+00:00 willy@debian.org # [PNP] Resource Conflict Cleanup # # This patch simplifies the ranged resource checking logic. # # drivers/pnp/resource.c # 2004/03/20 00:28:51+00:00 willy@debian.org +2 -8 # [PNP] Resource Conflict Cleanup # # ChangeSet # 2004/03/19 15:23:15-08:00 kenneth.w.chen@intel.com # [PATCH] ia64: Interim pal_halt_light patch # # While the sysctl variable is being worked out in the general kernel, here is # an interim patch which allows boot-time/dynamic control over the use of # PAL_HALT_LIGHT in the idle-loop. # # arch/ia64/kernel/process.c # 2004/03/19 13:44:50-08:00 kenneth.w.chen@intel.com +13 -4 # ia64: Interim pal_halt_light patch # # arch/ia64/Kconfig # 2004/03/19 13:15:35-08:00 kenneth.w.chen@intel.com +0 -9 # ia64: Interim pal_halt_light patch # # ChangeSet # 2004/03/19 12:29:20-08:00 rth@kanga.twiddle.home # [TRIVIAL] Tighten sanity in time_init to 250 ppm. # From: "Bailey, Scott" # # arch/alpha/kernel/time.c # 2004/03/19 12:29:04-08:00 rth@kanga.twiddle.home +6 -4 # Tighten sanity in time_init to 250 ppm. # # ChangeSet # 2004/03/18 20:36:25-08:00 rth@kanga.twiddle.home # [ALPHA] Streamline opDEC_check and the actual fixup bits in do_entIF. # # arch/alpha/kernel/traps.c # 2004/03/18 20:36:09-08:00 rth@kanga.twiddle.home +35 -40 # Streamline opDEC_check and the actual fixup bits in do_entIF. # # ChangeSet # 2004/03/18 22:24:47-05:00 len.brown@intel.com # [ACPI] numa.c build fix (Luming Yu) # http://bugzilla.kernel.org/show_bug.cgi?id=2131 # # drivers/acpi/numa.c # 2004/02/18 04:19:31-05:00 len.brown@intel.com +9 -2 # [ACPI] numa.c build fix (Luming Yu) # # ChangeSet # 2004/03/18 18:32:56-08:00 jeremy@sgi.com # [PATCH] ia64: make level sensitive interrupt emulation default on SN2 # # SN2 doesn't fully support level triggered interrupts. As a # workaround, we need this patch to force another interrupt if the line # is still high after a handler completes. # # arch/ia64/sn/kernel/sn2/sn_proc_fs.c # 2004/03/17 19:13:51-08:00 jeremy@sgi.com +7 -2 # ia64: make level sensitive interrupt emulation default on SN2 # # ChangeSet # 2004/03/18 10:11:09-08:00 davidm@tiger.hpl.hp.com # ia64: Small cleanup in __kernel_sigtramp(). # # arch/ia64/kernel/gate.S # 2004/03/18 10:11:02-08:00 davidm@tiger.hpl.hp.com +1 -1 # (__kernel_sigtramp): Remove left-over post-increment of base0 and fix # obsolete comment. # # ChangeSet # 2004/03/17 21:57:22-08:00 davidm@tiger.hpl.hp.com # ia64: GCC v3.5 fixes. # # GCC v3.5 doesn't like it when a function gets cast to a # function-pointer with a different signature. In fact, it exterts # extreme prejudice in this case and replaces the call-site with a call # to __builtin_trap()! Fix this by providing appropriately typed # dummy-functions for the macvec operations as needed. # # While at it, also clean up some machvec handlers which weren't used anywhere. # # include/asm-ia64/machvec_hpzx1.h # 2004/03/17 21:57:15-08:00 davidm@tiger.hpl.hp.com +5 -5 # (platform_dma_sync_single_for_cpu): Define to machvec_dma_sync_single. # (platform_dma_sync_single_for_device): Likewise. # (platform_dma_sync_sg_for_cpu): Define to machvec_dma_sync_sg. # (platform_dma_sync_sg_for_device): Likewise. # # include/asm-ia64/machvec.h # 2004/03/17 21:57:15-08:00 davidm@tiger.hpl.hp.com +12 -36 # (ia64_mv_mca_init_t): Delete (not used anywhere). # (ia64_mv_mca_handler_t): Likewise. # (ia64_mv_cmci_handler_t): Likewise. # (ia64_mv_log_print_t): Likewise. # (machvec_setup): Declare as extern. # (machvec_timer_interrupt): Likewise. # (machvec_dma_sync_single): Likewise. # (machvec_dma_sync_sg): Likewise. # (platform_irq_init): Default to machvec_noop (no cast). # (platform_timer_interrupt): Default to machvec_timer_interrupt (no cast). # # arch/ia64/kernel/machvec.c # 2004/03/17 21:57:15-08:00 davidm@tiger.hpl.hp.com +21 -2 # (machvec_memory_fence): Delete. # (machvec_setup): New function. # (machvec_timer_interrupt): Likewise. # (machvec_dma_sync_single): Likewise. # (machvec_dma_sync_sg): Likewise. # # ChangeSet # 2004/03/17 17:15:25-08:00 rth@kanga.twiddle.home # [TRIVIAL] Remove x86 instructions on alpha. # From . # # arch/alpha/Kconfig # 2004/03/17 17:15:09-08:00 rth@kanga.twiddle.home +2 -13 # Remove x86 instructions on alpha. # # ChangeSet # 2004/03/17 17:11:34-08:00 rth@kanga.twiddle.home # [TRIVIAL] Miata url update. # From: "Petri T. Koistinen" # # arch/alpha/Kconfig # 2004/03/17 17:11:18-08:00 rth@kanga.twiddle.home +1 -1 # Miata url update. # # ChangeSet # 2004/03/17 17:06:15-08:00 rth@kanga.twiddle.home # [ALPHA] Fix build in alpha_ksyms.c. # # arch/alpha/kernel/alpha_ksyms.c # 2004/03/17 16:58:10-08:00 rth@kanga.twiddle.home +3 -0 # Include . # # ChangeSet # 2004/03/17 15:28:48-08:00 kaos@sgi.com # [PATCH] ia64: force all kernel sections into one and the same segment # # Older versions of the linker do not handle cross-segment segment-relative # relocations properly. This becomes a real problem when the linker decides # to put .text and .text.init into different segments (for whatever reasons) # because in that case, broken linkers will produce a broken unwind section, # which can cause nasty Heisenbugs, where, for example, unwinding may or may # not work depending on the exact value of the IP in a function. # # arch/ia64/kernel/vmlinux.lds.S # 2004/03/17 06:44:14-08:00 kaos@sgi.com +9 -0 # n### Change the comments to ChangeSet|1.1670 below # [PATCH] ia64: force all kernel sections into one and the same segment # # Older versions of the linker do not handle cross-segment # segment-relative relocations properly. This becomes a real problem # when the linker decides to put .text and .text.init into different # segments (for whatever reasons) because in that case, the broken # linker will produce a broken unwind section which intermingles # unwind info from the two sections. Fix is to simply force all sections # into the same segment. # # ia64: force all kernel sections into one and the same segment # # ChangeSet # 2004/03/17 15:25:47-08:00 willy@debian.org # [PATCH] ia64: kill unused ACPI configgery # # The config ACPI helptext isn't used because the option is never # presented to the user. # ACPI_KERNEL_CONFIG is unused. # ACPI_INTERPRETER is now set in drivers/acpi/Kconfig. # # arch/ia64/Kconfig # 2004/03/17 14:54:06-08:00 willy@debian.org +0 -41 # ia64: kill unused ACPI configgery # # ChangeSet # 2004/03/17 12:53:09-08:00 bjorn.helgaas@hp.com # [PATCH] ia64: init IO port space, IO accessors earlier # # This is a minor patch to get things setup so consoles can # work earlier. (No change to consoles here, I just split this # out to make the diff easier to read.) # # (io_port_init): New function, same old code to setup ia64_iobase # and legacy IO port space. # (setup_arch): Call io_port_init() and machvec_init() as early as # possible so consoles can work earlier. # # arch/ia64/kernel/setup.c # 2004/03/17 04:46:59-08:00 bjorn.helgaas@hp.com +37 -32 # ia64: init IO port space, IO accessors earlier # # ChangeSet # 2004/03/17 15:36:55-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/linux-2.6.5 # into intel.com:/home/lenb/src/linux-acpi-test-2.6.5 # # arch/x86_64/kernel/setup.c # 2004/03/17 15:36:51-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/03/17 00:45:57-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/linux-acpi-test-2.6.4 # into intel.com:/home/lenb/src/linux-acpi-test-2.6.5 # # arch/x86_64/kernel/setup.c # 2004/03/17 00:45:53-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/mpparse.c # 2004/03/17 00:45:51-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/setup.c # 2004/03/17 00:45:51-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/03/17 00:44:22-05:00 len.brown@intel.com # [ACPI] check "maxcpus=N" early -- same as NR_CPUS check. # http://bugzilla.kernel.org/show_bug.cgi?id=2317 # # When the BIOS enumerates physical processors before logical, # maxcpus=N/2 will now effectively disable HT. # # This can be verified by boot messages warning that HT is off: # eg. "maxcpus=2" on a 2xHT system: # # Total of 2 processors activated (11141.12 BogoMIPS). # WARNING: No sibling found for CPU 0. # WARNING: No sibling found for CPU 1. # # arch/x86_64/kernel/setup.c # 2004/03/17 00:43:10-05:00 len.brown@intel.com +12 -1 # check "maxcpus=N" at processor enumeration-time rather than smpboot-time # # arch/x86_64/kernel/mpparse.c # 2004/03/17 00:43:10-05:00 len.brown@intel.com +12 -0 # check "maxcpus=N" at processor enumeration-time rather than smpboot-time # # arch/i386/kernel/setup.c # 2004/03/17 00:43:10-05:00 len.brown@intel.com +12 -0 # check "maxcpus=N" at processor enumeration-time rather than smpboot-time # # arch/i386/kernel/mpparse.c # 2004/03/17 00:43:10-05:00 len.brown@intel.com +9 -2 # check "maxcpus=N" at processor enumeration-time rather than smpboot-time # # ChangeSet # 2004/03/16 02:14:55-08:00 wesolows@foobazco.org # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # The only users of this were udelay/ndelay. These now look more # like sparc64, except ours are too weird and too big to inline. # # include/asm-sparc/smp.h # 2004/03/16 02:14:49-08:00 wesolows@foobazco.org +4 -1 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # include/asm-sparc/delay.h # 2004/03/16 02:14:49-08:00 wesolows@foobazco.org +12 -3 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # include/asm-sparc/asmmacro.h # 2004/03/16 02:14:48-08:00 wesolows@foobazco.org +0 -7 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # arch/sparc/kernel/sun4m_smp.c # 2004/03/16 02:14:48-08:00 wesolows@foobazco.org +0 -6 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # arch/sparc/kernel/sun4d_smp.c # 2004/03/16 02:14:48-08:00 wesolows@foobazco.org +0 -7 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # arch/sparc/kernel/sparc_ksyms.c # 2004/03/16 02:14:48-08:00 wesolows@foobazco.org +2 -2 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # arch/sparc/kernel/smp.c # 2004/03/16 02:14:48-08:00 wesolows@foobazco.org +1 -1 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # # arch/sparc/kernel/entry.S # 2004/03/16 02:14:48-08:00 wesolows@foobazco.org +20 -18 # [SPARC32]: Down with our cpu_offset. Use regular per_cpu instead. # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS Sun Mar 28 13:12:08 2004 +++ b/CREDITS Sun Mar 28 13:12:08 2004 @@ -1864,6 +1864,13 @@ S: D53424 Remagen S: Germany +N: Colin Leroy +E: colin@colino.net +W: http://www.geekounet.org/ +D: PowerMac adt7467 fan driver +S: Toulouse +S: France + N: Achim Leubner E: achim_leubner@adaptec.com D: GDT Disk Array Controller/Storage RAID controller driver diff -Nru a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt --- a/Documentation/DMA-API.txt Sun Mar 28 13:12:08 2004 +++ b/Documentation/DMA-API.txt Sun Mar 28 13:12:08 2004 @@ -279,14 +279,14 @@ cache width is. int -dma_error(dma_addr_t dma_addr) +dma_mapping_error(dma_addr_t dma_addr) int -pci_dma_error(dma_addr_t dma_addr) +pci_dma_mapping_error(dma_addr_t dma_addr) In some circumstances dma_map_single and dma_map_page will fail to create a mapping. A driver can check for these errors by testing the returned -dma address with dma_error(). A non zero return value means the mapping +dma address with dma_mapping_error(). A non zero return value means the mapping could not be created and the driver should take appropriate action (eg reduce current DMA mapping usage or delay and try again later). diff -Nru a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt --- a/Documentation/DMA-mapping.txt Sun Mar 28 13:12:08 2004 +++ b/Documentation/DMA-mapping.txt Sun Mar 28 13:12:08 2004 @@ -850,12 +850,12 @@ - checking if pci_alloc_consistent returns NULL or pci_map_sg returns 0 - checking the returned dma_addr_t of pci_map_single and pci_map_page - by using pci_dma_error(): + by using pci_dma_mapping_error(): dma_addr_t dma_handle; dma_handle = pci_map_single(dev, addr, size, direction); - if (pci_dma_error(dma_handle)) { + if (pci_dma_mapping_error(dma_handle)) { /* * reduce current DMA mapping usage, * delay and try again later or diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt --- a/Documentation/crypto/api-intro.txt Sun Mar 28 13:12:08 2004 +++ b/Documentation/crypto/api-intro.txt Sun Mar 28 13:12:08 2004 @@ -187,6 +187,7 @@ Brian Gladman (AES) Kartikey Mahendra Bhatt (CAST6) Jon Oberheide (ARC4) + Jouni Malinen (Michael MIC) SHA1 algorithm contributors: Jean-Francois Dive diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt Sun Mar 28 13:12:08 2004 +++ b/Documentation/kernel-parameters.txt Sun Mar 28 13:12:08 2004 @@ -103,10 +103,8 @@ Format: { s3_bios, s3_mode } See Documentation/power/video.txt - acpi_pic_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode - Format: { level | edge } - level Force PIC-mode SCI to Level Trigger (default) - edge Force PIC-mode SCI to Edge Trigge + acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode + Format: { level | edge | high | low } acpi_irq_balance [HW,ACPI] ACPI will balance active IRQs default in APIC mode diff -Nru a/Documentation/sh/new-machine.txt b/Documentation/sh/new-machine.txt --- a/Documentation/sh/new-machine.txt Sun Mar 28 13:12:08 2004 +++ b/Documentation/sh/new-machine.txt Sun Mar 28 13:12:08 2004 @@ -288,22 +288,22 @@ used on it. Also, as soon as you have copied over a sample .config for your new board -(assume arch/sh/configs/defconfig-vapor), you can also use this directly as a +(assume arch/sh/configs/vapor_defconfig), you can also use this directly as a build target, and it will be implicitly listed as such in the help text. Looking at the 'make help' output, you should now see something like: Architecture specific targets (sh): zImage - Compressed kernel image (arch/sh/boot/zImage) - defconfig-adx - Build for adx - defconfig-cqreek - Build for cqreek - defconfig-dreamcast - Build for dreamcast + adx_defconfig - Build for adx + cqreek_defconfig - Build for cqreek + dreamcast_defconfig - Build for dreamcast ... - defconfig-vapor - Build for vapor + vapor_defconfig - Build for vapor which then allows you to do: -$ make ARCH=sh CROSS_COMPILE=sh4-linux- defconfig-vapor vmlinux +$ make ARCH=sh CROSS_COMPILE=sh4-linux- vapor_defconfig vmlinux which will in turn copy the defconfig for this board, run it through oldconfig (prompting you for any new options since the time of creation), diff -Nru a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt --- a/Documentation/x86_64/boot-options.txt Sun Mar 28 13:12:08 2004 +++ b/Documentation/x86_64/boot-options.txt Sun Mar 28 13:12:08 2004 @@ -136,7 +136,7 @@ IOMMU - iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]] + iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]][,soft] size set size of iommu (in bytes) noagp don't initialize the AGP driver and use full aperture. off don't use the IOMMU @@ -144,5 +144,9 @@ memaper[=order] allocate an own aperture over RAM with size 32MB^order. noforce don't force IOMMU usage. Default. force Force IOMMU + soft Use software bounce buffering for non 32bit IO. Default on Intel + machines. + swiotlb=pages + Prereserve that many 4K pages for the software IO bounce buffering. diff -Nru a/Makefile b/Makefile --- a/Makefile Sun Mar 28 13:12:08 2004 +++ b/Makefile Sun Mar 28 13:12:08 2004 @@ -563,7 +563,7 @@ # Handle descending into subdirectories listed in $(SUBDIRS) .PHONY: $(SUBDIRS) -$(SUBDIRS): prepare-all +$(SUBDIRS): prepare-all scripts $(Q)$(MAKE) $(build)=$@ # Things we need to do before we recursively start building the kernel diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig --- a/arch/alpha/Kconfig Sun Mar 28 13:12:08 2004 +++ b/arch/alpha/Kconfig Sun Mar 28 13:12:08 2004 @@ -188,7 +188,7 @@ help The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a, or 600au). There is an Installation HOWTO for this hardware at - . + . config ALPHA_MIKASA bool "Mikasa" @@ -486,19 +486,8 @@ singleprocessor machines. On a singleprocessor machine, the kernel will run faster if you say N here. - Note that if you say Y here and choose architecture "586" or - "Pentium" under "Processor family", the kernel will not work on 486 - architectures. Similarly, multiprocessor kernels for the "PPro" - architecture may not work on all Pentium based boards. - - People using multiprocessor machines who say Y here should also say - Y to "Enhanced Real Time Clock Support", below. The "Advanced Power - Management" code will be disabled if you say Y here. - - See also the , - , - and the SMP-HOWTO available at - . + See also the , and the SMP-HOWTO + available at . If you don't know what to do here, say N. diff -Nru a/arch/alpha/defconfig b/arch/alpha/defconfig --- a/arch/alpha/defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/alpha/defconfig Sun Mar 28 13:12:08 2004 @@ -2,8 +2,8 @@ # Automatically generated make config: don't edit # CONFIG_ALPHA=y +CONFIG_64BIT=y CONFIG_MMU=y -CONFIG_SWAP=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_ISA_DMA=y @@ -11,14 +11,28 @@ # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_NET=y +CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # # Loadable module support @@ -26,6 +40,8 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set CONFIG_KMOD=y # @@ -45,6 +61,8 @@ # CONFIG_ALPHA_EIGER is not set # CONFIG_ALPHA_JENSEN is not set # CONFIG_ALPHA_LX164 is not set +# CONFIG_ALPHA_LYNX is not set +# CONFIG_ALPHA_MARVEL is not set # CONFIG_ALPHA_MIATA is not set # CONFIG_ALPHA_MIKASA is not set # CONFIG_ALPHA_NAUTILUS is not set @@ -62,26 +80,35 @@ # CONFIG_ALPHA_TITAN is not set # CONFIG_ALPHA_WILDFIRE is not set CONFIG_ISA=y -CONFIG_EISA=y CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_ALPHA_CORE_AGP=y CONFIG_ALPHA_BROKEN_IRQ_MASK=y +CONFIG_EARLY_PRINTK=y +CONFIG_EISA=y # CONFIG_SMP is not set # CONFIG_DISCONTIGMEM is not set CONFIG_VERBOSE_MCHECK=y +CONFIG_VERBOSE_MCHECK_ON=1 +CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set +CONFIG_EISA_PCI_EISA=y +CONFIG_EISA_VIRTUAL_ROOT=y +CONFIG_EISA_NAMES=y CONFIG_SRM_ENV=m -# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_EM86 is not set +# CONFIG_BINFMT_MISC is not set # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -89,10 +116,14 @@ # CONFIG_MTD is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # CONFIG_PNP=y -# CONFIG_PNP_NAMES is not set # CONFIG_PNP_DEBUG is not set # @@ -111,63 +142,60 @@ # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_CARMEL is not set # CONFIG_BLK_DEV_RAM is not set # -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# # ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# +CONFIG_IDE_MAX_HWIFS=4 CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # -# CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y # 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 # -# CONFIG_BLK_DEV_ISAPNP is not set +CONFIG_IDE_GENERIC=y +# CONFIG_BLK_DEV_IDEPNP is not set CONFIG_BLK_DEV_IDEPCI=y -CONFIG_BLK_DEV_GENERIC=y # CONFIG_IDEPCI_SHARE_IRQ is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDE_TCQ is not set # CONFIG_BLK_DEV_OFFBOARD is not set +CONFIG_BLK_DEV_GENERIC=y +# CONFIG_BLK_DEV_OPTI621 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_IDEDMA=y CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set CONFIG_BLK_DEV_ALI15X3=y # CONFIG_WDC_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set CONFIG_BLK_DEV_CMD64X=y +# CONFIG_BLK_DEV_TRIFLEX is not set CONFIG_BLK_DEV_CY82C693=y +# CONFIG_BLK_DEV_CS5520 is not set # CONFIG_BLK_DEV_CS5530 is not set # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_PIIX is not set # CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set # CONFIG_BLK_DEV_SVWKS is not set @@ -176,13 +204,16 @@ # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set # CONFIG_IDE_CHIPSETS is not set -CONFIG_IDEDMA_AUTO=y +CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set # -# SCSI support +# SCSI device support # CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) @@ -203,85 +234,104 @@ # CONFIG_SCSI_LOGGING is not set # +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_7000FASST is not set # CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 is not set # CONFIG_SCSI_AHA1740 is not set # CONFIG_SCSI_AACRAID is not set CONFIG_SCSI_AIC7XXX=m CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 CONFIG_AIC7XXX_RESET_DELAY_MS=5000 +# CONFIG_AIC7XXX_PROBE_EISA_VL is not set # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 is not set # CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_DMA 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_GENERIC_NCR5380 is not set # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_NCR53C7xx is not set # CONFIG_SCSI_SYM53C8XX_2 is not set -CONFIG_SCSI_NCR53C8XX=y -CONFIG_SCSI_SYM53C8XX=y -CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 -CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 -CONFIG_SCSI_NCR53C8XX_SYNC=20 -# CONFIG_SCSI_NCR53C8XX_PROFILE is not set -# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set -# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set -# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set # CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set # CONFIG_SCSI_PSI240I is not set # CONFIG_SCSI_QLOGIC_FAS is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_QLA6322 is not set # CONFIG_SCSI_SIM710 is not set # CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_DEBUG is not set # +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# # Fusion MPT device support # # CONFIG_FUSION is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set # +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_NETLINK_DEV=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_FILTER is not set CONFIG_UNIX=y CONFIG_NET_KEY=m CONFIG_INET=y @@ -296,7 +346,17 @@ # CONFIG_SYN_COOKIES is not set CONFIG_INET_AH=m CONFIG_INET_ESP=m -CONFIG_XFRM_USER=m +# CONFIG_INET_IPCOMP 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 # # IP: Netfilter Configuration @@ -304,14 +364,18 @@ CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m +# CONFIG_IP_NF_TFTP is not set +# CONFIG_IP_NF_AMANDA is not set CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m # CONFIG_IP_NF_MATCH_LIMIT is not set +# CONFIG_IP_NF_MATCH_IPRANGE is not set # CONFIG_IP_NF_MATCH_MAC is not set # CONFIG_IP_NF_MATCH_PKTTYPE is not set # CONFIG_IP_NF_MATCH_MARK is not set # CONFIG_IP_NF_MATCH_MULTIPORT is not set # CONFIG_IP_NF_MATCH_TOS is not set +# CONFIG_IP_NF_MATCH_RECENT is not set # CONFIG_IP_NF_MATCH_ECN is not set # CONFIG_IP_NF_MATCH_DSCP is not set # CONFIG_IP_NF_MATCH_AH_ESP is not set @@ -321,15 +385,15 @@ # CONFIG_IP_NF_MATCH_HELPER is not set # CONFIG_IP_NF_MATCH_STATE is not set # CONFIG_IP_NF_MATCH_CONNTRACK is not set -# CONFIG_IP_NF_MATCH_UNCLEAN is not set # CONFIG_IP_NF_MATCH_OWNER is not set CONFIG_IP_NF_FILTER=m # CONFIG_IP_NF_TARGET_REJECT is not set -# CONFIG_IP_NF_TARGET_MIRROR is not set CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m # CONFIG_IP_NF_TARGET_REDIRECT is not set +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_LOCAL is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set CONFIG_IP_NF_NAT_IRC=m @@ -340,7 +404,8 @@ # CONFIG_IP_NF_TARGET_TCPMSS is not set # CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_COMPAT_IPCHAINS=y -# CONFIG_IPV6 is not set +CONFIG_XFRM=y +CONFIG_XFRM_USER=m # # SCTP Configuration (EXPERIMENTAL) @@ -349,9 +414,9 @@ # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set CONFIG_VLAN_8021Q=m -# CONFIG_LLC is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set @@ -369,10 +434,6 @@ # Network testing # # CONFIG_NET_PKTGEN is not set - -# -# Network device support -# CONFIG_NETDEVICES=y # @@ -390,6 +451,7 @@ # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y +CONFIG_MII=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set CONFIG_NET_VENDOR_3COM=y @@ -400,6 +462,7 @@ # CONFIG_EL3 is not set # CONFIG_3C515 is not set CONFIG_VORTEX=y +# CONFIG_TYPHOON is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set @@ -412,6 +475,7 @@ 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 @@ -421,10 +485,12 @@ # CONFIG_NET_ISA is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set # CONFIG_CS89x0 is not set # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set @@ -440,7 +506,6 @@ # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_NET_POCKET is not set @@ -448,13 +513,20 @@ # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set -CONFIG_DL2K=m +# CONFIG_DL2K is not set # CONFIG_E1000 is not set -CONFIG_NS83820=m +# CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set CONFIG_YELLOWFIN=y +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set # CONFIG_SK98LIN is not set # CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_PPP is not set @@ -470,8 +542,8 @@ # # CONFIG_TR is not set # CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # Wan interfaces @@ -484,34 +556,74 @@ # CONFIG_HAMRADIO is not set # +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# Bluetooth support +# +# CONFIG_BT is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # -# Old CD-ROM drivers (not SCSI, not IDE) +# Telephony Support # -# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_PHONE is not set # # Input device support # -# CONFIG_INPUT is not set +CONFIG_INPUT=y # # Userland interfaces # +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set # # Input I/O drivers # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 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=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set # # Character devices @@ -524,32 +636,30 @@ # # Serial drivers # -CONFIG_SERIAL_8250=m +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=m +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_QIC02_TAPE is not set # -# Mice +# IPMI # -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -564,72 +674,134 @@ # CONFIG_RAW_DRIVER is not set # +# I2C support +# +# CONFIG_I2C 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_VGA_CONSOLE=y +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # File systems # -# CONFIG_QUOTA is not set -CONFIG_AUTOFS_FS=m -# CONFIG_AUTOFS4_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set CONFIG_REISERFS_FS=m # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_AUTOFS_FS=m +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set -CONFIG_TMPFS=y -CONFIG_RAMFS=y -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_JFS_FS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set -# CONFIG_XFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=m CONFIG_NFS_V3=y # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=m CONFIG_NFSD_V3=y # CONFIG_NFSD_V4 is not set # CONFIG_NFSD_TCP is not set -CONFIG_SUNRPC=m CONFIG_LOCKD=m CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m -# CONFIG_CIFS is not set +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -638,11 +810,11 @@ # CONFIG_PARTITION_ADVANCED is not set CONFIG_OSF_PARTITION=y CONFIG_MSDOS_PARTITION=y -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set @@ -683,29 +855,9 @@ # CONFIG_NLS_UTF8 is not set # -# Console drivers -# -CONFIG_VGA_CONSOLE=y - -# -# Frame-buffer support -# -# CONFIG_FB is not set - +# Profiling support # -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set +# CONFIG_PROFILING is not set # # Kernel hacking @@ -718,16 +870,34 @@ # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_RWLOCK is not set # CONFIG_DEBUG_SEMAPHORE is not set +CONFIG_DEBUG_INFO=y # # Security options # -CONFIG_SECURITY_CAPABILITIES=y +# CONFIG_SECURITY is not set # # Cryptographic options # -# CONFIG_CRYPTO is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_SHA1=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_TEST is not set # # Library routines diff -Nru a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c --- a/arch/alpha/kernel/alpha_ksyms.c Sun Mar 28 13:12:07 2004 +++ b/arch/alpha/kernel/alpha_ksyms.c Sun Mar 28 13:12:07 2004 @@ -35,6 +35,9 @@ #include #include +#define __KERNEL_SYSCALLS__ +#include + extern struct hwrpb_struct *hwrpb; extern void dump_thread(struct pt_regs *, struct user *); extern spinlock_t rtc_lock; diff -Nru a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c --- a/arch/alpha/kernel/time.c Sun Mar 28 13:12:08 2004 +++ b/arch/alpha/kernel/time.c Sun Mar 28 13:12:08 2004 @@ -24,6 +24,8 @@ * 2000-08-13 Jan-Benedict Glaw * Fixed time_init to be aware of epoches != 1900. This prevents * booting up in 2048 for me;) Code is stolen from rtc.c. + * 2003-06-03 R. Scott Bailey + * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM */ #include #include @@ -306,7 +308,7 @@ time_init(void) { unsigned int year, mon, day, hour, min, sec, cc1, cc2, epoch; - unsigned long cycle_freq, one_percent; + unsigned long cycle_freq, tolerance; long diff; /* Calibrate CPU clock -- attempt #1. */ @@ -324,13 +326,13 @@ cycle_freq = hwrpb->cycle_freq; if (est_cycle_freq) { - /* If the given value is within 1% of what we calculated, + /* If the given value is within 250 PPM of what we calculated, accept it. Otherwise, use what we found. */ - one_percent = cycle_freq / 100; + tolerance = cycle_freq / 4000; diff = cycle_freq - est_cycle_freq; if (diff < 0) diff = -diff; - if ((unsigned long)diff > one_percent) { + if ((unsigned long)diff > tolerance) { cycle_freq = est_cycle_freq; printk("HWRPB cycle frequency bogus. " "Estimated %lu Hz\n", cycle_freq); diff -Nru a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c --- a/arch/alpha/kernel/traps.c Sun Mar 28 13:12:08 2004 +++ b/arch/alpha/kernel/traps.c Sun Mar 28 13:12:08 2004 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -25,35 +26,37 @@ #include "proto.h" -/* data/code implementing a work-around for some SRMs which - mishandle opDEC faults -*/ -static int opDEC_testing = 0; -static int opDEC_fix = 0; -static int opDEC_checked = 0; -static unsigned long opDEC_test_pc = 0; +/* Work-around for some SRMs which mishandle opDEC faults. */ -static void +static int opDEC_fix; + +static void __init opDEC_check(void) { - unsigned long test_pc; - - if (opDEC_checked) return; - - lock_kernel(); - opDEC_testing = 1; + __asm__ __volatile__ ( + /* Load the address of... */ + " br $16, 1f\n" + /* A stub instruction fault handler. Just add 4 to the + pc and continue. */ + " ldq $16, 8($sp)\n" + " addq $16, 4, $16\n" + " stq $16, 8($sp)\n" + " call_pal %[rti]\n" + /* Install the instruction fault handler. */ + "1: lda $17, 3\n" + " call_pal %[wrent]\n" + /* With that in place, the fault from the round-to-minf fp + insn will arrive either at the "lda 4" insn (bad) or one + past that (good). This places the correct fixup in %0. */ + " lda %[fix], 0\n" + " cvttq/svm $f31,$f31\n" + " lda %[fix], 4" + : [fix] "=r" (opDEC_fix) + : [rti] "n" (PAL_rti), [wrent] "n" (PAL_wrent) + : "$0", "$1", "$16", "$17", "$22", "$23", "$24", "$25"); - __asm__ __volatile__( - " br %0,1f\n" - "1: addq %0,8,%0\n" - " stq %0,%1\n" - " cvttq/svm $f31,$f31\n" - : "=&r"(test_pc), "=m"(opDEC_test_pc) - : ); - - opDEC_testing = 0; - opDEC_checked = 1; - unlock_kernel(); + if (opDEC_fix) + printk("opDEC fixup enabled.\n"); } void @@ -244,7 +247,7 @@ siginfo_t info; int signo, code; - if (!opDEC_testing || type != 4) { + if (regs->ps == 0) { if (type == 1) { const unsigned int *data = (const unsigned int *) regs->pc; @@ -359,14 +362,6 @@ fault during the boot sequence and testing if we get the correct PC. If not, we set a flag to correct it every time through. */ - if (opDEC_testing) { - if (regs->pc == opDEC_test_pc) { - opDEC_fix = 4; - regs->pc += 4; - printk("opDEC fixup enabled.\n"); - } - return; - } regs->pc += opDEC_fix; /* EV4 does not implement anything except normal @@ -1083,22 +1078,22 @@ return; } -void +void __init trap_init(void) { /* Tell PAL-code what global pointer we want in the kernel. */ register unsigned long gptr __asm__("$29"); wrkgp(gptr); + /* Hack for Multia (UDB) and JENSEN: some of their SRMs have + a bug in the handling of the opDEC fault. Fix it up if so. */ + if (implver() == IMPLVER_EV4) + opDEC_check(); + wrent(entArith, 1); wrent(entMM, 2); wrent(entIF, 3); wrent(entUna, 4); wrent(entSys, 5); wrent(entDbg, 6); - - /* Hack for Multia (UDB) and JENSEN: some of their SRMs have - a bug in the handling of the opDEC fault. Fix it up if so. */ - if (implver() == IMPLVER_EV4) - opDEC_check(); } diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/Kconfig Sun Mar 28 13:12:08 2004 @@ -75,28 +75,6 @@ config ARCH_ADIFCC bool "ADIFCC-based" -config ARCH_ANAKIN - bool "Anakin" - ---help--- - The Anakin is a StrongArm based SA110 - 2 DIN Vehicle Telematics Platform. - 64MB SDRAM - 4 Mb Flash - Compact Flash Interface - 1 MB VRAM - - On board peripherals: - * Front display: 400x234 16 bit TFT touchscreen - * External independent second screen interface - * CAN controller SJA1000 - * USB host controller - * 6 channel video codec with hardware overlay - * Smartcard reader - * IrDa - - Modules interfaced over the Multi Media Extension slots: - * A communication card - Wavecom GPRS modem - uBlock GPS - Bosch DAB module - * An audio card ( 4 * 40W, AC97 Codec, I2S) - config ARCH_CLPS7500 bool "Cirrus-CL-PS7500FE" diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile --- a/arch/arm/Makefile Sun Mar 28 13:12:07 2004 +++ b/arch/arm/Makefile Sun Mar 28 13:12:07 2004 @@ -96,7 +96,6 @@ textaddr-$(CONFIG_ARCH_CLPS711X) := 0xc0028000 machine-$(CONFIG_ARCH_CLPS711X) := clps711x textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000 - machine-$(CONFIG_ARCH_ANAKIN) := anakin machine-$(CONFIG_ARCH_IOP3XX) := iop3xx machine-$(CONFIG_ARCH_ADIFCC) := adifcc diff -Nru a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile --- a/arch/arm/boot/Makefile Sun Mar 28 13:12:07 2004 +++ b/arch/arm/boot/Makefile Sun Mar 28 13:12:07 2004 @@ -47,7 +47,6 @@ params_phys-$(CONFIG_ARCH_SA1100) := 0xc0000100 initrd_phys-$(CONFIG_ARCH_SA1100) := 0xc0800000 zreladdr-$(CONFIG_ARCH_PXA) := 0xa0008000 - zreladdr-$(CONFIG_ARCH_ANAKIN) := 0x20008000 zreladdr-$(CONFIG_ARCH_IOP3XX) := 0xa0008000 params_phys-$(CONFIG_ARCH_IOP3XX) := 0xa0000100 zreladdr-$(CONFIG_ARCH_ADIFCC) := 0xc0008000 @@ -82,7 +81,7 @@ $(call if_changed,objcopy) @echo ' Kernel: $@ is ready' -quite_cmd_uimage = UIMAGE $@ +quiet_cmd_uimage = UIMAGE $@ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ -C none -a $(ZRELADDR) -e $(ZRELADDR) \ -n 'Linux-$(KERNELRELEASE)' -d $< $@ diff -Nru a/arch/arm/common/amba.c b/arch/arm/common/amba.c --- a/arch/arm/common/amba.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/common/amba.c Sun Mar 28 13:12:07 2004 @@ -199,7 +199,11 @@ dev->dev.release = amba_device_release; dev->dev.bus = &amba_bustype; + dev->dev.dma_mask = &dev->dma_mask; dev->res.name = dev->dev.bus_id; + + if (!dev->dev.coherent_dma_mask && dev->dma_mask) + dev_warn(&dev->dev, "coherent dma mask is unset\n"); ret = request_resource(parent, &dev->res); if (ret == 0) { diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c Sun Mar 28 13:12:08 2004 +++ b/arch/arm/common/sa1111.c Sun Mar 28 13:12:08 2004 @@ -516,6 +516,8 @@ */ if (sachip->dev->dma_mask) *sachip->dev->dma_mask &= sa1111_dma_mask[drac >> 2]; + + sachip->dev->coherent_dma_mask &= sa1111_dma_mask[drac >> 2]; } #endif @@ -558,6 +560,7 @@ dev->dev.parent = sachip->dev; dev->dev.bus = &sa1111_bus_type; dev->dev.release = sa1111_dev_release; + dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; dev->res.start = sachip->phys + info->offset; dev->res.end = dev->res.start + 511; dev->res.name = dev->dev.bus_id; diff -Nru a/arch/arm/configs/adi_evb_defconfig b/arch/arm/configs/adi_evb_defconfig --- a/arch/arm/configs/adi_evb_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/adi_evb_defconfig Sun Mar 28 13:12:08 2004 @@ -28,7 +28,6 @@ # System Type # CONFIG_ARCH_ADIFCC=y -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -417,8 +416,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set diff -Nru a/arch/arm/configs/adsbitsy_defconfig b/arch/arm/configs/adsbitsy_defconfig --- a/arch/arm/configs/adsbitsy_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/adsbitsy_defconfig Sun Mar 28 13:12:08 2004 @@ -25,7 +25,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -581,7 +580,6 @@ # CONFIG_FB_CLPS711X is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_SA1100=y -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_E1355 is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set diff -Nru a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig --- a/arch/arm/configs/assabet_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/assabet_defconfig Sun Mar 28 13:12:07 2004 @@ -27,7 +27,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -527,8 +526,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set @@ -773,7 +770,6 @@ CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y # CONFIG_FB_ACORN is not set -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_CLPS711X is not set CONFIG_FB_SA1100=y # CONFIG_FB_CYBER2000 is not set diff -Nru a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig --- a/arch/arm/configs/badge4_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/badge4_defconfig Sun Mar 28 13:12:08 2004 @@ -35,7 +35,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -654,8 +653,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set diff -Nru a/arch/arm/configs/cerfcube_defconfig b/arch/arm/configs/cerfcube_defconfig --- a/arch/arm/configs/cerfcube_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/cerfcube_defconfig Sun Mar 28 13:12:07 2004 @@ -45,7 +45,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -449,7 +448,6 @@ # CONFIG_IDE_CHIPSETS is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/arm/configs/ebsa110_defconfig b/arch/arm/configs/ebsa110_defconfig --- a/arch/arm/configs/ebsa110_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/ebsa110_defconfig Sun Mar 28 13:12:07 2004 @@ -35,7 +35,6 @@ # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_ANAKIN is not set # # Archimedes/A5000 Implementations diff -Nru a/arch/arm/configs/epxa10db_defconfig b/arch/arm/configs/epxa10db_defconfig --- a/arch/arm/configs/epxa10db_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/epxa10db_defconfig Sun Mar 28 13:12:07 2004 @@ -32,7 +32,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set diff -Nru a/arch/arm/configs/flexanet_defconfig b/arch/arm/configs/flexanet_defconfig --- a/arch/arm/configs/flexanet_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/flexanet_defconfig Sun Mar 28 13:12:08 2004 @@ -27,7 +27,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -513,8 +512,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set @@ -716,7 +713,6 @@ CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y # CONFIG_FB_ACORN is not set -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_CLPS711X is not set CONFIG_FB_SA1100=y # CONFIG_FB_CYBER2000 is not set diff -Nru a/arch/arm/configs/fortunet_defconfig b/arch/arm/configs/fortunet_defconfig --- a/arch/arm/configs/fortunet_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/fortunet_defconfig Sun Mar 28 13:12:08 2004 @@ -27,7 +27,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set CONFIG_ARCH_CLPS711X=y @@ -343,8 +342,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set CONFIG_SERIAL_CLPS711X=y diff -Nru a/arch/arm/configs/graphicsclient_defconfig b/arch/arm/configs/graphicsclient_defconfig --- a/arch/arm/configs/graphicsclient_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/graphicsclient_defconfig Sun Mar 28 13:12:08 2004 @@ -25,7 +25,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -687,7 +686,6 @@ # CONFIG_FB_CLPS711X is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_SA1100=y -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_E1355 is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set diff -Nru a/arch/arm/configs/graphicsmaster_defconfig b/arch/arm/configs/graphicsmaster_defconfig --- a/arch/arm/configs/graphicsmaster_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/graphicsmaster_defconfig Sun Mar 28 13:12:07 2004 @@ -25,7 +25,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -662,7 +661,6 @@ # CONFIG_FB_CLPS711X is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_SA1100=y -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_E1355 is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set diff -Nru a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig --- a/arch/arm/configs/h3600_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/h3600_defconfig Sun Mar 28 13:12:07 2004 @@ -27,7 +27,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -516,8 +515,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set @@ -753,7 +750,6 @@ CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y # CONFIG_FB_ACORN is not set -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_CLPS711X is not set CONFIG_FB_SA1100=y # CONFIG_FB_CYBER2000 is not set diff -Nru a/arch/arm/configs/hackkit_defconfig b/arch/arm/configs/hackkit_defconfig --- a/arch/arm/configs/hackkit_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/hackkit_defconfig Sun Mar 28 13:12:08 2004 @@ -32,7 +32,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set diff -Nru a/arch/arm/configs/integrator_defconfig b/arch/arm/configs/integrator_defconfig --- a/arch/arm/configs/integrator_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/integrator_defconfig Sun Mar 28 13:12:07 2004 @@ -35,7 +35,6 @@ # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_ANAKIN is not set # # Archimedes/A5000 Implementations @@ -620,7 +619,6 @@ # CONFIG_FB_CLPS711X is not set # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_SA1100 is not set -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_E1355 is not set # CONFIG_FB_MATROX is not set # CONFIG_FB_ATY is not set diff -Nru a/arch/arm/configs/iq80310_defconfig b/arch/arm/configs/iq80310_defconfig --- a/arch/arm/configs/iq80310_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/iq80310_defconfig Sun Mar 28 13:12:07 2004 @@ -39,7 +39,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set diff -Nru a/arch/arm/configs/iq80321_defconfig b/arch/arm/configs/iq80321_defconfig --- a/arch/arm/configs/iq80321_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/iq80321_defconfig Sun Mar 28 13:12:07 2004 @@ -39,7 +39,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set diff -Nru a/arch/arm/configs/jornada720_defconfig b/arch/arm/configs/jornada720_defconfig --- a/arch/arm/configs/jornada720_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/jornada720_defconfig Sun Mar 28 13:12:07 2004 @@ -27,7 +27,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -518,8 +517,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set @@ -730,7 +727,6 @@ CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y # CONFIG_FB_ACORN is not set -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_CLPS711X is not set # CONFIG_FB_SA1100 is not set CONFIG_FB_EPSON1356=y diff -Nru a/arch/arm/configs/lart_defconfig b/arch/arm/configs/lart_defconfig --- a/arch/arm/configs/lart_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/lart_defconfig Sun Mar 28 13:12:08 2004 @@ -44,7 +44,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -470,7 +469,6 @@ # CONFIG_IDE_CHIPSETS is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/arm/configs/lubbock_defconfig b/arch/arm/configs/lubbock_defconfig --- a/arch/arm/configs/lubbock_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/lubbock_defconfig Sun Mar 28 13:12:07 2004 @@ -35,7 +35,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -583,8 +582,6 @@ # # CONFIG_ATOMWIDE_SERIAL is not set # CONFIG_DUALSP_SERIAL is not set -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set diff -Nru a/arch/arm/configs/lusl7200_defconfig b/arch/arm/configs/lusl7200_defconfig --- a/arch/arm/configs/lusl7200_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/lusl7200_defconfig Sun Mar 28 13:12:07 2004 @@ -35,7 +35,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -314,8 +313,6 @@ # # CONFIG_ATOMWIDE_SERIAL is not set # CONFIG_DUALSP_SERIAL is not set -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set diff -Nru a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig --- a/arch/arm/configs/neponset_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/neponset_defconfig Sun Mar 28 13:12:07 2004 @@ -31,7 +31,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set diff -Nru a/arch/arm/configs/netwinder_defconfig b/arch/arm/configs/netwinder_defconfig --- a/arch/arm/configs/netwinder_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/netwinder_defconfig Sun Mar 28 13:12:07 2004 @@ -40,7 +40,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -464,7 +463,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/arm/configs/pangolin_defconfig b/arch/arm/configs/pangolin_defconfig --- a/arch/arm/configs/pangolin_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/pangolin_defconfig Sun Mar 28 13:12:08 2004 @@ -25,7 +25,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -662,7 +661,6 @@ # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_SA1100 is not set CONFIG_FB_MQ200=y -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_E1355 is not set # CONFIG_FB_VIRTUAL is not set CONFIG_FBCON_ADVANCED=y diff -Nru a/arch/arm/configs/pleb_defconfig b/arch/arm/configs/pleb_defconfig --- a/arch/arm/configs/pleb_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/pleb_defconfig Sun Mar 28 13:12:08 2004 @@ -35,7 +35,6 @@ # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y # CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_ANAKIN is not set # # Archimedes/A5000 Implementations diff -Nru a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig --- a/arch/arm/configs/rpc_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/rpc_defconfig Sun Mar 28 13:12:07 2004 @@ -31,7 +31,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set diff -Nru a/arch/arm/configs/shannon_defconfig b/arch/arm/configs/shannon_defconfig --- a/arch/arm/configs/shannon_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/shannon_defconfig Sun Mar 28 13:12:07 2004 @@ -27,7 +27,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set diff -Nru a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig --- a/arch/arm/configs/shark_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/shark_defconfig Sun Mar 28 13:12:08 2004 @@ -46,7 +46,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -382,7 +381,6 @@ # CONFIG_IDE_CHIPSETS is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/arm/configs/stork_defconfig b/arch/arm/configs/stork_defconfig --- a/arch/arm/configs/stork_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/configs/stork_defconfig Sun Mar 28 13:12:08 2004 @@ -28,7 +28,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -514,8 +513,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set @@ -753,7 +750,6 @@ CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y # CONFIG_FB_ACORN is not set -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_CLPS711X is not set CONFIG_FB_SA1100=y # CONFIG_FB_CYBER2000 is not set diff -Nru a/arch/arm/configs/system3_defconfig b/arch/arm/configs/system3_defconfig --- a/arch/arm/configs/system3_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/system3_defconfig Sun Mar 28 13:12:07 2004 @@ -27,7 +27,6 @@ # # System Type # -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -532,8 +531,6 @@ # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set @@ -799,7 +796,6 @@ CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y # CONFIG_FB_ACORN is not set -# CONFIG_FB_ANAKIN is not set # CONFIG_FB_CLPS711X is not set CONFIG_FB_SA1100=y # CONFIG_FB_CYBER2000 is not set diff -Nru a/arch/arm/configs/trizeps_defconfig b/arch/arm/configs/trizeps_defconfig --- a/arch/arm/configs/trizeps_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/configs/trizeps_defconfig Sun Mar 28 13:12:07 2004 @@ -35,7 +35,6 @@ # System Type # # CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set @@ -494,7 +493,6 @@ # CONFIG_BLK_DEV_IDE_RAPIDE is not set # CONFIG_IDE_CHIPSETS is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # # SCSI support @@ -601,8 +599,6 @@ # CONFIG_SERIAL_8250_MULTIPORT is not set # CONFIG_SERIAL_8250_RSA is not set # CONFIG_SERIAL_ACORN is not set -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set diff -Nru a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S --- a/arch/arm/kernel/debug.S Sun Mar 28 13:12:07 2004 +++ b/arch/arm/kernel/debug.S Sun Mar 28 13:12:07 2004 @@ -348,37 +348,6 @@ 1002: .endm -#elif defined(CONFIG_ARCH_ANAKIN) - -//#//include - - .macro addruart,rx - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - moveq \rx, #IO_START - movne \rx, #IO_BASE - add \rx, \rx, #UART0 - .endm - - .macro senduart,rd,rx - str \rd, [\rx, #0x14] @ tx - ldr \rd, [\rx, #0x18] - orr \rd, \rd, #SENDREQUEST - str \rd, [\rx, #0x18] - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #0x10] - tst \rd, #TXEMPTY - beq 1001b - .endm - - .macro busyuart,rd,rx -1001: ldr \rd, [\rx, #0x10] - tst \rd, #CTS - bne 1001b - .endm - #elif defined(CONFIG_ARCH_CAMELOT) #include diff -Nru a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S --- a/arch/arm/kernel/entry-armv.S Sun Mar 28 13:12:07 2004 +++ b/arch/arm/kernel/entry-armv.S Sun Mar 28 13:12:07 2004 @@ -530,33 +530,6 @@ .macro irq_prio_table .endm -#elif defined(CONFIG_ARCH_ANAKIN) - - .macro disable_fiq - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - mov \base, #IO_BASE - mov \irqstat, #INTERRUPT_CONTROLLER - ldr \tmp, =anakin_irq_mask - ldr \irqstat, [\base, \irqstat] - ldr \tmp, [\tmp] - ands \irqstat, \irqstat, \tmp - ldrne \tmp, =anakin_active_irqs - strne \irqstat, [\tmp] - movne \irqnr, #IRQ_ANAKIN - .endm - - .macro irq_prio_table - .ltorg - .bss -ENTRY(anakin_irq_mask) - .word 0 -ENTRY(anakin_active_irqs) - .space 4 - .text - .endm - #elif defined(CONFIG_ARCH_IOP310) || defined(CONFIG_ARCH_ADIFCC) .macro disable_fiq diff -Nru a/arch/arm/mach-anakin/Makefile b/arch/arm/mach-anakin/Makefile --- a/arch/arm/mach-anakin/Makefile Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,11 +0,0 @@ -# -# Makefile for the linux kernel. -# - -# Object file lists. - -obj-y := arch.o irq.o mm.o -obj-m := -obj-n := -obj- := - diff -Nru a/arch/arm/mach-anakin/arch.c b/arch/arm/mach-anakin/arch.c --- a/arch/arm/mach-anakin/arch.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,29 +0,0 @@ -/* - * linux/arch/arm/mach-anakin/arch.c - * - * Copyright (C) 2001 Aleph One Ltd. for Acunia N.V. - * - * 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. - * - * Changelog: - * 09-Apr-2001 W/TTC Created - */ -#include -#include - -#include -#include -#include - -extern void anakin_map_io(void); -extern void genarch_init_irq(void); - -MACHINE_START(ANAKIN, "Anakin") - MAINTAINER("Wookey/Tak-Shing Chan") - BOOT_MEM(0x20000000, 0x40000000, 0xe0000000) - VIDEO(0x80000000, 0x8002db40) - MAPIO(anakin_map_io) - INITIRQ(genarch_init_irq) -MACHINE_END diff -Nru a/arch/arm/mach-anakin/irq.c b/arch/arm/mach-anakin/irq.c --- a/arch/arm/mach-anakin/irq.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,83 +0,0 @@ -/* - * linux/arch/arm/mach-anakin/irq.c - * - * Copyright (C) 2001 Aleph One Ltd. for Acunia N.V. - * - * 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. - * - * Changelog: - * 10-Apr-2001 TTC Created - */ - -#include -#include -#include - -#include -#include - -extern unsigned int anakin_irq_mask, anakin_active_irqs; -extern void do_IRQ(int, struct pt_regs *); - -static void -anakin_mask_irq(unsigned int irq) -{ - anakin_irq_mask &= ~(1 << irq); -} - -static void -anakin_unmask_irq(unsigned int irq) -{ - anakin_irq_mask |= (1 << irq); -} - -/* - * This is a faked interrupt to deal with parallel interrupt requests - * on the Anakin. Make sure that its interrupt number is not in any - * way conflicting with the hardware interrupt numbers! Check - * IRQ_ANAKIN in linux/include/asm-arm/arch-anakin/irqs.h. - */ -static void -anakin_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - for (irq = 0; irq < NR_IRQS; irq++) - if (anakin_active_irqs & (1 << irq)) - do_IRQ(irq, regs); -} - -static struct irqaction anakin_irq = { - .name = "Anakin IRQ", - .handler = anakin_interrupt, - .flags = SA_INTERRUPT -}; - -void __init -irq_init_irq(void) -{ - unsigned int irq; - - for (irq = 0; irq < NR_IRQS; irq++) { - switch (irq) { - case IRQ_UART0: - case IRQ_UART1: - case IRQ_UART2: - case IRQ_TICK: - case IRQ_CODEC: - case IRQ_UART4: - case IRQ_TOUCHSCREEN: - case IRQ_UART3: - case IRQ_FIFO: - case IRQ_CAN: - case IRQ_COMPACTFLASH: - case IRQ_BOSH: - case IRQ_ANAKIN: - irq_desc[irq].valid = 1; - irq_desc[irq].mask_ack = anakin_mask_irq; - irq_desc[irq].mask = anakin_mask_irq; - irq_desc[irq].unmask = anakin_unmask_irq; - } - } - setup_arm_irq(IRQ_ANAKIN, &anakin_irq); -} diff -Nru a/arch/arm/mach-anakin/mm.c b/arch/arm/mach-anakin/mm.c --- a/arch/arm/mach-anakin/mm.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,30 +0,0 @@ -/* - * linux/arch/arm/mach-anakin/mm.c - * - * Copyright (C) 2001 Aleph One Ltd. for Acunia N.V. - * - * 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. - * - * Changelog: - * 09-Apr-2001 W/TTC Created - */ -#include -#include - -#include -#include -#include - -static struct map_desc anakin_io_desc[] __initdata = { - { IO_BASE, IO_START, IO_SIZE, MT_DEVICE }, - { FLASH_BASE, FLASH_START, FLASH_SIZE, MT_DEVICE }, - { VGA_BASE, VGA_START, VGA_SIZE, MT_DEVICE } -}; - -void __init -anakin_map_io(void) -{ - iotable_init(anakin_io_desc, ARRAY_SIZE(anakin_io_desc)); -} diff -Nru a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig --- a/arch/arm/mach-sa1100/Kconfig Sun Mar 28 13:12:08 2004 +++ b/arch/arm/mach-sa1100/Kconfig Sun Mar 28 13:12:08 2004 @@ -204,7 +204,7 @@ depends on ARCH_SA1100 help Say Y here if you are using the inhand electronics OmniMeter. See - for details. + for details. config SA1100_PANGOLIN bool "Pangolin" @@ -232,7 +232,7 @@ help Say Y here if you intend to build a kernel suitable to run on a Pruftechnik Digital Board. For more information see - + config SA1100_SHANNON bool "Shannon" @@ -250,8 +250,8 @@ Say Y here to support the Blazie Engineering `Sherman' StrongARM 1110-based SBC, used primarily in assistance products for the visually impaired. The company is now Freedom Scientific, with - a website at . The - Sherman product, however, appears to have been discontinued. + a website at . The Sherman + product, however, appears to have been discontinued. config SA1100_SIMPAD bool "Simpad" @@ -262,7 +262,7 @@ FLASH. The SL4 version got 64 MB RAM and 32 MB FLASH and a PCMCIA-Slot. The version for the Germany Telecom (DTAG) is the same like CL4 in additional it has a PCMCIA-Slot. For more information - visit . + visit or . config SA1100_PFS168 bool "Tulsa" @@ -280,7 +280,7 @@ help Say Y here if you are using a Visu Aide Intel(R) StrongARM(R) SA-1100 based Victor Digital Talking Book Reader. See - for information on + for information on this system. config SA1100_XP860 diff -Nru a/arch/arm/mach-sa1100/adsbitsy.c b/arch/arm/mach-sa1100/adsbitsy.c --- a/arch/arm/mach-sa1100/adsbitsy.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mach-sa1100/adsbitsy.c Sun Mar 28 13:12:07 2004 @@ -47,6 +47,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c --- a/arch/arm/mach-sa1100/badge4.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mach-sa1100/badge4.c Sun Mar 28 13:12:07 2004 @@ -55,6 +55,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask; + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c --- a/arch/arm/mach-sa1100/generic.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mach-sa1100/generic.c Sun Mar 28 13:12:07 2004 @@ -162,6 +162,7 @@ .id = 0, .dev = { .dma_mask = &sa11x0udc_dma_mask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa11x0udc_resources), .resource = sa11x0udc_resources, @@ -212,6 +213,7 @@ .id = 0, .dev = { .dma_mask = &sa11x0mcp_dma_mask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa11x0mcp_resources), .resource = sa11x0mcp_resources, @@ -232,6 +234,7 @@ .id = 0, .dev = { .dma_mask = &sa11x0ssp_dma_mask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa11x0ssp_resources), .resource = sa11x0ssp_resources, @@ -253,6 +256,9 @@ static struct platform_device sa11x0fb_device = { .name = "sa11x0-fb", .id = 0, + .dev = { + .coherent_dma_mask = 0xffffffff, + }, .num_resources = ARRAY_SIZE(sa11x0fb_resources), .resource = sa11x0fb_resources, }; diff -Nru a/arch/arm/mach-sa1100/graphicsmaster.c b/arch/arm/mach-sa1100/graphicsmaster.c --- a/arch/arm/mach-sa1100/graphicsmaster.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mach-sa1100/graphicsmaster.c Sun Mar 28 13:12:07 2004 @@ -44,6 +44,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c --- a/arch/arm/mach-sa1100/jornada720.c Sun Mar 28 13:12:08 2004 +++ b/arch/arm/mach-sa1100/jornada720.c Sun Mar 28 13:12:08 2004 @@ -44,6 +44,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c --- a/arch/arm/mach-sa1100/neponset.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mach-sa1100/neponset.c Sun Mar 28 13:12:07 2004 @@ -251,6 +251,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mach-sa1100/pfs168.c b/arch/arm/mach-sa1100/pfs168.c --- a/arch/arm/mach-sa1100/pfs168.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mach-sa1100/pfs168.c Sun Mar 28 13:12:07 2004 @@ -38,6 +38,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mach-sa1100/system3.c b/arch/arm/mach-sa1100/system3.c --- a/arch/arm/mach-sa1100/system3.c Sun Mar 28 13:12:08 2004 +++ b/arch/arm/mach-sa1100/system3.c Sun Mar 28 13:12:08 2004 @@ -393,6 +393,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mach-sa1100/xp860.c b/arch/arm/mach-sa1100/xp860.c --- a/arch/arm/mach-sa1100/xp860.c Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mach-sa1100/xp860.c Sun Mar 28 13:12:07 2004 @@ -45,6 +45,7 @@ .id = 0, .dev = { .dma_mask = &sa1111_dmamask, + .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), .resource = sa1111_resources, diff -Nru a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig --- a/arch/arm/mm/Kconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm/mm/Kconfig Sun Mar 28 13:12:07 2004 @@ -185,8 +185,8 @@ # SA110 config CPU_SA110 - bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && !ARCH_ANAKIN && ARCH_RPC - default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI || ARCH_ANAKIN + bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && ARCH_RPC + default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI select CPU_32v3 if ARCH_RPC select CPU_32v4 if !ARCH_RPC select CPU_ABRT_EV4 diff -Nru a/arch/arm26/defconfig b/arch/arm26/defconfig --- a/arch/arm26/defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/arm26/defconfig Sun Mar 28 13:12:07 2004 @@ -164,8 +164,6 @@ # CONFIG_SERIAL_8250_RSA is not set # CONFIG_ATOMWIDE_SERIAL is not set # CONFIG_DUALSP_SERIAL is not set -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set # CONFIG_SERIAL_AMBA is not set # CONFIG_SERIAL_AMBA_CONSOLE is not set # CONFIG_SERIAL_CLPS711X is not set diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Sun Mar 28 13:12:07 2004 +++ b/arch/i386/Kconfig Sun Mar 28 13:12:07 2004 @@ -819,7 +819,7 @@ depends on SMP && X86_IO_APIC default y help - The defalut yes will allow the kernel to do irq load balancing. + The default yes will allow the kernel to do irq load balancing. Saying no will keep the kernel from doing irq load balancing. config HAVE_DEC_LOCK diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig --- a/arch/i386/defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/i386/defconfig Sun Mar 28 13:12:08 2004 @@ -304,7 +304,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c Sun Mar 28 13:12:08 2004 +++ b/arch/i386/kernel/acpi/boot.c Sun Mar 28 13:12:08 2004 @@ -35,11 +35,21 @@ #include #include -#ifdef CONFIG_X86_LOCAL_APIC +#ifdef CONFIG_X86_64 + +static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { } +static inline void clustered_apic_check(void) { } +static inline int ioapic_setup_disabled(void) { return 0; } +#include + +#else /* X86 */ + +#ifdef CONFIG_X86_LOCAL_APIC #include #include -#include -#endif +#endif /* CONFIG_X86_LOCAL_APIC */ + +#endif /* X86 */ #define PREFIX "ACPI: " @@ -50,6 +60,9 @@ int acpi_ioapic; int acpi_strict; +acpi_interrupt_flags acpi_sci_flags __initdata; +int acpi_sci_override_gsi __initdata; + #ifdef CONFIG_X86_LOCAL_APIC static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; #endif @@ -64,6 +77,22 @@ */ enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; +#ifdef CONFIG_X86_64 + +/* rely on all ACPI tables being in the direct mapping */ +char *__acpi_map_table(unsigned long phys_addr, unsigned long size) +{ + if (!phys_addr || !size) + return NULL; + + if (phys_addr < (end_pfn_map << PAGE_SHIFT)) + return __va(phys_addr); + + return NULL; +} + +#else + /* * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END, * to map the target physical address. The problem is that set_fixmap() @@ -103,7 +132,7 @@ return ((unsigned char *) base + offset); } - +#endif #ifdef CONFIG_PCI_MMCONFIG static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) @@ -244,6 +273,39 @@ return 0; } +/* + * Parse Interrupt Source Override for the ACPI SCI + */ +static void +acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) +{ + if (trigger == 0) /* compatible SCI trigger is level */ + trigger = 3; + + if (polarity == 0) /* compatible SCI polarity is low */ + polarity = 3; + + /* Command-line over-ride via acpi_sci= */ + if (acpi_sci_flags.trigger) + trigger = acpi_sci_flags.trigger; + + if (acpi_sci_flags.polarity) + polarity = acpi_sci_flags.polarity; + + /* + * mp_config_acpi_legacy_irqs() already setup IRQs < 16 + * If GSI is < 16, this will update its flags, + * else it will create a new mp_irqs[] entry. + */ + mp_override_legacy_irq(gsi, polarity, trigger, gsi); + + /* + * stash over-ride to indicate we've been here + * and for later update of acpi_fadt + */ + acpi_sci_override_gsi = gsi; + return; +} static int __init acpi_parse_int_src_ovr ( @@ -257,6 +319,12 @@ acpi_table_print_madt_entry(header); + if (intsrc->bus_irq == acpi_fadt.sci_int) { + acpi_sci_ioapic_setup(intsrc->global_irq, + intsrc->flags.polarity, intsrc->flags.trigger); + return 0; + } + mp_override_legacy_irq ( intsrc->bus_irq, intsrc->flags.polarity, @@ -287,14 +355,14 @@ #endif /* CONFIG_X86_IO_APIC */ #ifdef CONFIG_ACPI_BUS + /* - * "acpi_pic_sci=level" (current default) - * programs the PIC-mode SCI to Level Trigger. - * (NO-OP if the BIOS set Level Trigger already) + * acpi_pic_sci_set_trigger() + * + * use ELCR to set PIC-mode trigger type for SCI * * If a PIC-mode SCI is not recognized or gives spurious IRQ7's - * it may require Edge Trigger -- use "acpi_pic_sci=edge" - * (NO-OP if the BIOS set Edge Trigger already) + * it may require Edge Trigger -- use "acpi_sci=edge" * * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. @@ -302,10 +370,8 @@ * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0) */ -static int __initdata acpi_pic_sci_trigger; /* 0: level, 1: edge */ - void __init -acpi_pic_sci_set_trigger(unsigned int irq) +acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) { unsigned char mask = 1 << (irq & 7); unsigned int port = 0x4d0 + (irq >> 3); @@ -316,41 +382,26 @@ if (!(val & mask)) { printk(" Edge"); - if (!acpi_pic_sci_trigger) { + if (trigger == 3) { printk(" set to Level"); outb(val | mask, port); } } else { printk(" Level"); - if (acpi_pic_sci_trigger) { + if (trigger == 1) { printk(" set to Edge"); - outb(val | mask, port); + outb(val & ~mask, port); } } printk(" Trigger.\n"); } -int __init -acpi_pic_sci_setup(char *str) -{ - while (str && *str) { - if (strncmp(str, "level", 5) == 0) - acpi_pic_sci_trigger = 0; /* force level trigger */ - if (strncmp(str, "edge", 4) == 0) - acpi_pic_sci_trigger = 1; /* force edge trigger */ - str = strchr(str, ','); - if (str) - str += strspn(str, ", \t"); - } - return 1; -} - -__setup("acpi_pic_sci=", acpi_pic_sci_setup); #endif /* CONFIG_ACPI_BUS */ #ifdef CONFIG_X86_IO_APIC +/* deprecated in favor of acpi_gsi_to_irq */ int acpi_irq_to_vector(u32 irq) { if (use_pci_vector() && !platform_legacy_irq(irq)) @@ -359,6 +410,17 @@ } #endif +int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) +{ +#ifdef CONFIG_X86_IO_APIC + if (use_pci_vector() && !platform_legacy_irq(gsi)) + *irq = IO_APIC_VECTOR(gsi); + else +#endif + *irq = gsi; + return 0; +} + static unsigned long __init acpi_scan_rsdp ( unsigned long start, @@ -400,7 +462,6 @@ #ifdef CONFIG_HPET_TIMER -extern unsigned long hpet_address; static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) { @@ -421,18 +482,31 @@ return -1; } - hpet_address = hpet_tbl->addr.addrl; - printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", hpet_tbl->id, - hpet_address); +#ifdef CONFIG_X86_64 + vxtime.hpet_address = hpet_tbl->addr.addrl | + ((long) hpet_tbl->addr.addrh << 32); + + printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", + hpet_tbl->id, vxtime.hpet_address); +#else /* X86 */ + { + extern unsigned long hpet_address; + + hpet_address = hpet_tbl->addr.addrl; + printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", + hpet_tbl->id, hpet_address); + } +#endif /* X86 */ + return 0; } #else #define acpi_parse_hpet NULL #endif -/* detect the location of the ACPI PM Timer */ #ifdef CONFIG_X86_PM_TIMER extern u32 pmtmr_ioport; +#endif static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) { @@ -444,6 +518,13 @@ return 0; } +#ifdef CONFIG_ACPI_INTERPRETER + /* initialize sci_int early for INT_SRC_OVR MADT parsing */ + acpi_fadt.sci_int = fadt->sci_int; +#endif + +#ifdef CONFIG_X86_PM_TIMER + /* detect the location of the ACPI PM Timer */ if (fadt->revision >= FADT2_REVISION_ID) { /* FADT rev. 2 */ if (fadt->xpm_tmr_blk.address_space_id != ACPI_ADR_SPACE_SYSTEM_IO) @@ -456,11 +537,9 @@ } if (pmtmr_ioport) printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", pmtmr_ioport); +#endif return 0; } -#else -#define acpi_parse_fadt NULL -#endif unsigned long __init @@ -554,7 +633,7 @@ /* * if "noapic" boot option, don't look for IO-APICs */ - if (ioapic_setup_disabled()) { + if (skip_ioapic_setup) { printk(KERN_INFO PREFIX "Skipping IOAPIC probe " "due to 'noapic' option.\n"); return -ENODEV; @@ -580,6 +659,13 @@ return count; } + /* + * If BIOS did not supply an INT_SRC_OVR for the SCI + * pretend we got one so we can set the SCI flags. + */ + if (!acpi_sci_override_gsi) + acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); + count = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, NR_IRQ_VECTORS); if (count < 0) { printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); @@ -668,7 +754,7 @@ */ error = acpi_table_init(); if (error) { - acpi_disabled = 1; + disable_acpi(); return error; } @@ -680,16 +766,20 @@ error = acpi_blacklisted(); if (error) { printk(KERN_WARNING PREFIX "BIOS listed in blacklist, disabling ACPI support\n"); - acpi_disabled = 1; + disable_acpi(); return error; } /* + * set sci_int and PM timer address + */ + acpi_table_parse(ACPI_FADT, acpi_parse_fadt); + + /* * Process the Multiple APIC Description Table (MADT), if present */ acpi_process_madt(); - acpi_table_parse(ACPI_FADT, acpi_parse_fadt); acpi_table_parse(ACPI_HPET, acpi_parse_hpet); acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c --- a/arch/i386/kernel/dmi_scan.c Sun Mar 28 13:12:07 2004 +++ b/arch/i386/kernel/dmi_scan.c Sun Mar 28 13:12:07 2004 @@ -523,13 +523,13 @@ #ifdef CONFIG_ACPI_BOOT -extern int acpi_disabled, acpi_force; +extern int acpi_force; -static __init __attribute__((unused)) int disable_acpi(struct dmi_blacklist *d) +static __init __attribute__((unused)) int dmi_disable_acpi(struct dmi_blacklist *d) { if (!acpi_force) { printk(KERN_NOTICE "%s detected: acpi off\n",d->ident); - acpi_disabled = 1; + disable_acpi(); } else { printk(KERN_NOTICE "Warning: DMI blacklist says broken, but acpi forced\n"); @@ -537,8 +537,6 @@ return 0; } -extern int acpi_ht; - /* * Limit ACPI to CPU enumeration for HT */ @@ -546,7 +544,7 @@ { if (!acpi_force) { printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident); - acpi_disabled = 1; + disable_acpi(); acpi_ht = 1; } else { printk(KERN_NOTICE @@ -933,7 +931,7 @@ * Boxes that need ACPI disabled */ - { disable_acpi, "IBM Thinkpad", { + { dmi_disable_acpi, "IBM Thinkpad", { MATCH(DMI_BOARD_VENDOR, "IBM"), MATCH(DMI_BOARD_NAME, "2629H1G"), NO_MATCH, NO_MATCH }}, @@ -1063,8 +1061,7 @@ if (disable && !acpi_force) { printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s); printk(KERN_NOTICE "You can enable it with acpi=force\n"); - acpi_disabled = 1; - acpi_ht = 0; + disable_acpi(); } } } diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c Sun Mar 28 13:12:07 2004 +++ b/arch/i386/kernel/mpparse.c Sun Mar 28 13:12:07 2004 @@ -1,5 +1,5 @@ /* - * Intel Multiprocessor Specificiation 1.1 and 1.4 + * Intel Multiprocessor Specification 1.1 and 1.4 * compliant MP-table parsing routines. * * (c) 1995 Alan Cox, Building #3 @@ -37,6 +37,7 @@ /* Have we found an MP table */ int smp_found_config; +unsigned int __initdata maxcpus = NR_CPUS; /* * Various Linux-internal data structures created from the @@ -168,8 +169,14 @@ } if (num_processors >= NR_CPUS) { - printk(KERN_WARNING "NR_CPUS limit of %i reached. Cannot " - "boot CPU(apicid 0x%x).\n", NR_CPUS, m->mpc_apicid); + printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." + " Processor ignored.\n", NR_CPUS); + return; + } + + if (num_processors >= maxcpus) { + printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." + " Processor ignored.\n", maxcpus); return; } num_processors++; @@ -844,25 +851,25 @@ struct mp_ioapic_routing { int apic_id; - int irq_start; - int irq_end; + int gsi_base; + int gsi_end; u32 pin_programmed[4]; } mp_ioapic_routing[MAX_IO_APICS]; static int __init mp_find_ioapic ( - int irq) + int gsi) { int i = 0; - /* Find the IOAPIC that manages this IRQ. */ + /* Find the IOAPIC that manages this GSI. */ for (i = 0; i < nr_ioapics; i++) { - if ((irq >= mp_ioapic_routing[i].irq_start) - && (irq <= mp_ioapic_routing[i].irq_end)) + if ((gsi >= mp_ioapic_routing[i].gsi_base) + && (gsi <= mp_ioapic_routing[i].gsi_end)) return i; } - printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d\n", irq); + printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi); return -1; } @@ -871,7 +878,7 @@ void __init mp_register_ioapic ( u8 id, u32 address, - u32 irq_base) + u32 gsi_base) { int idx = 0; @@ -897,19 +904,19 @@ mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); /* - * Build basic IRQ lookup table to facilitate irq->io_apic lookups - * and to prevent reprogramming of IOAPIC pins (PCI IRQs). + * Build basic GSI lookup table to facilitate gsi->io_apic lookups + * and to prevent reprogramming of IOAPIC pins (PCI GSIs). */ mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mpc_apicid; - mp_ioapic_routing[idx].irq_start = irq_base; - mp_ioapic_routing[idx].irq_end = irq_base + + mp_ioapic_routing[idx].gsi_base = gsi_base; + mp_ioapic_routing[idx].gsi_end = gsi_base + io_apic_get_redir_entries(idx); printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, " - "IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, + "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, - mp_ioapic_routing[idx].irq_start, - mp_ioapic_routing[idx].irq_end); + mp_ioapic_routing[idx].gsi_base, + mp_ioapic_routing[idx].gsi_end); return; } @@ -919,7 +926,7 @@ u8 bus_irq, u8 polarity, u8 trigger, - u32 global_irq) + u32 gsi) { struct mpc_config_intsrc intsrc; int i = 0; @@ -928,12 +935,12 @@ int pin = -1; /* - * Convert 'global_irq' to 'ioapic.pin'. + * Convert 'gsi' to 'ioapic.pin'. */ - ioapic = mp_find_ioapic(global_irq); + ioapic = mp_find_ioapic(gsi); if (ioapic < 0) return; - pin = global_irq - mp_ioapic_routing[ioapic].irq_start; + pin = gsi - mp_ioapic_routing[ioapic].gsi_base; /* * TBD: This check is for faulty timer entries, where the override @@ -958,7 +965,7 @@ /* * If an existing [IOAPIC.PIN -> IRQ] routing entry exists we override it. - * Otherwise create a new entry (e.g. global_irq == 2). + * Otherwise create a new entry (e.g. gsi == 2). */ for (i = 0; i < mp_irq_entries; i++) { if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus) @@ -1029,69 +1036,6 @@ extern FADT_DESCRIPTOR acpi_fadt; -void __init mp_config_ioapic_for_sci(int irq) -{ - int ioapic; - int ioapic_pin; - struct acpi_table_madt *madt; - struct acpi_table_int_src_ovr *entry = NULL; - acpi_interrupt_flags flags; - void *madt_end; - acpi_status status; - - /* - * Ensure that if there is an interrupt source override entry - * for the ACPI SCI, we leave it as is. Unfortunately this involves - * walking the MADT again. - */ - status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING, - (struct acpi_table_header **) &madt); - if (ACPI_SUCCESS(status)) { - madt_end = (void *) (unsigned long)madt + madt->header.length; - - entry = (struct acpi_table_int_src_ovr *) - ((unsigned long) madt + sizeof(struct acpi_table_madt)); - - while ((void *) entry < madt_end) { - if (entry->header.type == ACPI_MADT_INT_SRC_OVR && - acpi_fadt.sci_int == entry->bus_irq) - goto found; - - entry = (struct acpi_table_int_src_ovr *) - ((unsigned long) entry + entry->header.length); - } - } - /* - * Although the ACPI spec says that the SCI should be level/low - * don't reprogram it unless there is an explicit MADT OVR entry - * instructing us to do so -- otherwise we break Tyan boards which - * have the SCI wired edge/high but no MADT OVR. - */ - return; - -found: - /* - * See the note at the end of ACPI 2.0b section - * 5.2.10.8 for what this is about. - */ - flags = entry->flags; - acpi_fadt.sci_int = entry->global_irq; - irq = entry->global_irq; - - ioapic = mp_find_ioapic(irq); - - ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; - - /* - * MPS INTI flags: - * trigger: 0=default, 1=edge, 3=level - * polarity: 0=default, 1=high, 3=low - * Per ACPI spec, default for SCI means level/low. - */ - io_apic_set_pci_routing(ioapic, ioapic_pin, irq, - (flags.trigger == 1 ? 0 : 1), (flags.polarity == 1 ? 0 : 1)); -} - #ifdef CONFIG_ACPI_PCI void __init mp_parse_prt (void) @@ -1100,7 +1044,7 @@ struct acpi_prt_entry *entry = NULL; int ioapic = -1; int ioapic_pin = 0; - int irq = 0; + int gsi = 0; int idx, bit = 0; int edge_level = 0; int active_high_low = 0; @@ -1112,39 +1056,39 @@ list_for_each(node, &acpi_prt.entries) { entry = list_entry(node, struct acpi_prt_entry, node); - /* Need to get irq for dynamic entry */ + /* Need to get gsi for dynamic entry */ if (entry->link.handle) { - irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low); - if (!irq) + gsi = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low); + if (!gsi) continue; } else { - /* Hardwired IRQ. Assume PCI standard settings */ - irq = entry->link.index; + /* Hardwired GSI. Assume PCI standard settings */ + gsi = entry->link.index; edge_level = 1; active_high_low = 1; } /* Don't set up the ACPI SCI because it's already set up */ - if (acpi_fadt.sci_int == irq) { - irq = acpi_irq_to_vector(irq); - entry->irq = irq; /* we still need to set entry's irq */ + if (acpi_fadt.sci_int == gsi) { + /* we still need to set entry's irq */ + acpi_gsi_to_irq(gsi, &entry->irq); continue; } - ioapic = mp_find_ioapic(irq); + ioapic = mp_find_ioapic(gsi); if (ioapic < 0) continue; - ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; + ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base; if (es7000_plat) { - if (!ioapic && (irq < 16)) - irq += 16; + if (!ioapic && (gsi < 16)) + gsi += 16; } /* * Avoid pin reprogramming. PRTs typically include entries - * with redundant pin->irq mappings (but unique PCI devices); + * with redundant pin->gsi mappings (but unique PCI devices); * we only only program the IOAPIC on the first. */ bit = ioapic_pin % 32; @@ -1158,19 +1102,19 @@ if ((1<irq = acpi_irq_to_vector(irq); + acpi_gsi_to_irq(gsi, &entry->irq); continue; } mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<irq = acpi_irq_to_vector(irq); - } + if (!io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, edge_level, active_high_low)) { + acpi_gsi_to_irq(gsi, &entry->irq); + } printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> IRQ %d\n", - entry->id.segment, entry->id.bus, - entry->id.device, ('A' + entry->pin), - mp_ioapic_routing[ioapic].apic_id, ioapic_pin, + entry->id.segment, entry->id.bus, + entry->id.device, ('A' + entry->pin), + mp_ioapic_routing[ioapic].apic_id, ioapic_pin, entry->irq); } diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/i386/kernel/setup.c Sun Mar 28 13:12:07 2004 @@ -83,8 +83,8 @@ EXPORT_SYMBOL(acpi_disabled); #ifdef CONFIG_ACPI_BOOT -extern int __initdata acpi_ht; int __initdata acpi_force = 0; +extern acpi_interrupt_flags acpi_sci_flags; #endif int MCA_bus; @@ -560,17 +560,28 @@ } } +#ifdef CONFIG_SMP + /* + * If the BIOS enumerates physical processors before logical, + * maxcpus=N at enumeration-time can be used to disable HT. + */ + else if (!memcmp(from, "maxcpus=", 8)) { + extern unsigned int maxcpus; + + maxcpus = simple_strtoul(from + 8, NULL, 0); + } +#endif + #ifdef CONFIG_ACPI_BOOT /* "acpi=off" disables both ACPI table parsing and interpreter */ else if (!memcmp(from, "acpi=off", 8)) { - acpi_ht = 0; - acpi_disabled = 1; + disable_acpi(); } /* acpi=force to over-ride black-list */ else if (!memcmp(from, "acpi=force", 10)) { acpi_force = 1; - acpi_ht=1; + acpi_ht = 1; acpi_disabled = 0; } @@ -581,14 +592,27 @@ /* Limit ACPI just to boot-time to enable HT */ else if (!memcmp(from, "acpi=ht", 7)) { + if (!acpi_force) + disable_acpi(); acpi_ht = 1; - if (!acpi_force) acpi_disabled = 1; } /* "pci=noacpi" disables ACPI interrupt routing */ else if (!memcmp(from, "pci=noacpi", 10)) { acpi_noirq_set(); } + + else if (!memcmp(from, "acpi_sci=edge", 13)) + acpi_sci_flags.trigger = 1; + + else if (!memcmp(from, "acpi_sci=level", 14)) + acpi_sci_flags.trigger = 3; + + else if (!memcmp(from, "acpi_sci=high", 13)) + acpi_sci_flags.polarity = 1; + + else if (!memcmp(from, "acpi_sci=low", 12)) + acpi_sci_flags.polarity = 3; #ifdef CONFIG_X86_LOCAL_APIC /* disable IO-APIC */ diff -Nru a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c --- a/arch/i386/kernel/timers/timer_tsc.c Sun Mar 28 13:12:08 2004 +++ b/arch/i386/kernel/timers/timer_tsc.c Sun Mar 28 13:12:08 2004 @@ -360,8 +360,9 @@ if (variable_tsc) cpu_data[freq->cpu].loops_per_jiffy = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new); #ifndef CONFIG_SMP - if (use_tsc) { + if (cpu_khz) cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new); + if (use_tsc) { if (variable_tsc) { fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq); set_cyc2ns_scale(cpu_khz/1000); diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig --- a/arch/ia64/Kconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/Kconfig Sun Mar 28 13:12:08 2004 @@ -214,15 +214,6 @@ int default "18" -config IA64_PAL_IDLE - bool "Use PAL_HALT_LIGHT in idle loop" - help - Say Y here to enable use of PAL_HALT_LIGHT in the cpu_idle loop. - This allows the CPU to enter a low power state when idle. You - can enable CONFIG_IA64_PALINFO and check /proc/pal/cpu0/power_info - to see the power consumption and latency for this state. If you're - unsure your firmware supports it, answer N. - config SMP bool "Symmetric multi-processing support" help @@ -344,47 +335,6 @@ bool depends on !IA64_HP_SIM default y - help - ACPI/OSPM support for Linux is currently under development. As such, - this support is preliminary and EXPERIMENTAL. Configuring ACPI - support enables kernel interfaces that allow higher level software - (OSPM) to manipulate ACPI defined hardware and software interfaces, - including the evaluation of ACPI control methods. If unsure, choose - N here. Note, this option will enlarge your kernel by about 120K. - - This support requires an ACPI compliant platform (hardware/firmware). - If both ACPI and Advanced Power Management (APM) support are - configured, whichever is loaded first shall be used. - - This code DOES NOT currently provide a complete OSPM implementation - -- it has not yet reached APM's level of functionality. When fully - implemented, Linux ACPI/OSPM will provide a more robust functional - replacement for legacy configuration and power management - interfaces, including the Plug-and-Play BIOS specification (PnP - BIOS), the Multi-Processor Specification (MPS), and the Advanced - Power Management specification (APM). - - Linux support for ACPI/OSPM is based on Intel Corporation's ACPI - Component Architecture (ACPI CA). The latest ACPI CA source code, - documentation, debug builds, and implementation status information - can be downloaded from: - . - - The ACPI Sourceforge project may also be of interest: - - -config ACPI_INTERPRETER - bool - depends on !IA64_HP_SIM - default y - -config ACPI_KERNEL_CONFIG - bool - depends on !IA64_HP_SIM - default y - help - If you say `Y' here, Linux's ACPI support will use the - hardware-level system descriptions found on IA-64 systems. if !IA64_HP_SIM diff -Nru a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig --- a/arch/ia64/configs/generic_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/configs/generic_defconfig Sun Mar 28 13:12:07 2004 @@ -214,7 +214,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig --- a/arch/ia64/configs/sn2_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/configs/sn2_defconfig Sun Mar 28 13:12:07 2004 @@ -48,31 +48,26 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_TIME_INTERPOLATION=y CONFIG_EFI=y -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y # CONFIG_IA64_GENERIC is not set # CONFIG_IA64_DIG is not set # CONFIG_IA64_HP_ZX1 is not set CONFIG_IA64_SGI_SN2=y # CONFIG_IA64_HP_SIM is not set +# CONFIG_ITANIUM is not set +CONFIG_MCKINLEY=y # CONFIG_IA64_PAGE_SIZE_4KB is not set # CONFIG_IA64_PAGE_SIZE_8KB is not set CONFIG_IA64_PAGE_SIZE_16KB=y # CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_ACPI=y -CONFIG_ACPI_INTERPRETER=y -CONFIG_ACPI_KERNEL_CONFIG=y CONFIG_IA64_L1_CACHE_SHIFT=7 # CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set CONFIG_NUMA=y CONFIG_VIRTUAL_MEM_MAP=y CONFIG_DISCONTIGMEM=y -CONFIG_IA64_MCA=y # CONFIG_IA64_CYCLONE is not set CONFIG_IOSAPIC=y -# CONFIG_IA64_SGI_SN_SIM is not set +CONFIG_IA64_SGI_SN_SIM=y CONFIG_FORCE_MAX_ZONEORDER=18 -# CONFIG_IA64_PAL_IDLE is not set CONFIG_SMP=y CONFIG_NR_CPUS=512 # CONFIG_PREEMPT is not set @@ -86,9 +81,15 @@ # CONFIG_BINFMT_MISC is not set # +# Power management and ACPI +# +CONFIG_ACPI=y + +# # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI_BOOT=y +CONFIG_ACPI_INTERPRETER=y # CONFIG_ACPI_BUTTON is not set # CONFIG_ACPI_FAN is not set # CONFIG_ACPI_PROCESSOR is not set @@ -98,6 +99,10 @@ CONFIG_ACPI_POWER=y CONFIG_ACPI_PCI=y CONFIG_ACPI_SYSTEM=y + +# +# Bus options (PCI, PCMCIA) +# CONFIG_PCI=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_LEGACY_PROC=y @@ -106,7 +111,13 @@ # # PCI Hotplug Support # -# CONFIG_HOTPLUG_PCI is not set +CONFIG_HOTPLUG_PCI=y +# CONFIG_HOTPLUG_PCI_FAKE is not set +# CONFIG_HOTPLUG_PCI_ACPI 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_SGI=y # # PCMCIA/CardBus support @@ -120,7 +131,7 @@ # # Generic Driver Options # -# CONFIG_FW_LOADER is not set +CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set # @@ -140,13 +151,12 @@ # # 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=m CONFIG_BLK_DEV_UMEM=m CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set +CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_CARMEL is not set CONFIG_BLK_DEV_RAM=y @@ -211,7 +221,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # @@ -272,6 +281,7 @@ CONFIG_SCSI_SATA_SVW=m CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_PROMISE=m +# CONFIG_SCSI_SATA_SIL is not set CONFIG_SCSI_SATA_VIA=m CONFIG_SCSI_SATA_VITESSE=y # CONFIG_SCSI_BUSLOGIC is not set @@ -314,12 +324,12 @@ # CONFIG_MD_RAID6 is not set CONFIG_MD_MULTIPATH=y CONFIG_BLK_DEV_DM=y -# CONFIG_DM_CRYPT is not set +CONFIG_DM_CRYPT=m # # Fusion MPT device support # -CONFIG_FUSION=m +CONFIG_FUSION=y CONFIG_FUSION_MAX_SGE=40 CONFIG_FUSION_ISENSE=m CONFIG_FUSION_CTL=m @@ -364,7 +374,6 @@ CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y CONFIG_ARPD=y -# CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m @@ -460,7 +469,6 @@ # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=m # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set CONFIG_VLAN_8021Q=m @@ -490,6 +498,7 @@ CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m +# CONFIG_NET_SCH_DELAY is not set # CONFIG_NET_SCH_INGRESS is not set CONFIG_NET_QOS=y CONFIG_NET_ESTIMATOR=y @@ -523,12 +532,10 @@ # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -CONFIG_MII=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 +# CONFIG_NET_VENDOR_3COM is not set # # Tulip family network device support @@ -550,7 +557,7 @@ # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set -CONFIG_EEPRO100=y +CONFIG_EEPRO100=m # CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set @@ -582,7 +589,8 @@ # # Ethernet (10000 Mbit) # -# CONFIG_IXGB is not set +CONFIG_IXGB=m +# CONFIG_IXGB_NAPI is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set CONFIG_PPP=m @@ -606,7 +614,7 @@ # CONFIG_TR is not set CONFIG_NET_FC=y # CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set +CONFIG_NETCONSOLE=y # # Wan interfaces @@ -627,8 +635,10 @@ # Bluetooth support # # CONFIG_BT is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # # ISDN subsystem @@ -674,9 +684,13 @@ 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_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set @@ -714,11 +728,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 - -# -# Mice -# -# CONFIG_BUSMOUSE is not set # CONFIG_QIC02_TAPE is not set # @@ -742,7 +751,8 @@ # # CONFIG_AGP is not set # CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set +CONFIG_RAW_DRIVER=m +CONFIG_MAX_RAW_DEVS=256 # # I2C support @@ -825,9 +835,9 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set +CONFIG_JOLIET=y # CONFIG_ZISOFS is not set -# CONFIG_UDF_FS is not set +CONFIG_UDF_FS=m # # DOS/FAT/NT Filesystems @@ -887,6 +897,7 @@ # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -980,6 +991,7 @@ # CONFIG_IA64_DEBUG_CMPXCHG is not set # CONFIG_IA64_DEBUG_IRQ is not set # CONFIG_DEBUG_INFO is not set +CONFIG_SYSVIPC_COMPAT=y # # Security options @@ -1006,4 +1018,5 @@ # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_ARC4 is not set CONFIG_CRYPTO_DEFLATE=m +# CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_TEST is not set diff -Nru a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig --- a/arch/ia64/configs/zx1_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/configs/zx1_defconfig Sun Mar 28 13:12:08 2004 @@ -211,7 +211,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ia64/defconfig b/arch/ia64/defconfig --- a/arch/ia64/defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/defconfig Sun Mar 28 13:12:07 2004 @@ -218,7 +218,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c --- a/arch/ia64/hp/common/sba_iommu.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/hp/common/sba_iommu.c Sun Mar 28 13:12:07 2004 @@ -1678,6 +1678,7 @@ static struct ioc_iommu ioc_iommu_info[] __initdata = { { ZX1_IOC_ID, "zx1", ioc_zx1_init }, + { SX1000_IOC_ID, "sx1000", NULL }, }; static struct ioc * __init @@ -1979,6 +1980,12 @@ return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL); } +int +sba_dma_mapping_error (dma_addr_t dma_addr) +{ + return 0; +} + __setup("nosbagart", nosbagart); static int __init @@ -2004,6 +2011,7 @@ __setup("sbapagesize=",sba_page_override); +EXPORT_SYMBOL(sba_dma_mapping_error); EXPORT_SYMBOL(sba_map_single); EXPORT_SYMBOL(sba_unmap_single); EXPORT_SYMBOL(sba_map_sg); diff -Nru a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S --- a/arch/ia64/ia32/ia32_entry.S Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/ia32/ia32_entry.S Sun Mar 28 13:12:08 2004 @@ -229,7 +229,7 @@ data8 sys_ni_syscall data8 sys32_lseek data8 sys_getpid /* 20 */ - data8 sys_mount + data8 compat_sys_mount data8 sys_oldumount data8 sys_setuid /* 16-bit version */ data8 sys_getuid /* 16-bit version */ diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c --- a/arch/ia64/ia32/sys_ia32.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/ia32/sys_ia32.c Sun Mar 28 13:12:08 2004 @@ -34,9 +34,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -2383,157 +2380,6 @@ } #ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */ - -struct ncp_mount_data32 { - int version; - unsigned int ncp_fd; - compat_uid_t mounted_uid; - int wdog_pid; - unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; - unsigned int time_out; - unsigned int retry_count; - unsigned int flags; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -static void * -do_ncp_super_data_conv(void *raw_data) -{ - struct ncp_mount_data *n = (struct ncp_mount_data *)raw_data; - struct ncp_mount_data32 *n32 = (struct ncp_mount_data32 *)raw_data; - - n->dir_mode = n32->dir_mode; - n->file_mode = n32->file_mode; - n->gid = n32->gid; - n->uid = n32->uid; - memmove (n->mounted_vol, n32->mounted_vol, - (sizeof (n32->mounted_vol) + 3 * sizeof (unsigned int))); - n->wdog_pid = n32->wdog_pid; - n->mounted_uid = n32->mounted_uid; - return raw_data; -} - -struct smb_mount_data32 { - int version; - compat_uid_t mounted_uid; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -static void * -do_smb_super_data_conv(void *raw_data) -{ - struct smb_mount_data *s = (struct smb_mount_data *)raw_data; - struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data; - - if (s32->version != SMB_MOUNT_OLDVERSION) - goto out; - s->version = s32->version; - s->mounted_uid = s32->mounted_uid; - s->uid = s32->uid; - s->gid = s32->gid; - s->file_mode = s32->file_mode; - s->dir_mode = s32->dir_mode; -out: - return raw_data; -} - -static int -copy_mount_stuff_to_kernel(const void *user, unsigned long *kernel) -{ - int i; - unsigned long page; - struct vm_area_struct *vma; - - *kernel = 0; - if(!user) - return 0; - vma = find_vma(current->mm, (unsigned long)user); - if(!vma || (unsigned long)user < vma->vm_start) - return -EFAULT; - if(!(vma->vm_flags & VM_READ)) - return -EFAULT; - i = vma->vm_end - (unsigned long) user; - if(PAGE_SIZE <= (unsigned long) i) - i = PAGE_SIZE - 1; - if(!(page = __get_free_page(GFP_KERNEL))) - return -ENOMEM; - if(copy_from_user((void *) page, user, i)) { - free_page(page); - return -EFAULT; - } - *kernel = page; - return 0; -} - -#define SMBFS_NAME "smbfs" -#define NCPFS_NAME "ncpfs" - -asmlinkage long -sys32_mount(char *dev_name, char *dir_name, char *type, - unsigned long new_flags, u32 data) -{ - unsigned long type_page; - int err, is_smb, is_ncp; - - if(!capable(CAP_SYS_ADMIN)) - return -EPERM; - is_smb = is_ncp = 0; - err = copy_mount_stuff_to_kernel((const void *)type, &type_page); - if(err) - return err; - if(type_page) { - is_smb = !strcmp((char *)type_page, SMBFS_NAME); - is_ncp = !strcmp((char *)type_page, NCPFS_NAME); - } - if(!is_smb && !is_ncp) { - if(type_page) - free_page(type_page); - return sys_mount(dev_name, dir_name, type, new_flags, - (void *)AA(data)); - } else { - unsigned long dev_page, dir_page, data_page; - - err = copy_mount_stuff_to_kernel((const void *)dev_name, - &dev_page); - if(err) - goto out; - err = copy_mount_stuff_to_kernel((const void *)dir_name, - &dir_page); - if(err) - goto dev_out; - err = copy_mount_stuff_to_kernel((const void *)AA(data), - &data_page); - if(err) - goto dir_out; - if(is_ncp) - do_ncp_super_data_conv((void *)data_page); - else if(is_smb) - do_smb_super_data_conv((void *)data_page); - else - panic("The problem is here..."); - err = do_mount((char *)dev_page, (char *)dir_page, - (char *)type_page, new_flags, - (void *)data_page); - if(data_page) - free_page(data_page); - dir_out: - if(dir_page) - free_page(dir_page); - dev_out: - if(dev_page) - free_page(dev_page); - out: - if(type_page) - free_page(type_page); - return err; - } -} asmlinkage long sys32_setreuid(compat_uid_t ruid, compat_uid_t euid) { diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/acpi.c Sun Mar 28 13:12:08 2004 @@ -62,8 +62,6 @@ unsigned char acpi_kbd_controller_present = 1; unsigned char acpi_legacy_devices; -int acpi_disabled; /* XXX this shouldn't be needed---we can't boot without ACPI! */ - const char * acpi_get_sysname (void) { diff -Nru a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/gate.S Sun Mar 28 13:12:08 2004 @@ -234,7 +234,7 @@ br.call.sptk.many rp=b6 // call the signal handler .ret0: adds base0=(BSP_OFF+SIGCONTEXT_OFF),sp ;; - ld8 r15=[base0],(CFM_OFF-BSP_OFF) // fetch sc_ar_bsp and advance to CFM_OFF + ld8 r15=[base0] // fetch sc_ar_bsp mov r14=ar.bsp ;; cmp.ne p1,p0=r14,r15 // do we need to restore the rbs? diff -Nru a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c --- a/arch/ia64/kernel/machvec.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/machvec.c Sun Mar 28 13:12:08 2004 @@ -50,8 +50,27 @@ EXPORT_SYMBOL(machvec_noop); void -machvec_memory_fence (void) +machvec_setup (char **arg) +{ +} +EXPORT_SYMBOL(machvec_setup); + +void +machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) +{ +} +EXPORT_SYMBOL(machvec_timer_interrupt); + +void +machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir) +{ + mb(); +} +EXPORT_SYMBOL(machvec_dma_sync_single); + +void +machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir) { mb(); } -EXPORT_SYMBOL(machvec_memory_fence); +EXPORT_SYMBOL(machvec_dma_sync_sg); diff -Nru a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c --- a/arch/ia64/kernel/process.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/kernel/process.c Sun Mar 28 13:12:07 2004 @@ -159,16 +159,25 @@ ia64_do_signal(oldset, scr, in_syscall); } +static int pal_halt = 1; +static int __init nohalt_setup(char * str) +{ + pal_halt = 0; + return 1; +} +__setup("nohalt", nohalt_setup); + /* * We use this if we don't have any better idle routine.. */ void default_idle (void) { -#ifdef CONFIG_IA64_PAL_IDLE - if (!need_resched()) - safe_halt(); -#endif + unsigned long pmu_active = ia64_getreg(_IA64_REG_PSR) & (IA64_PSR_PP | IA64_PSR_UP); + + while (!need_resched()) + if (pal_halt && !pmu_active) + safe_halt(); } void __attribute__((noreturn)) diff -Nru a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/kernel/setup.c Sun Mar 28 13:12:07 2004 @@ -229,6 +229,38 @@ #endif } +static void __init +io_port_init (void) +{ + extern unsigned long ia64_iobase; + unsigned long phys_iobase; + + /* + * Set `iobase' to the appropriate address in region 6 (uncached access range). + * + * The EFI memory map is the "preferred" location to get the I/O port space base, + * rather the relying on AR.KR0. This should become more clear in future SAL + * specs. We'll fall back to getting it out of AR.KR0 if no appropriate entry is + * found in the memory map. + */ + phys_iobase = efi_get_iobase(); + if (phys_iobase) + /* set AR.KR0 since this is all we use it for anyway */ + ia64_set_kr(IA64_KR_IO_BASE, phys_iobase); + else { + phys_iobase = ia64_get_kr(IA64_KR_IO_BASE); + printk(KERN_INFO "No I/O port range found in EFI memory map, falling back " + "to AR.KR0\n"); + printk(KERN_INFO "I/O port base = 0x%lx\n", phys_iobase); + } + ia64_iobase = (unsigned long) ioremap(phys_iobase, 0); + + /* setup legacy IO port space */ + io_space[0].mmio_base = ia64_iobase; + io_space[0].sparse = 1; + num_io_spaces = 1; +} + #ifdef CONFIG_SERIAL_8250_CONSOLE static void __init setup_serial_legacy (void) @@ -251,9 +283,6 @@ void __init setup_arch (char **cmdline_p) { - extern unsigned long ia64_iobase; - unsigned long phys_iobase; - unw_init(); ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); @@ -262,6 +291,11 @@ strlcpy(saved_command_line, *cmdline_p, sizeof(saved_command_line)); efi_init(); + io_port_init(); + +#ifdef CONFIG_IA64_GENERIC + machvec_init(acpi_get_sysname()); +#endif #ifdef CONFIG_ACPI_BOOT /* Initialize the ACPI boot-time table parser */ @@ -279,35 +313,6 @@ /* process SAL system table: */ ia64_sal_init(efi.sal_systab); - -#ifdef CONFIG_IA64_GENERIC - machvec_init(acpi_get_sysname()); -#endif - - /* - * Set `iobase' to the appropriate address in region 6 (uncached access range). - * - * The EFI memory map is the "preferred" location to get the I/O port space base, - * rather the relying on AR.KR0. This should become more clear in future SAL - * specs. We'll fall back to getting it out of AR.KR0 if no appropriate entry is - * found in the memory map. - */ - phys_iobase = efi_get_iobase(); - if (phys_iobase) - /* set AR.KR0 since this is all we use it for anyway */ - ia64_set_kr(IA64_KR_IO_BASE, phys_iobase); - else { - phys_iobase = ia64_get_kr(IA64_KR_IO_BASE); - printk(KERN_INFO "No I/O port range found in EFI memory map, falling back " - "to AR.KR0\n"); - printk(KERN_INFO "I/O port base = 0x%lx\n", phys_iobase); - } - ia64_iobase = (unsigned long) ioremap(phys_iobase, 0); - - /* setup legacy IO port space */ - io_space[0].mmio_base = ia64_iobase; - io_space[0].sparse = 1; - num_io_spaces = 1; #ifdef CONFIG_SMP cpu_physical_id(0) = hard_smp_processor_id(); diff -Nru a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c --- a/arch/ia64/kernel/smp.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/smp.c Sun Mar 28 13:12:08 2004 @@ -91,9 +91,6 @@ unsigned long *pending_ipis = &__ia64_per_cpu_var(ipi_operation); unsigned long ops; - /* Count this now; we may make a call that never returns. */ - local_cpu_data->ipi_count++; - mb(); /* Order interrupt and bit testing. */ while ((ops = xchg(pending_ipis, 0)) != 0) { mb(); /* Order bit clearing and data access. */ @@ -337,17 +334,6 @@ return 0; } EXPORT_SYMBOL(smp_call_function); - -void -smp_do_timer (struct pt_regs *regs) -{ - int user = user_mode(regs); - - if (--local_cpu_data->prof_counter <= 0) { - local_cpu_data->prof_counter = local_cpu_data->prof_multiplier; - update_process_times(user); - } -} /* * this function calls the 'stop' function on all other CPUs in the system. diff -Nru a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c --- a/arch/ia64/kernel/smpboot.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/kernel/smpboot.c Sun Mar 28 13:12:07 2004 @@ -265,8 +265,6 @@ static inline void __init smp_setup_percpu_timer (void) { - local_cpu_data->prof_counter = 1; - local_cpu_data->prof_multiplier = 1; } static void __init diff -Nru a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c --- a/arch/ia64/kernel/time.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/kernel/time.c Sun Mar 28 13:12:07 2004 @@ -255,9 +255,13 @@ ia64_do_profile(regs); while (1) { - #ifdef CONFIG_SMP - smp_do_timer(regs); + /* + * For UP, this is done in do_timer(). Weird, but + * fixing that would require updates to all + * platforms. + */ + update_process_times(user_mode(regs)); #endif new_itm += local_cpu_data->itm_delta; @@ -280,17 +284,19 @@ } do { - /* - * If we're too close to the next clock tick for comfort, we increase the - * safety margin by intentionally dropping the next tick(s). We do NOT update - * itm.next because that would force us to call do_timer() which in turn would - * let our clock run too fast (with the potentially devastating effect of - * losing monotony of time). - */ - while (!time_after(new_itm, ia64_get_itc() + local_cpu_data->itm_delta/2)) - new_itm += local_cpu_data->itm_delta; - ia64_set_itm(new_itm); - /* double check, in case we got hit by a (slow) PMI: */ + /* + * If we're too close to the next clock tick for + * comfort, we increase the safety margin by + * intentionally dropping the next tick(s). We do NOT + * update itm.next because that would force us to call + * do_timer() which in turn would let our clock run + * too fast (with the potentially devastating effect + * of losing monotony of time). + */ + while (!time_after(new_itm, ia64_get_itc() + local_cpu_data->itm_delta/2)) + new_itm += local_cpu_data->itm_delta; + ia64_set_itm(new_itm); + /* double check, in case we got hit by a (slow) PMI: */ } while (time_after_eq(ia64_get_itc(), new_itm)); return IRQ_HANDLED; } diff -Nru a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c --- a/arch/ia64/kernel/traps.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/traps.c Sun Mar 28 13:12:08 2004 @@ -488,7 +488,7 @@ siginfo.si_isr = isr; force_sig_info(sig, &siginfo, current); return; - } else if (done_with_exception(regs)) + } else if (ia64_done_with_exception(regs)) return; sprintf(buf, "NaT consumption"); break; diff -Nru a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c --- a/arch/ia64/kernel/unaligned.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/unaligned.c Sun Mar 28 13:12:08 2004 @@ -1486,7 +1486,7 @@ /* something went wrong... */ if (!user_mode(regs)) { if (eh) { - handle_exception(regs, eh); + ia64_handle_exception(regs, eh); goto done; } die_if_kernel("error during unaligned kernel access\n", regs, ret); diff -Nru a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c --- a/arch/ia64/kernel/unwind.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/unwind.c Sun Mar 28 13:12:08 2004 @@ -1746,7 +1746,7 @@ if (!state->pri_unat_loc) state->pri_unat_loc = &state->sw->ar_unat; /* register off. is a multiple of 8, so the least 3 bits (type) are 0 */ - s[dst+1] = (*state->pri_unat_loc - s[dst]) | UNW_NAT_MEMSTK; + s[dst+1] = ((unsigned long) state->pri_unat_loc - s[dst]) | UNW_NAT_MEMSTK; break; case UNW_INSN_SETNAT_TYPE: diff -Nru a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S --- a/arch/ia64/kernel/vmlinux.lds.S Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/kernel/vmlinux.lds.S Sun Mar 28 13:12:08 2004 @@ -12,6 +12,11 @@ OUTPUT_ARCH(ia64) ENTRY(phys_start) jiffies = jiffies_64; +PHDRS { + code PT_LOAD; + percpu PT_LOAD; + data PT_LOAD; +} SECTIONS { /* Sections to be discarded */ @@ -26,6 +31,7 @@ v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */ phys_start = _start - LOAD_OFFSET; + code : { } :code . = KERNEL_START; _text = .; @@ -173,6 +179,7 @@ { *(.data.cacheline_aligned) } /* Per-cpu data: */ + percpu : { } :percpu . = ALIGN(PERCPU_PAGE_SIZE); __phys_per_cpu_start = .; .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) @@ -183,6 +190,7 @@ } . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits into percpu page size */ + data : { } :data .data : AT(ADDR(.data) - LOAD_OFFSET) { *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS } @@ -205,6 +213,7 @@ _end = .; + code : { } :code /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } diff -Nru a/arch/ia64/lib/swiotlb.c b/arch/ia64/lib/swiotlb.c --- a/arch/ia64/lib/swiotlb.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/lib/swiotlb.c Sun Mar 28 13:12:08 2004 @@ -498,6 +498,12 @@ sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir); } +int +swiotlb_dma_mapping_error (dma_addr_t dma_addr) +{ + return 0; +} + /* * Return whether the given PCI device DMA address mask can be supported properly. For * example, if your device can only drive the low 24-bits during PCI bus mastering, then @@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_device); EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu); EXPORT_SYMBOL(swiotlb_sync_sg_for_device); +EXPORT_SYMBOL(swiotlb_dma_mapping_error); EXPORT_SYMBOL(swiotlb_alloc_coherent); EXPORT_SYMBOL(swiotlb_free_coherent); EXPORT_SYMBOL(swiotlb_dma_supported); diff -Nru a/arch/ia64/mm/extable.c b/arch/ia64/mm/extable.c --- a/arch/ia64/mm/extable.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/mm/extable.c Sun Mar 28 13:12:07 2004 @@ -81,7 +81,7 @@ } void -handle_exception (struct pt_regs *regs, const struct exception_table_entry *e) +ia64_handle_exception (struct pt_regs *regs, const struct exception_table_entry *e) { long fix = (u64) &e->cont + e->cont; diff -Nru a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c --- a/arch/ia64/mm/fault.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/mm/fault.c Sun Mar 28 13:12:08 2004 @@ -213,7 +213,7 @@ return; } - if (done_with_exception(regs)) + if (ia64_done_with_exception(regs)) return; /* @@ -233,7 +233,7 @@ bust_spinlocks(1); if (address < PAGE_SIZE) - printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); + printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference (address %016lx)\n", address); else printk(KERN_ALERT "Unable to handle kernel paging request at " "virtual address %016lx\n", address); diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/pci/pci.c Sun Mar 28 13:12:07 2004 @@ -128,7 +128,8 @@ static int __init pci_set_sal_ops (void) { - if (sal_version >= SAL_VERSION_CODE(3, 2)) { + if (sal_revision >= SAL_VERSION_CODE(3, 2)) { + printk("Using SAL 3.2 to access PCI config space\n"); raw_pci_ops = &pci_sal_ext_ops; } return 0; diff -Nru a/arch/ia64/sn/io/machvec/pci_dma.c b/arch/ia64/sn/io/machvec/pci_dma.c --- a/arch/ia64/sn/io/machvec/pci_dma.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/sn/io/machvec/pci_dma.c Sun Mar 28 13:12:07 2004 @@ -652,6 +652,13 @@ } EXPORT_SYMBOL(sn_dma_sync_sg_for_device); +int +sn_dma_mapping_error(dma_addr_t dma_addr) +{ + return 0; +} + +EXPORT_SYMBOL(sn_dma_mapping_error); EXPORT_SYMBOL(sn_pci_unmap_single); EXPORT_SYMBOL(sn_pci_map_single); EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu); diff -Nru a/arch/ia64/sn/io/sn2/shub.c b/arch/ia64/sn/io/sn2/shub.c --- a/arch/ia64/sn/io/sn2/shub.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/sn/io/sn2/shub.c Sun Mar 28 13:12:08 2004 @@ -160,11 +160,13 @@ shubstats_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - cnodeid_t cnode; - uint64_t longarg; + cnodeid_t cnode; + uint64_t longarg; + uint64_t intarg; + uint64_t regval[2]; int nasid; - cnode = (cnodeid_t)file->f_dentry->d_fsdata; + cnode = (cnodeid_t)(u64)file->f_dentry->d_fsdata; if (cnode < 0 || cnode >= numnodes) return -ENODEV; @@ -200,6 +202,38 @@ } break; + case SNDRV_SHUB_GETMMR32: + intarg = shub_mmr_read32(cnode, arg); + if (copy_to_user((void *)arg, &intarg, + sizeof(intarg))) { + return -EFAULT; + } + break; + + case SNDRV_SHUB_GETMMR64: + case SNDRV_SHUB_GETMMR64_IO: + if (cmd == SNDRV_SHUB_GETMMR64) + longarg = shub_mmr_read(cnode, arg); + else + longarg = shub_mmr_read_iospace(cnode, arg); + if (copy_to_user((void *)arg, &longarg, sizeof(longarg))) + return -EFAULT; + break; + + case SNDRV_SHUB_PUTMMR64: + case SNDRV_SHUB_PUTMMR64_IO: + if (copy_from_user((void *)regval, (void *)arg, sizeof(regval))) + return -EFAULT; + if (regval[0] & 0x7) { + printk("Error: configure_shub_stats: unaligned address 0x%016lx\n", regval[0]); + return -EINVAL; + } + if (cmd == SNDRV_SHUB_PUTMMR64) + shub_mmr_write(cnode, (shubreg_t)regval[0], regval[1]); + else + shub_mmr_write_iospace(cnode, (shubreg_t)regval[0], regval[1]); + break; + default: return -EINVAL; } @@ -210,255 +244,3 @@ struct file_operations shub_mon_fops = { .ioctl = shubstats_ioctl, }; - -/* - * "linkstatd" kernel thread to export SGI Numalink - * stats via /proc/sgi_sn/linkstats - */ -static struct s_linkstats { - uint64_t hs_ni_sn_errors[2]; - uint64_t hs_ni_cb_errors[2]; - uint64_t hs_ni_retry_errors[2]; - int hs_ii_up; - uint64_t hs_ii_sn_errors; - uint64_t hs_ii_cb_errors; - uint64_t hs_ii_retry_errors; -} *sn_linkstats; - -static spinlock_t sn_linkstats_lock; -static unsigned long sn_linkstats_starttime; -static unsigned long sn_linkstats_samples; -static unsigned long sn_linkstats_overflows; -static unsigned long sn_linkstats_update_msecs; - -void -sn_linkstats_reset(unsigned long msecs) -{ - int cnode; - uint64_t iio_wstat; - uint64_t llp_csr_reg; - - spin_lock(&sn_linkstats_lock); - memset(sn_linkstats, 0, numnodes * sizeof(struct s_linkstats)); - for (cnode=0; cnode < numnodes; cnode++) { - shub_mmr_write(cnode, SH_NI0_LLP_ERR, 0L); - shub_mmr_write(cnode, SH_NI1_LLP_ERR, 0L); - shub_mmr_write_iospace(cnode, IIO_LLP_LOG, 0L); - - /* zero the II retry counter */ - iio_wstat = shub_mmr_read_iospace(cnode, IIO_WSTAT); - iio_wstat &= 0xffffffffff00ffff; /* bits 23:16 */ - shub_mmr_write_iospace(cnode, IIO_WSTAT, iio_wstat); - - /* Check if the II xtalk link is working */ - llp_csr_reg = shub_mmr_read_iospace(cnode, IIO_LLP_CSR); - if (llp_csr_reg & IIO_LLP_CSR_IS_UP) - sn_linkstats[cnode].hs_ii_up = 1; - } - - sn_linkstats_update_msecs = msecs; - sn_linkstats_samples = 0; - sn_linkstats_overflows = 0; - sn_linkstats_starttime = jiffies; - spin_unlock(&sn_linkstats_lock); -} - -int -linkstatd_thread(void *unused) -{ - int cnode; - int overflows; - uint64_t reg[2]; - uint64_t iio_wstat = 0L; - ii_illr_u_t illr; - struct s_linkstats *lsp; - struct task_struct *tsk = current; - - daemonize("linkstatd"); - set_user_nice(tsk, 19); - sigfillset(&tsk->blocked); - strcpy(tsk->comm, "linkstatd"); - - while(1) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(sn_linkstats_update_msecs * HZ / 1000); - - spin_lock(&sn_linkstats_lock); - - overflows = 0; - for (lsp=sn_linkstats, cnode=0; cnode < numnodes; cnode++, lsp++) { - reg[0] = shub_mmr_read(cnode, SH_NI0_LLP_ERR); - reg[1] = shub_mmr_read(cnode, SH_NI1_LLP_ERR); - if (lsp->hs_ii_up) { - illr = (ii_illr_u_t)shub_mmr_read_iospace(cnode, IIO_LLP_LOG); - iio_wstat = shub_mmr_read_iospace(cnode, IIO_WSTAT); - } - - if (!overflows && ( - (reg[0] & SH_NI0_LLP_ERR_RX_SN_ERR_COUNT_MASK) == - SH_NI0_LLP_ERR_RX_SN_ERR_COUNT_MASK || - (reg[0] & SH_NI0_LLP_ERR_RX_CB_ERR_COUNT_MASK) == - SH_NI0_LLP_ERR_RX_CB_ERR_COUNT_MASK || - (reg[1] & SH_NI1_LLP_ERR_RX_SN_ERR_COUNT_MASK) == - SH_NI1_LLP_ERR_RX_SN_ERR_COUNT_MASK || - (reg[1] & SH_NI1_LLP_ERR_RX_CB_ERR_COUNT_MASK) == - SH_NI1_LLP_ERR_RX_CB_ERR_COUNT_MASK || - (lsp->hs_ii_up && illr.ii_illr_fld_s.i_sn_cnt == IIO_LLP_SN_MAX) || - (lsp->hs_ii_up && illr.ii_illr_fld_s.i_cb_cnt == IIO_LLP_CB_MAX))) { - overflows = 1; - } - -#define LINKSTAT_UPDATE(reg, cnt, mask, shift) cnt += (reg & mask) >> shift - - LINKSTAT_UPDATE(reg[0], lsp->hs_ni_sn_errors[0], - SH_NI0_LLP_ERR_RX_SN_ERR_COUNT_MASK, - SH_NI0_LLP_ERR_RX_SN_ERR_COUNT_SHFT); - - LINKSTAT_UPDATE(reg[1], lsp->hs_ni_sn_errors[1], - SH_NI1_LLP_ERR_RX_SN_ERR_COUNT_MASK, - SH_NI1_LLP_ERR_RX_SN_ERR_COUNT_SHFT); - - LINKSTAT_UPDATE(reg[0], lsp->hs_ni_cb_errors[0], - SH_NI0_LLP_ERR_RX_CB_ERR_COUNT_MASK, - SH_NI0_LLP_ERR_RX_CB_ERR_COUNT_SHFT); - - LINKSTAT_UPDATE(reg[1], lsp->hs_ni_cb_errors[1], - SH_NI1_LLP_ERR_RX_CB_ERR_COUNT_MASK, - SH_NI1_LLP_ERR_RX_CB_ERR_COUNT_SHFT); - - LINKSTAT_UPDATE(reg[0], lsp->hs_ni_retry_errors[0], - SH_NI0_LLP_ERR_RETRY_COUNT_MASK, - SH_NI0_LLP_ERR_RETRY_COUNT_SHFT); - - LINKSTAT_UPDATE(reg[1], lsp->hs_ni_retry_errors[1], - SH_NI1_LLP_ERR_RETRY_COUNT_MASK, - SH_NI1_LLP_ERR_RETRY_COUNT_SHFT); - - if (lsp->hs_ii_up) { - /* II sn and cb errors */ - lsp->hs_ii_sn_errors += illr.ii_illr_fld_s.i_sn_cnt; - lsp->hs_ii_cb_errors += illr.ii_illr_fld_s.i_cb_cnt; - lsp->hs_ii_retry_errors += (iio_wstat & 0x0000000000ff0000) >> 16; - - shub_mmr_write(cnode, SH_NI0_LLP_ERR, 0L); - shub_mmr_write(cnode, SH_NI1_LLP_ERR, 0L); - shub_mmr_write_iospace(cnode, IIO_LLP_LOG, 0L); - - /* zero the II retry counter */ - iio_wstat = shub_mmr_read_iospace(cnode, IIO_WSTAT); - iio_wstat &= 0xffffffffff00ffff; /* bits 23:16 */ - shub_mmr_write_iospace(cnode, IIO_WSTAT, iio_wstat); - } - } - - sn_linkstats_samples++; - if (overflows) - sn_linkstats_overflows++; - - spin_unlock(&sn_linkstats_lock); - } -} - -static char * -rate_per_minute(uint64_t val, uint64_t secs) -{ - static char buf[16]; - uint64_t a=0, b=0, c=0, d=0; - - if (secs) { - a = 60 * val / secs; - b = 60 * 10 * val / secs - (10 * a); - c = 60 * 100 * val / secs - (100 * a) - (10 * b); - d = 60 * 1000 * val / secs - (1000 * a) - (100 * b) - (10 * c); - } - sprintf(buf, "%4lu.%lu%lu%lu", a, b, c, d); - - return buf; -} - -int -sn_linkstats_get(char *page) -{ - int n = 0; - int cnode; - int nlport; - struct s_linkstats *lsp; - nodepda_t *npda; - uint64_t snsum = 0; - uint64_t cbsum = 0; - uint64_t retrysum = 0; - uint64_t snsum_ii = 0; - uint64_t cbsum_ii = 0; - uint64_t retrysum_ii = 0; - uint64_t secs; - - spin_lock(&sn_linkstats_lock); - secs = (jiffies - sn_linkstats_starttime) / HZ; - - n += sprintf(page, "# SGI Numalink stats v1 : %lu samples, %lu o/flows, update %lu msecs\n", - sn_linkstats_samples, sn_linkstats_overflows, sn_linkstats_update_msecs); - - n += sprintf(page+n, "%-37s %8s %8s %8s %8s\n", - "# Numalink", "sn errs", "cb errs", "cb/min", "retries"); - - for (lsp=sn_linkstats, cnode=0; cnode < numnodes; cnode++, lsp++) { - npda = NODEPDA(cnode); - - /* two NL links on each SHub */ - for (nlport=0; nlport < 2; nlport++) { - cbsum += lsp->hs_ni_cb_errors[nlport]; - snsum += lsp->hs_ni_sn_errors[nlport]; - retrysum += lsp->hs_ni_retry_errors[nlport]; - - /* avoid buffer overrun (should be using seq_read API) */ - if (numnodes > 64) - continue; - - n += sprintf(page + n, "/%s/link/%d %8lu %8lu %8s %8lu\n", - npda->hwg_node_name, nlport+1, lsp->hs_ni_sn_errors[nlport], - lsp->hs_ni_cb_errors[nlport], - rate_per_minute(lsp->hs_ni_cb_errors[nlport], secs), - lsp->hs_ni_retry_errors[nlport]); - } - - /* one II port on each SHub (may not be connected) */ - if (lsp->hs_ii_up) { - n += sprintf(page + n, "/%s/xtalk %8lu %8lu %8s %8lu\n", - npda->hwg_node_name, lsp->hs_ii_sn_errors, - lsp->hs_ii_cb_errors, rate_per_minute(lsp->hs_ii_cb_errors, secs), - lsp->hs_ii_retry_errors); - - snsum_ii += lsp->hs_ii_sn_errors; - cbsum_ii += lsp->hs_ii_cb_errors; - retrysum_ii += lsp->hs_ii_retry_errors; - } - } - - n += sprintf(page + n, "%-37s %8lu %8lu %8s %8lu\n", - "System wide NL totals", snsum, cbsum, - rate_per_minute(cbsum, secs), retrysum); - - n += sprintf(page + n, "%-37s %8lu %8lu %8s %8lu\n", - "System wide II totals", snsum_ii, cbsum_ii, - rate_per_minute(cbsum_ii, secs), retrysum_ii); - - spin_unlock(&sn_linkstats_lock); - - return n; -} - -static int __init -linkstatd_init(void) -{ - if (!ia64_platform_is("sn2")) - return -ENODEV; - - spin_lock_init(&sn_linkstats_lock); - sn_linkstats = kmalloc(numnodes * sizeof(struct s_linkstats), GFP_KERNEL); - sn_linkstats_reset(60000UL); /* default 60 second update interval */ - kernel_thread(linkstatd_thread, NULL, CLONE_KERNEL); - - return 0; -} - -__initcall(linkstatd_init); diff -Nru a/arch/ia64/sn/kernel/mca.c b/arch/ia64/sn/kernel/mca.c --- a/arch/ia64/sn/kernel/mca.c Sun Mar 28 13:12:07 2004 +++ b/arch/ia64/sn/kernel/mca.c Sun Mar 28 13:12:07 2004 @@ -108,6 +108,7 @@ down(&sn_oemdata_mutex); sn_oemdata = oemdata; sn_oemdata_size = oemdata_size; + sn_oemdata_bufsize = 0; ia64_sn_plat_specific_err_print(print_hook, (char *)psei); up(&sn_oemdata_mutex); return 0; @@ -120,7 +121,6 @@ { efi_guid_t guid = *(efi_guid_t *)sect_header; *oemdata_size = 0; - sn_oemdata_bufsize = 0; vfree(*oemdata); *oemdata = NULL; if (efi_guidcmp(guid, SAL_PLAT_SPECIFIC_ERR_SECT_GUID) == 0) diff -Nru a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c Sun Mar 28 13:12:08 2004 +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c Sun Mar 28 13:12:08 2004 @@ -73,8 +73,13 @@ } } -// Disable forced interrupts, but leave the code in, just in case. -int sn_force_interrupt_flag = 0; +/* + * Enable forced interrupt by default. + * When set, the sn interrupt handler writes the force interrupt register on + * the bridge chip. The hardware will then send an interrupt message if the + * interrupt line is active. This mimics a level sensitive interrupt. + */ +int sn_force_interrupt_flag = 1; static int sn_force_interrupt_read_proc(char *page, char **start, off_t off, @@ -113,59 +118,11 @@ } } -extern int sn_linkstats_get(char *); -extern int sn_linkstats_reset(unsigned long); - -static int -sn_linkstats_read_proc(char *page, char **start, off_t off, - int count, int *eof, void *data) { - - return sn_linkstats_get(page); -} - -static int -sn_linkstats_write_proc(struct file *file, const char *buffer, - unsigned long count, void *data) -{ - char s[64]; - unsigned long msecs; - int e = count; - - if (copy_from_user(s, buffer, count < sizeof(s) ? count : sizeof(s))) - e = -EFAULT; - else { - if (sscanf(s, "%lu", &msecs) != 1 || msecs < 5) - /* at least 5 milliseconds between updates */ - e = -EINVAL; - else - sn_linkstats_reset(msecs); - } - - return e; -} - -void -register_sn_linkstats(void) { - struct proc_dir_entry *entry; - - if (!sgi_proc_dir) { - sgi_proc_dir = proc_mkdir("sgi_sn", 0); - } - entry = create_proc_entry("linkstats", 0444, sgi_proc_dir); - if (entry) { - entry->nlink = 1; - entry->data = 0; - entry->read_proc = sn_linkstats_read_proc; - entry->write_proc = sn_linkstats_write_proc; - } -} - void register_sn_procfs(void) { register_sn_partition_id(); register_sn_serial_numbers(); register_sn_force_interrupt(); - register_sn_linkstats(); } #endif /* CONFIG_PROC_FS */ diff -Nru a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig --- a/arch/mips/configs/capcella_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/capcella_defconfig Sun Mar 28 13:12:07 2004 @@ -196,7 +196,6 @@ # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig --- a/arch/mips/configs/cobalt_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/cobalt_defconfig Sun Mar 28 13:12:07 2004 @@ -189,7 +189,6 @@ # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig --- a/arch/mips/configs/db1500_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/db1500_defconfig Sun Mar 28 13:12:07 2004 @@ -268,7 +268,6 @@ CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/ddb5476_defconfig b/arch/mips/configs/ddb5476_defconfig --- a/arch/mips/configs/ddb5476_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/ddb5476_defconfig Sun Mar 28 13:12:07 2004 @@ -188,7 +188,6 @@ # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig --- a/arch/mips/configs/e55_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/e55_defconfig Sun Mar 28 13:12:07 2004 @@ -188,7 +188,6 @@ CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/eagle_defconfig b/arch/mips/configs/eagle_defconfig --- a/arch/mips/configs/eagle_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/eagle_defconfig Sun Mar 28 13:12:07 2004 @@ -273,7 +273,6 @@ # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/hp-lj_defconfig b/arch/mips/configs/hp-lj_defconfig --- a/arch/mips/configs/hp-lj_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/hp-lj_defconfig Sun Mar 28 13:12:07 2004 @@ -245,7 +245,6 @@ CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/it8172_defconfig b/arch/mips/configs/it8172_defconfig --- a/arch/mips/configs/it8172_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/it8172_defconfig Sun Mar 28 13:12:07 2004 @@ -243,7 +243,6 @@ CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/ivr_defconfig b/arch/mips/configs/ivr_defconfig --- a/arch/mips/configs/ivr_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/ivr_defconfig Sun Mar 28 13:12:07 2004 @@ -191,7 +191,6 @@ # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig --- a/arch/mips/configs/lasat200_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/mips/configs/lasat200_defconfig Sun Mar 28 13:12:08 2004 @@ -284,7 +284,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig --- a/arch/mips/configs/pb1500_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/mips/configs/pb1500_defconfig Sun Mar 28 13:12:07 2004 @@ -251,7 +251,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig --- a/arch/mips/configs/tb0226_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/mips/configs/tb0226_defconfig Sun Mar 28 13:12:08 2004 @@ -192,7 +192,6 @@ CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig --- a/arch/mips/configs/workpad_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/mips/configs/workpad_defconfig Sun Mar 28 13:12:08 2004 @@ -188,7 +188,6 @@ CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig --- a/arch/parisc/configs/c3000_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/parisc/configs/c3000_defconfig Sun Mar 28 13:12:08 2004 @@ -186,7 +186,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c --- a/arch/parisc/kernel/sys_parisc32.c Sun Mar 28 13:12:07 2004 +++ b/arch/parisc/kernel/sys_parisc32.c Sun Mar 28 13:12:07 2004 @@ -607,105 +607,6 @@ return error; } -static int copy_mount_stuff_to_kernel(const void *user, unsigned long *kernel) -{ - int i; - unsigned long page; - struct vm_area_struct *vma; - - *kernel = 0; - if(!user) - return 0; - vma = find_vma(current->mm, (unsigned long)user); - if(!vma || (unsigned long)user < vma->vm_start) - return -EFAULT; - if(!(vma->vm_flags & VM_READ)) - return -EFAULT; - i = vma->vm_end - (unsigned long) user; - if(PAGE_SIZE <= (unsigned long) i) - i = PAGE_SIZE - 1; - if(!(page = __get_free_page(GFP_KERNEL))) - return -ENOMEM; - if(copy_from_user((void *) page, user, i)) { - free_page(page); - return -EFAULT; - } - *kernel = page; - return 0; -} - -#define SMBFS_NAME "smbfs" -#define NCPFS_NAME "ncpfs" - -asmlinkage int sys32_mount(char *dev_name, char *dir_name, char *type, unsigned long new_flags, u32 data) -{ - unsigned long type_page = 0; - unsigned long data_page = 0; - unsigned long dev_page = 0; - unsigned long dir_page = 0; - int err, is_smb, is_ncp; - - is_smb = is_ncp = 0; - - err = copy_mount_stuff_to_kernel((const void *)type, &type_page); - if (err) - goto out; - - if (!type_page) { - err = -EINVAL; - goto out; - } - - is_smb = !strcmp((char *)type_page, SMBFS_NAME); - is_ncp = !strcmp((char *)type_page, NCPFS_NAME); - - err = copy_mount_stuff_to_kernel((const void *)(unsigned long)data, &data_page); - if (err) - goto type_out; - - err = copy_mount_stuff_to_kernel(dev_name, &dev_page); - if (err) - goto data_out; - - err = copy_mount_stuff_to_kernel(dir_name, &dir_page); - if (err) - goto dev_out; - - if (!is_smb && !is_ncp) { - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } else { - if (is_ncp) - panic("NCP mounts not yet supported 32/64 parisc"); - /* do_ncp_super_data_conv((void *)data_page); */ - else { - panic("SMB mounts not yet supported 32/64 parisc"); - /* do_smb_super_data_conv((void *)data_page); */ - } - - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } - free_page(dir_page); - -dev_out: - free_page(dev_page); - -data_out: - free_page(data_page); - -type_out: - free_page(type_page); - -out: - return err; -} - - /* readv/writev stolen from mips64 */ typedef ssize_t (*IO_fn_t)(struct file *, char *, size_t, loff_t *); diff -Nru a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S --- a/arch/parisc/kernel/syscall_table.S Sun Mar 28 13:12:07 2004 +++ b/arch/parisc/kernel/syscall_table.S Sun Mar 28 13:12:07 2004 @@ -84,7 +84,7 @@ ENTRY_DIFF(lseek) ENTRY_SAME(getpid) /* 20 */ /* the 'void * data' parameter may need re-packing in wide */ - ENTRY_DIFF(mount) + ENTRY_COMP(mount) /* concerned about struct sockaddr in wide/narrow */ /* ---> I think sockaddr is OK unless the compiler packs the struct */ /* differently to align the char array */ diff -Nru a/arch/ppc/boot/ld.script b/arch/ppc/boot/ld.script --- a/arch/ppc/boot/ld.script Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/boot/ld.script Sun Mar 28 13:12:08 2004 @@ -82,6 +82,7 @@ *(__ksymtab) *(__ksymtab_strings) *(__bug_table) + *(__kcrctab) } } diff -Nru a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile --- a/arch/ppc/boot/openfirmware/Makefile Sun Mar 28 13:12:07 2004 +++ b/arch/ppc/boot/openfirmware/Makefile Sun Mar 28 13:12:07 2004 @@ -104,10 +104,10 @@ $(HACKCOFF) $@ && \ ln -sf $(notdir $@) $(images)/zImage$(initrd).pmac -$(images)/vmlinux.coff: $(obj)/coffboot +$(images)/vmlinux.coff: $(obj)/coffboot $(boot)/ld.script $(call cmd,gen-coff) -$(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd +$(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd $(boot)/ld.script $(call cmd,gen-coff) quiet_cmd_gen-elf-pmac = ELF $@ @@ -116,19 +116,19 @@ $(OBJCOPY) $@ $@ --add-section=.note=$(obj)/note \ -R .comment $(del-ramdisk-sec) -$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) $(obj)/note +$(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) $(obj)/note $(boot)/ld.script $(call cmd,gen-elf-pmac) $(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \ - $(LIBS) $(obj)/note + $(LIBS) $(obj)/note $(boot)/ld.script $(call cmd,gen-elf-pmac) quiet_cmd_gen-chrp = CHRP $@ cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $^ && \ $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) -$(images)/zImage.chrp: $(CHRPOBJS) $(obj)/image.o $(LIBS) +$(images)/zImage.chrp: $(CHRPOBJS) $(obj)/image.o $(LIBS) $(boot)/ld.script $(call cmd,gen-chrp) -$(images)/zImage.initrd.chrp: $(CHRPOBJS) $(obj)/image.initrd.o $(LIBS) +$(images)/zImage.initrd.chrp: $(CHRPOBJS) $(obj)/image.initrd.o $(LIBS) $(boot)/ld.script $(call cmd,gen-chrp) quiet_cmd_addnote = ADDNOTE $@ diff -Nru a/arch/ppc/configs/common_defconfig b/arch/ppc/configs/common_defconfig --- a/arch/ppc/configs/common_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/ppc/configs/common_defconfig Sun Mar 28 13:12:07 2004 @@ -241,7 +241,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc/configs/cpci405_defconfig b/arch/ppc/configs/cpci405_defconfig --- a/arch/ppc/configs/cpci405_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/configs/cpci405_defconfig Sun Mar 28 13:12:08 2004 @@ -177,7 +177,6 @@ # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc/configs/pmac_defconfig b/arch/ppc/configs/pmac_defconfig --- a/arch/ppc/configs/pmac_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/configs/pmac_defconfig Sun Mar 28 13:12:08 2004 @@ -247,7 +247,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc/configs/pplus_defconfig b/arch/ppc/configs/pplus_defconfig --- a/arch/ppc/configs/pplus_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/configs/pplus_defconfig Sun Mar 28 13:12:08 2004 @@ -180,7 +180,6 @@ # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc/configs/redwood5_defconfig b/arch/ppc/configs/redwood5_defconfig --- a/arch/ppc/configs/redwood5_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/configs/redwood5_defconfig Sun Mar 28 13:12:08 2004 @@ -173,7 +173,6 @@ # # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc/defconfig b/arch/ppc/defconfig --- a/arch/ppc/defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/defconfig Sun Mar 28 13:12:08 2004 @@ -248,7 +248,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S --- a/arch/ppc/kernel/entry.S Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/kernel/entry.S Sun Mar 28 13:12:08 2004 @@ -171,9 +171,10 @@ bl do_show_syscall #endif /* SHOW_SYSCALLS */ rlwinm r10,r1,0,0,18 /* current_thread_info() */ + lwz r11,TI_LOCAL_FLAGS(r10) + rlwinm r11,r11,0,~_TIFL_FORCE_NOERROR + stw r11,TI_LOCAL_FLAGS(r10) lwz r11,TI_FLAGS(r10) - rlwinm r11,r11,0,~_TIF_FORCE_NOERROR - stw r11,TI_FLAGS(r10) andi. r11,r11,_TIF_SYSCALL_TRACE bne- syscall_dotrace syscall_dotrace_cont: @@ -196,8 +197,8 @@ cmpl 0,r3,r11 rlwinm r12,r1,0,0,18 /* current_thread_info() */ blt+ 30f - lwz r11,TI_FLAGS(r12) - andi. r11,r11,_TIF_FORCE_NOERROR + lwz r11,TI_LOCAL_FLAGS(r12) + andi. r11,r11,_TIFL_FORCE_NOERROR bne 30f neg r3,r3 lwz r10,_CCR(r1) /* Set SO bit in CR */ @@ -413,6 +414,14 @@ rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */ stw r0,TRAP(r1) /* register set saved */ b sys_clone + + .globl ppc_swapcontext +ppc_swapcontext: + SAVE_NVGPRS(r1) + lwz r0,TRAP(r1) + rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */ + stw r0,TRAP(r1) /* register set saved */ + b sys_swapcontext /* * This routine switches between two different tasks. The process diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S --- a/arch/ppc/kernel/misc.S Sun Mar 28 13:12:08 2004 +++ b/arch/ppc/kernel/misc.S Sun Mar 28 13:12:08 2004 @@ -1363,7 +1363,7 @@ .long sys_clock_gettime .long sys_clock_getres .long sys_clock_nanosleep - .long sys_swapcontext + .long ppc_swapcontext .long sys_tgkill /* 250 */ .long sys_utimes .long sys_statfs64 diff -Nru a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c --- a/arch/ppc/kernel/process.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc/kernel/process.c Sun Mar 28 13:12:07 2004 @@ -45,7 +45,6 @@ #include #include -int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs); extern unsigned long _get_SP(void); struct task_struct *last_task_used_math = NULL; @@ -164,6 +163,7 @@ void enable_kernel_altivec(void) { + preempt_disable(); #ifdef CONFIG_SMP if (current->thread.regs && (current->thread.regs->msr & MSR_VEC)) giveup_altivec(current); @@ -172,12 +172,14 @@ #else giveup_altivec(last_task_used_altivec); #endif /* __SMP __ */ + preempt_enable(); } #endif /* CONFIG_ALTIVEC */ void enable_kernel_fp(void) { + preempt_disable(); #ifdef CONFIG_SMP if (current->thread.regs && (current->thread.regs->msr & MSR_FP)) giveup_fpu(current); @@ -186,14 +188,17 @@ #else giveup_fpu(last_task_used_math); #endif /* CONFIG_SMP */ + preempt_enable(); } int -dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs) +dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) { - if (regs->msr & MSR_FP) - giveup_fpu(current); - memcpy(fpregs, ¤t->thread.fpr[0], sizeof(*fpregs)); + preempt_disable(); + if (tsk->thread.regs && (tsk->thread.regs->msr & MSR_FP)) + giveup_fpu(tsk); + preempt_enable(); + memcpy(fpregs, &tsk->thread.fpr[0], sizeof(*fpregs)); return 1; } @@ -330,12 +335,14 @@ if (regs == NULL) return; + preempt_disable(); if (regs->msr & MSR_FP) giveup_fpu(current); #ifdef CONFIG_ALTIVEC if (regs->msr & MSR_VEC) giveup_altivec(current); #endif /* CONFIG_ALTIVEC */ + preempt_enable(); } /* @@ -480,12 +487,14 @@ error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; + preempt_disable(); if (regs->msr & MSR_FP) giveup_fpu(current); #ifdef CONFIG_ALTIVEC if (regs->msr & MSR_VEC) giveup_altivec(current); #endif /* CONFIG_ALTIVEC */ + preempt_enable(); error = do_execve(filename, (char __user *__user *) a1, (char __user *__user *) a2, regs); if (error == 0) diff -Nru a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c --- a/arch/ppc/kernel/traps.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc/kernel/traps.c Sun Mar 28 13:12:07 2004 @@ -391,14 +391,25 @@ return 0; if (bug->line & BUG_WARNING_TRAP) { /* this is a WARN_ON rather than BUG/BUG_ON */ +#ifdef CONFIG_XMON + xmon_printf(KERN_ERR "Badness in %s at %s:%d\n", + bug->function, bug->file, + bug->line & ~BUG_WARNING_TRAP); +#endif /* CONFIG_XMON */ printk(KERN_ERR "Badness in %s at %s:%d\n", bug->function, bug->file, bug->line & ~BUG_WARNING_TRAP); dump_stack(); return 1; } +#ifdef CONFIG_XMON + xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%d!\n", + bug->function, bug->file, bug->line); + xmon(regs); +#endif /* CONFIG_XMON */ printk(KERN_CRIT "kernel BUG in %s at %s:%d!\n", bug->function, bug->file, bug->line); + return 0; } @@ -427,8 +438,14 @@ int code = 0; u32 fpscr; + /* We must make sure the FP state is consistent with + * our MSR_FP in regs + */ + preempt_disable(); if (regs->msr & MSR_FP) giveup_fpu(current); + preempt_enable(); + fpscr = current->thread.fpscr; fpscr &= fpscr << 22; /* mask summary bits with enables */ if (fpscr & FPSCR_VX) @@ -592,12 +609,16 @@ void AltivecAssistException(struct pt_regs *regs) { + preempt_disable(); if (regs->msr & MSR_VEC) giveup_altivec(current); + preempt_enable(); + /* XXX quick hack for now: set the non-Java bit in the VSCR */ current->thread.vscr.u[3] |= 0x10000; } #endif /* CONFIG_ALTIVEC */ + void __init trap_init(void) { diff -Nru a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig --- a/arch/ppc64/configs/g5_defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/configs/g5_defconfig Sun Mar 28 13:12:07 2004 @@ -46,6 +46,7 @@ CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_KMOD is not set +CONFIG_STOP_MACHINE=y # # Platform support @@ -100,6 +101,7 @@ # Generic Driver Options # CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -126,10 +128,10 @@ 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_RAM=y CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y -# CONFIG_DCSSBLK is not set # # ATA/ATAPI/MFM/RLL support @@ -193,7 +195,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # @@ -221,6 +222,12 @@ # CONFIG_SCSI_LOGGING is not set # +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set @@ -236,6 +243,7 @@ # CONFIG_SCSI_ATA_PIIX is not set # CONFIG_SCSI_SATA_PROMISE 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 @@ -295,6 +303,8 @@ # # CONFIG_IEEE1394_VERBOSEDEBUG is not set CONFIG_IEEE1394_OUI_DB=y +CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y +CONFIG_IEEE1394_CONFIG_ROM_IP1394=y # # Device Drivers @@ -349,15 +359,72 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -CONFIG_INET_ECN=y +# CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m + +# +# 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 is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +# 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_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_NAT=y +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_LOCAL is not set +# 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_TARGET_LOG=y +CONFIG_IP_NF_TARGET_ULOG=y +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y CONFIG_XFRM=y # CONFIG_XFRM_USER is not set @@ -467,6 +534,7 @@ # CONFIG_TMS380TR is not set # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # Wan interfaces @@ -487,6 +555,8 @@ # Bluetooth support # # CONFIG_BT is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set # # ISDN subsystem @@ -532,11 +602,13 @@ CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_ATKBD is not set # 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 is not set # CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set @@ -562,11 +634,6 @@ CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_HVC_CONSOLE=y - -# -# Mice -# -# CONFIG_BUSMOUSE is not set # CONFIG_QIC02_TAPE is not set # @@ -578,7 +645,6 @@ # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -629,28 +695,40 @@ # CONFIG_I2C_VOODOO3 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_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_LM75 is not set # CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM 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 # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -664,6 +742,7 @@ # Graphics support # CONFIG_FB=y +# CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y # CONFIG_FB_CONTROL is not set @@ -731,6 +810,7 @@ # USB Host Controller Drivers # CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_SPLIT_ISO is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set @@ -739,9 +819,9 @@ # # CONFIG_USB_BLUETOOTH_TTY is not set CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -CONFIG_USB_STORAGE_DEBUG=y +CONFIG_USB_PRINTER=y +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y @@ -765,7 +845,9 @@ # 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_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set # # USB Imaging devices @@ -795,6 +877,7 @@ # # USB Host-to-Host Cables # +CONFIG_USB_ALI_M5632=y CONFIG_USB_AN2720=y CONFIG_USB_BELKIN=y CONFIG_USB_GENESYS=y @@ -866,7 +949,6 @@ # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_BRLVGER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_TEST is not set @@ -961,12 +1043,13 @@ CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=y CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -978,7 +1061,11 @@ # CONFIG_AMIGA_PARTITION is not set # CONFIG_ATARI_PARTITION is not set CONFIG_MAC_PARTITION=y -# CONFIG_MSDOS_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set # CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set @@ -1059,18 +1146,20 @@ 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_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_ARC4 is not set CONFIG_CRYPTO_DEFLATE=m +# CONFIG_CRYPTO_MICHAEL_MIC is not set CONFIG_CRYPTO_TEST=m # diff -Nru a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig --- a/arch/ppc64/configs/pSeries_defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/configs/pSeries_defconfig Sun Mar 28 13:12:08 2004 @@ -197,7 +197,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc64/defconfig b/arch/ppc64/defconfig --- a/arch/ppc64/defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/defconfig Sun Mar 28 13:12:07 2004 @@ -197,7 +197,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/ppc64/kernel/chrp_setup.c b/arch/ppc64/kernel/chrp_setup.c --- a/arch/ppc64/kernel/chrp_setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/kernel/chrp_setup.c Sun Mar 28 13:12:07 2004 @@ -88,14 +88,11 @@ extern unsigned long ppc_proc_freq; extern unsigned long ppc_tb_freq; -void -chrp_get_cpuinfo(struct seq_file *m) +void chrp_get_cpuinfo(struct seq_file *m) { struct device_node *root; const char *model = ""; - seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); - root = of_find_node_by_path("/"); if (root) model = get_property(root, "model", NULL); @@ -209,15 +206,17 @@ fwnmi_active = 1; } - /* Early initialization. Relocation is on but do not reference unbolted pages */ void __init pSeries_init_early(void) { -#ifdef CONFIG_PPC_PSERIES /* This ifdef should go away */ void *comport; hpte_init_pSeries(); - tce_init_pSeries(); + + if (ppc64_iommu_off) + pci_dma_init_direct(); + else + tce_init_pSeries(); #ifdef CONFIG_SMP smp_init_pSeries(); @@ -230,7 +229,6 @@ ppc_md.udbg_putc = udbg_putc; ppc_md.udbg_getc = udbg_getc; ppc_md.udbg_getc_poll = udbg_getc_poll; -#endif } void __init @@ -253,7 +251,6 @@ #endif ppc_md.setup_arch = chrp_setup_arch; - ppc_md.setup_residual = NULL; ppc_md.get_cpuinfo = chrp_get_cpuinfo; if(naca->interrupt_controller == IC_OPEN_PIC) { ppc_md.init_IRQ = pSeries_init_openpic; @@ -418,46 +415,64 @@ extern void setup_default_decr(void); +/* Some sane defaults: 125 MHz timebase, 1GHz processor */ +#define DEFAULT_TB_FREQ 125000000UL +#define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) + void __init pSeries_calibrate_decr(void) { struct device_node *cpu; struct div_result divres; - int *fp; - unsigned long freq, processor_freq; + unsigned int *fp; + int node_found; /* * The cpu node should have a timebase-frequency property * to tell us the rate at which the decrementer counts. */ - freq = 16666000; /* hardcoded default */ cpu = of_find_node_by_type(NULL, "cpu"); + + ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ + node_found = 0; if (cpu != 0) { - fp = (int *) get_property(cpu, "timebase-frequency", NULL); - if (fp != 0) - freq = *fp; + fp = (unsigned int *)get_property(cpu, "timebase-frequency", + NULL); + if (fp != 0) { + node_found = 1; + ppc_tb_freq = *fp; + } } - ppc_tb_freq = freq; - processor_freq = freq; + if (!node_found) + printk(KERN_ERR "WARNING: Estimating decrementer frequency " + "(not found)\n"); + + ppc_proc_freq = DEFAULT_PROC_FREQ; + node_found = 0; if (cpu != 0) { - fp = (int *) get_property(cpu, "clock-frequency", NULL); - if (fp != 0) - processor_freq = *fp; + fp = (unsigned int *)get_property(cpu, "clock-frequency", + NULL); + if (fp != 0) { + node_found = 1; + ppc_proc_freq = *fp; + } } - ppc_proc_freq = processor_freq; + if (!node_found) + printk(KERN_ERR "WARNING: Estimating processor frequency " + "(not found)\n"); + of_node_put(cpu); - printk("time_init: decrementer frequency = %lu.%.6lu MHz\n", - freq/1000000, freq%1000000); - printk("time_init: processor frequency = %lu.%.6lu MHz\n", - processor_freq/1000000, processor_freq%1000000); + printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", + ppc_tb_freq/1000000, ppc_tb_freq%1000000); + printk(KERN_INFO "time_init: processor frequency = %lu.%.6lu MHz\n", + ppc_proc_freq/1000000, ppc_proc_freq%1000000); - tb_ticks_per_jiffy = freq / HZ; + tb_ticks_per_jiffy = ppc_tb_freq / HZ; tb_ticks_per_sec = tb_ticks_per_jiffy * HZ; - tb_ticks_per_usec = freq / 1000000; - tb_to_us = mulhwu_scale_factor(freq, 1000000); - div128_by_32( 1024*1024, 0, tb_ticks_per_sec, &divres ); + tb_ticks_per_usec = ppc_tb_freq / 1000000; + tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); + div128_by_32(1024*1024, 0, tb_ticks_per_sec, &divres); tb_to_xs = divres.result_low; setup_default_decr(); } - diff -Nru a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c --- a/arch/ppc64/kernel/iSeries_pci.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/iSeries_pci.c Sun Mar 28 13:12:08 2004 @@ -103,47 +103,6 @@ Error_Text, Bus, SubBus, AgentId, HvRc); } -#if 0 -/* - * Dump the iSeries Temp Device Node - * <4>buswalk [swapper : - DeviceNode: 0xC000000000634300 - * <4>00. Device Node = 0xC000000000634300 - * <4> - PciDev = 0x0000000000000000 - * <4> - tDevice = 0x 17:01.00 0x1022 00 - * <4> 4. Device Node = 0xC000000000634480 - * <4> - PciDev = 0x0000000000000000 - * <4> - Device = 0x 18:38.16 Irq:0xA7 Vendor:0x1014 Flags:0x00 - * <4> - Devfn = 0xB0: 22.18 - */ -void dumpDevice_Node(struct iSeries_Device_Node *DevNode) -{ - udbg_printf("Device Node = 0x%p\n", DevNode); - udbg_printf(" - PciDev = 0x%p\n", DevNode->PciDev); - udbg_printf(" - Device = 0x%4X:%02X.%02X (0x%02X)\n", - ISERIES_BUS(DevNode), ISERIES_SUBBUS(DevNode), - DevNode->AgentId, DevNode->DevFn); - udbg_printf(" - LSlot = 0x%02X\n", DevNode->LogicalSlot); - udbg_printf(" - TceTable = 0x%p\n ", DevNode->DevTceTable); - udbg_printf(" - DSA = 0x%04X\n", ISERIES_DSA(DevNode) >> 32); - udbg_printf(" = Irq:0x%02X Vendor:0x%04X Flags:0x%02X\n", - DevNode->Irq, DevNode->Vendor, DevNode->Flags); - udbg_printf(" - Location = %s\n", DevNode->CardLocation); -} - -/* - * Walk down the device node chain - */ -static void list_device_nodes(void) -{ - struct list_head *Device_Node_Ptr = iSeries_Global_Device_List.next; - - while (Device_Node_Ptr != &iSeries_Global_Device_List) { - dumpDevice_Node((struct iSeries_Device_Node*)Device_Node_Ptr); - Device_Node_Ptr = Device_Node_Ptr->next; - } -} -#endif - /* * build_device_node(u16 Bus, int SubBus, u8 DevFn) */ diff -Nru a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c --- a/arch/ppc64/kernel/iSeries_setup.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/iSeries_setup.c Sun Mar 28 13:12:08 2004 @@ -311,7 +311,6 @@ iSeries_recal_titan = HvCallXm_loadTod(); ppc_md.setup_arch = iSeries_setup_arch; - ppc_md.setup_residual = iSeries_setup_residual; ppc_md.get_cpuinfo = iSeries_get_cpuinfo; ppc_md.init_IRQ = iSeries_init_IRQ; ppc_md.get_irq = iSeries_get_irq; @@ -724,29 +723,6 @@ tbFreqMhzHundreths); systemcfg->processor = xIoHriProcessorVpd[procIx].xPVR; printk("Processor version = %x\n", systemcfg->processor); -} - -/* - * int as400_setup_residual() - * - * Description: - * This routine pretty-prints CPU information gathered from the VPD - * for use in /proc/cpuinfo - * - * Input(s): - * *buffer - Buffer into which CPU data is to be printed. - * - * Output(s): - * *buffer - Buffer with CPU data. - */ -void iSeries_setup_residual(struct seq_file *m, int cpu_id) -{ - seq_printf(m, "clock\t\t: %lu.%02luMhz\n", procFreqMhz, - procFreqMhzHundreths); - seq_printf(m, "time base\t: %lu.%02luMHz\n", tbFreqMhz, - tbFreqMhzHundreths); - seq_printf(m, "i-cache\t\t: %d\n", systemcfg->iCacheL1LineSize); - seq_printf(m, "d-cache\t\t: %d\n", systemcfg->dCacheL1LineSize); } void iSeries_get_cpuinfo(struct seq_file *m) diff -Nru a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c --- a/arch/ppc64/kernel/idle.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/idle.c Sun Mar 28 13:12:08 2004 @@ -172,16 +172,16 @@ oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); if (!oldval) { set_thread_flag(TIF_POLLING_NRFLAG); - start_snooze = __get_tb(); + start_snooze = __get_tb() + + naca->smt_snooze_delay*tb_ticks_per_usec; while (!need_resched()) { /* need_resched could be 1 or 0 at this * point. If it is 0, set it to 0, so * an IPI/Prod is sent. If it is 1, keep * it that way & schedule work. */ - if (__get_tb() < - (start_snooze + - naca->smt_snooze_delay*tb_ticks_per_usec)) { + if (naca->smt_snooze_delay == 0 || + __get_tb() < start_snooze) { HMT_low(); /* Low thread priority */ continue; } diff -Nru a/arch/ppc64/kernel/ioctl32.c b/arch/ppc64/kernel/ioctl32.c --- a/arch/ppc64/kernel/ioctl32.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/ioctl32.c Sun Mar 28 13:12:08 2004 @@ -346,9 +346,6 @@ COMPATIBLE_IOCTL(TIOCSTART) COMPATIBLE_IOCTL(TIOCSTOP) COMPATIBLE_IOCTL(TIOCSLTC) -#if 0 -COMPATIBLE_IOCTL(FBIOBLANK) -#endif /* Little p (/dev/rtc, /dev/envctrl, etc.) */ COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */ COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */ diff -Nru a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c --- a/arch/ppc64/kernel/iommu.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/kernel/iommu.c Sun Mar 28 13:12:07 2004 @@ -73,7 +73,7 @@ if (unlikely(npages) == 0) { if (printk_ratelimit()) WARN_ON(1); - return NO_TCE; + return PCI_DMA_ERROR_CODE; } if (handle && *handle) @@ -100,16 +100,17 @@ end = n + npages; if (unlikely(end >= limit)) { - if (likely(pass++ < 2)) { + if (likely(pass < 2)) { /* First failure, just rescan the half of the table. * Second failure, rescan the other half of the table. */ start = (largealloc ^ pass) ? tbl->it_halfpoint : 0; limit = pass ? tbl->it_mapsize : limit; + pass++; goto again; } else { /* Third failure, give up */ - return NO_TCE; + return PCI_DMA_ERROR_CODE; } } @@ -143,15 +144,15 @@ unsigned int npages, int direction) { unsigned long entry, flags; - dma_addr_t ret = NO_TCE; + dma_addr_t ret = PCI_DMA_ERROR_CODE; spin_lock_irqsave(&(tbl->it_lock), flags); entry = iommu_range_alloc(tbl, npages, NULL); - if (unlikely(entry == NO_TCE)) { + if (unlikely(entry == PCI_DMA_ERROR_CODE)) { spin_unlock_irqrestore(&(tbl->it_lock), flags); - return NO_TCE; + return PCI_DMA_ERROR_CODE; } entry += tbl->it_offset; /* Offset into real TCE table */ @@ -262,7 +263,7 @@ DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen); /* Handle failure */ - if (unlikely(entry == NO_TCE)) { + if (unlikely(entry == PCI_DMA_ERROR_CODE)) { if (printk_ratelimit()) printk(KERN_INFO "iommu_alloc failed, tbl %p vaddr %lx" " npages %lx\n", tbl, vaddr, npages); @@ -326,7 +327,7 @@ */ if (outcount < nelems) { outs++; - outs->dma_address = NO_TCE; + outs->dma_address = PCI_DMA_ERROR_CODE; outs->dma_length = 0; } return outcount; diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/misc.S Sun Mar 28 13:12:08 2004 @@ -593,7 +593,7 @@ .llong .sys_ni_syscall /* old stat syscall */ .llong .ppc32_lseek .llong .sys_getpid /* 20 */ - .llong .sys32_mount + .llong .compat_sys_mount .llong .sys_oldumount .llong .sys_setuid .llong .sys_getuid diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c --- a/arch/ppc64/kernel/pSeries_pci.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/pSeries_pci.c Sun Mar 28 13:12:08 2004 @@ -699,7 +699,8 @@ phbs_fixup_io(); chrp_request_regions(); pci_fix_bus_sysdata(); - iommu_setup_pSeries(); + if (!ppc64_iommu_off) + iommu_setup_pSeries(); } /*********************************************************************** diff -Nru a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c --- a/arch/ppc64/kernel/pci_iommu.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/pci_iommu.c Sun Mar 28 13:12:08 2004 @@ -82,7 +82,7 @@ if (order >= IOMAP_MAX_ORDER) { printk("PCI_DMA: pci_alloc_consistent size too large: 0x%lx\n", size); - return (void *)NO_TCE; + return (void *)PCI_DMA_ERROR_CODE; } tbl = devnode_table(hwdev); @@ -101,7 +101,7 @@ /* Set up tces to cover the allocated range */ mapping = iommu_alloc(tbl, ret, npages, PCI_DMA_BIDIRECTIONAL); - if (mapping == NO_TCE) { + if (mapping == PCI_DMA_ERROR_CODE) { free_pages((unsigned long)ret, order); ret = NULL; } else @@ -139,7 +139,7 @@ size_t size, int direction) { struct iommu_table * tbl; - dma_addr_t dma_handle = NO_TCE; + dma_addr_t dma_handle = PCI_DMA_ERROR_CODE; unsigned long uaddr; unsigned int npages; @@ -153,7 +153,7 @@ if (tbl) { dma_handle = iommu_alloc(tbl, vaddr, npages, direction); - if (dma_handle == NO_TCE) { + if (dma_handle == PCI_DMA_ERROR_CODE) { if (printk_ratelimit()) { printk(KERN_INFO "iommu_alloc failed, tbl %p vaddr %p npages %d\n", tbl, vaddr, npages); diff -Nru a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c --- a/arch/ppc64/kernel/pmac_setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/kernel/pmac_setup.c Sun Mar 28 13:12:07 2004 @@ -95,7 +95,6 @@ PMAC_MB_INFO_MODEL, 0); unsigned int mbflags = pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL, PMAC_MB_INFO_FLAGS, 0); - extern unsigned long ppc_tb_freq; if (pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL, PMAC_MB_INFO_NAME, (long)&mbname) != 0) @@ -130,9 +129,6 @@ /* Indicate newworld */ seq_printf(m, "pmac-generation\t: NewWorld\n"); - - /* Indicate timebase value */ - seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); } diff -Nru a/arch/ppc64/kernel/pmac_time.c b/arch/ppc64/kernel/pmac_time.c --- a/arch/ppc64/kernel/pmac_time.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/pmac_time.c Sun Mar 28 13:12:08 2004 @@ -40,6 +40,7 @@ extern void setup_default_decr(void); extern unsigned long ppc_tb_freq; +extern unsigned long ppc_proc_freq; /* Apparently the RTC stores seconds since 1 Jan 1904 */ #define RTC_OFFSET 2082844800 @@ -154,6 +155,11 @@ div128_by_32( 1024*1024, 0, tb_ticks_per_sec, &divres ); tb_to_xs = divres.result_low; ppc_tb_freq = freq; + + fp = (unsigned int *)get_property(cpu, "clock-frequency", NULL); + if (fp == 0) + panic("can't get cpu processor frequency"); + ppc_proc_freq = *fp; setup_default_decr(); } diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/prom.c Sun Mar 28 13:12:08 2004 @@ -525,25 +525,16 @@ return mem; } -#ifdef CONFIG_PMAC_DART -static int dart_force_on; -#endif +static int iommu_force_on; +int ppc64_iommu_off; -static unsigned long __init -prom_initialize_lmb(unsigned long mem) +static void early_cmdline_parse(void) { - phandle node; - char type[64]; - unsigned long i, offset = reloc_offset(); - struct prom_t *_prom = PTRRELOC(&prom); - struct systemcfg *_systemcfg = RELOC(systemcfg); - union lmb_reg_property reg; - unsigned long lmb_base, lmb_size; - unsigned long num_regs, bytes_per_reg = (_prom->encode_phys_size*2)/8; - int nodart = 0; - -#ifdef CONFIG_PMAC_DART + unsigned long offset = reloc_offset(); char *opt; +#ifndef CONFIG_PMAC_DART + struct systemcfg *_systemcfg = RELOC(systemcfg); +#endif opt = strstr(RELOC(cmd_line), RELOC("iommu=")); if (opt) { @@ -554,16 +545,30 @@ while (*opt && *opt == ' ') opt++; if (!strncmp(opt, RELOC("off"), 3)) - nodart = 1; + RELOC(ppc64_iommu_off) = 1; else if (!strncmp(opt, RELOC("force"), 5)) - RELOC(dart_force_on) = 1; + RELOC(iommu_force_on) = 1; } -#else - nodart = 1; -#endif /* CONFIG_PMAC_DART */ - if (nodart) +#ifndef CONFIG_PMAC_DART + if (_systemcfg->platform == PLATFORM_POWERMAC) { + RELOC(ppc64_iommu_off) = 1; prom_print(RELOC("DART disabled on PowerMac !\n")); + } +#endif +} + +static unsigned long __init +prom_initialize_lmb(unsigned long mem) +{ + phandle node; + char type[64]; + unsigned long i, offset = reloc_offset(); + struct prom_t *_prom = PTRRELOC(&prom); + struct systemcfg *_systemcfg = RELOC(systemcfg); + union lmb_reg_property reg; + unsigned long lmb_base, lmb_size; + unsigned long num_regs, bytes_per_reg = (_prom->encode_phys_size*2)/8; lmb_init(); @@ -589,11 +594,6 @@ lmb_base = ((unsigned long)reg.addrPM[i].address_hi) << 32; lmb_base |= (unsigned long)reg.addrPM[i].address_lo; lmb_size = reg.addrPM[i].size; - if (nodart && lmb_base > 0x80000000ull) { - prom_print(RELOC("Skipping memory above 2Gb for " - "now, DART support disabled\n")); - continue; - } } else if (_prom->encode_phys_size == 32) { lmb_base = reg.addr32[i].address; lmb_size = reg.addr32[i].size; @@ -602,7 +602,16 @@ lmb_size = reg.addr64[i].size; } - if ( lmb_add(lmb_base, lmb_size) < 0 ) + /* We limit memory to 2GB if the IOMMU is off */ + if (RELOC(ppc64_iommu_off)) { + if (lmb_base >= 0x80000000UL) + continue; + + if ((lmb_base + lmb_size) > 0x80000000UL) + lmb_size = 0x80000000UL - lmb_base; + } + + if (lmb_add(lmb_base, lmb_size) < 0) prom_print(RELOC("Too many LMB's, discarding this one...\n")); } @@ -780,11 +789,11 @@ /* Only reserve DART space if machine has more than 2GB of RAM * or if requested with iommu=on on cmdline. */ - if (lmb_end_of_DRAM() <= 0x80000000ull && !RELOC(dart_force_on)) + if (lmb_end_of_DRAM() <= 0x80000000ull && !RELOC(iommu_force_on)) return; - /* 512 pages is max DART tablesize. */ - RELOC(dart_tablesize) = 1UL << 19; + /* 512 pages (2MB) is max DART tablesize. */ + RELOC(dart_tablesize) = 1UL << 21; /* 16MB (1 << 24) alignment. We allocate a full 16Mb chuck since we * will blow up an entire large page anyway in the kernel mapping */ @@ -811,6 +820,9 @@ struct of_tce_table *prom_tce_table = RELOC(of_tce_table); unsigned long tce_entry, *tce_entryp; + if (RELOC(ppc64_iommu_off)) + return; + #ifdef DEBUG_PROM prom_print(RELOC("starting prom_initialize_tce_table\n")); #endif @@ -930,16 +942,15 @@ path, sizeof(path)-1) <= 0) { prom_print(RELOC("package-to-path failed\n")); } else { - prom_print(RELOC("opened ")); + prom_print(RELOC("opening PHB ")); prom_print(path); - prom_print_nl(); } phb_node = (ihandle)call_prom(RELOC("open"), 1, 1, path); if ( (long)phb_node <= 0) { - prom_print(RELOC("open failed\n")); + prom_print(RELOC("... failed\n")); } else { - prom_print(RELOC("open success\n")); + prom_print(RELOC("... done\n")); } call_prom(RELOC("call-method"), 6, 0, RELOC("set-64-bit-addressing"), @@ -1136,7 +1147,7 @@ prom_print_hex(cpuid); prom_print(RELOC(" : starting cpu ")); prom_print(path); - prom_print(RELOC("...")); + prom_print(RELOC("... ")); call_prom(RELOC("start-cpu"), 3, 0, node, secondary_hold, cpuid); @@ -1144,7 +1155,7 @@ (*acknowledge == ((unsigned long)-1)); i++ ) ; if (*acknowledge == cpuid) { - prom_print(RELOC("ok\n")); + prom_print(RELOC("... done\n")); /* We have to get every CPU out of OF, * even if we never start it. */ if (cpuid >= NR_CPUS) @@ -1157,10 +1168,9 @@ cpu_set(cpuid, RELOC(cpu_present_at_boot)); #endif } else { - prom_print(RELOC("failed: ")); + prom_print(RELOC("... failed: ")); prom_print_hex(*acknowledge); prom_print_nl(); - /* prom_panic(RELOC("cpu failed to start")); */ } } #ifdef CONFIG_SMP @@ -1583,6 +1593,8 @@ strlcpy(RELOC(cmd_line), p, sizeof(cmd_line)); } + early_cmdline_parse(); + mem = prom_initialize_lmb(mem); mem = prom_bi_rec_reserve(mem); @@ -1691,7 +1703,7 @@ prom_print(RELOC("Looking for displays\n")); if (RELOC(of_stdout_device) != 0) { - prom_print(RELOC("OF stdout is : ")); + prom_print(RELOC("OF stdout is : ")); prom_print(PTRRELOC(RELOC(of_stdout_device))); prom_print(RELOC("\n")); } @@ -1751,7 +1763,7 @@ continue; } - prom_print(RELOC("... ok\n")); + prom_print(RELOC("... done\n")); /* Setup a useable color table when the appropriate * method is available. Should update this to set-colors */ diff -Nru a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c --- a/arch/ppc64/kernel/rtas.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/kernel/rtas.c Sun Mar 28 13:12:07 2004 @@ -130,7 +130,7 @@ void log_rtas_error(struct rtas_args *rtas_args) { - struct rtas_args err_args; + struct rtas_args err_args, temp_args; err_args.token = rtas_token("rtas-last-error"); err_args.nargs = 2; @@ -141,6 +141,7 @@ err_args.args[1] = RTAS_ERROR_LOG_MAX; err_args.args[2] = 0; + temp_args = *rtas_args; get_paca()->xRtas = err_args; PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n", @@ -148,8 +149,9 @@ enter_rtas((void *)__pa((unsigned long)&get_paca()->xRtas)); PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n"); + err_args = get_paca()->xRtas; - get_paca()->xRtas = *rtas_args; + get_paca()->xRtas = temp_args; if (err_args.rets[0] == 0) log_error(rtas_err_buf, ERR_TYPE_RTAS_LOG, 0); diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/kernel/setup.c Sun Mar 28 13:12:07 2004 @@ -330,6 +330,7 @@ unsigned short min; if (cpu_id == NR_CPUS) { + seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); if (ppc_md.get_cpuinfo != NULL) ppc_md.get_cpuinfo(m); @@ -363,29 +364,12 @@ seq_printf(m, "\n"); -#ifdef CONFIG_PPC_PSERIES /* * Assume here that all clock rates are the same in a * smp system. -- Cort */ - if (systemcfg->platform != PLATFORM_ISERIES_LPAR) { - struct device_node *cpu_node; - int *fp; - - cpu_node = of_find_node_by_type(NULL, "cpu"); - if (cpu_node) { - fp = (int *) get_property(cpu_node, "clock-frequency", - NULL); - if (fp) - seq_printf(m, "clock\t\t: %dMHz\n", - *fp / 1000000); - of_node_put(cpu_node); - } - } -#endif - - if (ppc_md.setup_residual != NULL) - ppc_md.setup_residual(m, cpu_id); + seq_printf(m, "clock\t\t: %lu.%06luMHz\n", ppc_proc_freq / 1000000, + ppc_proc_freq % 1000000); seq_printf(m, "revision\t: %hd.%hd\n\n", maj, min); diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c --- a/arch/ppc64/kernel/sys_ppc32.c Sun Mar 28 13:12:08 2004 +++ b/arch/ppc64/kernel/sys_ppc32.c Sun Mar 28 13:12:08 2004 @@ -35,9 +35,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -253,209 +250,6 @@ return ret; } -struct ncp_mount_data32_v3 { - int version; - unsigned int ncp_fd; - compat_uid_t mounted_uid; - compat_pid_t wdog_pid; - unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; - unsigned int time_out; - unsigned int retry_count; - unsigned int flags; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -struct ncp_mount_data32_v4 { - int version; - /* all members below are "long" in ABI ... i.e. 32bit on sparc32, while 64bits on sparc64 */ - unsigned int flags; - unsigned int mounted_uid; - int wdog_pid; - - unsigned int ncp_fd; - unsigned int time_out; - unsigned int retry_count; - - unsigned int uid; - unsigned int gid; - unsigned int file_mode; - unsigned int dir_mode; -}; - -static void *do_ncp_super_data_conv(void *raw_data) -{ - switch (*(int*)raw_data) { - case NCP_MOUNT_VERSION: - { - struct ncp_mount_data news, *n = &news; - struct ncp_mount_data32_v3 *n32 = (struct ncp_mount_data32_v3 *)raw_data; - - n->version = n32->version; - n->ncp_fd = n32->ncp_fd; - n->mounted_uid = n32->mounted_uid; - n->wdog_pid = n32->wdog_pid; - memmove (n->mounted_vol, n32->mounted_vol, sizeof (n32->mounted_vol)); - n->time_out = n32->time_out; - n->retry_count = n32->retry_count; - n->flags = n32->flags; - n->uid = n32->uid; - n->gid = n32->gid; - n->file_mode = n32->file_mode; - n->dir_mode = n32->dir_mode; - memcpy(raw_data, n, sizeof(*n)); - } - break; - case NCP_MOUNT_VERSION_V4: - { - struct ncp_mount_data_v4 news, *n = &news; - struct ncp_mount_data32_v4 *n32 = (struct ncp_mount_data32_v4 *)raw_data; - - n->version = n32->version; - n->flags = n32->flags; - n->mounted_uid = n32->mounted_uid; - n->wdog_pid = n32->wdog_pid; - n->ncp_fd = n32->ncp_fd; - n->time_out = n32->time_out; - n->retry_count = n32->retry_count; - n->uid = n32->uid; - n->gid = n32->gid; - n->file_mode = n32->file_mode; - n->dir_mode = n32->dir_mode; - memcpy(raw_data, n, sizeof(*n)); - } - break; - default: - /* do not touch unknown structures */ - break; - } - return raw_data; -} - -struct smb_mount_data32 { - int version; - compat_uid_t mounted_uid; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -static void *do_smb_super_data_conv(void *raw_data) -{ - struct smb_mount_data news, *s = &news; - struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data; - - if (s32->version != SMB_MOUNT_OLDVERSION) - goto out; - s->version = s32->version; - s->mounted_uid = s32->mounted_uid; - s->uid = s32->uid; - s->gid = s32->gid; - s->file_mode = s32->file_mode; - s->dir_mode = s32->dir_mode; - memcpy(raw_data, s, sizeof(struct smb_mount_data)); -out: - return raw_data; -} - -static int copy_mount_stuff_to_kernel(const void *user, unsigned long *kernel) -{ - int i; - unsigned long page; - struct vm_area_struct *vma; - - *kernel = 0; - if(!user) - return 0; - vma = find_vma(current->mm, (unsigned long)user); - if(!vma || (unsigned long)user < vma->vm_start) - return -EFAULT; - if(!(vma->vm_flags & VM_READ)) - return -EFAULT; - i = vma->vm_end - (unsigned long) user; - if(PAGE_SIZE <= (unsigned long) i) - i = PAGE_SIZE - 1; - if(!(page = __get_free_page(GFP_KERNEL))) - return -ENOMEM; - if(copy_from_user((void *) page, user, i)) { - free_page(page); - return -EFAULT; - } - *kernel = page; - return 0; -} - -#define SMBFS_NAME "smbfs" -#define NCPFS_NAME "ncpfs" - -asmlinkage long sys32_mount(char *dev_name, char *dir_name, char *type, unsigned long new_flags, u32 data) -{ - unsigned long type_page = 0; - unsigned long data_page = 0; - unsigned long dev_page = 0; - unsigned long dir_page = 0; - int err, is_smb, is_ncp; - - is_smb = is_ncp = 0; - - err = copy_mount_stuff_to_kernel((const void *)type, &type_page); - if (err) - goto out; - - if (!type_page) { - err = -EINVAL; - goto out; - } - - is_smb = !strcmp((char *)type_page, SMBFS_NAME); - is_ncp = !strcmp((char *)type_page, NCPFS_NAME); - - err = copy_mount_stuff_to_kernel((const void *)AA(data), &data_page); - if (err) - goto type_out; - - err = copy_mount_stuff_to_kernel(dev_name, &dev_page); - if (err) - goto data_out; - - err = copy_mount_stuff_to_kernel(dir_name, &dir_page); - if (err) - goto dev_out; - - if (!is_smb && !is_ncp) { - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } else { - if (is_ncp) - do_ncp_super_data_conv((void *)data_page); - else - do_smb_super_data_conv((void *)data_page); - - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } - free_page(dir_page); - -dev_out: - free_page(dev_page); - -data_out: - free_page(data_page); - -type_out: - free_page(type_page); - -out: - return err; -} - /* readdir & getdents */ #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) #define ROUND_UP(x) (((x)+sizeof(u32)-1) & ~(sizeof(u32)-1)) @@ -528,39 +322,55 @@ int error; }; -static int -filldir(void * __buf, const char * name, int namlen, off_t offset, ino_t ino, - unsigned int d_type) +static int filldir(void * __buf, const char * name, int namlen, off_t offset, + ino_t ino, unsigned int d_type) { struct linux_dirent32 * dirent; struct getdents_callback32 * buf = (struct getdents_callback32 *) __buf; - int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); + int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; dirent = buf->previous; - if (dirent) - put_user(offset, &dirent->d_off); + if (dirent) { + if (__put_user(offset, &dirent->d_off)) + goto efault; + } dirent = buf->current_dir; + if (__put_user(ino, &dirent->d_ino)) + goto efault; + if (__put_user(reclen, &dirent->d_reclen)) + goto efault; + if (copy_to_user(dirent->d_name, name, namlen)) + goto efault; + if (__put_user(0, dirent->d_name + namlen)) + goto efault; + if (__put_user(d_type, (char *) dirent + reclen - 1)) + goto efault; buf->previous = dirent; - put_user(ino, &dirent->d_ino); - put_user(reclen, &dirent->d_reclen); - copy_to_user(dirent->d_name, name, namlen); - put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; + dirent = (void *)dirent + reclen; buf->current_dir = dirent; buf->count -= reclen; return 0; +efault: + buf->error = -EFAULT; + return -EFAULT; } -asmlinkage long sys32_getdents(unsigned int fd, struct linux_dirent32 *dirent, unsigned int count) +long sys32_getdents(unsigned int fd, struct linux_dirent32 *dirent, + unsigned int count) { struct file * file; struct linux_dirent32 * lastdirent; struct getdents_callback32 buf; - int error = -EBADF; + int error; + + error = -EFAULT; + if (!access_ok(VERIFY_WRITE, dirent, count)) + goto out; + error = -EBADF; file = fget(fd); if (!file) goto out; @@ -573,19 +383,20 @@ error = vfs_readdir(file, (filldir_t)filldir, &buf); if (error < 0) goto out_putf; - lastdirent = buf.previous; error = buf.error; - if(lastdirent) { - put_user(file->f_pos, &lastdirent->d_off); - error = count - buf.count; + lastdirent = buf.previous; + if (lastdirent) { + if (put_user(file->f_pos, &lastdirent->d_off)) + error = -EFAULT; + else + error = count - buf.count; } - out_putf: - fput(file); - out: +out_putf: + fput(file); +out: return error; } -/* end of readdir & getdents */ /* * Ooo, nasty. We need here to frob 32-bit unsigned longs to diff -Nru a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c --- a/arch/ppc64/kernel/vio.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/kernel/vio.c Sun Mar 28 13:12:07 2004 @@ -419,7 +419,7 @@ size_t size, int direction ) { struct iommu_table *tbl; - dma_addr_t dma_handle = NO_TCE; + dma_addr_t dma_handle = PCI_DMA_ERROR_CODE; unsigned long uaddr; unsigned int npages; @@ -504,7 +504,7 @@ /* It is easier to debug here for the drivers than in the tce tables.*/ if(order >= IOMAP_MAX_ORDER) { printk("VIO_DMA: vio_alloc_consistent size to large: 0x%lx \n", size); - return (void *)NO_TCE; + return (void *)PCI_DMA_ERROR_CODE; } tbl = dev->iommu_table; @@ -517,7 +517,7 @@ memset(ret, 0, npages << PAGE_SHIFT); /* Set up tces to cover the allocated range */ tce = iommu_alloc(tbl, ret, npages, PCI_DMA_BIDIRECTIONAL); - if (tce == NO_TCE) { + if (tce == PCI_DMA_ERROR_CODE) { PPCDBG(PPCDBG_TCE, "vio_alloc_consistent: iommu_alloc failed\n" ); free_pages((unsigned long)ret, order); ret = NULL; diff -Nru a/arch/ppc64/kernel/viopath.c b/arch/ppc64/kernel/viopath.c --- a/arch/ppc64/kernel/viopath.c Sun Mar 28 13:12:07 2004 +++ b/arch/ppc64/kernel/viopath.c Sun Mar 28 13:12:07 2004 @@ -105,6 +105,9 @@ */ static vio_event_handler_t *vio_handler[VIO_MAX_SUBTYPES]; +#define VIOPATH_KERN_WARN KERN_WARNING "viopath: " +#define VIOPATH_KERN_INFO KERN_INFO "viopath: " + static unsigned char e2a(unsigned char x) { switch (x) { @@ -209,7 +212,7 @@ ((u64)handle) << 32, PAGE_SIZE, 0, 0); if (hvrc != HvLpEvent_Rc_Good) - printk("viopath hv error on op %d\n", (int)hvrc); + printk(VIOPATH_KERN_WARN "hv error on op %d\n", (int)hvrc); down(&Semaphore); @@ -318,7 +321,7 @@ if (hvrc == HvLpEvent_Rc_Good) viopathStatus[remoteLp].isActive = 1; else { - printk(KERN_WARNING_VIO "could not connect to partition %d\n", + printk(VIOPATH_KERN_WARN "could not connect to partition %d\n", remoteLp); viopathStatus[remoteLp].isActive = 0; } @@ -355,11 +358,11 @@ remoteLp = event->xTargetLp; if ((event->xSourceInstanceId != viopathStatus[remoteLp].mSourceInst) || (event->xTargetInstanceId != viopathStatus[remoteLp].mTargetInst)) { - printk(KERN_WARNING_VIO "ignoring ack....mismatched instances\n"); + printk(VIOPATH_KERN_WARN "ignoring ack....mismatched instances\n"); return; } - printk(KERN_WARNING_VIO "partition %d ended\n", remoteLp); + printk(VIOPATH_KERN_WARN "partition %d ended\n", remoteLp); viopathStatus[remoteLp].isActive = 0; @@ -403,7 +406,7 @@ if (!event) return; if (event->xFlags.xFunction == HvLpEvent_Function_Int) { - printk(KERN_WARNING_VIO + printk(VIOPATH_KERN_WARN "unexpected config request from partition %d", event->xSourceLp); @@ -461,7 +464,7 @@ if (viopathStatus[remoteLp].isActive && (event->xSourceInstanceId != viopathStatus[remoteLp].mTargetInst)) { - printk(KERN_WARNING_VIO + printk(VIOPATH_KERN_WARN "message from invalid partition. " "int msg rcvd, source inst (%d) doesnt match (%d)\n", viopathStatus[remoteLp].mTargetInst, @@ -472,7 +475,7 @@ if (viopathStatus[remoteLp].isActive && (event->xTargetInstanceId != viopathStatus[remoteLp].mSourceInst)) { - printk(KERN_WARNING_VIO + printk(VIOPATH_KERN_WARN "message from invalid partition. " "int msg rcvd, target inst (%d) doesnt match (%d)\n", viopathStatus[remoteLp].mSourceInst, @@ -483,7 +486,7 @@ remoteLp = event->xTargetLp; if (event->xSourceInstanceId != viopathStatus[remoteLp].mSourceInst) { - printk(KERN_WARNING_VIO + printk(VIOPATH_KERN_WARN "message from invalid partition. " "ack msg rcvd, source inst (%d) doesnt match (%d)\n", viopathStatus[remoteLp].mSourceInst, @@ -493,7 +496,7 @@ if (event->xTargetInstanceId != viopathStatus[remoteLp].mTargetInst) { - printk(KERN_WARNING_VIO + printk(VIOPATH_KERN_WARN "message from invalid partition. " "viopath: ack msg rcvd, target inst (%d) doesnt match (%d)\n", viopathStatus[remoteLp].mTargetInst, @@ -503,7 +506,7 @@ } if (vio_handler[subtype] == NULL) { - printk(KERN_WARNING_VIO + printk(VIOPATH_KERN_WARN "unexpected virtual io event subtype %d from partition %d\n", event->xSubtype, remoteLp); /* No handler. Ack if necessary */ @@ -608,10 +611,10 @@ HvLpEvent_registerHandler(HvLpEvent_Type_VirtualIo, &vio_handleEvent); sendMonMsg(remoteLp); - printk(KERN_INFO_VIO - "Opening connection to partition %d, setting sinst %d, tinst %d\n", - remoteLp, viopathStatus[remoteLp].mSourceInst, - viopathStatus[remoteLp].mTargetInst); + printk(VIOPATH_KERN_INFO "opening connection to partition %d, " + "setting sinst %d, tinst %d\n", + remoteLp, viopathStatus[remoteLp].mSourceInst, + viopathStatus[remoteLp].mTargetInst); } spin_unlock_irqrestore(&statuslock, flags); @@ -662,7 +665,7 @@ numOpen += viopathStatus[remoteLp].users[i]; if ((viopathStatus[remoteLp].isOpen) && (numOpen == 0)) { - printk(KERN_INFO_VIO "Closing connection to partition %d", + printk(VIOPATH_KERN_INFO "closing connection to partition %d", remoteLp); HvCallEvent_closeLpEventPath(remoteLp, @@ -696,23 +699,21 @@ { subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT; if ((subtype < 0) || (subtype >= VIO_MAX_SUBTYPES)) { - printk(KERN_WARNING_VIO - "unexpected subtype %d freeing event buffer\n", - subtype); + printk(VIOPATH_KERN_WARN + "unexpected subtype %d freeing event buffer\n", subtype); return; } if (atomic_read(&event_buffer_available[subtype]) != 0) { - printk(KERN_WARNING_VIO + printk(VIOPATH_KERN_WARN "freeing unallocated event buffer, subtype %d\n", subtype); return; } if (buffer != &event_buffer[subtype * 256]) { - printk(KERN_WARNING_VIO - "freeing invalid event buffer, subtype %d\n", - subtype); + printk(VIOPATH_KERN_WARN + "freeing invalid event buffer, subtype %d\n", subtype); } atomic_set(&event_buffer_available[subtype], 1); diff -Nru a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c --- a/arch/s390/appldata/appldata_base.c Sun Mar 28 13:12:07 2004 +++ b/arch/s390/appldata/appldata_base.c Sun Mar 28 13:12:07 2004 @@ -372,31 +372,57 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, void *buffer, size_t *lenp) { - struct appldata_ops *ops; - int rc, len; + struct appldata_ops *ops = NULL, *tmp_ops; + int rc, len, found; char buf[2]; + struct list_head *lh; + found = 0; + spin_lock_bh(&appldata_ops_lock); + list_for_each(lh, &appldata_ops_list) { + tmp_ops = list_entry(lh, struct appldata_ops, list); + if (&tmp_ops->ctl_table[2] == ctl) { + found = 1; + } + } + if (!found) { + spin_unlock_bh(&appldata_ops_lock); + return -ENODEV; + } ops = ctl->data; + if (!try_module_get(ops->owner)) { // protect this function + spin_unlock_bh(&appldata_ops_lock); + return -ENODEV; + } + spin_unlock_bh(&appldata_ops_lock); + if (!*lenp || filp->f_pos) { *lenp = 0; + module_put(ops->owner); return 0; } if (!write) { len = sprintf(buf, ops->active ? "1\n" : "0\n"); if (len > *lenp) len = *lenp; - if (copy_to_user(buffer, buf, len)) + if (copy_to_user(buffer, buf, len)) { + module_put(ops->owner); return -EFAULT; + } goto out; } len = *lenp; - if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) + if (copy_from_user(buf, buffer, + len > sizeof(buf) ? sizeof(buf) : len)) { + module_put(ops->owner); return -EFAULT; + } spin_lock_bh(&appldata_ops_lock); if ((buf[0] == '1') && (ops->active == 0)) { - if (!try_module_get(ops->owner)) { + if (!try_module_get(ops->owner)) { // protect tasklet spin_unlock_bh(&appldata_ops_lock); + module_put(ops->owner); return -ENODEV; } ops->active = 1; @@ -430,6 +456,7 @@ out: *lenp = len; filp->f_pos += len; + module_put(ops->owner); return 0; } @@ -511,7 +538,6 @@ ops->ctl_table[3].ctl_name = 0; ops->sysctl_header = register_sysctl_table(ops->ctl_table,1); - ops->ctl_table[2].de->owner = ops->owner; P_INFO("%s-ops registered!\n", ops->name); return 0; @@ -525,10 +551,11 @@ void appldata_unregister_ops(struct appldata_ops *ops) { spin_lock_bh(&appldata_ops_lock); - list_del(&ops->list); - spin_unlock_bh(&appldata_ops_lock); unregister_sysctl_table(ops->sysctl_header); + list_del(&ops->list); kfree(ops->ctl_table); + ops->ctl_table = NULL; + spin_unlock_bh(&appldata_ops_lock); P_INFO("%s-ops unregistered!\n", ops->name); } /********************** module-ops management **************************/ diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig --- a/arch/s390/defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/s390/defconfig Sun Mar 28 13:12:08 2004 @@ -21,9 +21,11 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=17 -# CONFIG_IKCONFIG is not set +CONFIG_HOTPLUG=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set -# CONFIG_KALLSYMS is not set +CONFIG_KALLSYMS=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -84,6 +86,7 @@ # Generic Driver Options # # CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # SCSI device support @@ -110,6 +113,12 @@ CONFIG_SCSI_LOGGING=y # +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# # SCSI low-level drivers # # CONFIG_SCSI_AIC7XXX_OLD is not set @@ -185,7 +194,6 @@ # S/390 tape hardware support # CONFIG_S390_TAPE_34XX=m -CONFIG_HOTPLUG=y # # Networking support @@ -199,7 +207,7 @@ # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y -# CONFIG_NET_KEY is not set +CONFIG_NET_KEY=y CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set @@ -208,7 +216,6 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set @@ -222,11 +229,12 @@ # CONFIG_DECNET is not set # CONFIG_BRIDGE is not set # CONFIG_NETFILTER is not set +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set # CONFIG_VLAN_8021Q is not set @@ -247,6 +255,7 @@ CONFIG_NET_SCHED=y CONFIG_NET_SCH_CBQ=m # CONFIG_NET_SCH_HTB is not set +# CONFIG_NET_SCH_HFSC is not set CONFIG_NET_SCH_CSZ=m CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m @@ -255,6 +264,7 @@ CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m +# CONFIG_NET_SCH_DELAY is not set CONFIG_NET_QOS=y CONFIG_NET_ESTIMATOR=y CONFIG_NET_CLS=y @@ -303,6 +313,7 @@ # # CONFIG_TR is not set # CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # Wan interfaces @@ -340,6 +351,8 @@ # Bluetooth support # # CONFIG_BT is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set # # File systems @@ -380,7 +393,6 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set @@ -392,6 +404,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -417,7 +430,7 @@ CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=y CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -484,7 +497,9 @@ # CONFIG_CRYPTO_AES is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_TEST is not set # diff -Nru a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c --- a/arch/s390/kernel/asm-offsets.c Sun Mar 28 13:12:07 2004 +++ b/arch/s390/kernel/asm-offsets.c Sun Mar 28 13:12:07 2004 @@ -17,10 +17,10 @@ int main(void) { DEFINE(__THREAD_info, offsetof(struct task_struct, thread_info),); - DEFINE(__THREAD_ar2, offsetof(struct task_struct, thread.ar2),); - DEFINE(__THREAD_ar4, offsetof(struct task_struct, thread.ar4),); DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),); DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),); + DEFINE(__THREAD_mm_segment, + offsetof(struct task_struct, thread.mm_segment),); BLANK(); DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),); DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),); @@ -31,5 +31,12 @@ DEFINE(__TI_flags, offsetof(struct thread_info, flags),); DEFINE(__TI_cpu, offsetof(struct thread_info, cpu),); DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count),); + BLANK(); + DEFINE(__PT_PSW, offsetof(struct pt_regs, psw),); + DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs),); + DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2),); + DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc),); + DEFINE(__PT_TRAP, offsetof(struct pt_regs, trap),); + DEFINE(__PT_SIZE, sizeof(struct pt_regs),); return 0; } diff -Nru a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c --- a/arch/s390/kernel/binfmt_elf32.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/binfmt_elf32.c Sun Mar 28 13:12:08 2004 @@ -57,18 +57,7 @@ /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is now struct_user_regs, they are different) */ -#define ELF_CORE_COPY_REGS(pr_reg, regs) \ - { \ - int i; \ - memcpy(&pr_reg.psw.mask, ®s->psw.mask, 4); \ - memcpy(&pr_reg.psw.addr, ((char*)®s->psw.addr)+4, 4); \ - for(i=0; igprs[i]; \ - for(i=0; iacrs[i]; \ - pr_reg.orig_gpr2 = regs->orig_gpr2; \ - } - +#define ELF_CORE_COPY_REGS(pr_reg, regs) dump_regs32(regs, &pr_reg); /* This yields a mask that user programs can use to figure out what @@ -106,6 +95,18 @@ __u32 orig_gpr2; } s390_regs32; typedef s390_regs32 elf_gregset_t; + +static inline int dump_regs32(struct pt_regs *ptregs, elf_gregset_t *regs) +{ + int i; + + memcpy(®s->psw.mask, &ptregs->psw.mask, 4); + memcpy(®s->psw.addr, &ptregs->psw.addr, 4); + for (i = 0; i < NUM_GPRS; i++) + regs->gprs[i] = ptregs->gprs[i]; + regs->orig_gpr2 = ptregs->orig_gpr2; + return 1; +} #include #include diff -Nru a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c --- a/arch/s390/kernel/compat_linux.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/compat_linux.c Sun Mar 28 13:12:08 2004 @@ -35,9 +35,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -298,7 +295,7 @@ * * This is really horribly ugly. */ -asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr) +asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr) { if(call >> 16) /* hack for backward compatibility */ return -EINVAL; @@ -360,7 +357,7 @@ return -EINVAL; } -asmlinkage int sys32_truncate64(const char * path, unsigned long high, unsigned long low) +asmlinkage long sys32_truncate64(const char * path, unsigned long high, unsigned long low) { if ((int)high < 0) return -EINVAL; @@ -368,7 +365,7 @@ return sys_truncate(path, (high << 32) | low); } -asmlinkage int sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low) +asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low) { if ((int)high < 0) return -EINVAL; @@ -479,7 +476,7 @@ return retval; } -asmlinkage long sys32_readv(int fd, struct compat_iovec *vector, u32 count) +asmlinkage long sys32_readv(int fd, struct compat_iovec *vector, unsigned long count) { struct file *file; long ret = -EBADF; @@ -497,7 +494,7 @@ return ret; } -asmlinkage long sys32_writev(int fd, struct compat_iovec *vector, u32 count) +asmlinkage long sys32_writev(int fd, struct compat_iovec *vector, unsigned long count) { struct file *file; int ret = -EBADF; @@ -549,7 +546,7 @@ return 0; } -asmlinkage int old32_readdir(unsigned int fd, struct old_linux_dirent32 *dirent, unsigned int count) +asmlinkage long old32_readdir(unsigned int fd, struct old_linux_dirent32 *dirent, unsigned int count) { int error = -EBADF; struct file * file; @@ -611,7 +608,7 @@ return 0; } -asmlinkage int sys32_getdents(unsigned int fd, struct linux_dirent32 *dirent, unsigned int count) +asmlinkage long sys32_getdents(unsigned int fd, struct linux_dirent32 *dirent, unsigned int count) { struct file * file; struct linux_dirent32 * lastdirent; @@ -706,10 +703,10 @@ #define MAX_SELECT_SECONDS \ ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) -asmlinkage int sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x) +asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, + struct compat_timeval *tvp) { fd_set_bits fds; - struct compat_timeval *tvp = (struct compat_timeval *)AA(tvp_x); char *bits; unsigned long nn; long timeout; @@ -828,157 +825,6 @@ return err; } -struct ncp_mount_data32 { - int version; - unsigned int ncp_fd; - compat_uid_t mounted_uid; - compat_pid_t wdog_pid; - unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; - unsigned int time_out; - unsigned int retry_count; - unsigned int flags; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -static void *do_ncp_super_data_conv(void *raw_data) -{ - struct ncp_mount_data *n = (struct ncp_mount_data *)raw_data; - struct ncp_mount_data32 *n32 = (struct ncp_mount_data32 *)raw_data; - - n->dir_mode = n32->dir_mode; - n->file_mode = n32->file_mode; - n->gid = low2highgid(n32->gid); - n->uid = low2highuid(n32->uid); - memmove (n->mounted_vol, n32->mounted_vol, (sizeof (n32->mounted_vol) + 3 * sizeof (unsigned int))); - n->wdog_pid = n32->wdog_pid; - n->mounted_uid = low2highuid(n32->mounted_uid); - return raw_data; -} - -struct smb_mount_data32 { - int version; - compat_uid_t mounted_uid; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -static void *do_smb_super_data_conv(void *raw_data) -{ - struct smb_mount_data *s = (struct smb_mount_data *)raw_data; - struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data; - - if (s32->version != SMB_MOUNT_OLDVERSION) - goto out; - s->version = s32->version; - s->mounted_uid = low2highuid(s32->mounted_uid); - s->uid = low2highuid(s32->uid); - s->gid = low2highgid(s32->gid); - s->file_mode = s32->file_mode; - s->dir_mode = s32->dir_mode; -out: - return raw_data; -} - -static int copy_mount_stuff_to_kernel(const void *user, unsigned long *kernel) -{ - int i; - unsigned long page; - struct vm_area_struct *vma; - - *kernel = 0; - if(!user) - return 0; - vma = find_vma(current->mm, (unsigned long)user); - if(!vma || (unsigned long)user < vma->vm_start) - return -EFAULT; - if(!(vma->vm_flags & VM_READ)) - return -EFAULT; - i = vma->vm_end - (unsigned long) user; - if(PAGE_SIZE <= (unsigned long) i) - i = PAGE_SIZE - 1; - if(!(page = __get_free_page(GFP_KERNEL))) - return -ENOMEM; - if(copy_from_user((void *) page, user, i)) { - free_page(page); - return -EFAULT; - } - *kernel = page; - return 0; -} - -#define SMBFS_NAME "smbfs" -#define NCPFS_NAME "ncpfs" - -asmlinkage int sys32_mount(char *dev_name, char *dir_name, char *type, unsigned long new_flags, u32 data) -{ - unsigned long type_page = 0; - unsigned long data_page = 0; - unsigned long dev_page = 0; - unsigned long dir_page = 0; - int err, is_smb, is_ncp; - - is_smb = is_ncp = 0; - - err = copy_mount_stuff_to_kernel((const void *)type, &type_page); - if (err) - goto out; - - if (!type_page) { - err = -EINVAL; - goto out; - } - - is_smb = !strcmp((char *)type_page, SMBFS_NAME); - is_ncp = !strcmp((char *)type_page, NCPFS_NAME); - - err = copy_mount_stuff_to_kernel((const void *)AA(data), &data_page); - if (err) - goto type_out; - - err = copy_mount_stuff_to_kernel(dev_name, &dev_page); - if (err) - goto data_out; - - err = copy_mount_stuff_to_kernel(dir_name, &dir_page); - if (err) - goto dev_out; - - if (!is_smb && !is_ncp) { - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } else { - if (is_ncp) - do_ncp_super_data_conv((void *)data_page); - else - do_smb_super_data_conv((void *)data_page); - - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } - free_page(dir_page); - -dev_out: - free_page(dev_page); - -data_out: - free_page(data_page); - -type_out: - free_page(type_page); - -out: - return err; -} - struct sysinfo32 { s32 uptime; u32 loads[3]; @@ -996,7 +842,7 @@ char _f[8]; }; -asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info) +asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info) { struct sysinfo s; int ret, err; @@ -1024,7 +870,7 @@ return ret; } -asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid, +asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval) { struct timespec t; @@ -1039,8 +885,8 @@ return ret; } -asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, - compat_sigset_t __user *oset, compat_size_t sigsetsize) +asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, + compat_sigset_t __user *oset, size_t sigsetsize) { sigset_t s; compat_sigset_t s32; @@ -1074,8 +920,8 @@ return 0; } -asmlinkage int sys32_rt_sigpending(compat_sigset_t __user *set, - compat_size_t sigsetsize) +asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, + size_t sigsetsize) { sigset_t s; compat_sigset_t s32; @@ -1101,9 +947,9 @@ extern int copy_siginfo_to_user32(siginfo_t32 *to, siginfo_t *from); -asmlinkage int +asmlinkage long sys32_rt_sigtimedwait(compat_sigset_t *uthese, siginfo_t32 *uinfo, - struct compat_timespec *uts, compat_size_t sigsetsize) + struct compat_timespec *uts, size_t sigsetsize) { int ret, sig; sigset_t these; @@ -1182,7 +1028,7 @@ return ret; } -asmlinkage int +asmlinkage long sys32_rt_sigqueueinfo(int pid, int sig, siginfo_t32 __user *uinfo) { siginfo_t info; @@ -1384,7 +1230,7 @@ * sys32_execve() executes a new program after the asm stub has set * things up for us. This should basically do what I want it to. */ -asmlinkage int +asmlinkage long sys32_execve(struct pt_regs regs) { int error; @@ -1412,14 +1258,14 @@ #ifdef CONFIG_MODULES -asmlinkage int +asmlinkage long sys32_init_module(void __user *umod, unsigned long len, const char __user *uargs) { return sys_init_module(umod, len, uargs); } -asmlinkage int +asmlinkage long sys32_delete_module(const char __user *name_user, unsigned int flags) { return sys_delete_module(name_user, flags); @@ -1427,14 +1273,14 @@ #else /* CONFIG_MODULES */ -asmlinkage int +asmlinkage long sys32_init_module(void __user *umod, unsigned long len, const char __user *uargs) { return -ENOSYS; } -asmlinkage int +asmlinkage long sys32_delete_module(const char __user *name_user, unsigned int flags) { return -ENOSYS; @@ -1599,7 +1445,7 @@ return copy_to_user(res32, kres, sizeof(*res32)) ? -EFAULT : 0; } -int asmlinkage sys32_nfsservctl(int cmd, struct nfsctl_arg32 *arg32, union nfsctl_res32 *res32) +long asmlinkage sys32_nfsservctl(int cmd, struct nfsctl_arg32 *arg32, union nfsctl_res32 *res32) { struct nfsctl_arg *karg = NULL; union nfsctl_res *kres = NULL; @@ -1667,7 +1513,7 @@ extern struct timezone sys_tz; -asmlinkage int sys32_gettimeofday(struct compat_timeval *tv, struct timezone *tz) +asmlinkage long sys32_gettimeofday(struct compat_timeval *tv, struct timezone *tz) { if (tv) { struct timeval ktv; @@ -1696,7 +1542,7 @@ return 0; } -asmlinkage int sys32_settimeofday(struct compat_timeval *tv, struct timezone *tz) +asmlinkage long sys32_settimeofday(struct compat_timeval *tv, struct timezone *tz) { struct timespec kts; struct timezone ktz; @@ -1714,23 +1560,23 @@ } /* These are here just in case some old sparc32 binary calls it. */ -asmlinkage int sys32_pause(void) +asmlinkage long sys32_pause(void) { current->state = TASK_INTERRUPTIBLE; schedule(); return -ERESTARTNOHAND; } -asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, char *ubuf, - compat_size_t count, u32 poshi, u32 poslo) +asmlinkage long sys32_pread64(unsigned int fd, char *ubuf, + size_t count, u32 poshi, u32 poslo) { if ((compat_ssize_t) count < 0) return -EINVAL; return sys_pread64(fd, ubuf, count, ((loff_t)AA(poshi) << 32) | AA(poslo)); } -asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd, char *ubuf, - compat_size_t count, u32 poshi, u32 poslo) +asmlinkage long sys32_pwrite64(unsigned int fd, const char *ubuf, + size_t count, u32 poshi, u32 poslo) { if ((compat_ssize_t) count < 0) return -EINVAL; @@ -1742,7 +1588,7 @@ return sys_readahead(fd, ((loff_t)AA(offhi) << 32) | AA(offlo), count); } -asmlinkage int sys32_sendfile(int out_fd, int in_fd, compat_off_t *offset, s32 count) +asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t *offset, size_t count) { mm_segment_t old_fs = get_fs(); int ret; @@ -1761,7 +1607,7 @@ return ret; } -asmlinkage int sys32_sendfile64(int out_fd, int in_fd, +asmlinkage long sys32_sendfile64(int out_fd, int in_fd, compat_loff_t *offset, s32 count) { mm_segment_t old_fs = get_fs(); @@ -1798,7 +1644,7 @@ extern int do_adjtimex(struct timex *); -asmlinkage int sys32_adjtimex(struct timex32 *utp) +asmlinkage long sys32_adjtimex(struct timex32 *utp) { struct timex txc; int ret; @@ -1951,7 +1797,7 @@ return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; } -asmlinkage long sys32_stat64(char * filename, struct stat64_emu31 * statbuf, long flags) +asmlinkage long sys32_stat64(char * filename, struct stat64_emu31 * statbuf) { struct kstat stat; int ret = vfs_stat(filename, &stat); @@ -1960,7 +1806,7 @@ return ret; } -asmlinkage long sys32_lstat64(char * filename, struct stat64_emu31 * statbuf, long flags) +asmlinkage long sys32_lstat64(char * filename, struct stat64_emu31 * statbuf) { struct kstat stat; int ret = vfs_lstat(filename, &stat); @@ -1969,7 +1815,7 @@ return ret; } -asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 * statbuf, long flags) +asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 * statbuf) { struct kstat stat; int ret = vfs_fstat(fd, &stat); @@ -2056,7 +1902,7 @@ return error; } -asmlinkage compat_ssize_t sys32_read(unsigned int fd, char * buf, size_t count) +asmlinkage long sys32_read(unsigned int fd, char * buf, size_t count) { if ((compat_ssize_t) count < 0) return -EINVAL; @@ -2064,7 +1910,7 @@ return sys_read(fd, buf, count); } -asmlinkage compat_ssize_t sys32_write(unsigned int fd, char * buf, size_t count) +asmlinkage long sys32_write(unsigned int fd, char * buf, size_t count) { if ((compat_ssize_t) count < 0) return -EINVAL; @@ -2072,7 +1918,7 @@ return sys_write(fd, buf, count); } -asmlinkage int sys32_clone(struct pt_regs regs) +asmlinkage long sys32_clone(struct pt_regs regs) { unsigned long clone_flags; unsigned long newsp; diff -Nru a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c --- a/arch/s390/kernel/compat_signal.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/compat_signal.c Sun Mar 28 13:12:08 2004 @@ -161,7 +161,7 @@ } } -asmlinkage int +asmlinkage long sys32_sigaction(int sig, const struct old_sigaction32 *act, struct old_sigaction32 *oact) { @@ -254,7 +254,7 @@ return ret; } -asmlinkage int +asmlinkage long sys32_sigaltstack(const stack_t32 *uss, stack_t32 *uoss, struct pt_regs *regs) { stack_t kss, koss; @@ -297,7 +297,8 @@ regs32.psw.addr = PSW32_ADDR_AMODE31 | (__u32) regs->psw.addr; for (i = 0; i < NUM_GPRS; i++) regs32.gprs[i] = (__u32) regs->gprs[i]; - memcpy(regs32.acrs, regs->acrs, sizeof(regs32.acrs)); + save_access_regs(current->thread.acrs); + memcpy(regs32.acrs, current->thread.acrs, sizeof(regs32.acrs)); err = __copy_to_user(&sregs->regs, ®s32, sizeof(regs32)); if (err) return err; @@ -323,7 +324,8 @@ regs->psw.addr = (__u64)(regs32.psw.addr & PSW32_ADDR_INSN); for (i = 0; i < NUM_GPRS; i++) regs->gprs[i] = (__u64) regs32.gprs[i]; - memcpy(regs->acrs, regs32.acrs, sizeof(regs32.acrs)); + memcpy(current->thread.acrs, regs32.acrs, sizeof(current->thread.acrs)); + restore_access_regs(current->thread.acrs); err = __copy_from_user(¤t->thread.fp_regs, &sregs->fpregs, sizeof(_s390_fp_regs32)); diff -Nru a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S --- a/arch/s390/kernel/compat_wrapper.S Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/compat_wrapper.S Sun Mar 28 13:12:08 2004 @@ -102,7 +102,7 @@ llgtr %r4,%r4 # char * llgfr %r5,%r5 # unsigned long llgtr %r6,%r6 # void * - jg sys32_mount # branch to system call + jg compat_sys_mount # branch to system call .globl sys32_oldumount_wrapper sys32_oldumount_wrapper: @@ -126,7 +126,7 @@ .globl sys32_alarm_wrapper sys32_alarm_wrapper: - llgtr %r2,%r2 # unsigned int + llgfr %r2,%r2 # unsigned int jg sys_alarm # branch to system call #sys32_pause_wrapper # void @@ -203,7 +203,7 @@ .globl sys32_signal_wrapper sys32_signal_wrapper: lgfr %r2,%r2 # int - llgfr %r3,%r3 # __sighandler_t + llgtr %r3,%r3 # __sighandler_t jg sys_signal #sys32_geteuid16_wrapper # void @@ -243,7 +243,7 @@ .globl sys32_umask_wrapper sys32_umask_wrapper: - lgfr %r3,%r3 # int + lgfr %r2,%r2 # int jg sys_umask # branch to system call .globl sys32_chroot_wrapper @@ -273,6 +273,7 @@ sys32_sigaction_wrapper: lgfr %r2,%r2 # int llgtr %r3,%r3 # const struct old_sigaction * + llgtr %r4,%r4 # struct old_sigaction32 * jg sys32_sigaction # branch to system call .globl sys32_setreuid16_wrapper @@ -424,8 +425,8 @@ .globl sys32_fchown16_wrapper sys32_fchown16_wrapper: llgfr %r2,%r2 # unsigned int - llgtr %r3,%r3 # __kernel_old_uid_emu31_t * - llgtr %r4,%r4 # __kernel_old_gid_emu31_t * + llgfr %r3,%r3 # compat_uid_t + llgfr %r4,%r4 # compat_uid_t jg sys32_fchown16 # branch to system call .globl sys32_getpriority_wrapper @@ -523,7 +524,7 @@ lgfr %r3,%r3 # int lgfr %r4,%r4 # int lgfr %r5,%r5 # int - llgtr %r6,%r6 # void * + llgfr %r6,%r6 # u32 jg sys32_ipc # branch to system call .globl sys32_fsync_wrapper @@ -580,9 +581,9 @@ .globl sys32_quotactl_wrapper sys32_quotactl_wrapper: - lgfr %r2,%r2 # int + llgfr %r2,%r2 # unsigned int llgtr %r3,%r3 # const char * - lgfr %r4,%r4 # int + llgfr %r4,%r4 # qid_t llgtr %r5,%r5 # caddr_t jg sys_quotactl # branch to system call @@ -664,14 +665,14 @@ .globl sys32_readv_wrapper sys32_readv_wrapper: - llgfr %r2,%r2 # unsigned long + lgfr %r2,%r2 # int llgtr %r3,%r3 # const struct iovec_emu31 * llgfr %r4,%r4 # unsigned long jg sys32_readv # branch to system call .globl sys32_writev_wrapper sys32_writev_wrapper: - llgfr %r2,%r2 # unsigned long + lgfr %r2,%r2 # int llgtr %r3,%r3 # const struct iovec_emu31 * llgfr %r4,%r4 # unsigned long jg sys32_writev # branch to system call @@ -830,6 +831,7 @@ lgfr %r2,%r2 # int llgtr %r3,%r3 # old_sigset_emu31 * llgtr %r4,%r4 # old_sigset_emu31 * + llgfr %r5,%r5 # size_t jg sys32_rt_sigprocmask # branch to system call .globl sys32_rt_sigpending_wrapper @@ -917,15 +919,15 @@ .globl sys32_truncate64_wrapper sys32_truncate64_wrapper: llgtr %r2,%r2 # const char * - lgfr %r3,%r3 # s32 - llgfr %r4,%r4 # u32 + llgfr %r3,%r3 # unsigned long + llgfr %r4,%r4 # unsigned long jg sys32_truncate64 # branch to system call .globl sys32_ftruncate64_wrapper sys32_ftruncate64_wrapper: llgfr %r2,%r2 # unsigned int - lgfr %r3,%r3 # s32 - llgfr %r4,%r4 # u32 + llgfr %r3,%r3 # unsigned long + llgfr %r4,%r4 # unsigned long jg sys32_ftruncate64 # branch to system call .globl sys32_lchown_wrapper @@ -1064,14 +1066,12 @@ sys32_stat64_wrapper: llgtr %r2,%r2 # char * llgtr %r3,%r3 # struct stat64 * - llgfr %r4,%r4 # long jg sys32_stat64 # branch to system call .globl sys32_lstat64_wrapper sys32_lstat64_wrapper: llgtr %r2,%r2 # char * llgtr %r3,%r3 # struct stat64 * - llgfr %r4,%r4 # long jg sys32_lstat64 # branch to system call .globl sys32_stime_wrapper @@ -1088,7 +1088,6 @@ sys32_fstat64_wrapper: llgfr %r2,%r2 # unsigned long llgtr %r3,%r3 # struct stat64 * - llgfr %r4,%r4 # long jg sys32_fstat64 # branch to system call .globl compat_sys_futex_wrapper diff -Nru a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S --- a/arch/s390/kernel/entry.S Sun Mar 28 13:12:07 2004 +++ b/arch/s390/kernel/entry.S Sun Mar 28 13:12:07 2004 @@ -25,40 +25,32 @@ * The first few entries are identical to the user_regs_struct. */ SP_PTREGS = STACK_FRAME_OVERHEAD -SP_PSW = STACK_FRAME_OVERHEAD + PT_PSWMASK -SP_R0 = STACK_FRAME_OVERHEAD + PT_GPR0 -SP_R1 = STACK_FRAME_OVERHEAD + PT_GPR1 -SP_R2 = STACK_FRAME_OVERHEAD + PT_GPR2 -SP_R3 = STACK_FRAME_OVERHEAD + PT_GPR3 -SP_R4 = STACK_FRAME_OVERHEAD + PT_GPR4 -SP_R5 = STACK_FRAME_OVERHEAD + PT_GPR5 -SP_R6 = STACK_FRAME_OVERHEAD + PT_GPR6 -SP_R7 = STACK_FRAME_OVERHEAD + PT_GPR7 -SP_R8 = STACK_FRAME_OVERHEAD + PT_GPR8 -SP_R9 = STACK_FRAME_OVERHEAD + PT_GPR9 -SP_R10 = STACK_FRAME_OVERHEAD + PT_GPR10 -SP_R11 = STACK_FRAME_OVERHEAD + PT_GPR11 -SP_R12 = STACK_FRAME_OVERHEAD + PT_GPR12 -SP_R13 = STACK_FRAME_OVERHEAD + PT_GPR13 -SP_R14 = STACK_FRAME_OVERHEAD + PT_GPR14 -SP_R15 = STACK_FRAME_OVERHEAD + PT_GPR15 -SP_AREGS = STACK_FRAME_OVERHEAD + PT_ACR0 -SP_ORIG_R2 = STACK_FRAME_OVERHEAD + PT_ORIGGPR2 -/* Now the additional entries */ -SP_ILC = (SP_ORIG_R2+GPR_SIZE) -SP_TRAP = (SP_ILC+2) -SP_SIZE = (SP_TRAP+2) +SP_PSW = STACK_FRAME_OVERHEAD + __PT_PSW +SP_R0 = STACK_FRAME_OVERHEAD + __PT_GPRS +SP_R1 = STACK_FRAME_OVERHEAD + __PT_GPRS + 4 +SP_R2 = STACK_FRAME_OVERHEAD + __PT_GPRS + 8 +SP_R3 = STACK_FRAME_OVERHEAD + __PT_GPRS + 12 +SP_R4 = STACK_FRAME_OVERHEAD + __PT_GPRS + 16 +SP_R5 = STACK_FRAME_OVERHEAD + __PT_GPRS + 20 +SP_R6 = STACK_FRAME_OVERHEAD + __PT_GPRS + 24 +SP_R7 = STACK_FRAME_OVERHEAD + __PT_GPRS + 28 +SP_R8 = STACK_FRAME_OVERHEAD + __PT_GPRS + 32 +SP_R9 = STACK_FRAME_OVERHEAD + __PT_GPRS + 36 +SP_R10 = STACK_FRAME_OVERHEAD + __PT_GPRS + 40 +SP_R11 = STACK_FRAME_OVERHEAD + __PT_GPRS + 44 +SP_R12 = STACK_FRAME_OVERHEAD + __PT_GPRS + 48 +SP_R13 = STACK_FRAME_OVERHEAD + __PT_GPRS + 52 +SP_R14 = STACK_FRAME_OVERHEAD + __PT_GPRS + 56 +SP_R15 = STACK_FRAME_OVERHEAD + __PT_GPRS + 60 +SP_ORIG_R2 = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2 +SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC +SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP +SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_RESTART_SVC) _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED) -/* - * Base Address of this Module --- saved in __LC_ENTRY_BASE - */ - .globl entry_base -entry_base: - -#define BASED(name) name-entry_base(%r13) +#define BASED(name) name-system_call(%r13) /* * Register usage in interrupt handlers: @@ -68,55 +60,108 @@ * R15 - kernel stack pointer */ - .macro SAVE_ALL_BASE - stm %r13,%r15,__LC_SAVE_AREA - basr %r13,0 # temp base pointer -0: stam %a2,%a4,__LC_SAVE_AREA+12 - l %r13,.Lentry_base-0b(%r13)# load &entry_base to %r13 + .macro SAVE_ALL_BASE psworg,savearea,sync + stm %r12,%r15,\savearea + l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 .endm - .macro SAVE_ALL psworg,sync # system entry macro - tm \psworg+1,0x01 # test problem state bit + .macro CLEANUP_SAVE_ALL_BASE psworg,savearea,sync + l %r1,SP_PSW+4(%r15) + cli 1(%r1),0xcf + jne 0f + mvc \savearea(16),SP_R12(%r15) +0: st %r13,SP_R13(%r15) + .endm + + .macro SAVE_ALL psworg,savearea,sync .if \sync + tm \psworg+1,0x01 # test problem state bit bz BASED(1f) # skip stack setup save + l %r15,__LC_KERNEL_STACK # problem state -> load ksp .else - bnz BASED(0f) # from user -> load kernel stack + tm \psworg+1,0x01 # test problem state bit + bnz BASED(0f) # from user -> load async stack l %r14,__LC_ASYNC_STACK # are we already on the async stack ? slr %r14,%r15 sra %r14,13 be BASED(1f) - l %r15,__LC_ASYNC_STACK # load async. stack - b BASED(1f) +0: l %r15,__LC_ASYNC_STACK .endif -0: l %r15,__LC_KERNEL_STACK # problem state -> load ksp - lam %a2,%a4,BASED(.Lc_ac) # set ac.reg. 2 to primary space - # and ac.reg. 4 to home space 1: s %r15,BASED(.Lc_spsize) # make room for registers & psw - n %r15,BASED(.Lc0xfffffff8) # align stack pointer to 8 - stm %r0,%r12,SP_R0(%r15) # store gprs 0-12 to kernel stack + l %r14,BASED(.L\psworg) + slr %r12,%r12 + icm %r14,12,__LC_SVC_ILC + stm %r0,%r11,SP_R0(%r15) # store gprs 0-12 to kernel stack st %r2,SP_ORIG_R2(%r15) # store original content of gpr 2 - mvc SP_R13(12,%r15),__LC_SAVE_AREA # move R13-R15 to stack - stam %a0,%a15,SP_AREGS(%r15) # store access registers to kst. - mvc SP_AREGS+8(12,%r15),__LC_SAVE_AREA+12 # store ac. regs + mvc SP_R12(16,%r15),\savearea # move R13-R15 to stack mvc SP_PSW(8,%r15),\psworg # move user PSW to stack - mvc SP_ILC(2,%r15),__LC_SVC_ILC # store instruction length - mvc SP_TRAP(2,%r15),BASED(.L\psworg) # store trap indication - xc 0(4,%r15),0(%r15) # clear back chain + st %r14,SP_ILC(%r15) + st %r12,0(%r15) # clear back chain .endm - .macro RESTORE_ALL sync # system exit macro + .macro CLEANUP_SAVE_ALL psworg,savearea,sync + l %r1,\savearea+12 + .if \sync + tm \psworg+1,0x01 + bz BASED(1f) + l %r1,__LC_KERNEL_STACK + .else + tm \psworg+1,0x01 + bnz BASED(0f) + l %r0,__LC_ASYNC_STACK + slr %r0,%r1 + sra %r0,13 + bz BASED(1f) +0: l %r1,__LC_ASYNC_STACK + .endif +1: s %r1,BASED(.Lc_spsize) + st %r1,SP_R15(%r15) + l %r0,BASED(.L\psworg) + xc SP_R12(4,%r15),SP_R12(%r15) + icm %r0,12,__LC_SVC_ILC + st %r0,SP_R14(%r15) + mvc SP_R0(48,%r1),SP_R0(%r15) + mvc SP_ORIG_R2(4,%r1),SP_R2(%r15) + mvc SP_R12(16,%r1),\savearea + mvc SP_PSW(8,%r1),\psworg + st %r0,SP_ILC(%r1) + xc 0(4,%r1),0(%r1) + .endm + + .macro RESTORE_ALL # system exit macro mvc __LC_RETURN_PSW(8),SP_PSW(%r15) # move user PSW to lowcore - lam %a0,%a15,SP_AREGS(%r15) # load the access registers - lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user ni __LC_RETURN_PSW+1,0xfd # clear wait state bit + lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user lpsw __LC_RETURN_PSW # back to caller .endm + .macro CLEANUP_RESTORE_ALL + l %r1,SP_PSW+4(%r15) + cli 0(%r1),0x82 + jne 0f + mvc SP_PSW(8,%r15),__LC_RETURN_PSW + j 1f +0: l %r1,SP_R15(%r15) + mvc SP_PSW(8,%r15),SP_PSW(%r1) + mvc SP_R0(64,%r15),SP_R0(%r1) +1: + .endm + .macro GET_THREAD_INFO - l %r9,BASED(.Lc0xffffe000) # load pointer to task_struct to %r9 - al %r9,__LC_KERNEL_STACK + l %r9,__LC_THREAD_INFO .endm + .macro CHECK_CRITICAL + tm SP_PSW+1(%r15),0x01 # test problem state bit + bnz BASED(0f) # from user -> not critical + clc SP_PSW+4(4,%r15),BASED(.Lcritical_end) + jnl 0f + clc SP_PSW+4(4,%r15),BASED(.Lcritical_start) + jl 0f + l %r1,BASED(.Lcleanup_critical) + basr %r14,%r1 +0: + .endm /* * Scheduler resume function, called by switch_to @@ -139,13 +184,10 @@ stm %r6,%r15,24(%r15) # store __switch_to registers of prev task st %r15,__THREAD_ksp(%r2) # store kernel stack to prev->tss.ksp l %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp - stam %a2,%a2,__THREAD_ar2(%r2) # store kernel access reg. 2 - stam %a4,%a4,__THREAD_ar4(%r2) # store kernel access reg. 4 - lam %a2,%a2,__THREAD_ar2(%r3) # load kernel access reg. 2 - lam %a4,%a4,__THREAD_ar4(%r3) # load kernel access reg. 4 lm %r6,%r15,24(%r15) # load __switch_to registers of next task st %r3,__LC_CURRENT # __LC_CURRENT = current task struct l %r3,__THREAD_info(%r3) # load thread_info from task struct + st %r3,__LC_THREAD_INFO ahi %r3,8192 st %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack br %r14 @@ -172,6 +214,7 @@ lm %r12,%r15,24(%r12) br %r14 +__critical_start: /* * SVC interrupt handler routine. System calls are synchronous events and * are executed with interrupts enabled. @@ -179,10 +222,10 @@ .globl system_call system_call: - SAVE_ALL_BASE - SAVE_ALL __LC_SVC_OLD_PSW,1 + SAVE_ALL_BASE __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 lh %r7,0x8a # get svc number from lowcore - stosm 24(%r15),0x03 # reenable interrupts +sysc_enter: GET_THREAD_INFO # load pointer to task_struct to R9 sla %r7,2 # *4 and test for svc 0 bnz BASED(sysc_do_restart) # svc number > 0 @@ -193,7 +236,7 @@ sla %r7,2 # *4 sysc_do_restart: tm __TI_flags+3(%r9),_TIF_SYSCALL_TRACE - l %r8,sys_call_table-entry_base(%r7,%r13) # get system call addr. + l %r8,sys_call_table-system_call(%r7,%r13) # get system call addr. bo BASED(sysc_tracesys) basr %r14,%r8 # call sys_xxxx st %r2,SP_R2(%r15) # store return value (change R2 on stack) @@ -201,19 +244,17 @@ # changing anything here !! sysc_return: - stnsm 24(%r15),0xfc # disable I/O and ext. interrupts tm SP_PSW+1(%r15),0x01 # returning to user ? bno BASED(sysc_leave) tm __TI_flags+3(%r9),_TIF_WORK_SVC bnz BASED(sysc_work) # there is work to do (signals etc.) sysc_leave: - RESTORE_ALL 1 + RESTORE_ALL # # recheck if there is more work to do # sysc_work_loop: - stnsm 24(%r15),0xfc # disable I/O and ext. interrupts GET_THREAD_INFO # load pointer to task_struct to R9 tm __TI_flags+3(%r9),_TIF_WORK_SVC bz BASED(sysc_leave) # there is no work to do @@ -234,7 +275,6 @@ # _TIF_NEED_RESCHED is set, call schedule # sysc_reschedule: - stosm 24(%r15),0x03 # reenable interrupts l %r1,BASED(.Lschedule) la %r14,BASED(sysc_work_loop) br %r1 # call scheduler @@ -243,12 +283,10 @@ # _TIF_SIGPENDING is set, call do_signal # sysc_sigpending: - stosm 24(%r15),0x03 # reenable interrupts la %r2,SP_PTREGS(%r15) # load pt_regs sr %r3,%r3 # clear *oldset l %r1,BASED(.Ldo_signal) basr %r14,%r1 # call do_signal - stnsm 24(%r15),0xfc # disable I/O and ext. interrupts tm __TI_flags+3(%r9),_TIF_RESTART_SVC bo BASED(sysc_restart) b BASED(sysc_leave) # out of here, do NOT recheck @@ -258,13 +296,14 @@ # sysc_restart: ni __TI_flags+3(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC - stosm 24(%r15),0x03 # reenable interrupts l %r7,SP_R2(%r15) # load new svc number sla %r7,2 mvc SP_R2(4,%r15),SP_ORIG_R2(%r15) # restore first argument lm %r2,%r6,SP_R2(%r15) # load svc arguments b BASED(sysc_do_restart) # restart svc +__critical_end: + # # call trace before and after sys_call # @@ -277,7 +316,7 @@ bnl BASED(sysc_tracenogo) l %r7,SP_R2(%r15) # strace might have changed the sll %r7,2 # system call - l %r8,sys_call_table-entry_base(%r7,%r13) + l %r8,sys_call_table-system_call(%r7,%r13) sysc_tracego: lm %r3,%r6,SP_R3(%r15) l %r2,SP_ORIG_R2(%r15) @@ -294,13 +333,13 @@ # a new process exits the kernel with ret_from_fork # .globl ret_from_fork -ret_from_fork: - basr %r13,0 - l %r13,.Lentry_base-.(%r13) # setup base pointer to &entry_base +ret_from_fork: + l %r13,__LC_SVC_NEW_PSW+4 GET_THREAD_INFO # load pointer to task_struct to R9 l %r1,BASED(.Lschedtail) - la %r14,BASED(sysc_return) - br %r1 # call schedule_tail, return to sysc_return + basr %r14,%r1 + stosm 24(%r15),0x03 # reenable interrupts + b BASED(sysc_return) # # clone, fork, vfork, exec and sigreturn need glue, @@ -373,12 +412,6 @@ br %r1 # branch to sys_sigreturn -#define SYSCALL(esa,esame,emu) .long esa - .globl sys_call_table -sys_call_table: -#include "syscalls.S" -#undef SYSCALL - /* * Program check handler routine */ @@ -398,10 +431,10 @@ * we just ignore the PER event (FIXME: is there anything we have to do * for LPSW?). */ - SAVE_ALL_BASE + SAVE_ALL_BASE __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception bnz BASED(pgm_per) # got per exception -> special case - SAVE_ALL __LC_PGM_OLD_PSW,1 + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 l %r3,__LC_PGM_ILC # load program interruption code la %r8,0x7f l %r7,BASED(.Ljump_table) @@ -430,7 +463,7 @@ # Normal per exception # pgm_per_std: - SAVE_ALL __LC_PGM_OLD_PSW,1 + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 GET_THREAD_INFO mvc __THREAD_per+__PER_atmid(2,%r9),__LC_PER_ATMID mvc __THREAD_per+__PER_address(4,%r9),__LC_PER_ADDRESS @@ -454,7 +487,7 @@ # it was a single stepped SVC that is causing all the trouble # pgm_svcper: - SAVE_ALL __LC_SVC_OLD_PSW,1 + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 lh %r7,0x8a # get svc number from lowcore stosm 24(%r15),0x03 # reenable interrupts GET_THREAD_INFO # load pointer to task_struct to R9 @@ -470,7 +503,7 @@ sla %r7,2 # *4 pgm_svcstd: tm __TI_flags+3(%r9),_TIF_SYSCALL_TRACE - l %r8,sys_call_table-entry_base(%r7,%r13) # get system call addr. + l %r8,sys_call_table-system_call(%r7,%r13) # get system call addr. bo BASED(pgm_tracesys) basr %r14,%r8 # call sys_xxxx st %r2,SP_R2(%r15) # store return value (change R2 on stack) @@ -503,7 +536,7 @@ bnl BASED(pgm_svc_nogo) l %r7,SP_R2(%r15) # strace changed the syscall sll %r7,2 - l %r8,sys_call_table-entry_base(%r7,%r13) + l %r8,sys_call_table-system_call(%r7,%r13) pgm_svc_go: lm %r3,%r6,SP_R3(%r15) l %r2,SP_ORIG_R2(%r15) @@ -522,10 +555,11 @@ .globl io_int_handler io_int_handler: - SAVE_ALL_BASE - SAVE_ALL __LC_IO_OLD_PSW,0 - GET_THREAD_INFO # load pointer to task_struct to R9 + SAVE_ALL_BASE __LC_IO_OLD_PSW,__LC_SAVE_AREA+16,0 + SAVE_ALL __LC_IO_OLD_PSW,__LC_SAVE_AREA+16,0 stck __LC_INT_CLOCK + CHECK_CRITICAL + GET_THREAD_INFO # load pointer to task_struct to R9 l %r1,BASED(.Ldo_IRQ) # load address of do_IRQ la %r2,SP_PTREGS(%r15) # address of register-save area basr %r14,%r1 # branch to standard irq handler @@ -540,24 +574,21 @@ tm __TI_flags+3(%r9),_TIF_WORK_INT bnz BASED(io_work) # there is work to do (signals etc.) io_leave: - RESTORE_ALL 0 + RESTORE_ALL #ifdef CONFIG_PREEMPT io_preempt: icm %r0,15,__TI_precount(%r9) bnz BASED(io_leave) -io_resume_loop: - tm __TI_flags+3(%r9),_TIF_NEED_RESCHED - bno BASED(io_leave) - mvc __TI_precount(4,%r9),BASED(.Lc_pactive) - # hmpf, we are on the async. stack but to call schedule - # we have to move the interrupt frame to the process stack l %r1,SP_R15(%r15) s %r1,BASED(.Lc_spsize) - n %r1,BASED(.Lc0xfffffff8) - mvc SP_PTREGS(SP_SIZE-SP_PTREGS,%r1),SP_PTREGS(%r15) + mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) xc 0(4,%r1),0(%r1) # clear back chain lr %r15,%r1 +io_resume_loop: + tm __TI_flags+3(%r9),_TIF_NEED_RESCHED + bno BASED(io_leave) + mvc __TI_precount(4,%r9),BASED(.Lc_pactive) stosm 24(%r15),0x03 # reenable interrupts l %r1,BASED(.Lschedule) basr %r14,%r1 # call schedule @@ -568,18 +599,19 @@ #endif # -# recheck if there is more work to do +# switch to kernel stack, then check the TIF bits # -io_work_loop: - stnsm 24(%r15),0xfc # disable I/O and ext. interrupts - GET_THREAD_INFO # load pointer to task_struct to R9 - tm __TI_flags+3(%r9),_TIF_WORK_INT - bz BASED(io_leave) # there is no work to do +io_work: + l %r1,__LC_KERNEL_STACK + s %r1,BASED(.Lc_spsize) + mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) + xc 0(4,%r1),0(%r1) # clear back chain + lr %r15,%r1 # # One of the work bits is on. Find out which one. # Checked are: _TIF_SIGPENDING and _TIF_NEED_RESCHED # -io_work: +io_work_loop: tm __TI_flags+3(%r9),_TIF_NEED_RESCHED bo BASED(io_reschedule) tm __TI_flags+3(%r9),_TIF_SIGPENDING @@ -590,10 +622,14 @@ # _TIF_NEED_RESCHED is set, call schedule # io_reschedule: - stosm 24(%r15),0x03 # reenable interrupts l %r1,BASED(.Lschedule) - la %r14,BASED(io_work_loop) - br %r1 # call scheduler + stosm 24(%r15),0x03 # reenable interrupts + basr %r14,%r1 # call scheduler + stnsm 24(%r15),0xfc # disable I/O and ext. interrupts + GET_THREAD_INFO # load pointer to task_struct to R9 + tm __TI_flags+3(%r9),_TIF_WORK_INT + bz BASED(io_leave) # there is no work to do + b BASED(io_work_loop) # # _TIF_SIGPENDING is set, call do_signal @@ -613,10 +649,11 @@ .globl ext_int_handler ext_int_handler: - SAVE_ALL_BASE - SAVE_ALL __LC_EXT_OLD_PSW,0 - GET_THREAD_INFO # load pointer to task_struct to R9 + SAVE_ALL_BASE __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16,0 + SAVE_ALL __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16,0 stck __LC_INT_CLOCK + CHECK_CRITICAL + GET_THREAD_INFO # load pointer to task_struct to R9 la %r2,SP_PTREGS(%r15) # address of register-save area lh %r3,__LC_EXT_INT_CODE # get interruption code l %r1,BASED(.Ldo_extint) @@ -629,12 +666,12 @@ .globl mcck_int_handler mcck_int_handler: - SAVE_ALL_BASE - SAVE_ALL __LC_MCK_OLD_PSW,0 + SAVE_ALL_BASE __LC_MCK_OLD_PSW,__LC_SAVE_AREA+32,0 + SAVE_ALL __LC_MCK_OLD_PSW,__LC_SAVE_AREA+32,0 l %r1,BASED(.Ls390_mcck) basr %r14,%r1 # call machine check handler mcck_return: - RESTORE_ALL 0 + RESTORE_ALL #ifdef CONFIG_SMP /* @@ -667,24 +704,65 @@ restart_go: #endif +cleanup_table: + .long system_call, sysc_enter, cleanup_sysc_enter + .long sysc_return, sysc_leave, cleanup_sysc_return + .long sysc_leave, sysc_work_loop, cleanup_sysc_leave + .long sysc_work_loop, sysc_reschedule, cleanup_sysc_return +cleanup_table_entries=(.-cleanup_table) / 12 + +cleanup_critical: + lhi %r0,cleanup_table_entries + la %r1,BASED(cleanup_table) + l %r2,SP_PSW+4(%r15) + la %r2,0(%r2) +cleanup_loop: + cl %r2,0(%r1) + bl BASED(cleanup_cont) + cl %r2,4(%r1) + bl BASED(cleanup_found) +cleanup_cont: + la %r1,12(%r1) + bct %r0,BASED(cleanup_loop) + br %r14 +cleanup_found: + l %r1,8(%r1) + br %r1 + +cleanup_sysc_enter: + CLEANUP_SAVE_ALL_BASE __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 + CLEANUP_SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 + lh %r0,0x8a + st %r0,SP_R7(%r15) + la %r1,BASED(sysc_enter) + o %r1,BASED(.Lamode) + st %r1,SP_PSW+4(%r15) + br %r14 + +cleanup_sysc_return: + la %r1,BASED(sysc_return) + o %r1,BASED(.Lamode) + st %r1,SP_PSW+4(%r15) + br %r14 + +cleanup_sysc_leave: + CLEANUP_RESTORE_ALL + br %r14 + /* * Integer constants */ .align 4 -.Lc0xfffffff8: .long -8 # to align stack pointer to 8 -.Lc0xffffe000: .long -8192 # to round stack pointer to &task_struct .Lc_spsize: .long SP_SIZE .Lc_overhead: .long STACK_FRAME_OVERHEAD -.Lc_ac: .long 0,0,1 -.Lc_ENOSYS: .long -ENOSYS .Lc_pactive: .long PREEMPT_ACTIVE -.Lc0xff: .long 0xff .Lnr_syscalls: .long NR_syscalls -.L0x018: .word 0x018 -.L0x020: .word 0x020 -.L0x028: .word 0x028 -.L0x030: .word 0x030 -.L0x038: .word 0x038 +.L0x018: .long 0x018 +.L0x020: .long 0x020 +.L0x028: .long 0x028 +.L0x030: .long 0x030 +.L0x038: .long 0x038 +.Lamode: .long 0x80000000 /* * Symbol constants @@ -694,8 +772,6 @@ .Ldo_extint: .long do_extint .Ldo_signal: .long do_signal .Ldo_softirq: .long do_softirq -.Lentry_base: .long entry_base -.Lext_hash: .long ext_int_hash .Lhandle_per: .long do_debugger_trap .Ljump_table: .long pgm_check_table .Lschedule: .long schedule @@ -712,4 +788,16 @@ .Lvfork: .long sys_vfork .Lschedtail: .long schedule_tail +.Lcritical_start: + .long __critical_start + 0x80000000 +.Lcritical_end: + .long __critical_end + 0x80000000 +.Lcleanup_critical: + .long cleanup_critical + +#define SYSCALL(esa,esame,emu) .long esa + .globl sys_call_table +sys_call_table: +#include "syscalls.S" +#undef SYSCALL diff -Nru a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S --- a/arch/s390/kernel/entry64.S Sun Mar 28 13:12:07 2004 +++ b/arch/s390/kernel/entry64.S Sun Mar 28 13:12:07 2004 @@ -25,29 +25,27 @@ * The first few entries are identical to the user_regs_struct. */ SP_PTREGS = STACK_FRAME_OVERHEAD -SP_PSW = STACK_FRAME_OVERHEAD + PT_PSWMASK -SP_R0 = STACK_FRAME_OVERHEAD + PT_GPR0 -SP_R1 = STACK_FRAME_OVERHEAD + PT_GPR1 -SP_R2 = STACK_FRAME_OVERHEAD + PT_GPR2 -SP_R3 = STACK_FRAME_OVERHEAD + PT_GPR3 -SP_R4 = STACK_FRAME_OVERHEAD + PT_GPR4 -SP_R5 = STACK_FRAME_OVERHEAD + PT_GPR5 -SP_R6 = STACK_FRAME_OVERHEAD + PT_GPR6 -SP_R7 = STACK_FRAME_OVERHEAD + PT_GPR7 -SP_R8 = STACK_FRAME_OVERHEAD + PT_GPR8 -SP_R9 = STACK_FRAME_OVERHEAD + PT_GPR9 -SP_R10 = STACK_FRAME_OVERHEAD + PT_GPR10 -SP_R11 = STACK_FRAME_OVERHEAD + PT_GPR11 -SP_R12 = STACK_FRAME_OVERHEAD + PT_GPR12 -SP_R13 = STACK_FRAME_OVERHEAD + PT_GPR13 -SP_R14 = STACK_FRAME_OVERHEAD + PT_GPR14 -SP_R15 = STACK_FRAME_OVERHEAD + PT_GPR15 -SP_AREGS = STACK_FRAME_OVERHEAD + PT_ACR0 -SP_ORIG_R2 = STACK_FRAME_OVERHEAD + PT_ORIGGPR2 -/* Now the additional entries */ -SP_ILC = (SP_ORIG_R2+GPR_SIZE) -SP_TRAP = (SP_ILC+2) -SP_SIZE = (SP_TRAP+2) +SP_PSW = STACK_FRAME_OVERHEAD + __PT_PSW +SP_R0 = STACK_FRAME_OVERHEAD + __PT_GPRS +SP_R1 = STACK_FRAME_OVERHEAD + __PT_GPRS + 8 +SP_R2 = STACK_FRAME_OVERHEAD + __PT_GPRS + 16 +SP_R3 = STACK_FRAME_OVERHEAD + __PT_GPRS + 24 +SP_R4 = STACK_FRAME_OVERHEAD + __PT_GPRS + 32 +SP_R5 = STACK_FRAME_OVERHEAD + __PT_GPRS + 40 +SP_R6 = STACK_FRAME_OVERHEAD + __PT_GPRS + 48 +SP_R7 = STACK_FRAME_OVERHEAD + __PT_GPRS + 56 +SP_R8 = STACK_FRAME_OVERHEAD + __PT_GPRS + 64 +SP_R9 = STACK_FRAME_OVERHEAD + __PT_GPRS + 72 +SP_R10 = STACK_FRAME_OVERHEAD + __PT_GPRS + 80 +SP_R11 = STACK_FRAME_OVERHEAD + __PT_GPRS + 88 +SP_R12 = STACK_FRAME_OVERHEAD + __PT_GPRS + 96 +SP_R13 = STACK_FRAME_OVERHEAD + __PT_GPRS + 104 +SP_R14 = STACK_FRAME_OVERHEAD + __PT_GPRS + 112 +SP_R15 = STACK_FRAME_OVERHEAD + __PT_GPRS + 120 +SP_ORIG_R2 = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2 +SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC +SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP +SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_RESTART_SVC) _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED) @@ -60,51 +58,100 @@ * R15 - kernel stack pointer */ - .macro SAVE_ALL psworg,sync # system entry macro - stmg %r14,%r15,__LC_SAVE_AREA - stam %a2,%a4,__LC_SAVE_AREA+16 - larl %r14,.Lconst - tm \psworg+1,0x01 # test problem state bit + .macro SAVE_ALL psworg,savearea,sync + stmg %r13,%r15,\savearea .if \sync + tm \psworg+1,0x01 # test problem state bit jz 1f # skip stack setup save + lg %r15,__LC_KERNEL_STACK # problem state -> load ksp .else + tm \psworg+1,0x01 # test problem state bit jnz 0f # from user -> load kernel stack lg %r14,__LC_ASYNC_STACK # are we already on the async. stack ? slgr %r14,%r15 srag %r14,%r14,14 - larl %r14,.Lconst jz 1f - lg %r15,__LC_ASYNC_STACK # load async. stack - j 1f +0: lg %r15,__LC_ASYNC_STACK # load async stack .endif -0: lg %r15,__LC_KERNEL_STACK # problem state -> load ksp - lam %a2,%a4,.Lc_ac-.Lconst(%r14) 1: aghi %r15,-SP_SIZE # make room for registers & psw - nill %r15,0xfff8 # align stack pointer to 8 - stmg %r0,%r13,SP_R0(%r15) # store gprs 0-13 to kernel stack + lghi %r14,\psworg + slgr %r13,%r13 + icm %r14,12,__LC_SVC_ILC + stmg %r0,%r12,SP_R0(%r15) # store gprs 0-13 to kernel stack stg %r2,SP_ORIG_R2(%r15) # store original content of gpr 2 - mvc SP_R14(16,%r15),__LC_SAVE_AREA # move r14 and r15 to stack - stam %a0,%a15,SP_AREGS(%r15) # store access registers to kst. - mvc SP_AREGS+8(12,%r15),__LC_SAVE_AREA+16 # store ac. regs + mvc SP_R13(24,%r15),\savearea # move r13, r14 and r15 to stack mvc SP_PSW(16,%r15),\psworg # move user PSW to stack - mvc SP_ILC(2,%r15),__LC_SVC_ILC # store instruction length - mvc SP_TRAP(2,%r15),.L\psworg-.Lconst(%r14) # store trap ind. - xc 0(8,%r15),0(%r15) # clear back chain + st %r14,SP_ILC(%r15) + stg %r13,0(%r15) .endm - .macro RESTORE_ALL sync # system exit macro + .macro CLEANUP_SAVE_ALL psworg,savearea,sync + lg %r1,SP_PSW+8(%r15) + cli 1(%r1),0xdf + jne 2f + mvc \savearea(24),SP_R13(%r15) +2: lg %r1,\savearea+16 + .if \sync + tm \psworg+1,0x01 + jz 1f + lg %r1,__LC_KERNEL_STACK + .else + tm \psworg+1,0x01 + jnz 0f + lg %r0,__LC_ASYNC_STACK + slgr %r0,%r1 + srag %r0,%r0,14 + jz 1f +0: lg %r1,__LC_ASYNC_STACK + .endif +1: aghi %r1,-SP_SIZE + stg %r1,SP_R15(%r15) + lghi %r0,\psworg + xc SP_R13(8,%r15),SP_R13(%r15) + icm %r0,12,__LC_SVC_ILC + stg %r0,SP_R14(%r15) + mvc SP_R0(104,%r1),SP_R0(%r15) + mvc SP_ORIG_R2(8,%r1),SP_R2(%r15) + mvc SP_R13(24,%r1),\savearea + mvc SP_PSW(16,%r1),\psworg + st %r0,SP_ILC(%r1) + xc 0(8,%r1),0(%r1) + .endm + + .macro RESTORE_ALL # system exit macro mvc __LC_RETURN_PSW(16),SP_PSW(%r15) # move user PSW to lowcore - lam %a0,%a15,SP_AREGS(%r15) # load the access registers - lmg %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user ni __LC_RETURN_PSW+1,0xfd # clear wait state bit + lmg %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user lpswe __LC_RETURN_PSW # back to caller .endm + .macro CLEANUP_RESTORE_ALL + lg %r1,SP_PSW+8(%r15) + cli 0(%r1),0xb2 + jne 0f + mvc SP_PSW(16,%r15),__LC_RETURN_PSW + j 1f +0: lg %r1,SP_R15(%r15) + mvc SP_PSW(16,%r15),SP_PSW(%r1) + mvc SP_R0(128,%r15),SP_R0(%r1) +1: + .endm + .macro GET_THREAD_INFO - lg %r9,__LC_KERNEL_STACK # load pointer to task_struct to %r9 - aghi %r9,-16384 + lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct .endm + .macro CHECK_CRITICAL + tm SP_PSW+1(%r15),0x01 # test problem state bit + jnz 0f # from user -> not critical + larl %r1,.Lcritical_start + clc SP_PSW+8(8,%r15),8(%r1) # compare ip with __critical_end + jnl 0f + clc SP_PSW+8(8,%r15),0(%r1) # compare ip with __critical_start + jl 0f + brasl %r14,cleanup_critical +0: + .endm /* * Scheduler resume function, called by switch_to @@ -125,13 +172,10 @@ stmg %r6,%r15,48(%r15) # store __switch_to registers of prev task stg %r15,__THREAD_ksp(%r2) # store kernel stack to prev->tss.ksp lg %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp - stam %a2,%a2,__THREAD_ar2(%r2) # store kernel access reg. 2 - stam %a4,%a4,__THREAD_ar4(%r2) # store kernel access reg. 4 - lam %a2,%a2,__THREAD_ar2(%r3) # load kernel access reg. 2 - lam %a4,%a4,__THREAD_ar4(%r3) # load kernel access reg. 4 lmg %r6,%r15,48(%r15) # load __switch_to registers of next task stg %r3,__LC_CURRENT # __LC_CURRENT = current task struct lg %r3,__THREAD_info(%r3) # load thread_info from task struct + stg %r3,__LC_THREAD_INFO aghi %r3,16384 stg %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack br %r14 @@ -154,7 +198,8 @@ brasl %r14,do_softirq lmg %r12,%r15,48(%r12) br %r14 - + +__critical_start: /* * SVC interrupt handler routine. System calls are synchronous events and * are executed with interrupts enabled. @@ -162,14 +207,15 @@ .globl system_call system_call: - SAVE_ALL __LC_SVC_OLD_PSW,1 + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore - stosm 48(%r15),0x03 # reenable interrupts +sysc_enter: GET_THREAD_INFO # load pointer to task_struct to R9 slag %r7,%r7,2 # *4 and test for svc 0 jnz sysc_do_restart # svc 0: system call number in %r1 - cl %r1,.Lnr_syscalls-.Lconst(%r14) + lghi %r0,NR_syscalls + clr %r1,%r0 jnl sysc_do_restart lgfr %r7,%r1 # clear high word in r1 slag %r7,%r7,2 # svc 0: system call number in %r1 @@ -190,19 +236,17 @@ # changing anything here !! sysc_return: - stnsm 48(%r15),0xfc # disable I/O and ext. interrupts tm SP_PSW+1(%r15),0x01 # returning to user ? jno sysc_leave tm __TI_flags+7(%r9),_TIF_WORK_SVC jnz sysc_work # there is work to do (signals etc.) sysc_leave: - RESTORE_ALL 1 + RESTORE_ALL # # recheck if there is more work to do # sysc_work_loop: - stnsm 48(%r15),0xfc # disable I/O and ext. interrupts GET_THREAD_INFO # load pointer to task_struct to R9 tm __TI_flags+7(%r9),_TIF_WORK_SVC jz sysc_leave # there is no work to do @@ -223,7 +267,6 @@ # _TIF_NEED_RESCHED is set, call schedule # sysc_reschedule: - stosm 48(%r15),0x03 # reenable interrupts larl %r14,sysc_work_loop jg schedule # return point is sysc_return @@ -231,11 +274,9 @@ # _TIF_SIGPENDING is set, call do_signal # sysc_sigpending: - stosm 48(%r15),0x03 # reenable interrupts la %r2,SP_PTREGS(%r15) # load pt_regs sgr %r3,%r3 # clear *oldset brasl %r14,do_signal # call do_signal - stnsm 48(%r15),0xfc # disable I/O and ext. interrupts tm __TI_flags+7(%r9),_TIF_RESTART_SVC jo sysc_restart j sysc_leave # out of here, do NOT recheck @@ -245,13 +286,14 @@ # sysc_restart: ni __TI_flags+7(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC - stosm 48(%r15),0x03 # reenable interrupts lg %r7,SP_R2(%r15) # load new svc number slag %r7,%r7,2 # *4 mvc SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument lmg %r2,%r6,SP_R2(%r15) # load svc arguments j sysc_do_restart # restart svc +__critical_end: + # # call syscall_trace before and after system call # special linkage: %r12 contains the return address for trace_svc @@ -260,9 +302,9 @@ srl %r7,2 stg %r7,SP_R2(%r15) brasl %r14,syscall_trace - larl %r1,.Lnr_syscalls - clc SP_R2(8,%r15),0(%r1) - jnl sysc_tracenogo + lghi %r0,NR_syscalls + clg %r0,SP_R2(%r15) + jnh sysc_tracenogo lg %r7,SP_R2(%r15) # strace might have changed the sll %r7,2 # system call lgf %r8,0(%r7,%r10) @@ -283,8 +325,9 @@ .globl ret_from_fork ret_from_fork: GET_THREAD_INFO # load pointer to task_struct to R9 - larl %r14,sysc_return - jg schedule_tail # return to sysc_return + brasl %r14,schedule_tail + stosm 24(%r15),0x03 # reenable interrupts + j sysc_return # # clone, fork, vfork, exec and sigreturn need glue, @@ -405,21 +448,6 @@ jg sys32_sigaltstack_wrapper # branch to sys_sigreturn #endif -#define SYSCALL(esa,esame,emu) .long esame - .globl sys_call_table -sys_call_table: -#include "syscalls.S" -#undef SYSCALL - -#ifdef CONFIG_S390_SUPPORT - -#define SYSCALL(esa,esame,emu) .long emu - .globl sys_call_table_emu -sys_call_table_emu: -#include "syscalls.S" -#undef SYSCALL -#endif - /* * Program check handler routine */ @@ -441,7 +469,7 @@ */ tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception jnz pgm_per # got per exception -> special case - SAVE_ALL __LC_PGM_OLD_PSW,1 + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 lgf %r3,__LC_PGM_ILC # load program interruption code lghi %r8,0x7f ngr %r8,%r3 @@ -469,7 +497,7 @@ # Normal per exception # pgm_per_std: - SAVE_ALL __LC_PGM_OLD_PSW,1 + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 GET_THREAD_INFO mvc __THREAD_per+__PER_atmid(2,%r9),__LC_PER_ATMID mvc __THREAD_per+__PER_address(8,%r9),__LC_PER_ADDRESS @@ -492,7 +520,7 @@ # it was a single stepped SVC that is causing all the trouble # pgm_svcper: - SAVE_ALL __LC_SVC_OLD_PSW,1 + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore stosm 48(%r15),0x03 # reenable interrupts GET_THREAD_INFO # load pointer to task_struct to R9 @@ -502,7 +530,8 @@ slag %r7,%r7,2 # *4 and test for svc 0 jnz pgm_svcstd # svc 0: system call number in %r1 - clg %r1,.Lnr_syscalls-.Lconst(%r14) + lghi %r0,NR_syscalls + clr %r1,%r0 slag %r7,%r1,2 pgm_svcstd: larl %r10,sys_call_table @@ -540,8 +569,9 @@ srlg %r7,%r7,2 stg %r7,SP_R2(%r15) brasl %r14,syscall_trace - clc SP_R2(8,%r15),.Lnr_syscalls - jnl pgm_svc_nogo + lghi %r0,NR_syscalls + clg %r0,SP_R2(%r15) + jnh pgm_svc_nogo lg %r7,SP_R2(%r15) sllg %r7,%r7,2 # strace wants to change the syscall lgf %r8,0(%r7,%r10) @@ -561,9 +591,10 @@ */ .globl io_int_handler io_int_handler: - SAVE_ALL __LC_IO_OLD_PSW,0 - GET_THREAD_INFO # load pointer to task_struct to R9 + SAVE_ALL __LC_IO_OLD_PSW,__LC_SAVE_AREA+32,0 stck __LC_INT_CLOCK + CHECK_CRITICAL + GET_THREAD_INFO # load pointer to task_struct to R9 la %r2,SP_PTREGS(%r15) # address of register-save area brasl %r14,do_IRQ # call standard irq handler @@ -577,25 +608,23 @@ tm __TI_flags+7(%r9),_TIF_WORK_INT jnz io_work # there is work to do (signals etc.) io_leave: - RESTORE_ALL 0 + RESTORE_ALL #ifdef CONFIG_PREEMPT io_preempt: icm %r0,15,__TI_precount(%r9) jnz io_leave + # switch to kernel stack + lg %r1,SP_R15(%r15) + aghi %r1,-SP_SIZE + mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) + xc 0(8,%r1),0(%r1) # clear back chain + lgr %r15,%r1 io_resume_loop: tm __TI_flags+7(%r9),_TIF_NEED_RESCHED jno io_leave larl %r1,.Lc_pactive mvc __TI_precount(4,%r9),0(%r1) - # hmpf, we are on the async. stack but to call schedule - # we have to move the interrupt frame to the process stack - lg %r1,SP_R15(%r15) - aghi %r1,-SP_SIZE - nill %r1,0xfff8 - mvc SP_PTREGS(SP_SIZE-SP_PTREGS,%r1),SP_PTREGS(%r15) - xc 0(8,%r1),0(%r1) # clear back chain - lgr %r15,%r1 stosm 48(%r15),0x03 # reenable interrupts brasl %r14,schedule # call schedule stnsm 48(%r15),0xfc # disable I/O and ext. interrupts @@ -605,18 +634,19 @@ #endif # -# recheck if there is more work to do +# switch to kernel stack, then check TIF bits # -io_work_loop: - stnsm 48(%r15),0xfc # disable I/O and ext. interrupts - GET_THREAD_INFO # load pointer to task_struct to R9 - tm __TI_flags+7(%r9),_TIF_WORK_INT - jz io_leave # there is no work to do +io_work: + lg %r1,__LC_KERNEL_STACK + aghi %r1,-SP_SIZE + mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) + xc 0(8,%r1),0(%r1) # clear back chain + lgr %r15,%r1 # # One of the work bits is on. Find out which one. # Checked are: _TIF_SIGPENDING and _TIF_NEED_RESCHED # -io_work: +io_work_loop: tm __TI_flags+7(%r9),_TIF_NEED_RESCHED jo io_reschedule tm __TI_flags+7(%r9),_TIF_SIGPENDING @@ -628,8 +658,12 @@ # io_reschedule: stosm 48(%r15),0x03 # reenable interrupts - larl %r14,io_work_loop - jg schedule # call scheduler + brasl %r14,schedule # call scheduler + stnsm 48(%r15),0xfc # disable I/O and ext. interrupts + GET_THREAD_INFO # load pointer to task_struct to R9 + tm __TI_flags+7(%r9),_TIF_WORK_INT + jz io_leave # there is no work to do + j io_work_loop # # _TIF_SIGPENDING is set, call do_signal @@ -647,7 +681,8 @@ */ .globl ext_int_handler ext_int_handler: - SAVE_ALL __LC_EXT_OLD_PSW,0 + SAVE_ALL __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32,0 + CHECK_CRITICAL GET_THREAD_INFO # load pointer to task_struct to R9 stck __LC_INT_CLOCK la %r2,SP_PTREGS(%r15) # address of register-save area @@ -660,10 +695,10 @@ */ .globl mcck_int_handler mcck_int_handler: - SAVE_ALL __LC_MCK_OLD_PSW,0 + SAVE_ALL __LC_MCK_OLD_PSW,__LC_SAVE_AREA+64,0 brasl %r14,s390_do_machine_check mcck_return: - RESTORE_ALL 0 + RESTORE_ALL #ifdef CONFIG_SMP /* @@ -694,16 +729,69 @@ restart_go: #endif +cleanup_table: + .quad system_call, sysc_enter, cleanup_sysc_enter + .quad sysc_return, sysc_leave, cleanup_sysc_return + .quad sysc_leave, sysc_work_loop, cleanup_sysc_leave + .quad sysc_work_loop, sysc_reschedule, cleanup_sysc_return +cleanup_table_entries=(.-cleanup_table) / 24 + +cleanup_critical: + lghi %r0,cleanup_table_entries + larl %r1,cleanup_table + lg %r2,SP_PSW+8(%r15) +cleanup_loop: + clg %r2,0(%r1) + jl cleanup_cont + clg %r2,8(%r1) + jl cleanup_found +cleanup_cont: + la %r1,24(%r1) + brct %r0,cleanup_loop + br %r14 +cleanup_found: + lg %r1,16(%r1) + br %r1 + +cleanup_sysc_enter: + CLEANUP_SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 + llgh %r0,0x8a + stg %r0,SP_R7(%r15) + larl %r1,sysc_enter + stg %r1,SP_PSW+8(%r15) + br %r14 + +cleanup_sysc_return: + larl %r1,sysc_return + stg %r1,SP_PSW+8(%r15) + br %r14 + +cleanup_sysc_leave: + CLEANUP_RESTORE_ALL + br %r14 + /* * Integer constants */ .align 4 .Lconst: -.Lc_ac: .long 0,0,1 .Lc_pactive: .long PREEMPT_ACTIVE -.L0x0130: .word 0x0130 -.L0x0140: .word 0x0140 -.L0x0150: .word 0x0150 -.L0x0160: .word 0x0160 -.L0x0170: .word 0x0170 -.Lnr_syscalls: .long NR_syscalls +.Lcritical_start: + .quad __critical_start +.Lcritical_end: + .quad __critical_end + +#define SYSCALL(esa,esame,emu) .long esame + .globl sys_call_table +sys_call_table: +#include "syscalls.S" +#undef SYSCALL + +#ifdef CONFIG_S390_SUPPORT + +#define SYSCALL(esa,esame,emu) .long emu + .globl sys_call_table_emu +sys_call_table_emu: +#include "syscalls.S" +#undef SYSCALL +#endif diff -Nru a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c --- a/arch/s390/kernel/process.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/process.c Sun Mar 28 13:12:08 2004 @@ -179,7 +179,7 @@ memset(®s, 0, sizeof(regs)); regs.psw.mask = PSW_KERNEL_BITS; regs.psw.addr = (unsigned long) kernel_thread_starter | PSW_ADDR_AMODE; - regs.gprs[7] = STACK_FRAME_OVERHEAD; + regs.gprs[7] = STACK_FRAME_OVERHEAD + sizeof(struct pt_regs); regs.gprs[8] = __LC_KERNEL_STACK; regs.gprs[9] = (unsigned long) fn; regs.gprs[10] = (unsigned long) arg; @@ -230,6 +230,7 @@ (THREAD_SIZE + (unsigned long) p->thread_info)) - 1; p->thread.ksp = (unsigned long) frame; p->set_child_tid = p->clear_child_tid = NULL; + /* Store access registers to kernel stack of new process. */ frame->childregs = *regs; frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */ frame->childregs.gprs[15] = new_stackp; @@ -240,6 +241,10 @@ /* fake return stack for resume(), don't go back to schedule */ frame->gprs[9] = (unsigned long) frame; + + /* Save access registers to new thread structure. */ + save_access_regs(&p->thread.acrs[0]); + #ifndef CONFIG_ARCH_S390X /* * save fprs to current->thread.fp_regs to merge them with @@ -251,7 +256,7 @@ p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _SEGMENT_TABLE; /* Set a new TLS ? */ if (clone_flags & CLONE_SETTLS) - frame->childregs.acrs[0] = regs->gprs[6]; + p->thread.acrs[0] = regs->gprs[6]; #else /* CONFIG_ARCH_S390X */ /* Save the fpu registers to new thread structure. */ save_fp_regs(&p->thread.fp_regs); @@ -259,30 +264,27 @@ /* Set a new TLS ? */ if (clone_flags & CLONE_SETTLS) { if (test_thread_flag(TIF_31BIT)) { - frame->childregs.acrs[0] = - (unsigned int) regs->gprs[6]; + p->thread.acrs[0] = (unsigned int) regs->gprs[6]; } else { - frame->childregs.acrs[0] = - (unsigned int)(regs->gprs[6] >> 32); - frame->childregs.acrs[1] = - (unsigned int) regs->gprs[6]; + p->thread.acrs[0] = (unsigned int)(regs->gprs[6] >> 32); + p->thread.acrs[1] = (unsigned int) regs->gprs[6]; } } #endif /* CONFIG_ARCH_S390X */ /* start new process with ar4 pointing to the correct address space */ - p->thread.ar4 = get_fs().ar4; + p->thread.mm_segment = get_fs(); /* Don't copy debug registers */ memset(&p->thread.per_info,0,sizeof(p->thread.per_info)); return 0; } -asmlinkage int sys_fork(struct pt_regs regs) +asmlinkage long sys_fork(struct pt_regs regs) { return do_fork(SIGCHLD, regs.gprs[15], ®s, 0, NULL, NULL); } -asmlinkage int sys_clone(struct pt_regs regs) +asmlinkage long sys_clone(struct pt_regs regs) { unsigned long clone_flags; unsigned long newsp; @@ -308,7 +310,7 @@ * do not have enough call-clobbered registers to hold all * the information you need. */ -asmlinkage int sys_vfork(struct pt_regs regs) +asmlinkage long sys_vfork(struct pt_regs regs) { return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.gprs[15], ®s, 0, NULL, NULL); @@ -317,7 +319,7 @@ /* * sys_execve() executes a new program. */ -asmlinkage int sys_execve(struct pt_regs regs) +asmlinkage long sys_execve(struct pt_regs regs) { int error; char * filename; diff -Nru a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c --- a/arch/s390/kernel/ptrace.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/ptrace.c Sun Mar 28 13:12:08 2004 @@ -137,25 +137,36 @@ if ((addr & 3) || addr > sizeof(struct user) - __ADDR_MASK) return -EIO; - if (addr <= (addr_t) &dummy->regs.orig_gpr2) { + if (addr < (addr_t) &dummy->regs.acrs) { /* - * psw, gprs, acrs and orig_gpr2 are stored on the stack + * psw and gprs are stored on the stack */ tmp = *(addr_t *)((addr_t) __KSTK_PTREGS(child) + addr); if (addr == (addr_t) &dummy->regs.psw.mask) /* Remove per bit from user psw. */ tmp &= ~PSW_MASK_PER; - } else if (addr >= (addr_t) &dummy->regs.fp_regs && - addr < (addr_t) (&dummy->regs.fp_regs + 1)) { + } else if (addr < (addr_t) &dummy->regs.orig_gpr2) { + /* + * access registers are stored in the thread structure + */ + offset = addr - (addr_t) &dummy->regs.acrs; + tmp = *(addr_t *)((addr_t) &child->thread.acrs + offset); + + } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { + /* + * orig_gpr2 is stored on the kernel stack + */ + tmp = (addr_t) __KSTK_PTREGS(child)->orig_gpr2; + + } else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) { /* * floating point regs. are stored in the thread structure */ offset = addr - (addr_t) &dummy->regs.fp_regs; tmp = *(addr_t *)((addr_t) &child->thread.fp_regs + offset); - } else if (addr >= (addr_t) &dummy->regs.per_info && - addr < (addr_t) (&dummy->regs.per_info + 1)) { + } else if (addr < (addr_t) (&dummy->regs.per_info + 1)) { /* * per_info is found in the thread structure */ @@ -187,9 +198,9 @@ if ((addr & 3) || addr > sizeof(struct user) - __ADDR_MASK) return -EIO; - if (addr <= (addr_t) &dummy->regs.orig_gpr2) { + if (addr < (addr_t) &dummy->regs.acrs) { /* - * psw, gprs, acrs and orig_gpr2 are stored on the stack + * psw and gprs are stored on the stack */ if (addr == (addr_t) &dummy->regs.psw.mask && #ifdef CONFIG_S390_SUPPORT @@ -206,8 +217,20 @@ #endif *(addr_t *)((addr_t) __KSTK_PTREGS(child) + addr) = data; - } else if (addr >= (addr_t) &dummy->regs.fp_regs && - addr < (addr_t) (&dummy->regs.fp_regs + 1)) { + } else if (addr < (addr_t) (&dummy->regs.orig_gpr2)) { + /* + * access registers are stored in the thread structure + */ + offset = addr - (addr_t) &dummy->regs.acrs; + *(addr_t *)((addr_t) &child->thread.acrs + offset) = data; + + } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { + /* + * orig_gpr2 is stored on the kernel stack + */ + __KSTK_PTREGS(child)->orig_gpr2 = data; + + } else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) { /* * floating point regs. are stored in the thread structure */ @@ -217,8 +240,7 @@ offset = addr - (addr_t) &dummy->regs.fp_regs; *(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data; - } else if (addr >= (addr_t) &dummy->regs.per_info && - addr < (addr_t) (&dummy->regs.per_info + 1)) { + } else if (addr < (addr_t) (&dummy->regs.per_info + 1)) { /* * per_info is found in the thread structure */ @@ -324,9 +346,9 @@ (addr & 3) || addr > sizeof(struct user) - 3) return -EIO; - if (addr <= (addr_t) &dummy32->regs.orig_gpr2) { + if (addr < (addr_t) &dummy32->regs.acrs) { /* - * psw, gprs, acrs and orig_gpr2 are stored on the stack + * psw and gprs are stored on the stack */ if (addr == (addr_t) &dummy32->regs.psw.mask) { /* Fake a 31 bit psw mask. */ @@ -336,28 +358,32 @@ /* Fake a 31 bit psw address. */ tmp = (__u32) __KSTK_PTREGS(child)->psw.addr | PSW32_ADDR_AMODE31; - } else if (addr < (addr_t) &dummy32->regs.acrs[0]) { + } else { /* gpr 0-15 */ tmp = *(__u32 *)((addr_t) __KSTK_PTREGS(child) + addr*2 + 4); - } else if (addr < (addr_t) &dummy32->regs.orig_gpr2) { - offset = PT_ACR0 + addr - (addr_t) &dummy32->regs.acrs; - tmp = *(__u32*)((addr_t) __KSTK_PTREGS(child) + offset); - } else { - /* orig gpr 2 */ - offset = PT_ORIGGPR2 + 4; - tmp = *(__u32*)((addr_t) __KSTK_PTREGS(child) + offset); } - } else if (addr >= (addr_t) &dummy32->regs.fp_regs && - addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { + } else if (addr < (addr_t) (&dummy32->regs.orig_gpr2)) { + /* + * access registers are stored in the thread structure + */ + offset = addr - (addr_t) &dummy32->regs.acrs; + tmp = *(__u32*)((addr_t) &child->thread.acrs + offset); + + } else if (addr == (addr_t) (&dummy32->regs.orig_gpr2)) { + /* + * orig_gpr2 is stored on the kernel stack + */ + tmp = *(__u32*)((addr_t) &__KSTK_PTREGS(child)->orig_gpr2 + 4); + + } else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { /* * floating point regs. are stored in the thread structure */ offset = addr - (addr_t) &dummy32->regs.fp_regs; tmp = *(__u32 *)((addr_t) &child->thread.fp_regs + offset); - } else if (addr >= (addr_t) &dummy32->regs.per_info && - addr < (addr_t) (&dummy32->regs.per_info + 1)) { + } else if (addr < (addr_t) (&dummy32->regs.per_info + 1)) { /* * per_info is found in the thread structure */ @@ -396,7 +422,7 @@ tmp = (__u32) data; - if (addr <= (addr_t) &dummy32->regs.orig_gpr2) { + if (addr < (addr_t) &dummy32->regs.acrs) { /* * psw, gprs, acrs and orig_gpr2 are stored on the stack */ @@ -411,19 +437,25 @@ /* Build a 64 bit psw address from 31 bit address. */ __KSTK_PTREGS(child)->psw.addr = (__u64) tmp & PSW32_ADDR_INSN; - } else if (addr < (addr_t) &dummy32->regs.acrs[0]) { + } else { /* gpr 0-15 */ *(__u32*)((addr_t) __KSTK_PTREGS(child) + addr*2 + 4) = tmp; - } else if (addr < (addr_t) &dummy32->regs.orig_gpr2) { - offset = PT_ACR0 + addr - (addr_t) &dummy32->regs.acrs; - *(__u32*)((addr_t) __KSTK_PTREGS(child) + offset) = tmp; - } else { - offset = PT_ORIGGPR2 + 4; - *(__u32*)((addr_t) __KSTK_PTREGS(child) + offset) = tmp; } - } else if (addr >= (addr_t) &dummy32->regs.fp_regs && - addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { + } else if (addr < (addr_t) (&dummy32->regs.orig_gpr2)) { + /* + * access registers are stored in the thread structure + */ + offset = addr - (addr_t) &dummy32->regs.acrs; + *(__u32*)((addr_t) &child->thread.acrs + offset) = tmp; + + } else if (addr == (addr_t) (&dummy32->regs.orig_gpr2)) { + /* + * orig_gpr2 is stored on the kernel stack + */ + *(__u32*)((addr_t) &__KSTK_PTREGS(child)->orig_gpr2 + 4) = tmp; + + } else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) { /* * floating point regs. are stored in the thread structure */ @@ -434,8 +466,7 @@ offset = addr - (addr_t) &dummy32->regs.fp_regs; *(__u32 *)((addr_t) &child->thread.fp_regs + offset) = tmp; - } else if (addr >= (addr_t) &dummy32->regs.per_info && - addr < (addr_t) (&dummy32->regs.per_info + 1)) { + } else if (addr < (addr_t) (&dummy32->regs.per_info + 1)) { /* * per_info is found in the thread structure. */ @@ -616,7 +647,7 @@ return -EIO; } -asmlinkage int +asmlinkage long sys_ptrace(long request, long pid, long addr, long data) { struct task_struct *child; diff -Nru a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c --- a/arch/s390/kernel/s390_ksyms.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/s390_ksyms.c Sun Mar 28 13:12:08 2004 @@ -33,6 +33,8 @@ EXPORT_SYMBOL_NOVERS(__copy_from_user_asm); EXPORT_SYMBOL_NOVERS(__copy_to_user_asm); EXPORT_SYMBOL_NOVERS(__clear_user_asm); +EXPORT_SYMBOL_NOVERS(__strncpy_from_user_asm); +EXPORT_SYMBOL_NOVERS(__strnlen_user_asm); EXPORT_SYMBOL(diag10); /* diff -Nru a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c --- a/arch/s390/kernel/setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/s390/kernel/setup.c Sun Mar 28 13:12:07 2004 @@ -492,26 +492,27 @@ #endif /* CONFIG_ARCH_S390X */ lc->restart_psw.mask = PSW_BASE_BITS; lc->restart_psw.addr = - PSW_ADDR_AMODE + (unsigned long) restart_int_handler; + PSW_ADDR_AMODE | (unsigned long) restart_int_handler; lc->external_new_psw.mask = PSW_KERNEL_BITS; lc->external_new_psw.addr = - PSW_ADDR_AMODE + (unsigned long) ext_int_handler; - lc->svc_new_psw.mask = PSW_KERNEL_BITS; - lc->svc_new_psw.addr = PSW_ADDR_AMODE + (unsigned long) system_call; + PSW_ADDR_AMODE | (unsigned long) ext_int_handler; + lc->svc_new_psw.mask = PSW_KERNEL_BITS | PSW_MASK_IO | PSW_MASK_EXT; + lc->svc_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) system_call; lc->program_new_psw.mask = PSW_KERNEL_BITS; lc->program_new_psw.addr = - PSW_ADDR_AMODE + (unsigned long)pgm_check_handler; + PSW_ADDR_AMODE | (unsigned long)pgm_check_handler; lc->mcck_new_psw.mask = PSW_KERNEL_BITS; lc->mcck_new_psw.addr = - PSW_ADDR_AMODE + (unsigned long) mcck_int_handler; + PSW_ADDR_AMODE | (unsigned long) mcck_int_handler; lc->io_new_psw.mask = PSW_KERNEL_BITS; - lc->io_new_psw.addr = PSW_ADDR_AMODE + (unsigned long) io_int_handler; + lc->io_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) io_int_handler; lc->ipl_device = S390_lowcore.ipl_device; lc->jiffy_timer = -1LL; lc->kernel_stack = ((unsigned long) &init_thread_union) + THREAD_SIZE; lc->async_stack = (unsigned long) __alloc_bootmem(ASYNC_SIZE, ASYNC_SIZE, 0) + ASYNC_SIZE; lc->current_task = (unsigned long) init_thread_union.thread_info.task; + lc->thread_info = (unsigned long) &init_thread_union; #ifdef CONFIG_ARCH_S390X if (MACHINE_HAS_DIAG44) lc->diag44_opcode = 0x83000044; diff -Nru a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c --- a/arch/s390/kernel/signal.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/kernel/signal.c Sun Mar 28 13:12:08 2004 @@ -151,13 +151,20 @@ unsigned long old_mask = regs->psw.mask; int err; + save_access_regs(current->thread.acrs); + /* Copy a 'clean' PSW mask to the user to avoid leaking information about whether PER is currently on. */ regs->psw.mask = PSW_MASK_MERGE(PSW_USER_BITS, regs->psw.mask); - err = __copy_to_user(&sregs->regs, regs, sizeof(_s390_regs_common)); + err = __copy_to_user(&sregs->regs.psw, ®s->psw, + sizeof(sregs->regs.psw)+sizeof(sregs->regs.gprs)); regs->psw.mask = old_mask; if (err != 0) return err; + err = __copy_to_user(&sregs->regs.acrs, current->thread.acrs, + sizeof(sregs->regs.acrs)); + if (err != 0) + return err; /* * We have to store the fp registers to current->thread.fp_regs * to merge them with the emulated registers. @@ -176,11 +183,17 @@ /* Alwys make any pending restarted system call return -EINTR */ current_thread_info()->restart_block.fn = do_no_restart_syscall; - err = __copy_from_user(regs, &sregs->regs, sizeof(_s390_regs_common)); + err = __copy_from_user(®s->psw, &sregs->regs.psw, + sizeof(sregs->regs.psw)+sizeof(sregs->regs.gprs)); regs->psw.mask = PSW_MASK_MERGE(old_mask, regs->psw.mask); regs->psw.addr |= PSW_ADDR_AMODE; if (err) return err; + err = __copy_from_user(¤t->thread.acrs, &sregs->regs.acrs, + sizeof(sregs->regs.acrs)); + if (err) + return err; + restore_access_regs(current->thread.acrs); err = __copy_from_user(¤t->thread.fp_regs, &sregs->fpregs, sizeof(s390_fp_regs)); diff -Nru a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c --- a/arch/s390/kernel/sys_s390.c Sun Mar 28 13:12:07 2004 +++ b/arch/s390/kernel/sys_s390.c Sun Mar 28 13:12:07 2004 @@ -32,17 +32,11 @@ #include #include -#ifndef CONFIG_ARCH_S390X -#define __SYS_RETTYPE int -#else -#define __SYS_RETTYPE long -#endif /* CONFIG_ARCH_S390X */ - /* * sys_pipe() is the normal C calling standard for creating * a pipe. It's not the way Unix traditionally does this, though. */ -asmlinkage __SYS_RETTYPE sys_pipe(unsigned long * fildes) +asmlinkage long sys_pipe(unsigned long * fildes) { int fd[2]; int error; @@ -61,7 +55,7 @@ unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff) { - __SYS_RETTYPE error = -EBADF; + long error = -EBADF; struct file * file = NULL; flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); @@ -109,10 +103,10 @@ return error; } -asmlinkage __SYS_RETTYPE old_mmap(struct mmap_arg_struct *arg) +asmlinkage long old_mmap(struct mmap_arg_struct *arg) { struct mmap_arg_struct a; - __SYS_RETTYPE error = -EFAULT; + long error = -EFAULT; if (copy_from_user(&a, arg, sizeof(a))) goto out; @@ -133,7 +127,7 @@ struct timeval *tvp; }; -asmlinkage int old_select(struct sel_arg_struct *arg) +asmlinkage long old_select(struct sel_arg_struct *arg) { struct sel_arg_struct a; @@ -182,7 +176,7 @@ * * This is really horribly ugly. */ -asmlinkage __SYS_RETTYPE sys_ipc (uint call, int first, int second, +asmlinkage long sys_ipc (uint call, int first, int second, unsigned long third, void *ptr) { struct ipc_kludge tmp; @@ -246,7 +240,7 @@ } #ifdef CONFIG_ARCH_S390X -asmlinkage int s390x_newuname(struct new_utsname * name) +asmlinkage long s390x_newuname(struct new_utsname * name) { int ret = sys_newuname(name); @@ -257,7 +251,7 @@ return ret; } -asmlinkage int s390x_personality(unsigned long personality) +asmlinkage long s390x_personality(unsigned long personality) { int ret; diff -Nru a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c --- a/arch/s390/kernel/traps.c Sun Mar 28 13:12:07 2004 +++ b/arch/s390/kernel/traps.c Sun Mar 28 13:12:07 2004 @@ -173,6 +173,10 @@ printk(" " FOURLONG, regs->gprs[12], regs->gprs[13], regs->gprs[14], regs->gprs[15]); +#if 0 + /* FIXME: this isn't needed any more but it changes the ksymoops + * input. To remove or not to remove ... */ + save_access_regs(regs->acrs); printk("%s ACRS: %08x %08x %08x %08x\n", mode, regs->acrs[0], regs->acrs[1], regs->acrs[2], regs->acrs[3]); printk(" %08x %08x %08x %08x\n", @@ -181,6 +185,7 @@ regs->acrs[8], regs->acrs[9], regs->acrs[10], regs->acrs[11]); printk(" %08x %08x %08x %08x\n", regs->acrs[12], regs->acrs[13], regs->acrs[14], regs->acrs[15]); +#endif /* * Print the first 20 byte of the instruction stream at the @@ -229,17 +234,17 @@ regs->gprs[12], regs->gprs[13], regs->gprs[14], regs->gprs[15]); buffer += sprintf(buffer, "User ACRS: %08x %08x %08x %08x\n", - regs->acrs[0], regs->acrs[1], - regs->acrs[2], regs->acrs[3]); + task->thread.acrs[0], task->thread.acrs[1], + task->thread.acrs[2], task->thread.acrs[3]); buffer += sprintf(buffer, " %08x %08x %08x %08x\n", - regs->acrs[4], regs->acrs[5], - regs->acrs[6], regs->acrs[7]); + task->thread.acrs[4], task->thread.acrs[5], + task->thread.acrs[6], task->thread.acrs[7]); buffer += sprintf(buffer, " %08x %08x %08x %08x\n", - regs->acrs[8], regs->acrs[9], - regs->acrs[10], regs->acrs[11]); + task->thread.acrs[8], task->thread.acrs[9], + task->thread.acrs[10], task->thread.acrs[11]); buffer += sprintf(buffer, " %08x %08x %08x %08x\n", - regs->acrs[12], regs->acrs[13], - regs->acrs[14], regs->acrs[15]); + task->thread.acrs[12], task->thread.acrs[13], + task->thread.acrs[14], task->thread.acrs[15]); return buffer; } diff -Nru a/arch/s390/lib/uaccess.S b/arch/s390/lib/uaccess.S --- a/arch/s390/lib/uaccess.S Sun Mar 28 13:12:08 2004 +++ b/arch/s390/lib/uaccess.S Sun Mar 28 13:12:08 2004 @@ -9,135 +9,191 @@ * These functions have standard call interface */ +#include #include +#include .text .align 4 .globl __copy_from_user_asm + # %r2 = to, %r3 = n, %r4 = from __copy_from_user_asm: - lr %r5,%r3 - sacf 512 -0: mvcle %r2,%r4,0 - jo 0b -1: sacf 0 - lr %r2,%r5 - br %r14 -2: lhi %r1,-4096 - lr %r3,%r4 - slr %r3,%r1 # %r3 = %r4 + 4096 - nr %r3,%r1 # %r3 = (%r4 + 4096) & -4096 - slr %r3,%r4 # %r3 = #bytes to next user page boundary - clr %r5,%r3 # copy crosses next page boundary ? - jnh 1b # no, this page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. -3: mvcle %r2,%r4,0 - jo 3b - j 1b + slr %r0,%r0 +0: mvcp 0(%r3,%r2),0(%r4),%r0 + jnz 1f + slr %r2,%r2 + br %r14 +1: la %r2,256(%r2) + la %r4,256(%r4) + ahi %r3,-256 +2: mvcp 0(%r3,%r2),0(%r4),%r0 + jnz 1b +3: slr %r2,%r2 + br %r14 +4: lhi %r0,-4096 + lr %r5,%r4 + slr %r5,%r0 + nr %r5,%r0 # %r5 = (%r4 + 4096) & -4096 + slr %r5,%r4 # %r5 = #bytes to next user page boundary + clr %r3,%r5 # copy crosses next page boundary ? + jnh 6f # no, the current page faulted + # move with the reduced length which is < 256 +5: mvcp 0(%r5,%r2),0(%r4),%r0 + slr %r3,%r5 +6: lr %r2,%r3 + br %r14 .section __ex_table,"a" - .long 0b,2b - .long 3b,1b + .long 0b,4b + .long 2b,4b + .long 5b,6b .previous .align 4 .text .globl __copy_to_user_asm + # %r2 = from, %r3 = n, %r4 = to __copy_to_user_asm: - lr %r5,%r3 - sacf 512 -0: mvcle %r4,%r2,0 - jo 0b -1: sacf 0 - lr %r2,%r3 + slr %r0,%r0 +0: mvcs 0(%r3,%r4),0(%r2),%r0 + jnz 1f + slr %r2,%r2 + br %r14 +1: la %r2,256(%r2) + la %r4,256(%r4) + ahi %r3,-256 +2: mvcs 0(%r3,%r4),0(%r2),%r0 + jnz 1b +3: slr %r2,%r2 br %r14 -2: lhi %r1,-4096 +4: lhi %r0,-4096 lr %r5,%r4 - slr %r5,%r1 # %r5 = %r4 + 4096 - nr %r5,%r1 # %r5 = (%r4 + 4096) & -4096 - slr %r5,%r4 # %r5 = #bytes to next user page boundary - clr %r3,%r5 # copy crosses next page boundary ? - jnh 1b # no, the current page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. -3: mvcle %r4,%r2,0 - jo 3b - j 1b + slr %r5,%r0 + nr %r5,%r0 # %r5 = (%r4 + 4096) & -4096 + slr %r5,%r4 # %r5 = #bytes to next user page boundary + clr %r3,%r5 # copy crosses next page boundary ? + jnh 6f # no, the current page faulted + # move with the reduced length which is < 256 +5: mvcs 0(%r5,%r4),0(%r2),%r0 + slr %r3,%r5 +6: lr %r2,%r3 + br %r14 .section __ex_table,"a" - .long 0b,2b - .long 3b,1b + .long 0b,4b + .long 2b,4b + .long 5b,6b .previous .align 4 .text .globl __copy_in_user_asm + # %r2 = from, %r3 = n, %r4 = to __copy_in_user_asm: - stm %r6,%r15,24(%r15) - lr %r5,%r3 - lr %r7,%r3 - lr %r6,%r2 - cpya 6,4 # ar6 = ar4 - sacf 512 -0: mvcle %r4,%r6,0 - jo 0b -1: sacf 0 - lr %r2,%r7 - lm %r6,%r15,24(%r15) + sacf 256 + bras 1,1f + mvc 0(1,%r4),0(%r2) +0: mvc 0(256,%r4),0(%r2) + la %r2,256(%r2) + la %r4,256(%r4) +1: ahi %r3,-256 + jnm 0b +2: ex %r3,0(%r1) + sacf 0 + slr %r2,%r2 + br 14 +3: mvc 0(1,%r4),0(%r2) + la %r2,1(%r2) + la %r4,1(%r4) + ahi %r3,-1 + jnm 3b +4: lr %r2,%r3 + sacf 0 br %r14 -2: lhi %r1,-4096 - lr %r5,%r4 - slr %r5,%r1 # %r5 = %r4 + 4096 - nr %r5,%r1 # %r5 = (%r4 + 4096) & -4096 - slr %r5,%r4 # %r5 = #bytes to next user page boundary - clr %r7,%r5 # copy crosses next page boundary ? - jnh 1b # no, the current page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. -3: mvcle %r4,%r6,0 - jo 3b - j 1b .section __ex_table,"a" - .long 0b,2b - .long 3b,1b + .long 0b,3b + .long 2b,3b + .long 3b,4b .previous .align 4 .text .globl __clear_user_asm + # %r2 = to, %r3 = n __clear_user_asm: + bras %r5,0f + .long empty_zero_page +0: l %r5,0(%r5) + slr %r0,%r0 +1: mvcs 0(%r3,%r2),0(%r5),%r0 + jnz 2f + slr %r2,%r2 + br %r14 +2: la %r2,256(%r2) + ahi %r3,-256 +3: mvcs 0(%r3,%r2),0(%r5),%r0 + jnz 2b +4: slr %r2,%r2 + br %r14 +5: lhi %r0,-4096 lr %r4,%r2 - lr %r5,%r3 - sr %r2,%r2 - sr %r3,%r3 - sacf 512 -0: mvcle %r4,%r2,0 - jo 0b -1: sacf 0 - br %r14 -2: lr %r2,%r5 - lhi %r1,-4096 - slr %r5,%r1 # %r5 = %r4 + 4096 - nr %r5,%r1 # %r5 = (%r4 + 4096) & -4096 - slr %r5,%r4 # %r5 = #bytes to next user page boundary - clr %r2,%r5 # copy crosses next page boundary ? - jnh 1b # no, the current page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. - slr %r2,%r5 -3: mvcle %r4,%r2,0 - jo 3b - j 1b -4: alr %r2,%r5 - j 1b + slr %r4,%r0 + nr %r4,%r0 # %r4 = (%r2 + 4096) & -4096 + slr %r4,%r2 # %r4 = #bytes to next user page boundary + clr %r3,%r4 # clear crosses next page boundary ? + jnh 7f # no, the current page faulted + # clear with the reduced length which is < 256 +6: mvcs 0(%r4,%r2),0(%r5),%r0 + slr %r3,%r4 +7: lr %r2,%r3 + br %r14 .section __ex_table,"a" - .long 0b,2b - .long 3b,4b + .long 1b,5b + .long 3b,5b + .long 6b,7b .previous + .align 4 + .text + .globl __strncpy_from_user_asm + # %r2 = dst, %r3 = src, %r4 = count +__strncpy_from_user_asm: + lhi %r0,0 + lhi %r1,1 + lhi %r5,0 +0: mvcp 0(%r1,%r2),0(%r3),%r0 + tm 0(%r2),0xff + jz 1f + la %r2,1(%r2) + la %r3,1(%r3) + ahi %r5,1 + clr %r5,%r4 + jl 0b +1: lr %r2,%r5 + br %r14 +2: lhi %r2,-EFAULT + br %r14 + .section __ex_table,"a" + .long 0b,2b + .previous + + .align 4 + .text + .globl __strnlen_user_asm + # %r2 = src, %r3 = count +__strnlen_user_asm: + lhi %r0,0 + lhi %r1,1 + lhi %r5,0 +0: mvcp 24(%r1,%r15),0(%r2),%r0 + ahi %r5,1 + tm 24(%r15),0xff + jz 1f + la %r2,1(%r2) + clr %r5,%r3 + jl 0b +1: lr %r2,%r5 + br %r14 +2: lhi %r2,-EFAULT + br %r14 + .section __ex_table,"a" + .long 0b,2b + .previous diff -Nru a/arch/s390/lib/uaccess64.S b/arch/s390/lib/uaccess64.S --- a/arch/s390/lib/uaccess64.S Sun Mar 28 13:12:08 2004 +++ b/arch/s390/lib/uaccess64.S Sun Mar 28 13:12:08 2004 @@ -9,134 +9,189 @@ * These functions have standard call interface */ +#include #include +#include .text .align 4 .globl __copy_from_user_asm + # %r2 = to, %r3 = n, %r4 = from __copy_from_user_asm: - lgr %r5,%r3 - sacf 512 -0: mvcle %r2,%r4,0 - jo 0b -1: sacf 0 - lgr %r2,%r5 - br %r14 -2: lghi %r1,-4096 - lgr %r3,%r4 - slgr %r3,%r1 # %r3 = %r4 + 4096 - ngr %r3,%r1 # %r3 = (%r4 + 4096) & -4096 - slgr %r3,%r4 # %r3 = #bytes to next user page boundary - clgr %r5,%r3 # copy crosses next page boundary ? - jnh 1b # no, this page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. -3: mvcle %r2,%r4,0 - jo 3b - j 1b + slgr %r0,%r0 +0: mvcp 0(%r3,%r2),0(%r4),%r0 + jnz 1f + slgr %r2,%r2 + br %r14 +1: la %r2,256(%r2) + la %r4,256(%r4) + aghi %r3,-256 +2: mvcp 0(%r3,%r2),0(%r4),%r0 + jnz 1b +3: slgr %r2,%r2 + br %r14 +4: lghi %r0,-4096 + lgr %r5,%r4 + slgr %r5,%r0 + ngr %r5,%r0 # %r5 = (%r4 + 4096) & -4096 + slgr %r5,%r4 # %r5 = #bytes to next user page boundary + clgr %r3,%r5 # copy crosses next page boundary ? + jnh 6f # no, the current page faulted + # move with the reduced length which is < 256 +5: mvcp 0(%r5,%r2),0(%r4),%r0 + slgr %r3,%r5 +6: lgr %r2,%r3 + br %r14 .section __ex_table,"a" - .quad 0b,2b - .quad 3b,1b + .quad 0b,4b + .quad 2b,4b + .quad 5b,6b .previous .align 4 .text .globl __copy_to_user_asm + # %r2 = from, %r3 = n, %r4 = to __copy_to_user_asm: - lgr %r5,%r3 - sacf 512 -0: mvcle %r4,%r2,0 - jo 0b -1: sacf 0 - lgr %r2,%r3 + slgr %r0,%r0 +0: mvcs 0(%r3,%r4),0(%r2),%r0 + jnz 1f + slgr %r2,%r2 + br %r14 +1: la %r2,256(%r2) + la %r4,256(%r4) + aghi %r3,-256 +2: mvcs 0(%r3,%r4),0(%r2),%r0 + jnz 1b +3: slgr %r2,%r2 br %r14 -2: lghi %r1,-4096 +4: lghi %r0,-4096 lgr %r5,%r4 - slgr %r5,%r1 # %r5 = %r4 + 4096 - ngr %r5,%r1 # %r5 = (%r4 + 4096) & -4096 - slgr %r5,%r4 # %r5 = #bytes to next user page boundary - clgr %r3,%r5 # copy crosses next page boundary ? - jnh 1b # no, the current page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. -3: mvcle %r4,%r2,0 - jo 3b - j 1b + slgr %r5,%r0 + ngr %r5,%r0 # %r5 = (%r4 + 4096) & -4096 + slgr %r5,%r4 # %r5 = #bytes to next user page boundary + clgr %r3,%r5 # copy crosses next page boundary ? + jnh 6f # no, the current page faulted + # move with the reduced length which is < 256 +5: mvcs 0(%r5,%r4),0(%r2),%r0 + slgr %r3,%r5 +6: lgr %r2,%r3 + br %r14 .section __ex_table,"a" - .quad 0b,2b - .quad 3b,1b + .quad 0b,4b + .quad 2b,4b + .quad 5b,6b .previous .align 4 .text .globl __copy_in_user_asm + # %r2 = from, %r3 = n, %r4 = to __copy_in_user_asm: - stmg %r6,%r15,48(%r15) - lgr %r5,%r3 - lgr %r7,%r5 - lgr %r6,%r2 - cpya 6,4 # ar6 = ar4 - sacf 512 -0: mvcle %r4,%r6,0 - jo 0b -1: sacf 0 - lgr %r2,%r7 - lmg %r6,%r15,48(%r15) + sacf 256 + bras 1,1f + mvc 0(1,%r4),0(%r2) +0: mvc 0(256,%r4),0(%r2) + la %r2,256(%r2) + la %r4,256(%r4) +1: aghi %r3,-256 + jnm 0b +2: ex %r3,0(%r1) + sacf 0 + slgr %r2,%r2 + br 14 +3: mvc 0(1,%r4),0(%r2) + la %r2,1(%r2) + la %r4,1(%r4) + aghi %r3,-1 + jnm 3b +4: lgr %r2,%r3 + sacf 0 br %r14 -2: lghi %r1,-4096 - lgr %r5,%r4 - slgr %r5,%r1 # %r5 = %r4 + 4096 - ngr %r5,%r1 # %r5 = (%r4 + 4096) & -4096 - slgr %r5,%r4 # %r5 = #bytes to next user page boundary - clgr %r7,%r5 # copy crosses next page boundary ? - jnh 1b # no, the current page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. -3: mvcle %r4,%r6,0 - jo 3b - j 1b .section __ex_table,"a" - .quad 0b,2b - .quad 3b,1b + .quad 0b,3b + .quad 2b,3b + .quad 3b,4b .previous .align 4 .text .globl __clear_user_asm + # %r2 = to, %r3 = n __clear_user_asm: + slgr %r0,%r0 + larl %r5,empty_zero_page +1: mvcs 0(%r3,%r2),0(%r5),%r0 + jnz 2f + slgr %r2,%r2 + br %r14 +2: la %r2,256(%r2) + aghi %r3,-256 +3: mvcs 0(%r3,%r2),0(%r5),%r0 + jnz 2b +4: slgr %r2,%r2 + br %r14 +5: lghi %r0,-4096 lgr %r4,%r2 - lgr %r5,%r3 - sgr %r2,%r2 - sgr %r3,%r3 - sacf 512 -0: mvcle %r4,%r2,0 - jo 0b -1: sacf 0 - br %r14 -2: lgr %r2,%r5 - lghi %r1,-4096 - slgr %r5,%r1 # %r5 = %r4 + 4096 - ngr %r5,%r1 # %r5 = (%r4 + 4096) & -4096 - slgr %r5,%r4 # %r5 = #bytes to next user page boundary - clgr %r2,%r5 # copy crosses next page boundary ? - jnh 1b # no, the current page fauled - # The page after the current user page might have faulted. - # We cant't find out which page because the program check handler - # might have callled schedule, destroying all lowcore information. - # We retry with the shortened length. - slgr %r2,%r5 -3: mvcle %r4,%r2,0 - jo 3b - j 1b -4: algr %r2,%r5 - j 1b + slgr %r4,%r0 + ngr %r4,%r0 # %r4 = (%r2 + 4096) & -4096 + slgr %r4,%r2 # %r4 = #bytes to next user page boundary + clgr %r3,%r4 # clear crosses next page boundary ? + jnh 7f # no, the current page faulted + # clear with the reduced length which is < 256 +6: mvcs 0(%r4,%r2),0(%r5),%r0 + slgr %r3,%r4 +7: lgr %r2,%r3 + br %r14 .section __ex_table,"a" - .quad 0b,2b - .quad 3b,4b + .quad 1b,5b + .quad 3b,5b + .quad 6b,7b .previous + + .align 4 + .text + .globl __strncpy_from_user_asm + # %r2 = dst, %r3 = src, %r4 = count +__strncpy_from_user_asm: + lghi %r0,0 + lghi %r1,1 + lghi %r5,0 +0: mvcp 0(%r1,%r2),0(%r3),%r0 + tm 0(%r2),0xff + jz 1f + la %r2,1(%r2) + la %r3,1(%r3) + aghi %r5,1 + clgr %r5,%r4 + jl 0b +1: lgr %r2,%r5 + br %r14 +2: lghi %r2,-EFAULT + br %r14 + .section __ex_table,"a" + .quad 0b,2b + .previous + + .align 4 + .text + .globl __strnlen_user_asm + # %r2 = src, %r3 = count +__strnlen_user_asm: + lghi %r0,0 + lghi %r1,1 + lghi %r5,0 +0: mvcp 24(%r1,%r15),0(%r2),%r0 + aghi %r5,1 + tm 24(%r15),0xff + jz 1f + la %r2,1(%r2) + clgr %r5,%r3 + jl 0b +1: lgr %r2,%r5 + br %r14 +2: lghi %r2,-EFAULT + br %r14 + .section __ex_table,"a" + .quad 0b,2b + .previous diff -Nru a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c --- a/arch/s390/mm/fault.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/mm/fault.c Sun Mar 28 13:12:08 2004 @@ -87,12 +87,12 @@ if (areg == 0) /* Access via access register 0 -> kernel address */ return 0; - if (regs && areg < NUM_ACRS && regs->acrs[areg] <= 1) + if (regs && areg < NUM_ACRS && current->thread.acrs[areg] <= 1) /* * access register contains 0 -> kernel address, * access register contains 1 -> user space address */ - return regs->acrs[areg]; + return current->thread.acrs[areg]; /* Something unhealthy was done with the access registers... */ die("page fault via unknown access register", regs, error_code); @@ -115,8 +115,10 @@ * 3: Home Segment Table Descriptor */ int descriptor = S390_lowcore.trans_exc_code & 3; - if (descriptor == 1) + if (descriptor == 1) { + save_access_regs(current->thread.acrs); return __check_access_register(regs, error_code); + } return descriptor >> 1; } diff -Nru a/arch/s390/mm/init.c b/arch/s390/mm/init.c --- a/arch/s390/mm/init.c Sun Mar 28 13:12:08 2004 +++ b/arch/s390/mm/init.c Sun Mar 28 13:12:08 2004 @@ -138,6 +138,8 @@ } } + S390_lowcore.kernel_asce = pgdir_k; + /* enable virtual mapping in kernel mode */ __asm__ __volatile__(" LCTL 1,1,%0\n" " LCTL 7,7,%0\n" @@ -222,6 +224,8 @@ } } } + + S390_lowcore.kernel_asce = pgdir_k; /* enable virtual mapping in kernel mode */ __asm__ __volatile__("lctlg 1,1,%0\n\t" diff -Nru a/arch/sh/Kconfig b/arch/sh/Kconfig --- a/arch/sh/Kconfig Sun Mar 28 13:12:08 2004 +++ b/arch/sh/Kconfig Sun Mar 28 13:12:08 2004 @@ -27,7 +27,6 @@ source "init/Kconfig" - menu "System type" choice @@ -244,6 +243,19 @@ turning this off will boot the kernel on these machines with the MMU implicitly switched off. +choice + prompt "HugeTLB page size" + depends on HUGETLB_PAGE && CPU_SH4 && MMU + default HUGETLB_PAGE_SIZE_64K + +config HUGETLB_PAGE_SIZE_64K + bool "64K" + +config HUGETLB_PAGE_SIZE_1MB + bool "1MB" + +endchoice + config CMDLINE_BOOL bool "Default bootloader kernel arguments" @@ -515,6 +527,8 @@ with an auto-probed frequency which should be considered the proper value for your hardware. +menu "CPU Frequency scaling" + config CPU_FREQ bool "CPU Frequency scaling" help @@ -525,6 +539,8 @@ If unsure, say N. +source "drivers/cpufreq/Kconfig" + config CPU_FREQ_TABLE tristate "CPU frequency table helpers" depends on CPU_FREQ @@ -546,12 +562,20 @@ If unsure, say N. -source "drivers/cpufreq/Kconfig" +endmenu source "arch/sh/drivers/dma/Kconfig" source "arch/sh/cchips/Kconfig" +config HEARTBEAT + bool "Heartbeat LED" + depends on SH_MPC1211 || SH_CAT68701 || SH_STB1_HARP || SH_STB1_OVERDRIVE || SH_BIGSUR || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE + help + Use the power-on LED on your machine as a load meter. The exact + behavior is platform-dependent, but normally the flash frequency is + a hyperbolic function of the 5-minute load average. + endmenu @@ -601,8 +625,9 @@ bool config MAPLE - bool - default y if SH_DREAMCAST + tristate "Maple Bus support" + depends on SH_DREAMCAST + default y source "arch/sh/drivers/pci/Kconfig" @@ -621,350 +646,9 @@ endmenu -source "drivers/base/Kconfig" - -source "drivers/mtd/Kconfig" - -source "drivers/parport/Kconfig" - -source "drivers/block/Kconfig" - -source "drivers/ide/Kconfig" - -source "drivers/scsi/Kconfig" - -source "drivers/cdrom/Kconfig" - -source "drivers/md/Kconfig" - -source "drivers/ieee1394/Kconfig" - -source "net/Kconfig" - -source "drivers/isdn/Kconfig" - -source "drivers/telephony/Kconfig" - -# -# input - input/joystick depends on it. As does USB. -# -source "drivers/input/Kconfig" - -menu "Character devices" - -config VT - bool "Virtual terminal" - ---help--- - If you say Y here, you will get support for terminal devices with - display and keyboard devices. These are called "virtual" because you - can run several virtual terminals (also called virtual consoles) on - one physical terminal. This is rather useful, for example one - virtual terminal can collect system messages and warnings, another - one can be used for a text-mode user session, and a third could run - an X session, all in parallel. Switching between virtual terminals - is done with certain key combinations, usually Alt-. - - The setterm command ("man setterm") can be used to change the - properties (such as colors or beeping) of a virtual terminal. The - man page console_codes(4) ("man console_codes") contains the special - character sequences that can be used to change those properties - directly. The fonts used on virtual terminals can be changed with - the setfont ("man setfont") command and the key bindings are defined - with the loadkeys ("man loadkeys") command. - - You need at least one virtual terminal device in order to make use - of your keyboard and monitor. Therefore, only people configuring an - embedded system would want to say N here in order to save some - memory; the only way to log into such a system is then via a serial - or network connection. - - If unsure, say Y, or else you won't be able to do much with your new - shiny Linux system :-) - -config VT_CONSOLE - bool "Support for console on virtual terminal" - depends on VT - ---help--- - The system console is the device which receives all kernel messages - and warnings and which allows logins in single user mode. If you - answer Y here, a virtual terminal (the device used to interact with - a physical terminal) can be used as system console. This is the most - common mode of operations, so you should say Y here unless you want - the kernel messages be output only to a serial port (in which case - you should say Y to "Console on serial port", below). - - If you do say Y here, by default the currently visible virtual - terminal (/dev/tty0) will be used as system console. You can change - that with a kernel command line option such as "console=tty3" which - would use the third virtual terminal as system console. (Try "man - bootparam" or see the documentation of your boot loader (lilo or - loadlin) about how to pass options to the kernel at boot time.) - - If unsure, say Y. - -config HW_CONSOLE - bool - depends on VT && !S390 && !UM - default y - -config SERIAL - tristate "Serial (8250, 16450, 16550 or compatible) support" - ---help--- - This selects whether you want to include the driver for the standard - serial ports. The standard answer is Y. People who might say N - here are those that are setting up dedicated Ethernet WWW/FTP - servers, or users that have one of the various bus mice instead of a - serial mouse and don't intend to use their machine's standard serial - port for anything. (Note that the Cyclades and Stallion multi - serial port drivers do not need this driver built in for them to - work.) - - To compile this driver as a module, choose M here: the - module will be called serial. - [WARNING: Do not compile this driver as a module if you are using - non-standard serial ports, since the configuration information will - be lost when the driver is unloaded. This limitation may be lifted - in the future.] - - BTW1: If you have a mouseman serial mouse which is not recognized by - the X window system, try running gpm first. - - BTW2: If you intend to use a software modem (also called Winmodem) - under Linux, forget it. These modems are crippled and require - proprietary drivers which are only available under Windows. - - Most people will say Y or M here, so that they can use serial mice, - modems and similar devices connecting to the standard serial ports. - -config SH_SCI - tristate "Serial (SCI, SCIF) support" - help - Selecting this option will allow the Linux kernel to transfer data - over SCI (Serial Communication Interface) and/or SCIF (Serial - Communication Interface with FIFO) which are built into the Hitachi - SuperH processor. The option provides 1 to 3 (depending - on the CPU model) standard Linux tty devices, /dev/ttySC[012]; one - of these is normally used as the system console. - - If in doubt, press "y". - -config SERIAL_CONSOLE - bool "Support for console on serial port" - depends on SERIAL=y || SH_SCI=y - ---help--- - If you say Y here, it will be possible to use a serial port as the - system console (the system console is the device which receives all - kernel messages and warnings and which allows logins in single user - mode). This could be useful if some terminal or printer is connected - to that serial port. - - Even if you say Y here, the currently visible virtual console - (/dev/tty0) will still be used as the system console by default, but - you can alter that using a kernel command line option such as - "console=ttyS1". (Try "man bootparam" or see the documentation of - your boot loader (lilo or loadlin) about how to pass options to the - kernel at boot time.) - - If you don't have a VGA card installed and you say Y here, the - kernel will automatically use the first serial line, /dev/ttyS0, as - system console. - - If unsure, say N. - -comment "Unix98 PTY support" - -config UNIX98_PTYS - bool "Unix98 PTY support" - ---help--- - A pseudo terminal (PTY) is a software device consisting of two - halves: a master and a slave. The slave device behaves identical to - a physical terminal; the master device is used by a process to - read data from and write data to the slave, thereby emulating a - terminal. Typical programs for the master side are telnet servers - and xterms. - - Linux has traditionally used the BSD-like names /dev/ptyxx for - masters and /dev/ttyxx for slaves of pseudo terminals. This scheme - has a number of problems. The GNU C library glibc 2.1 and later, - however, supports the Unix98 naming standard: in order to acquire a - pseudo terminal, a process opens /dev/ptmx; the number of the pseudo - terminal is then made available to the process and the pseudo - terminal slave can be accessed as /dev/pts/. What was - traditionally /dev/ttyp2 will then be /dev/pts/2, for example. - - The entries in /dev/pts/ are created on the fly by a virtual - file system; therefore, if you say Y here you should say Y to - "/dev/pts file system for Unix98 PTYs" as well. - - If you want to say Y here, you need to have the C library glibc 2.1 - or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*"). - Read the instructions in pertaining to - pseudo terminals. It's safe to say N. - -config UNIX98_PTY_COUNT - int "Maximum number of Unix98 PTYs in use (0-2048)" - depends on UNIX98_PTYS - default "256" - help - The maximum number of Unix98 PTYs that can be used at any one time. - The default is 256, and should be enough for desktop systems. Server - machines which support incoming telnet/rlogin/ssh connections and/or - serve several X terminals may want to increase this: every incoming - connection and every xterm uses up one PTY. - - When not in use, each additional set of 256 PTYs occupy - approximately 8 KB of kernel memory on 32-bit architectures. - -config HEARTBEAT - bool "Heartbeat LED" - depends on SH_MPC1211 || SH_CAT68701 || SH_STB1_HARP || SH_STB1_OVERDRIVE || SH_BIGSUR || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE - help - Use the power-on LED on your machine as a load meter. The exact - behavior is platform-dependent, but normally the flash frequency is - a hyperbolic function of the 5-minute load average. - - -menu "Maple Bus input peripherals" - depends on SH_DREAMCAST && MAPLE - -config MAPLE_KEYBOARD - tristate "Maple Bus keyboard support" - depends on INPUT - -config MAPLE_MOUSE - tristate "Maple Bus mouse support" - depends on INPUT - -comment "Input core support is required for Maple input peripherals" - depends on INPUT=n - -endmenu - -config PRINTER - tristate "Parallel printer support" - depends on PARPORT - ---help--- - If you intend to attach a printer to the parallel port of your Linux - box (as opposed to using a serial printer; if the connector at the - printer has 9 or 25 holes ["female"], then it's serial), say Y. - Also read the Printing-HOWTO, available from - . - - It is possible to share one parallel port among several devices - (e.g. printer and ZIP drive) and it is safe to compile the - corresponding drivers into the kernel. - To compile this driver as a module, choose M here and read - . The module will be called lp. - - If you have several parallel ports, you can specify which ports to - use with the "lp" kernel command line option. (Try "man bootparam" - or see the documentation of your boot loader (lilo or loadlin) about - how to pass options to the kernel at boot time.) The syntax of the - "lp" command line option can be found in . - - If you have more than 8 printers, you need to increase the LP_NO - macro in lp.c and the PARPORT_MAX macro in parport.h. - -config LP_CONSOLE - bool "Support for console on line printer" - depends on PRINTER - ---help--- - If you want kernel messages to be printed out as they occur, you - can have a console on the printer. This option adds support for - doing that; to actually get it to happen you need to pass the - option "console=lp0" to the kernel at boot time. - - If the printer is out of paper (or off, or unplugged, or too - busy..) the kernel will stall until the printer is ready again. - By defining CONSOLE_LP_STRICT to 0 (at your own risk) you - can make the kernel continue when this happens, - but it'll lose the kernel messages. - - If unsure, say N. - -config PPDEV - tristate "Support for user-space parallel port device drivers" - depends on PARPORT - ---help--- - Saying Y to this adds support for /dev/parport device nodes. This - is needed for programs that want portable access to the parallel - port, for instance deviceid (which displays Plug-and-Play device - IDs). - - This is the parallel port equivalent of SCSI generic support (sg). - It is safe to say N to this -- it is not needed for normal printing - or parallel port CD-ROM/disk support. - - To compile this support as a module, choose M here: the - module will be called ppdev. - - If unsure, say N. - -config PSMOUSE - bool "PS/2 mouse (aka \"auxiliary device\") support" - ---help--- - The PS/2 mouse connects to a special mouse port that looks much like - the keyboard port (small circular connector with 6 pins). This way, - the mouse does not use any serial ports. This port can also be used - for other input devices like light pens, tablets, keypads. Compaq, - AST and IBM all use this as their mouse port on currently shipping - machines. The trackballs of some laptops are PS/2 mice also. In - particular, the C&T 82C710 mouse on TI Travelmates is a PS/2 mouse. - - Although PS/2 mice are not technically bus mice, they are explained - in detail in the Busmouse-HOWTO, available from - . - - When using a PS/2 mouse, you can get problems if you want to use the - mouse both on the Linux console and under X. Using the "-R" option - of the Linux mouse managing program gpm (available from - ) solves this problem, or you can get - the "mconv2" utility from . - -source "drivers/char/watchdog/Kconfig" - -config RTC - tristate "Enhanced Real Time Clock Support" - ---help--- - If you say Y here and create a character special file /dev/rtc with - major number 10 and minor number 135 using mknod ("man mknod"), you - will get access to the real time clock (or hardware clock) built - into your computer. - - Every PC has such a clock built in. It can be used to generate - signals from as low as 1Hz up to 8192Hz, and can also be used - as a 24 hour alarm. It reports status information via the file - /proc/driver/rtc and its behaviour is set by various ioctls on - /dev/rtc. - - If you run Linux on a multiprocessor machine and said Y to - "Symmetric Multi Processing" above, you should say Y here to read - and set the RTC in an SMP compatible fashion. - - If you think you have a use for such a device (such as periodic data - sampling), then say Y here, and read - for details. - - To compile this driver as a module, choose M here: the - module will be called rtc. - -source "drivers/char/pcmcia/Kconfig" - -source "drivers/serial/Kconfig" - -source "drivers/i2c/Kconfig" - -endmenu +source "drivers/Kconfig" source "fs/Kconfig" - -source "drivers/media/Kconfig" - -source "drivers/video/Kconfig" - -source "sound/Kconfig" - -source "drivers/usb/Kconfig" source "arch/sh/oprofile/Kconfig" diff -Nru a/arch/sh/Makefile b/arch/sh/Makefile --- a/arch/sh/Makefile Sun Mar 28 13:12:08 2004 +++ b/arch/sh/Makefile Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.32 2003/10/26 23:33:49 lethal Exp $ +# $Id: Makefile,v 1.34 2004/03/21 17:31:06 lethal Exp $ # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive @@ -35,7 +35,6 @@ cflags-$(CONFIG_SH_DSP) += -Wa,-dsp cflags-$(CONFIG_SH_KGDB) += -g -cflags-$(CONFIG_EMBEDDED) += -Os cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') @@ -134,19 +133,7 @@ archclean: $(Q)$(MAKE) $(clean)=$(boot) -defconfig-%: - @echo ' Copying arch/sh/configs/$@ -> .config' - @if [ -e .config ]; then mv -f .config .config.old; fi - @cp -f arch/sh/configs/$@ .config - @chmod 644 .config - define archhelp - @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' - for board in arch/sh/configs/*; \ - do \ - echo -n ' ' $$board | sed -e 's|arch/sh/configs/||g' ; \ - echo -n ' - Build for ' ; \ - echo -e $$board | sed -e 's|.*-||g'; \ - done + @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' endef diff -Nru a/arch/sh/boards/hp6xx/hp680/mach.c b/arch/sh/boards/hp6xx/hp680/mach.c --- a/arch/sh/boards/hp6xx/hp680/mach.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/boards/hp6xx/hp680/mach.c Sun Mar 28 13:12:08 2004 @@ -21,29 +21,33 @@ #include struct sh_machine_vector mv_hp680 __initmv = { - .mv_nr_irqs = HD64461_IRQBASE+HD64461_IRQ_NUM, + .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, - .mv_inb = hd64461_inb, - .mv_inw = hd64461_inw, - .mv_inl = hd64461_inl, - .mv_outb = hd64461_outb, - .mv_outw = hd64461_outw, - .mv_outl = hd64461_outl, - - .mv_inb_p = hd64461_inb_p, - .mv_inw_p = hd64461_inw, - .mv_inl_p = hd64461_inl, - .mv_outb_p = hd64461_outb_p, - .mv_outw_p = hd64461_outw, - .mv_outl_p = hd64461_outl, - - .mv_insb = hd64461_insb, - .mv_insw = hd64461_insw, - .mv_insl = hd64461_insl, - .mv_outsb = hd64461_outsb, - .mv_outsw = hd64461_outsw, - .mv_outsl = hd64461_outsl, + .mv_inb = hd64461_inb, + .mv_inw = hd64461_inw, + .mv_inl = hd64461_inl, + .mv_outb = hd64461_outb, + .mv_outw = hd64461_outw, + .mv_outl = hd64461_outl, - .mv_irq_demux = hd64461_irq_demux, + .mv_inb_p = hd64461_inb_p, + .mv_inw_p = hd64461_inw, + .mv_inl_p = hd64461_inl, + .mv_outb_p = hd64461_outb_p, + .mv_outw_p = hd64461_outw, + .mv_outl_p = hd64461_outl, + + .mv_insb = hd64461_insb, + .mv_insw = hd64461_insw, + .mv_insl = hd64461_insl, + .mv_outsb = hd64461_outsb, + .mv_outsw = hd64461_outsw, + .mv_outsl = hd64461_outsl, + + .mv_readw = hd64461_readw, + .mv_writew = hd64461_writew, + + .mv_irq_demux = hd64461_irq_demux, }; + ALIAS_MV(hp680) diff -Nru a/arch/sh/boards/hp6xx/hp680/setup.c b/arch/sh/boards/hp6xx/hp680/setup.c --- a/arch/sh/boards/hp6xx/hp680/setup.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/boards/hp6xx/hp680/setup.c Sun Mar 28 13:12:08 2004 @@ -12,6 +12,9 @@ #include #include #include +#include +#include +#include const char *get_system_type(void) { @@ -20,8 +23,19 @@ int __init platform_setup(void) { - __set_io_port_base(CONFIG_HD64461_IOBASE - HD64461_STBCR); + u16 v; + v = inw(HD64461_STBCR); + v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST | + HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST | + HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST | + HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST | + HD64461_STBCR_SAFECKE_IST; + outw(v, HD64461_STBCR); + v = inw(HD64461_GPADR); + v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0; + outw(v, HD64461_GPADR); + + sh_dac_disable(DAC_SPEAKER_VOLUME); return 0; } - diff -Nru a/arch/sh/boards/se/770x/io.c b/arch/sh/boards/se/770x/io.c --- a/arch/sh/boards/se/770x/io.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/boards/se/770x/io.c Sun Mar 28 13:12:07 2004 @@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.4 2003/08/03 03:05:10 lethal Exp $ +/* $Id: io.c,v 1.5 2004/02/22 23:08:43 kkojima Exp $ * * linux/arch/sh/kernel/io_se.c * @@ -134,25 +134,27 @@ void se_insb(unsigned long port, void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); + __u8 *ap = addr; if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) { volatile __u8 *bp = (__u8 *) (sh_pcic_io_wbase + 0x40000 + port); while (count--) - *((__u8 *) addr)++ = *bp; + *ap++ = *bp; } else if (shifted_port(port)) { while (count--) - *((__u8 *) addr)++ = *p >> 8; + *ap++ = *p >> 8; } else { while (count--) - *((__u8 *) addr)++ = *p; + *ap++ = *p; } } void se_insw(unsigned long port, void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); + __u16 *ap = addr; while (count--) - *((__u16 *) addr)++ = *p; + *ap++ = *p; } void se_insl(unsigned long port, void *addr, unsigned long count) @@ -163,25 +165,27 @@ void se_outsb(unsigned long port, const void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); + const __u8 *ap = addr; if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) { volatile __u8 *bp = (__u8 *) (sh_pcic_io_wbase + port); while (count--) - *bp = *((__u8 *) addr)++; + *bp = *ap++; } else if (shifted_port(port)) { while (count--) - *p = *((__u8 *) addr)++ << 8; + *p = *ap++ << 8; } else { while (count--) - *p = *((__u8 *) addr)++; + *p = *ap++; } } void se_outsw(unsigned long port, const void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); + const __u16 *ap = addr; while (count--) - *p = *((__u16 *) addr)++; + *p = *ap++; } void se_outsl(unsigned long port, const void *addr, unsigned long count) diff -Nru a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c --- a/arch/sh/boards/se/770x/irq.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/boards/se/770x/irq.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: irq.c,v 1.1.2.2 2002/10/29 00:56:09 lethal Exp $ +/* $Id: irq.c,v 1.4 2004/02/22 22:44:36 kkojima Exp $ * * linux/arch/sh/boards/se/770x/irq.c * @@ -12,7 +12,7 @@ #include #include #include -#include +#include /* * Initialize IRQ setting diff -Nru a/arch/sh/cchips/Kconfig b/arch/sh/cchips/Kconfig --- a/arch/sh/cchips/Kconfig Sun Mar 28 13:12:08 2004 +++ b/arch/sh/cchips/Kconfig Sun Mar 28 13:12:08 2004 @@ -1,7 +1,13 @@ +menu "Companion Chips" + # A board must have defined HD6446X_SERIES in order to see these +config HD6446X_SERIES + bool "HD6446x support" + default n + choice prompt "HD6446x options" - depends HD6446X_SERIES + depends on HD6446X_SERIES default HD64461 config HD64461 @@ -73,4 +79,5 @@ Do not change this unless you know what you are doing. +endmenu diff -Nru a/arch/sh/cchips/hd6446x/hd64461/io.c b/arch/sh/cchips/hd6446x/hd64461/io.c --- a/arch/sh/cchips/hd6446x/hd64461/io.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/cchips/hd6446x/hd64461/io.c Sun Mar 28 13:12:08 2004 @@ -1,5 +1,5 @@ /* - * $Id: io.c,v 1.5 2004/02/01 19:46:04 lethal Exp $ + * $Id: io.c,v 1.6 2004/03/16 00:07:50 lethal Exp $ * Copyright (C) 2000 YAEGASHI Takeshi * Typical I/O routines for HD64461 system. */ @@ -8,6 +8,8 @@ #include #include +#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR) + static __inline__ unsigned long PORT2ADDR(unsigned long port) { /* 16550A: HD64461 internal */ @@ -36,7 +38,9 @@ #endif /* ??? */ - if (port < 0x10000) return 0xa0000000 + port; + if (port < 0xf000) return 0xa0000000 + port; + /* PCMCIA channel 0, I/O (0xba000000) */ + if (port < 0x10000) return 0xba000000 + port - 0xf000; /* HD64461 internal devices (0xb0000000) */ if (port < 0x20000) return CONFIG_HD64461_IOBASE + port - 0x10000; @@ -140,3 +144,14 @@ const unsigned long *buf=buffer; while(count--) *addr=*buf++; } + +unsigned short hd64461_readw(unsigned long addr) +{ + return *(volatile unsigned short*)(MEM_BASE+addr); +} + +void hd64461_writew(unsigned short b, unsigned long addr) +{ + *(volatile unsigned short*)(MEM_BASE+addr) = b; +} + diff -Nru a/arch/sh/cchips/hd6446x/hd64461/setup.c b/arch/sh/cchips/hd6446x/hd64461/setup.c --- a/arch/sh/cchips/hd6446x/hd64461/setup.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/cchips/hd6446x/hd64461/setup.c Sun Mar 28 13:12:08 2004 @@ -1,11 +1,12 @@ /* - * $Id: setup.c,v 1.4 2003/08/03 03:05:10 lethal Exp $ + * $Id: setup.c,v 1.5 2004/03/16 00:07:50 lethal Exp $ * Copyright (C) 2000 YAEGASHI Takeshi * Hitachi HD64461 companion chip support */ #include #include +#include #include #include #include @@ -30,7 +31,6 @@ local_irq_restore(flags); } - static void enable_hd64461_irq(unsigned int irq) { unsigned long flags; @@ -44,7 +44,6 @@ local_irq_restore(flags); } - static void mask_and_ack_hd64461(unsigned int irq) { disable_hd64461_irq(irq); @@ -54,27 +53,23 @@ #endif } - static void end_hd64461_irq(unsigned int irq) { if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) enable_hd64461_irq(irq); } - static unsigned int startup_hd64461_irq(unsigned int irq) -{ +{ enable_hd64461_irq(irq); return 0; } - static void shutdown_hd64461_irq(unsigned int irq) { disable_hd64461_irq(irq); } - static struct hw_interrupt_type hd64461_irq_type = { .typename = "HD64461-IRQ", .startup = startup_hd64461_irq, @@ -85,7 +80,6 @@ .end = end_hd64461_irq, }; - static irqreturn_t hd64461_interrupt(int irq, void *dev_id, struct pt_regs *regs) { printk(KERN_INFO @@ -95,23 +89,52 @@ return IRQ_NONE; } +static struct { + int (*func) (int, void *); + void *dev; +} hd64461_demux[HD64461_IRQ_NUM]; + +void hd64461_register_irq_demux(int irq, + int (*demux) (int irq, void *dev), void *dev) +{ + hd64461_demux[irq - HD64461_IRQBASE].func = demux; + hd64461_demux[irq - HD64461_IRQBASE].dev = dev; +} + +EXPORT_SYMBOL(hd64461_register_irq_demux); + +void hd64461_unregister_irq_demux(int irq) +{ + hd64461_demux[irq - HD64461_IRQBASE].func = 0; +} + +EXPORT_SYMBOL(hd64461_unregister_irq_demux); + int hd64461_irq_demux(int irq) { if (irq == CONFIG_HD64461_IRQ) { unsigned short bit; unsigned short nirr = inw(HD64461_NIRR); unsigned short nimr = inw(HD64461_NIMR); + int i; + nirr &= ~nimr; - for (bit = 1, irq = 0; irq < 16; bit <<= 1, irq++) - if (nirr & bit) break; - if (irq == 16) irq = CONFIG_HD64461_IRQ; - else irq += HD64461_IRQBASE; + for (bit = 1, i = 0; i < 16; bit <<= 1, i++) + if (nirr & bit) + break; + if (i == 16) + irq = CONFIG_HD64461_IRQ; + else { + irq = HD64461_IRQBASE + i; + if (hd64461_demux[i].func != 0) { + irq = hd64461_demux[i].func(irq, hd64461_demux[i].dev); + } + } } return __irq_demux(irq); } -static struct irqaction irq0 = { hd64461_interrupt, SA_INTERRUPT, 0, "HD64461", NULL, NULL}; - +static struct irqaction irq0 = { hd64461_interrupt, SA_INTERRUPT, 0, "HD64461", NULL, NULL }; int __init setup_hd64461(void) { @@ -120,11 +143,12 @@ if (!MACH_HD64461) return 0; - printk(KERN_INFO "HD64461 configured at 0x%x on irq %d(mapped into %d to %d)\n", - CONFIG_HD64461_IOBASE, CONFIG_HD64461_IRQ, - HD64461_IRQBASE, HD64461_IRQBASE+15); + printk(KERN_INFO + "HD64461 configured at 0x%x on irq %d(mapped into %d to %d)\n", + CONFIG_HD64461_IOBASE, CONFIG_HD64461_IRQ, HD64461_IRQBASE, + HD64461_IRQBASE + 15); -#if defined(CONFIG_CPU_SUBTYPE_SH7709) /* Should be at processor specific part.. */ +#if defined(CONFIG_CPU_SUBTYPE_SH7709) /* Should be at processor specific part.. */ outw(0x2240, INTC_ICR1); #endif outw(0xffff, HD64461_NIMR); diff -Nru a/arch/sh/configs/adx_defconfig b/arch/sh/configs/adx_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/configs/adx_defconfig Sun Mar 28 13:12:07 2004 @@ -0,0 +1,276 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_SUPERH=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Processor type and features +# +# CONFIG_SH_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SOLUTION_ENGINE is not set +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP620 is not set +# CONFIG_SH_HP680 is not set +# CONFIG_SH_HP690 is not set +# CONFIG_SH_CQREEK is not set +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_DREAMCAST is not set +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +CONFIG_SH_ADX=y +# CONFIG_SH_UNKNOWN is not set +CONFIG_SH_RTC=y +# CONFIG_CPU_SUBTYPE_SH7707 is not set +# CONFIG_CPU_SUBTYPE_SH7708 is not set +# CONFIG_CPU_SUBTYPE_SH7709 is not set +CONFIG_CPU_SUBTYPE_SH7750=y +# CONFIG_CPU_SUBTYPE_SH7751 is not set +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +# CONFIG_CPU_SH3 is not set +CONFIG_CPU_SH4=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_MEMORY_START=0x08000000 +CONFIG_MEMORY_SIZE=0x00400000 +CONFIG_MEMORY_SET=y +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +CONFIG_ISA=y +# CONFIG_EISA is not set +# CONFIG_MCA is not set +# CONFIG_SBUS is not set +# CONFIG_NET is not set +CONFIG_CF_ENABLER=y +# CONFIG_CF_AREA5 is not set +CONFIG_CF_AREA6=y +CONFIG_CF_BASE_ADDR=0xb8000000 +# CONFIG_HD64461 is not set +# CONFIG_HD64465 is not set +# CONFIG_SH_DMA is not set +# CONFIG_PCI is not set +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set +# CONFIG_SYSVIPC is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_SYSCTL is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# ATA/IDE/MFM/RLL support +# +CONFIG_IDE=y + +# +# IDE, ATA and ATAPI Block devices +# +CONFIG_BLK_DEV_IDE=y +# CONFIG_BLK_DEV_HD_IDE is not set +# CONFIG_BLK_DEV_HD is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set +# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set +# CONFIG_BLK_DEV_IDEDISK_IBM is not set +# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set +# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set +# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set +# CONFIG_BLK_DEV_IDEDISK_WD is not set +# CONFIG_BLK_DEV_COMMERIAL is not set +# CONFIG_BLK_DEV_TIVO is not set +# CONFIG_BLK_DEV_IDECS is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_BLK_DEV_CMD640 is not set +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set +# CONFIG_BLK_DEV_ISAPNP is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_DMA_NONPCI is not set +# CONFIG_BLK_DEV_ATARAID is not set +# CONFIG_BLK_DEV_ATARAID_PDC is not set +# CONFIG_BLK_DEV_ATARAID_HPT is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Input core support +# +# CONFIG_INPUT is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL is not set +CONFIG_SH_SCI=y +CONFIG_SERIAL_CONSOLE=y +# CONFIG_UNIX98_PTYS is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_PSMOUSE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_SMB_FS is not set +# CONFIG_ZISOFS_FS is not set +# CONFIG_ZLIB_FS_INFLATE is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_SH_STANDARD_BIOS=y +CONFIG_SH_EARLY_PRINTK=y + +# +# Library routines +# +# CONFIG_CRC32 is not set diff -Nru a/arch/sh/configs/cqreek_defconfig b/arch/sh/configs/cqreek_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/configs/cqreek_defconfig Sun Mar 28 13:12:08 2004 @@ -0,0 +1,274 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_SUPERH=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Processor type and features +# +# CONFIG_SH_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SOLUTION_ENGINE is not set +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP620 is not set +# CONFIG_SH_HP680 is not set +# CONFIG_SH_HP690 is not set +CONFIG_SH_CQREEK=y +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_DREAMCAST is not set +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +# CONFIG_SH_ADX is not set +# CONFIG_SH_UNKNOWN is not set +CONFIG_SH_RTC=y +# CONFIG_CPU_SUBTYPE_SH7707 is not set +CONFIG_CPU_SUBTYPE_SH7708=y +# CONFIG_CPU_SUBTYPE_SH7709 is not set +# CONFIG_CPU_SUBTYPE_SH7750 is not set +# CONFIG_CPU_SUBTYPE_SH7751 is not set +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +CONFIG_CPU_SH3=y +# CONFIG_CPU_SH4 is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_MEMORY_START=0x0c000000 +CONFIG_MEMORY_SIZE=0x00400000 +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +CONFIG_ISA=y +# CONFIG_EISA is not set +# CONFIG_MCA is not set +# CONFIG_SBUS is not set +# CONFIG_NET is not set +# CONFIG_CF_AREA5 is not set +CONFIG_CF_AREA6=y +CONFIG_CF_BASE_ADDR=0xb8000000 +# CONFIG_HD64461 is not set +# CONFIG_HD64465 is not set +# CONFIG_SH_DMA is not set +# CONFIG_PCI is not set +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set +# CONFIG_SYSVIPC is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_SYSCTL is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# ATA/IDE/MFM/RLL support +# +CONFIG_IDE=y + +# +# IDE, ATA and ATAPI Block devices +# +CONFIG_BLK_DEV_IDE=y +# CONFIG_BLK_DEV_HD_IDE is not set +# CONFIG_BLK_DEV_HD is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set +# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set +# CONFIG_BLK_DEV_IDEDISK_IBM is not set +# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set +# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set +# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set +# CONFIG_BLK_DEV_IDEDISK_WD is not set +# CONFIG_BLK_DEV_COMMERIAL is not set +# CONFIG_BLK_DEV_TIVO is not set +# CONFIG_BLK_DEV_IDECS is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_BLK_DEV_CMD640 is not set +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set +# CONFIG_BLK_DEV_ISAPNP is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_DMA_NONPCI is not set +# CONFIG_BLK_DEV_ATARAID is not set +# CONFIG_BLK_DEV_ATARAID_PDC is not set +# CONFIG_BLK_DEV_ATARAID_HPT is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Input core support +# +# CONFIG_INPUT is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL is not set +CONFIG_SH_SCI=y +CONFIG_SERIAL_CONSOLE=y +# CONFIG_UNIX98_PTYS is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_PSMOUSE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_SMB_FS is not set +# CONFIG_ZISOFS_FS is not set +# CONFIG_ZLIB_FS_INFLATE is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_SH_STANDARD_BIOS=y +CONFIG_SH_EARLY_PRINTK=y + +# +# Library routines +# +# CONFIG_CRC32 is not set diff -Nru a/arch/sh/configs/defconfig-adx b/arch/sh/configs/defconfig-adx --- a/arch/sh/configs/defconfig-adx Sun Mar 28 13:12:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,276 +0,0 @@ -# -# Automatically generated by make menuconfig: don't edit -# -CONFIG_SUPERH=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# Processor type and features -# -# CONFIG_SH_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SOLUTION_ENGINE is not set -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP620 is not set -# CONFIG_SH_HP680 is not set -# CONFIG_SH_HP690 is not set -# CONFIG_SH_CQREEK is not set -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_DREAMCAST is not set -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -CONFIG_SH_ADX=y -# CONFIG_SH_UNKNOWN is not set -CONFIG_SH_RTC=y -# CONFIG_CPU_SUBTYPE_SH7707 is not set -# CONFIG_CPU_SUBTYPE_SH7708 is not set -# CONFIG_CPU_SUBTYPE_SH7709 is not set -CONFIG_CPU_SUBTYPE_SH7750=y -# CONFIG_CPU_SUBTYPE_SH7751 is not set -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -# CONFIG_CPU_SH3 is not set -CONFIG_CPU_SH4=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_MEMORY_START=0x08000000 -CONFIG_MEMORY_SIZE=0x00400000 -CONFIG_MEMORY_SET=y -# CONFIG_DISCONTIGMEM is not set - -# -# General setup -# -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SBUS is not set -# CONFIG_NET is not set -CONFIG_CF_ENABLER=y -# CONFIG_CF_AREA5 is not set -CONFIG_CF_AREA6=y -CONFIG_CF_BASE_ADDR=0xb8000000 -# CONFIG_HD64461 is not set -# CONFIG_HD64465 is not set -# CONFIG_SH_DMA is not set -# CONFIG_PCI is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set - -# -# ATA/IDE/MFM/RLL support -# -CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# -CONFIG_BLK_DEV_IDE=y -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set -# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set -# CONFIG_BLK_DEV_IDEDISK_IBM is not set -# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set -# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set -# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set -# CONFIG_BLK_DEV_IDEDISK_WD is not set -# CONFIG_BLK_DEV_COMMERIAL is not set -# CONFIG_BLK_DEV_TIVO is not set -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set -# CONFIG_BLK_DEV_ATARAID is not set -# CONFIG_BLK_DEV_ATARAID_PDC is not set -# CONFIG_BLK_DEV_ATARAID_HPT is not set - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Input core support -# -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL is not set -CONFIG_SH_SCI=y -CONFIG_SERIAL_CONSOLE=y -# CONFIG_UNIX98_PTYS is not set - -# -# Joysticks -# -# CONFIG_INPUT_GAMEPORT is not set -# CONFIG_PSMOUSE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set - -# -# File systems -# -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_SMB_FS is not set -# CONFIG_ZISOFS_FS is not set -# CONFIG_ZLIB_FS_INFLATE is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_SMB_NLS is not set -# CONFIG_NLS is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -CONFIG_SH_STANDARD_BIOS=y -CONFIG_SH_EARLY_PRINTK=y - -# -# Library routines -# -# CONFIG_CRC32 is not set diff -Nru a/arch/sh/configs/defconfig-cqreek b/arch/sh/configs/defconfig-cqreek --- a/arch/sh/configs/defconfig-cqreek Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,274 +0,0 @@ -# -# Automatically generated by make menuconfig: don't edit -# -CONFIG_SUPERH=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# Processor type and features -# -# CONFIG_SH_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SOLUTION_ENGINE is not set -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP620 is not set -# CONFIG_SH_HP680 is not set -# CONFIG_SH_HP690 is not set -CONFIG_SH_CQREEK=y -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_DREAMCAST is not set -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -# CONFIG_SH_ADX is not set -# CONFIG_SH_UNKNOWN is not set -CONFIG_SH_RTC=y -# CONFIG_CPU_SUBTYPE_SH7707 is not set -CONFIG_CPU_SUBTYPE_SH7708=y -# CONFIG_CPU_SUBTYPE_SH7709 is not set -# CONFIG_CPU_SUBTYPE_SH7750 is not set -# CONFIG_CPU_SUBTYPE_SH7751 is not set -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -CONFIG_CPU_SH3=y -# CONFIG_CPU_SH4 is not set -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_MEMORY_START=0x0c000000 -CONFIG_MEMORY_SIZE=0x00400000 -# CONFIG_DISCONTIGMEM is not set - -# -# General setup -# -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -# CONFIG_SBUS is not set -# CONFIG_NET is not set -# CONFIG_CF_AREA5 is not set -CONFIG_CF_AREA6=y -CONFIG_CF_BASE_ADDR=0xb8000000 -# CONFIG_HD64461 is not set -# CONFIG_HD64465 is not set -# CONFIG_SH_DMA is not set -# CONFIG_PCI is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set - -# -# ATA/IDE/MFM/RLL support -# -CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# -CONFIG_BLK_DEV_IDE=y -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set -# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set -# CONFIG_BLK_DEV_IDEDISK_IBM is not set -# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set -# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set -# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set -# CONFIG_BLK_DEV_IDEDISK_WD is not set -# CONFIG_BLK_DEV_COMMERIAL is not set -# CONFIG_BLK_DEV_TIVO is not set -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set -# CONFIG_BLK_DEV_ATARAID is not set -# CONFIG_BLK_DEV_ATARAID_PDC is not set -# CONFIG_BLK_DEV_ATARAID_HPT is not set - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Input core support -# -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL is not set -CONFIG_SH_SCI=y -CONFIG_SERIAL_CONSOLE=y -# CONFIG_UNIX98_PTYS is not set - -# -# Joysticks -# -# CONFIG_INPUT_GAMEPORT is not set -# CONFIG_PSMOUSE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set - -# -# File systems -# -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_SMB_FS is not set -# CONFIG_ZISOFS_FS is not set -# CONFIG_ZLIB_FS_INFLATE is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_SMB_NLS is not set -# CONFIG_NLS is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -CONFIG_SH_STANDARD_BIOS=y -CONFIG_SH_EARLY_PRINTK=y - -# -# Library routines -# -# CONFIG_CRC32 is not set diff -Nru a/arch/sh/configs/defconfig-dreamcast b/arch/sh/configs/defconfig-dreamcast --- a/arch/sh/configs/defconfig-dreamcast Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,584 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_SUPERH=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -# CONFIG_CLEAN_COMPILE is not set -# CONFIG_STANDALONE is not set -CONFIG_BROKEN=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_IKCONFIG is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set - -# -# System type -# -# CONFIG_SH_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SOLUTION_ENGINE is not set -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP620 is not set -# CONFIG_SH_HP680 is not set -# CONFIG_SH_HP690 is not set -# CONFIG_SH_CQREEK is not set -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_SATURN is not set -CONFIG_SH_DREAMCAST=y -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -# CONFIG_SH_ADX is not set -# CONFIG_SH_MPC1211 is not set -# CONFIG_SH_SECUREEDGE5410 is not set -# CONFIG_SH_UNKNOWN is not set -# CONFIG_CPU_SH2 is not set -# CONFIG_CPU_SH3 is not set -CONFIG_CPU_SH4=y -# CONFIG_CPU_SUBTYPE_SH7604 is not set -# CONFIG_CPU_SUBTYPE_SH7300 is not set -# CONFIG_CPU_SUBTYPE_SH7707 is not set -# CONFIG_CPU_SUBTYPE_SH7708 is not set -# CONFIG_CPU_SUBTYPE_SH7709 is not set -CONFIG_CPU_SUBTYPE_SH7750=y -# CONFIG_CPU_SUBTYPE_SH7751 is not set -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -CONFIG_MMU=y -# CONFIG_CMDLINE_BOOL is not set -CONFIG_MEMORY_START=0x0c000000 -CONFIG_MEMORY_SIZE=0x01000000 -CONFIG_MEMORY_SET=y -# CONFIG_MEMORY_OVERRIDE is not set -CONFIG_ZERO_PAGE_OFFSET=0x00001000 -CONFIG_BOOT_LINK_OFFSET=0x00800000 -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_PREEMPT=y -# CONFIG_UBC_WAKEUP is not set -# CONFIG_SH_WRITETHROUGH is not set -# CONFIG_SH_OCRAM is not set -CONFIG_SH_STORE_QUEUES=y -# CONFIG_SMP is not set -CONFIG_SH_PCLK_FREQ=49876504 -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_SH_CPU_FREQ=y -# CONFIG_CPU_FREQ_PROC_INTF is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_SH_DMA=y -CONFIG_NR_ONCHIP_DMA_CHANNELS=4 -CONFIG_NR_DMA_CHANNELS_BOOL=y -CONFIG_NR_DMA_CHANNELS=9 -CONFIG_DMA_PAGE_OPS=y - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_SH_PCIDMA_NONCOHERENT is not set -CONFIG_PCI_AUTO=y -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_FLAT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Generic Driver Options -# - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Block devices -# -# 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_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_LBD 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 - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) -# -# CONFIG_IEEE1394 is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=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_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IPV6_SCTP__=y -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_STNIC is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -CONFIG_8139TOO=y -# 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 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# 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_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN_BOOL is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -# CONFIG_INPUT is not set - -# -# Userland interfaces -# - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# 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 -# - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL is not set -CONFIG_SH_SCI=y -CONFIG_SERIAL_CONSOLE=y - -# -# Unix 98 PTY support -# -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 -# CONFIG_PSMOUSE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_SH_SCI is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Algorithms -# - -# -# I2C Hardware Bus support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=y -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_FAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# 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_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=y -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set -CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_PVR2=y -# CONFIG_FB_PVR2_DEBUG is not set -# CONFIG_FB_E1355 is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_PM3 is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=y - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_SH_STANDARD_BIOS is not set -# CONFIG_KGDB is not set -# CONFIG_FRAME_POINTER is not set - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/sh/configs/defconfig-hp680 b/arch/sh/configs/defconfig-hp680 --- a/arch/sh/configs/defconfig-hp680 Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,428 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_SUPERH=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -# CONFIG_CLEAN_COMPILE is not set -# CONFIG_STANDALONE is not set -CONFIG_BROKEN=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# System type -# -# CONFIG_SH_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SYSTEMH is not set -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP620 is not set -CONFIG_SH_HP680=y -# CONFIG_SH_HP690 is not set -# CONFIG_SH_CQREEK is not set -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_SATURN is not set -# CONFIG_SH_DREAMCAST is not set -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -# CONFIG_SH_ADX is not set -# CONFIG_SH_MPC1211 is not set -# CONFIG_SH_SECUREEDGE5410 is not set -# CONFIG_SH_UNKNOWN is not set -# CONFIG_CPU_SH2 is not set -CONFIG_CPU_SH3=y -# CONFIG_CPU_SH4 is not set -# CONFIG_CPU_SUBTYPE_SH7604 is not set -# CONFIG_CPU_SUBTYPE_SH7300 is not set -# CONFIG_CPU_SUBTYPE_SH7707 is not set -# CONFIG_CPU_SUBTYPE_SH7708 is not set -CONFIG_CPU_SUBTYPE_SH7709=y -# CONFIG_CPU_SUBTYPE_SH7750 is not set -# CONFIG_CPU_SUBTYPE_SH7751 is not set -# CONFIG_CPU_SUBTYPE_SH7760 is not set -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -CONFIG_MMU=y -# CONFIG_CMDLINE_BOOL is not set -CONFIG_MEMORY_START=0x0c000000 -CONFIG_MEMORY_SIZE=0x00400000 -CONFIG_MEMORY_SET=y -# CONFIG_MEMORY_OVERRIDE is not set -CONFIG_SH_RTC=y -# CONFIG_SH_DSP is not set -CONFIG_SH_HP600=y -CONFIG_ZERO_PAGE_OFFSET=0x00001000 -CONFIG_BOOT_LINK_OFFSET=0x00800000 -CONFIG_CPU_LITTLE_ENDIAN=y -# CONFIG_PREEMPT is not set -# CONFIG_UBC_WAKEUP is not set -# CONFIG_SH_WRITETHROUGH is not set -# CONFIG_SH_OCRAM is not set -# CONFIG_SMP is not set -CONFIG_SH_PCLK_FREQ=1193182 -# CONFIG_CPU_FREQ is not set -# CONFIG_SH_DMA is not set -CONFIG_HD64461=y -# CONFIG_HD64465 is not set -CONFIG_HD64461_IRQ=36 -CONFIG_HD64461_ENABLER=y - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -# CONFIG_PCI is not set -# CONFIG_HOTPLUG is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_FLAT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Generic Driver Options -# - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_LOOP is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_LBD 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_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) -# -# CONFIG_IEEE1394 is not set - -# -# Networking support -# -# CONFIG_NET is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# ISDN subsystem -# - -# -# Telephony Support -# -# CONFIG_PHONE 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 is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set - -# -# 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 is not set -CONFIG_SH_SCI=y -# CONFIG_SERIAL_CONSOLE is not set - -# -# Unix 98 PTY support -# -# CONFIG_UNIX98_PTYS is not set -# CONFIG_PSMOUSE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_SH_SCI is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Algorithms -# - -# -# I2C Hardware Bus support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_FAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_TMPFS 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_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 - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# - -# -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_E1355 is not set -CONFIG_FB_HIT=y -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -CONFIG_FONT_PEARL_8x8=y -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB_GADGET is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_SH_STANDARD_BIOS is not set -# CONFIG_KGDB is not set -# CONFIG_FRAME_POINTER is not set - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -# CONFIG_CRC32 is not set diff -Nru a/arch/sh/configs/defconfig-se7751 b/arch/sh/configs/defconfig-se7751 --- a/arch/sh/configs/defconfig-se7751 Sun Mar 28 13:12:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,617 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_SUPERH=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_IKCONFIG is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODULE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set - -# -# System type -# -# CONFIG_SH_SOLUTION_ENGINE is not set -CONFIG_SH_7751_SOLUTION_ENGINE=y -# CONFIG_SH_7751_SYSTEMH is not set -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP620 is not set -# CONFIG_SH_HP680 is not set -# CONFIG_SH_HP690 is not set -# CONFIG_SH_CQREEK is not set -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_SATURN is not set -# CONFIG_SH_DREAMCAST is not set -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -# CONFIG_SH_ADX is not set -# CONFIG_SH_MPC1211 is not set -# CONFIG_SH_SECUREEDGE5410 is not set -# CONFIG_SH_UNKNOWN is not set -# CONFIG_CPU_SH2 is not set -# CONFIG_CPU_SH3 is not set -CONFIG_CPU_SH4=y -# CONFIG_CPU_SUBTYPE_SH7604 is not set -# CONFIG_CPU_SUBTYPE_SH7300 is not set -# CONFIG_CPU_SUBTYPE_SH7707 is not set -# CONFIG_CPU_SUBTYPE_SH7708 is not set -# CONFIG_CPU_SUBTYPE_SH7709 is not set -# CONFIG_CPU_SUBTYPE_SH7750 is not set -CONFIG_CPU_SUBTYPE_SH7751=y -# CONFIG_CPU_SUBTYPE_SH7760 is not set -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -CONFIG_MMU=y -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="console=ttySC1,38400" -CONFIG_MEMORY_START=0x0c000000 -CONFIG_MEMORY_SIZE=0x04000000 -CONFIG_MEMORY_SET=y -# CONFIG_MEMORY_OVERRIDE is not set -CONFIG_SH_RTC=y -CONFIG_ZERO_PAGE_OFFSET=0x00010000 -CONFIG_BOOT_LINK_OFFSET=0x00800000 -CONFIG_CPU_LITTLE_ENDIAN=y -# CONFIG_PREEMPT is not set -# CONFIG_UBC_WAKEUP is not set -# CONFIG_SH_WRITETHROUGH is not set -# CONFIG_SH_OCRAM is not set -# CONFIG_SH_STORE_QUEUES is not set -# CONFIG_SMP is not set -CONFIG_SH_PCLK_FREQ=60013568 -# CONFIG_CPU_FREQ is not set -# CONFIG_SH_DMA is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_SH_PCIDMA_NONCOHERENT is not set -CONFIG_PCI_AUTO=y -CONFIG_PCI_AUTO_UPDATE_RESOURCES=y -CONFIG_PCI_DMA=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_FLAT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Generic Driver Options -# - -# -# 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 - -# -# User Modules And Translation Layers -# -# CONFIG_MTD_CHAR is not set -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -# CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CFI_AMDSTD=y -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_RAM=y -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_MPC1211 is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set - -# -# 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 -# -# CONFIG_PARPORT is not set - -# -# 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 is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_LBD 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 - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) -# -# CONFIG_IEEE1394 is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_NETLINK_DEV=y -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=y -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP 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=y - -# -# IP: Netfilter Configuration -# -# CONFIG_IP_NF_CONNTRACK is not set -CONFIG_IP_NF_QUEUE=y -# CONFIG_IP_NF_IPTABLES is not set -# CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IPV6_SCTP__=y -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_STNIC is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=y -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# 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_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN_BOOL is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -# CONFIG_INPUT is not set - -# -# Userland interfaces -# - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# -# Input Device Drivers -# - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL is not set -CONFIG_SH_SCI=y -CONFIG_SERIAL_CONSOLE=y - -# -# Unix 98 PTY support -# -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 -CONFIG_HEARTBEAT=y -# CONFIG_PSMOUSE is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -# CONFIG_SH_WDT is not set -# CONFIG_RTC is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_SH_SCI is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Algorithms -# - -# -# I2C Hardware Bus support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_FAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -# CONFIG_CRAMFS 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 is not set -# CONFIG_NFSD is not set -# CONFIG_EXPORTFS is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# 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 is not set -# CONFIG_USB_GADGET is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_SH_STANDARD_BIOS is not set -# CONFIG_KGDB is not set -# CONFIG_FRAME_POINTER is not set - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/sh/configs/defconfig-snapgear b/arch/sh/configs/defconfig-snapgear --- a/arch/sh/configs/defconfig-snapgear Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,540 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_SUPERH=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# System type -# -# CONFIG_SH_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SOLUTION_ENGINE is not set -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP620 is not set -# CONFIG_SH_HP680 is not set -# CONFIG_SH_HP690 is not set -# CONFIG_SH_CQREEK is not set -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_SATURN is not set -# CONFIG_SH_DREAMCAST is not set -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -# CONFIG_SH_ADX is not set -# CONFIG_SH_MPC1211 is not set -CONFIG_SH_SECUREEDGE5410=y -# CONFIG_SH_UNKNOWN is not set -# CONFIG_CPU_SH2 is not set -# CONFIG_CPU_SH3 is not set -CONFIG_CPU_SH4=y -# CONFIG_CPU_SUBTYPE_SH7604 is not set -# CONFIG_CPU_SUBTYPE_SH7300 is not set -# CONFIG_CPU_SUBTYPE_SH7707 is not set -# CONFIG_CPU_SUBTYPE_SH7708 is not set -# CONFIG_CPU_SUBTYPE_SH7709 is not set -# CONFIG_CPU_SUBTYPE_SH7750 is not set -CONFIG_CPU_SUBTYPE_SH7751=y -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -CONFIG_MMU=y -# CONFIG_CMDLINE_BOOL is not set -CONFIG_MEMORY_START=0x08000000 -CONFIG_MEMORY_SIZE=0x01000000 -CONFIG_MEMORY_SET=y -# CONFIG_MEMORY_OVERRIDE is not set -CONFIG_SH_RTC=y -CONFIG_ZERO_PAGE_OFFSET=0x00001000 -CONFIG_BOOT_LINK_OFFSET=0x00800000 -CONFIG_CPU_LITTLE_ENDIAN=y -# CONFIG_PREEMPT is not set -# CONFIG_UBC_WAKEUP is not set -# CONFIG_SH_WRITETHROUGH is not set -# CONFIG_SH_OCRAM is not set -# CONFIG_SH_STORE_QUEUES is not set -# CONFIG_SMP is not set -CONFIG_SH_PCLK_FREQ=60013568 -# CONFIG_CPU_FREQ is not set -CONFIG_SH_DMA=y -CONFIG_NR_DMA_CHANNELS=8 -# CONFIG_DMA_PAGE_OPS is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_SH_PCIDMA_NONCOHERENT is not set -CONFIG_PCI_AUTO=y -CONFIG_PCI_AUTO_UPDATE_RESOURCES=y -CONFIG_PCI_DMA=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_FLAT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Generic Driver Options -# - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# 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 is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_LBD 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 - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) -# -# CONFIG_IEEE1394 is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_PACKET is not set -# CONFIG_NETLINK_DEV is not set -# CONFIG_UNIX is not set -# 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_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IPV6_SCTP__=y -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -# CONFIG_MII is not set -# CONFIG_STNIC is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -CONFIG_8139TOO=y -# 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 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# 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_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices (depends on LLC=y) -# -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN_BOOL is not set - -# -# Telephony Support -# -# CONFIG_PHONE 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 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 is not set -# CONFIG_SERIAL is not set -CONFIG_SH_SCI=y -CONFIG_SERIAL_CONSOLE=y - -# -# Unix 98 PTY support -# -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 -# CONFIG_PSMOUSE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_SH_SCI is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=y -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_FAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=y -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set -CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# 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 is not set -# CONFIG_USB_GADGET is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_SH_STANDARD_BIOS is not set -# CONFIG_KGDB is not set -# CONFIG_FRAME_POINTER is not set - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -# CONFIG_CRC32 is not set -CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/sh/configs/defconfig-systemh b/arch/sh/configs/defconfig-systemh --- a/arch/sh/configs/defconfig-systemh Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,372 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_SUPERH=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -# CONFIG_CLEAN_COMPILE is not set -# CONFIG_STANDALONE is not set -CONFIG_BROKEN=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_IKCONFIG is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set - -# -# System type -# -# CONFIG_SH_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SOLUTION_ENGINE is not set -CONFIG_SH_7751_SYSTEMH=y -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP620 is not set -# CONFIG_SH_HP680 is not set -# CONFIG_SH_HP690 is not set -# CONFIG_SH_CQREEK is not set -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_SATURN is not set -# CONFIG_SH_DREAMCAST is not set -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -# CONFIG_SH_ADX is not set -# CONFIG_SH_MPC1211 is not set -# CONFIG_SH_SECUREEDGE5410 is not set -# CONFIG_SH_UNKNOWN is not set -# CONFIG_CPU_SH2 is not set -# CONFIG_CPU_SH3 is not set -CONFIG_CPU_SH4=y -# CONFIG_CPU_SUBTYPE_SH7604 is not set -# CONFIG_CPU_SUBTYPE_SH7300 is not set -# CONFIG_CPU_SUBTYPE_SH7707 is not set -# CONFIG_CPU_SUBTYPE_SH7708 is not set -# CONFIG_CPU_SUBTYPE_SH7709 is not set -# CONFIG_CPU_SUBTYPE_SH7750 is not set -CONFIG_CPU_SUBTYPE_SH7751=y -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -CONFIG_MMU=y -# CONFIG_CMDLINE_BOOL is not set -CONFIG_MEMORY_START=0x0c000000 -CONFIG_MEMORY_SIZE=0x00400000 -# CONFIG_MEMORY_OVERRIDE is not set -CONFIG_SH_RTC=y -CONFIG_ZERO_PAGE_OFFSET=0x00001000 -CONFIG_BOOT_LINK_OFFSET=0x00800000 -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_PREEMPT=y -# CONFIG_UBC_WAKEUP is not set -# CONFIG_SH_WRITETHROUGH is not set -# CONFIG_SH_OCRAM is not set -# CONFIG_SH_STORE_QUEUES is not set -# CONFIG_SMP is not set -CONFIG_SH_PCLK_FREQ=49876504 -# CONFIG_CPU_FREQ is not set -# CONFIG_SH_DMA is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_SH_PCIDMA_NONCOHERENT is not set -CONFIG_PCI_AUTO=y -CONFIG_PCI_AUTO_UPDATE_RESOURCES=y -CONFIG_PCI_DMA=y -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_FLAT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Generic Driver Options -# - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Block devices -# -# 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_LOOP is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_LBD 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 - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) -# -# CONFIG_IEEE1394 is not set - -# -# Networking support -# -# CONFIG_NET is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# ISDN subsystem -# - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -# CONFIG_INPUT is not set - -# -# Userland interfaces -# - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# 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 -# - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL is not set -CONFIG_SH_SCI=y -CONFIG_SERIAL_CONSOLE=y - -# -# Unix 98 PTY support -# -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 -# CONFIG_PSMOUSE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_SH_SCI is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Algorithms -# - -# -# I2C Hardware Bus support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=y -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_FAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# 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_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=y -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_SH_STANDARD_BIOS is not set -# CONFIG_KGDB is not set -# CONFIG_FRAME_POINTER is not set - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/sh/configs/dreamcast_defconfig b/arch/sh/configs/dreamcast_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/configs/dreamcast_defconfig Sun Mar 28 13:12:08 2004 @@ -0,0 +1,715 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_SUPERH=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +# CONFIG_STANDALONE is not set +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_SYSCTL=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System type +# +# CONFIG_SH_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SYSTEMH is not set +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP620 is not set +# CONFIG_SH_HP680 is not set +# CONFIG_SH_HP690 is not set +# CONFIG_SH_CQREEK is not set +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_SATURN is not set +CONFIG_SH_DREAMCAST=y +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +# CONFIG_SH_ADX is not set +# CONFIG_SH_MPC1211 is not set +# CONFIG_SH_SECUREEDGE5410 is not set +# CONFIG_SH_UNKNOWN is not set +# CONFIG_CPU_SH2 is not set +# CONFIG_CPU_SH3 is not set +CONFIG_CPU_SH4=y +# CONFIG_CPU_SUBTYPE_SH7604 is not set +# CONFIG_CPU_SUBTYPE_SH7300 is not set +# CONFIG_CPU_SUBTYPE_SH7707 is not set +# CONFIG_CPU_SUBTYPE_SH7708 is not set +# CONFIG_CPU_SUBTYPE_SH7709 is not set +CONFIG_CPU_SUBTYPE_SH7750=y +# CONFIG_CPU_SUBTYPE_SH7751 is not set +# CONFIG_CPU_SUBTYPE_SH7760 is not set +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +CONFIG_MMU=y +CONFIG_HUGETLB_PAGE_SIZE_64K=y +# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set +# CONFIG_CMDLINE_BOOL is not set +CONFIG_MEMORY_START=0x0c000000 +CONFIG_MEMORY_SIZE=0x01000000 +CONFIG_MEMORY_SET=y +# CONFIG_MEMORY_OVERRIDE is not set +CONFIG_ZERO_PAGE_OFFSET=0x00001000 +CONFIG_BOOT_LINK_OFFSET=0x00800000 +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_PREEMPT=y +# CONFIG_UBC_WAKEUP is not set +# CONFIG_SH_WRITETHROUGH is not set +CONFIG_SH_OCRAM=y +CONFIG_SH_STORE_QUEUES=y +# CONFIG_SMP is not set +CONFIG_SH_PCLK_FREQ=49876504 + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +# CONFIG_CPU_FREQ_PROC_INTF is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_24_API is not set +CONFIG_CPU_FREQ_TABLE=y +CONFIG_SH_CPU_FREQ=y +CONFIG_SH_DMA=y +CONFIG_NR_ONCHIP_DMA_CHANNELS=4 +CONFIG_NR_DMA_CHANNELS_BOOL=y +CONFIG_NR_DMA_CHANNELS=9 +# CONFIG_HD6446X_SERIES is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +CONFIG_MAPLE=y +CONFIG_PCI=y +# CONFIG_SH_PCIDMA_NONCOHERENT is not set +CONFIG_PCI_AUTO=y +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y + +# +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_FLAT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +# 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_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_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=1024 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD 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 +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# 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 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_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_IPV6 is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IPV6_SCTP__=y +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_STNIC is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +# 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_8139_RXBUF_IDX=1 +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# 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_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# Bluetooth support +# +# CONFIG_BT 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=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +# 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 +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_MAPLE is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_MAPLE 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_SH_SCI=y +CONFIG_SERIAL_SH_SCI_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_QIC02_TAPE is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_SH_WDT=y + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C 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=y +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +CONFIG_FB_PVR2=y +# CONFIG_FB_E1355 is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON_OLD is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_PCI_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +# CONFIG_LOGO_LINUX_CLUT224 is not set +# CONFIG_LOGO_SUPERH_MONO is not set +# CONFIG_LOGO_SUPERH_VGA16 is not set +CONFIG_LOGO_SUPERH_CLUT224=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Maple Bus input peripherals +# +# CONFIG_MAPLE_KEYBOARD is not set +# CONFIG_MAPLE_MOUSE is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_ROMFS_FS=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y +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=y +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_GSS 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 is not set + +# +# Profiling support +# +CONFIG_PROFILING=y +CONFIG_OPROFILE=y + +# +# Kernel hacking +# +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_SH_STANDARD_BIOS is not set +# CONFIG_KGDB is not set +# CONFIG_FRAME_POINTER is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC32=y +CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/sh/configs/hp680_defconfig b/arch/sh/configs/hp680_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/configs/hp680_defconfig Sun Mar 28 13:12:08 2004 @@ -0,0 +1,418 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_SUPERH=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_CLEAN_COMPILE is not set +# CONFIG_STANDALONE is not set +CONFIG_BROKEN=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_SYSCTL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# System type +# +# CONFIG_SH_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SYSTEMH is not set +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP620 is not set +CONFIG_SH_HP680=y +# CONFIG_SH_HP690 is not set +# CONFIG_SH_CQREEK is not set +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_SATURN is not set +# CONFIG_SH_DREAMCAST is not set +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +# CONFIG_SH_ADX is not set +# CONFIG_SH_MPC1211 is not set +# CONFIG_SH_SECUREEDGE5410 is not set +# CONFIG_SH_UNKNOWN is not set +# CONFIG_CPU_SH2 is not set +CONFIG_CPU_SH3=y +# CONFIG_CPU_SH4 is not set +# CONFIG_CPU_SUBTYPE_SH7604 is not set +# CONFIG_CPU_SUBTYPE_SH7300 is not set +# CONFIG_CPU_SUBTYPE_SH7707 is not set +# CONFIG_CPU_SUBTYPE_SH7708 is not set +CONFIG_CPU_SUBTYPE_SH7709=y +# CONFIG_CPU_SUBTYPE_SH7750 is not set +# CONFIG_CPU_SUBTYPE_SH7751 is not set +# CONFIG_CPU_SUBTYPE_SH7760 is not set +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +CONFIG_MMU=y +# CONFIG_CMDLINE_BOOL is not set +CONFIG_MEMORY_START=0x0c000000 +CONFIG_MEMORY_SIZE=0x00400000 +CONFIG_MEMORY_SET=y +# CONFIG_MEMORY_OVERRIDE is not set +CONFIG_SH_RTC=y +# CONFIG_SH_DSP is not set +CONFIG_SH_HP600=y +CONFIG_ZERO_PAGE_OFFSET=0x00001000 +CONFIG_BOOT_LINK_OFFSET=0x00800000 +CONFIG_CPU_LITTLE_ENDIAN=y +# CONFIG_PREEMPT is not set +# CONFIG_UBC_WAKEUP is not set +# CONFIG_SH_WRITETHROUGH is not set +# CONFIG_SH_OCRAM is not set +# CONFIG_SMP is not set +CONFIG_SH_PCLK_FREQ=1193182 +# CONFIG_CPU_FREQ is not set +# CONFIG_SH_DMA is not set +CONFIG_HD6446X_SERIES=y +CONFIG_HD64461=y +# CONFIG_HD64465 is not set +CONFIG_HD64461_IRQ=36 +# CONFIG_HD64461_ENABLER is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +# CONFIG_PCI is not set +# CONFIG_HOTPLUG is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_FLAT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_LOOP is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD 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_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_IDEDISK_STROKE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_DMA_NONPCI is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# Networking support +# +# CONFIG_NET is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# ISDN subsystem +# + +# +# Telephony Support +# +# CONFIG_PHONE 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 is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set + +# +# 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 + +# +# Unix98 PTY support +# +# CONFIG_UNIX98_PTYS is not set +# CONFIG_PSMOUSE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_SH_SCI is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_TMPFS 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_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 + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +# CONFIG_NLS is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# + +# +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_E1355 is not set +CONFIG_FB_HIT=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_PCI_CONSOLE=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +CONFIG_FONT_PEARL_8x8=y +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_SH_STANDARD_BIOS is not set +# CONFIG_KGDB is not set +# CONFIG_FRAME_POINTER is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set diff -Nru a/arch/sh/configs/se7751_defconfig b/arch/sh/configs/se7751_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/configs/se7751_defconfig Sun Mar 28 13:12:07 2004 @@ -0,0 +1,617 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_SUPERH=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_SYSCTL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_KMOD is not set + +# +# System type +# +# CONFIG_SH_SOLUTION_ENGINE is not set +CONFIG_SH_7751_SOLUTION_ENGINE=y +# CONFIG_SH_7751_SYSTEMH is not set +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP620 is not set +# CONFIG_SH_HP680 is not set +# CONFIG_SH_HP690 is not set +# CONFIG_SH_CQREEK is not set +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_SATURN is not set +# CONFIG_SH_DREAMCAST is not set +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +# CONFIG_SH_ADX is not set +# CONFIG_SH_MPC1211 is not set +# CONFIG_SH_SECUREEDGE5410 is not set +# CONFIG_SH_UNKNOWN is not set +# CONFIG_CPU_SH2 is not set +# CONFIG_CPU_SH3 is not set +CONFIG_CPU_SH4=y +# CONFIG_CPU_SUBTYPE_SH7604 is not set +# CONFIG_CPU_SUBTYPE_SH7300 is not set +# CONFIG_CPU_SUBTYPE_SH7707 is not set +# CONFIG_CPU_SUBTYPE_SH7708 is not set +# CONFIG_CPU_SUBTYPE_SH7709 is not set +# CONFIG_CPU_SUBTYPE_SH7750 is not set +CONFIG_CPU_SUBTYPE_SH7751=y +# CONFIG_CPU_SUBTYPE_SH7760 is not set +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +CONFIG_MMU=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttySC1,38400" +CONFIG_MEMORY_START=0x0c000000 +CONFIG_MEMORY_SIZE=0x04000000 +CONFIG_MEMORY_SET=y +# CONFIG_MEMORY_OVERRIDE is not set +CONFIG_SH_RTC=y +CONFIG_ZERO_PAGE_OFFSET=0x00010000 +CONFIG_BOOT_LINK_OFFSET=0x00800000 +CONFIG_CPU_LITTLE_ENDIAN=y +# CONFIG_PREEMPT is not set +# CONFIG_UBC_WAKEUP is not set +# CONFIG_SH_WRITETHROUGH is not set +# CONFIG_SH_OCRAM is not set +# CONFIG_SH_STORE_QUEUES is not set +# CONFIG_SMP is not set +CONFIG_SH_PCLK_FREQ=60013568 +# CONFIG_CPU_FREQ is not set +# CONFIG_SH_DMA is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +CONFIG_PCI=y +# CONFIG_SH_PCIDMA_NONCOHERENT is not set +CONFIG_PCI_AUTO=y +CONFIG_PCI_AUTO_UPDATE_RESOURCES=y +CONFIG_PCI_DMA=y +# CONFIG_PCI_LEGACY_PROC is not set +# CONFIG_PCI_NAMES is not set +# CONFIG_HOTPLUG is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_FLAT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# + +# +# 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 + +# +# User Modules And Translation Layers +# +# CONFIG_MTD_CHAR is not set +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +# CONFIG_MTD_CFI_INTELEXT is not set +CONFIG_MTD_CFI_AMDSTD=y +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_RAM=y +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_MPC1211 is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set + +# +# 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 +# +# CONFIG_PARPORT is not set + +# +# 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 is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD 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 + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +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=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP 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=y + +# +# IP: Netfilter Configuration +# +# CONFIG_IP_NF_CONNTRACK is not set +CONFIG_IP_NF_QUEUE=y +# CONFIG_IP_NF_IPTABLES is not set +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set +# CONFIG_IP_NF_COMPAT_IPFWADM is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IPV6_SCTP__=y +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_STNIC is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +CONFIG_PCNET32=y +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# 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_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# Bluetooth support +# +# CONFIG_BT is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN_BOOL is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Userland interfaces +# + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set + +# +# Input Device Drivers +# + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL is not set +CONFIG_SH_SCI=y +CONFIG_SERIAL_CONSOLE=y + +# +# Unix 98 PTY support +# +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_HEARTBEAT=y +# CONFIG_PSMOUSE is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_SH_WDT is not set +# CONFIG_RTC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_SH_SCI is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# I2C Algorithms +# + +# +# I2C Hardware Bus support +# + +# +# I2C Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS=y +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_CRAMFS 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 is not set +# CONFIG_NFSD is not set +# CONFIG_EXPORTFS is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# 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 is not set +# CONFIG_USB_GADGET is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_SH_STANDARD_BIOS is not set +# CONFIG_KGDB is not set +# CONFIG_FRAME_POINTER is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC32=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/sh/configs/snapgear_defconfig b/arch/sh/configs/snapgear_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/configs/snapgear_defconfig Sun Mar 28 13:12:08 2004 @@ -0,0 +1,540 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_SUPERH=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_SYSCTL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# System type +# +# CONFIG_SH_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SOLUTION_ENGINE is not set +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP620 is not set +# CONFIG_SH_HP680 is not set +# CONFIG_SH_HP690 is not set +# CONFIG_SH_CQREEK is not set +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_SATURN is not set +# CONFIG_SH_DREAMCAST is not set +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +# CONFIG_SH_ADX is not set +# CONFIG_SH_MPC1211 is not set +CONFIG_SH_SECUREEDGE5410=y +# CONFIG_SH_UNKNOWN is not set +# CONFIG_CPU_SH2 is not set +# CONFIG_CPU_SH3 is not set +CONFIG_CPU_SH4=y +# CONFIG_CPU_SUBTYPE_SH7604 is not set +# CONFIG_CPU_SUBTYPE_SH7300 is not set +# CONFIG_CPU_SUBTYPE_SH7707 is not set +# CONFIG_CPU_SUBTYPE_SH7708 is not set +# CONFIG_CPU_SUBTYPE_SH7709 is not set +# CONFIG_CPU_SUBTYPE_SH7750 is not set +CONFIG_CPU_SUBTYPE_SH7751=y +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +CONFIG_MMU=y +# CONFIG_CMDLINE_BOOL is not set +CONFIG_MEMORY_START=0x08000000 +CONFIG_MEMORY_SIZE=0x01000000 +CONFIG_MEMORY_SET=y +# CONFIG_MEMORY_OVERRIDE is not set +CONFIG_SH_RTC=y +CONFIG_ZERO_PAGE_OFFSET=0x00001000 +CONFIG_BOOT_LINK_OFFSET=0x00800000 +CONFIG_CPU_LITTLE_ENDIAN=y +# CONFIG_PREEMPT is not set +# CONFIG_UBC_WAKEUP is not set +# CONFIG_SH_WRITETHROUGH is not set +# CONFIG_SH_OCRAM is not set +# CONFIG_SH_STORE_QUEUES is not set +# CONFIG_SMP is not set +CONFIG_SH_PCLK_FREQ=60013568 +# CONFIG_CPU_FREQ is not set +CONFIG_SH_DMA=y +CONFIG_NR_DMA_CHANNELS=8 +# CONFIG_DMA_PAGE_OPS is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +CONFIG_PCI=y +# CONFIG_SH_PCIDMA_NONCOHERENT is not set +CONFIG_PCI_AUTO=y +CONFIG_PCI_AUTO_UPDATE_RESOURCES=y +CONFIG_PCI_DMA=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_FLAT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# 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 is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD 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 + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_PACKET is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_UNIX is not set +# 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_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_IPV6 is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IPV6_SCTP__=y +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_LLC is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_MII is not set +# CONFIG_STNIC is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +# 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 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# 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_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices (depends on LLC=y) +# +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN_BOOL is not set + +# +# Telephony Support +# +# CONFIG_PHONE 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 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 is not set +# CONFIG_SERIAL is not set +CONFIG_SH_SCI=y +CONFIG_SERIAL_CONSOLE=y + +# +# Unix 98 PTY support +# +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_PSMOUSE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_SH_SCI is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# I2C Hardware Sensors Mainboard support +# + +# +# I2C Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_ROMFS_FS=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=y +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_GSS is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# 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 is not set +# CONFIG_USB_GADGET is not set + +# +# Bluetooth support +# +# CONFIG_BT is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_SH_STANDARD_BIOS is not set +# CONFIG_KGDB is not set +# CONFIG_FRAME_POINTER is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/sh/configs/systemh_defconfig b/arch/sh/configs/systemh_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/configs/systemh_defconfig Sun Mar 28 13:12:08 2004 @@ -0,0 +1,372 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_SUPERH=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_CLEAN_COMPILE is not set +# CONFIG_STANDALONE is not set +CONFIG_BROKEN=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_SYSCTL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_KMOD is not set + +# +# System type +# +# CONFIG_SH_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SOLUTION_ENGINE is not set +CONFIG_SH_7751_SYSTEMH=y +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP620 is not set +# CONFIG_SH_HP680 is not set +# CONFIG_SH_HP690 is not set +# CONFIG_SH_CQREEK is not set +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_SATURN is not set +# CONFIG_SH_DREAMCAST is not set +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +# CONFIG_SH_ADX is not set +# CONFIG_SH_MPC1211 is not set +# CONFIG_SH_SECUREEDGE5410 is not set +# CONFIG_SH_UNKNOWN is not set +# CONFIG_CPU_SH2 is not set +# CONFIG_CPU_SH3 is not set +CONFIG_CPU_SH4=y +# CONFIG_CPU_SUBTYPE_SH7604 is not set +# CONFIG_CPU_SUBTYPE_SH7300 is not set +# CONFIG_CPU_SUBTYPE_SH7707 is not set +# CONFIG_CPU_SUBTYPE_SH7708 is not set +# CONFIG_CPU_SUBTYPE_SH7709 is not set +# CONFIG_CPU_SUBTYPE_SH7750 is not set +CONFIG_CPU_SUBTYPE_SH7751=y +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +CONFIG_MMU=y +# CONFIG_CMDLINE_BOOL is not set +CONFIG_MEMORY_START=0x0c000000 +CONFIG_MEMORY_SIZE=0x00400000 +# CONFIG_MEMORY_OVERRIDE is not set +CONFIG_SH_RTC=y +CONFIG_ZERO_PAGE_OFFSET=0x00001000 +CONFIG_BOOT_LINK_OFFSET=0x00800000 +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_PREEMPT=y +# CONFIG_UBC_WAKEUP is not set +# CONFIG_SH_WRITETHROUGH is not set +# CONFIG_SH_OCRAM is not set +# CONFIG_SH_STORE_QUEUES is not set +# CONFIG_SMP is not set +CONFIG_SH_PCLK_FREQ=49876504 +# CONFIG_CPU_FREQ is not set +# CONFIG_SH_DMA is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +CONFIG_PCI=y +# CONFIG_SH_PCIDMA_NONCOHERENT is not set +CONFIG_PCI_AUTO=y +CONFIG_PCI_AUTO_UPDATE_RESOURCES=y +CONFIG_PCI_DMA=y +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_FLAT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Block devices +# +# 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_LOOP is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=1024 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD 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 + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# Networking support +# +# CONFIG_NET is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# ISDN subsystem +# + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Userland interfaces +# + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +# 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 +# + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL is not set +CONFIG_SH_SCI=y +CONFIG_SERIAL_CONSOLE=y + +# +# Unix 98 PTY support +# +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_PSMOUSE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_SH_SCI is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# I2C Algorithms +# + +# +# I2C Hardware Bus support +# + +# +# I2C Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_ROMFS_FS=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# 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_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=y +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set +# CONFIG_USB_GADGET is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_SH_STANDARD_BIOS is not set +# CONFIG_KGDB is not set +# CONFIG_FRAME_POINTER is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC32=y +CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/sh/defconfig b/arch/sh/defconfig --- a/arch/sh/defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/sh/defconfig Sun Mar 28 13:12:08 2004 @@ -152,7 +152,6 @@ CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # diff -Nru a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig --- a/arch/sh/drivers/dma/Kconfig Sun Mar 28 13:12:07 2004 +++ b/arch/sh/drivers/dma/Kconfig Sun Mar 28 13:12:07 2004 @@ -1,3 +1,5 @@ +menu "DMA support" + config SH_DMA bool "DMA controller (DMAC) support" help @@ -34,9 +36,20 @@ config DMA_PAGE_OPS bool "Use DMAC for page copy/clear" - depends on SH_DMA + depends on SH_DMA && BROKEN help Selecting this option will use a dual-address mode configured channel in the SH DMAC for copy_page()/clear_page(). Primarily a performance hack. + +config DMA_PAGE_OPS_CHANNEL + depends on DMA_PAGE_OPS + int "DMA channel for sh memory-manager page copy/clear" + default "3" + help + This allows the specification of the dual address dma channel, + in case channel 3 is unavailable. On the SH4, channels 1,2, and 3 + are dual-address capable. + +endmenu diff -Nru a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c --- a/arch/sh/drivers/dma/dma-api.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/drivers/dma/dma-api.c Sun Mar 28 13:12:08 2004 @@ -104,6 +104,11 @@ { struct dma_info *info = get_dma_info(chan); + if (info->tei_capable) { + wait_event(info->wait_queue, (info->ops->get_residue(info) == 0)); + return; + } + while (info->ops->get_residue(info)) cpu_relax(); } @@ -161,6 +166,7 @@ info->chan = i; init_MUTEX(&info->sem); + init_waitqueue_head(&info->wait_queue); } return 0; diff -Nru a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c --- a/arch/sh/drivers/dma/dma-sh.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/drivers/dma/dma-sh.c Sun Mar 28 13:12:08 2004 @@ -55,9 +55,9 @@ } __attribute__ ((aligned(16))); struct sh_dmac_info { - struct sh_dmac_channel channel[MAX_DMAC_CHANNELS]; + struct sh_dmac_channel channel[4]; unsigned long dmaor; -} __attribute__ ((packed)); +}; static volatile struct sh_dmac_info *sh_dmac = (volatile struct sh_dmac_info *)SH_DMAC_BASE; @@ -74,25 +74,12 @@ if (chan < 4) { irq = DMTE0_IRQ + chan; } else { - irq = DMTE4_IRQ + chan; + irq = DMTE4_IRQ + chan - 4; } return irq; } -static inline int get_dmte_chan(unsigned int irq) -{ - int chan; - - if ((irq - DMTE4_IRQ) < 0) { - chan = irq - DMTE0_IRQ; - } else { - chan = irq - DMTE4_IRQ + 4; - } - - return chan; -} - /* * We determine the correct shift size based off of the CHCR transmit size * for the given channel. Since we know that it will take: @@ -106,54 +93,42 @@ return ts_shift[(sh_dmac->channel[info->chan].chcr >> 4) & 0x0007]; } +/* + * The transfer end interrupt must read the chcr register to end the + * hardware interrupt active condition. + * Besides that it needs to waken any waiting process, which should handle + * setting up the next transfer. + */ static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs) { - - int chan = get_dmte_chan(irq); - struct dma_info *info = get_dma_info(chan); + struct dma_info * info = (struct dma_info *)dev_id; + u32 chcr = sh_dmac->channel[info->chan].chcr; - if (info->sar) - sh_dmac->channel[info->chan].sar = info->sar; - if (info->dar) - sh_dmac->channel[info->chan].sar = info->dar; + if (!(chcr & CHCR_TE)) + return IRQ_NONE; - sh_dmac->channel[info->chan].dmatcr = info->count >> calc_xmit_shift(info); - sh_dmac->channel[info->chan].chcr &= ~CHCR_TE; + sh_dmac->channel[info->chan].chcr = chcr & ~(CHCR_IE | CHCR_DE); - disable_irq(irq); + wake_up(&info->wait_queue); return IRQ_HANDLED; } -static struct irqaction irq_tei = { - .name = "DMAC Transfer End", - .handler = dma_tei, - .flags = SA_INTERRUPT, -}; - static int sh_dmac_request_dma(struct dma_info *info) { - int irq = get_dmte_irq(info->chan); - char *p = (char *)((&irq_tei)->name); - - sprintf(p, "%s (Channel %d)", p, info->chan); - - make_ipr_irq(irq, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); - - return setup_irq(irq, &irq_tei); + return request_irq(get_dmte_irq(info->chan), dma_tei, + SA_INTERRUPT, "DMAC Transfer End", info); } static void sh_dmac_free_dma(struct dma_info *info) { - free_irq(get_dmte_irq(info->chan), 0); + free_irq(get_dmte_irq(info->chan), info); } static void sh_dmac_configure_channel(struct dma_info *info, unsigned long chcr) { - if (!chcr) { - chcr = sh_dmac->channel[info->chan].chcr; - chcr |= /* CHCR_IE | */ RS_DUAL; - } + if (!chcr) + chcr = RS_DUAL; sh_dmac->channel[info->chan].chcr = chcr; @@ -162,12 +137,18 @@ static void sh_dmac_enable_dma(struct dma_info *info) { - sh_dmac->channel[info->chan].chcr |= CHCR_DE; + int irq = get_dmte_irq(info->chan); + + sh_dmac->channel[info->chan].chcr |= (CHCR_DE | CHCR_IE); + enable_irq(irq); } static void sh_dmac_disable_dma(struct dma_info *info) { - sh_dmac->channel[info->chan].chcr &= ~(CHCR_DE | CHCR_TE); + int irq = get_dmte_irq(info->chan); + + disable_irq(irq); + sh_dmac->channel[info->chan].chcr &= ~(CHCR_DE | CHCR_TE | CHCR_IE); } static int sh_dmac_xfer_dma(struct dma_info *info) @@ -191,10 +172,14 @@ * In this case, only one address can be defined, anything else will * result in a DMA address error interrupt (at least on the SH-4), * which will subsequently halt the transfer. + * + * Channel 2 on the Dreamcast is a special case, as this is used for + * cascading to the PVR2 DMAC. In this case, we still need to write + * SAR and DAR, regardless of value, in order for cascading to work. */ - if (info->sar) + if (info->sar || (mach_is_dreamcast() && info->chan == 2)) sh_dmac->channel[info->chan].sar = info->sar; - if (info->dar) + if (info->dar || (mach_is_dreamcast() && info->chan == 2)) sh_dmac->channel[info->chan].dar = info->dar; sh_dmac->channel[info->chan].dmatcr = info->count >> calc_xmit_shift(info); @@ -206,6 +191,9 @@ static int sh_dmac_get_dma_residue(struct dma_info *info) { + if (!(sh_dmac->channel[info->chan].chcr & CHCR_DE)) + return 0; + return sh_dmac->channel[info->chan].dmatcr << calc_xmit_shift(info); } @@ -221,12 +209,6 @@ return IRQ_HANDLED; } - -static struct irqaction irq_err = { - .name = "DMAC Address Error", - .handler = dma_err, - .flags = SA_INTERRUPT, -}; #endif static struct dma_ops sh_dmac_ops = { @@ -244,15 +226,21 @@ #ifdef CONFIG_CPU_SH4 make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); - setup_irq(DMAE_IRQ, &irq_err); + i = request_irq(DMAE_IRQ, dma_err, SA_INTERRUPT, "DMAC Address Error", 0); + if (i < 0) + return i; #endif - /* Kick the DMAOR */ - sh_dmac->dmaor |= DMAOR_DME /* | 0x200 */ | 0x8000; /* DDT = 1, PR1 = 1, DME = 1 */ - sh_dmac->dmaor &= ~(DMAOR_NMIF | DMAOR_AE); + for (i = 0; i < MAX_DMAC_CHANNELS; i++) { + int irq = get_dmte_irq(i); + + make_ipr_irq(irq, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); + + dma_info[i].ops = &sh_dmac_ops; + dma_info[i].tei_capable = 1; + } - for (i = 0; i < MAX_DMAC_CHANNELS; i++) - dma_info[i].ops = &sh_dmac_ops; + sh_dmac->dmaor |= 0x8000 | DMAOR_DME; return register_dmac(&sh_dmac_ops); } diff -Nru a/arch/sh/drivers/dma/dma-sh.h b/arch/sh/drivers/dma/dma-sh.h --- a/arch/sh/drivers/dma/dma-sh.h Sun Mar 28 13:12:08 2004 +++ b/arch/sh/drivers/dma/dma-sh.h Sun Mar 28 13:12:08 2004 @@ -24,7 +24,6 @@ #define DM_DEC 0x00008000 #define SM_INC 0x00001000 #define SM_DEC 0x00002000 -#define RS_DUAL 0x00000000 #define RS_IN 0x00000200 #define RS_OUT 0x00000300 #define TM_BURST 0x0000080 @@ -36,6 +35,11 @@ #define CHCR_DE 0x00000001 #define CHCR_TE 0x00000002 #define CHCR_IE 0x00000004 + +/* Define the default configuration for dual address memory-memory transfer. + * The 0x400 value represents auto-request, external->external. + */ +#define RS_DUAL (DM_INC | SM_INC | 0x400 | TS_32) #define DMAOR_COD 0x00000008 #define DMAOR_AE 0x00000004 diff -Nru a/arch/sh/drivers/pci/Kconfig b/arch/sh/drivers/pci/Kconfig --- a/arch/sh/drivers/pci/Kconfig Sun Mar 28 13:12:07 2004 +++ b/arch/sh/drivers/pci/Kconfig Sun Mar 28 13:12:07 2004 @@ -14,6 +14,7 @@ config SH_PCIDMA_NONCOHERENT bool "Cache and PCI noncoherent" depends on PCI + default y help Enable this option if your platform does not have a CPU cache which remains coherent with PCI DMA. It is safest to say 'Y', although you @@ -38,9 +39,4 @@ for some reason, you have a board that simply refuses to work with its resources updated beyond what they are when the device is powered up, set this to N. Everyone else will want this as Y. - -config PCI_DMA - bool - depends on PCI - default y if !SH_DREAMCAST diff -Nru a/arch/sh/drivers/pci/Makefile b/arch/sh/drivers/pci/Makefile --- a/arch/sh/drivers/pci/Makefile Sun Mar 28 13:12:07 2004 +++ b/arch/sh/drivers/pci/Makefile Sun Mar 28 13:12:07 2004 @@ -4,7 +4,6 @@ obj-y += pci.o obj-$(CONFIG_PCI_AUTO) += pci-auto.o -obj-$(CONFIG_PCI_DMA) += pci-dma.o obj-$(CONFIG_CPU_SUBTYPE_ST40STB1) += pci-st40.o obj-$(CONFIG_CPU_SUBTYPE_SH7751) += pci-sh7751.o diff -Nru a/arch/sh/drivers/pci/dma-dreamcast.c b/arch/sh/drivers/pci/dma-dreamcast.c --- a/arch/sh/drivers/pci/dma-dreamcast.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/drivers/pci/dma-dreamcast.c Sun Mar 28 13:12:08 2004 @@ -30,7 +30,7 @@ static int gapspci_dma_used = 0; -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, +void *__pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t * dma_handle) { unsigned long buf; @@ -52,7 +52,7 @@ return (void *)buf; } -void pci_free_consistent(struct pci_dev *hwdev, size_t size, +void __pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { /* XXX */ diff -Nru a/arch/sh/drivers/pci/pci-dma.c b/arch/sh/drivers/pci/pci-dma.c --- a/arch/sh/drivers/pci/pci-dma.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2001 David J. Mckay (david.mckay@st.com) - * - * May be copied or modified under the terms of the GNU General Public - * License. See linux/COPYING for more information. - * - * Dynamic DMA mapping support. - */ - -#include -#include -#include -#include -#include -#include - - -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t * dma_handle) -{ - void *ret; - int gfp = GFP_ATOMIC; - - ret = (void *) __get_free_pages(gfp, get_order(size)); - - if (ret != NULL) { - /* Is it necessary to do the memset? */ - memset(ret, 0, size); - *dma_handle = virt_to_phys(ret); - } - /* We must flush the cache before we pass it on to the device */ - dma_cache_wback_inv(ret, size); - return P2SEGADDR(ret); -} - -void pci_free_consistent(struct pci_dev *hwdev, size_t size, - void *vaddr, dma_addr_t dma_handle) -{ - unsigned long p1addr=P1SEGADDR((unsigned long)vaddr); - - free_pages(p1addr, get_order(size)); -} diff -Nru a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c --- a/arch/sh/kernel/cf-enabler.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/kernel/cf-enabler.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: cf-enabler.c,v 1.3 2003/05/04 19:29:52 lethal Exp $ +/* $Id: cf-enabler.c,v 1.4 2004/02/22 22:44:36 kkojima Exp $ * * linux/drivers/block/cf-enabler.c * @@ -88,7 +88,7 @@ } #if defined(CONFIG_SH_SOLUTION_ENGINE) -#include +#include /* * SolutionEngine diff -Nru a/arch/sh/kernel/cpu/irq_ipr.c b/arch/sh/kernel/cpu/irq_ipr.c --- a/arch/sh/kernel/cpu/irq_ipr.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/kernel/cpu/irq_ipr.c Sun Mar 28 13:12:07 2004 @@ -196,6 +196,7 @@ #endif make_ipr_irq(TIMER_IRQ, TIMER_IPR_ADDR, TIMER_IPR_POS, TIMER_PRIORITY); + make_ipr_irq(TIMER1_IRQ, TIMER1_IPR_ADDR, TIMER1_IPR_POS, TIMER1_PRIORITY); make_ipr_irq(RTC_IRQ, RTC_IPR_ADDR, RTC_IPR_POS, RTC_PRIORITY); #ifdef SCI_ERI_IRQ diff -Nru a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c --- a/arch/sh/kernel/cpu/sh4/sq.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/kernel/cpu/sh4/sq.c Sun Mar 28 13:12:07 2004 @@ -3,13 +3,13 @@ * * General management API for SH-4 integrated Store Queues * - * Copyright (C) 2001, 2002, 2003 Paul Mundt + * Copyright (C) 2001, 2002, 2003, 2004 Paul Mundt * Copyright (C) 2001, 2002 M. R. Brown * * Some of this code has been adopted directly from the old arch/sh/mm/sq.c - * hack that was part of the LinuxDC project. For all intensive purposes, this - * is a completely new interface that really doesn't have much in common with - * the old zone-based approach at all. Infact, I'm only listing it here for + * hack that was part of the LinuxDC project. For all intents and purposes, + * this is a completely new interface that really doesn't have much in common + * with the old zone-based approach at all. In fact, it's only listed here for * general completeness. * * This file is subject to the terms and conditions of the GNU General Public @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -31,6 +32,9 @@ #include static LIST_HEAD(sq_mapping_list); +static spinlock_t sq_mapping_lock = SPIN_LOCK_UNLOCKED; + +extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end); /** * sq_flush - Flush (prefetch) the store queue cache @@ -42,7 +46,7 @@ */ inline void sq_flush(void *addr) { - __asm__ __volatile__ ("pref @%0": "=r" (addr) : : "memory"); + __asm__ __volatile__ ("pref @%0" : : "r" (addr) : "memory"); } /** @@ -57,13 +61,17 @@ void sq_flush_range(unsigned long start, unsigned int len) { volatile unsigned long *sq = (unsigned long *)start; + unsigned long dummy; /* Flush the queues */ for (len >>= 5; len--; sq += 8) sq_flush((void *)sq); - + /* Wait for completion */ - sq = (volatile unsigned long *)start; + dummy = ctrl_inl(P4SEG_STORE_QUE); + + ctrl_outl(0, P4SEG_STORE_QUE + 0); + ctrl_outl(0, P4SEG_STORE_QUE + 8); } static struct sq_mapping *__sq_alloc_mapping(unsigned long virt, unsigned long phys, unsigned long size, const char *name) @@ -81,7 +89,7 @@ map->sq_addr = virt; map->addr = phys; - map->size = size; + map->size = size + 1; map->name = name; list_add(&map->list, &sq_mapping_list); @@ -128,24 +136,20 @@ */ static struct sq_mapping *__sq_remap(struct sq_mapping *map) { - /* - * First check the MMU status.. - */ -#ifndef CONFIG_MMU + unsigned long flags, pteh, ptel; + struct vm_struct *vma; + pgprot_t pgprot; + /* * Without an MMU (or with it turned off), this is much more * straightforward, as we can just load up each queue's QACR with * the physical address appropriately masked. */ + ctrl_outl(((map->addr >> 26) << 2) & 0x1c, SQ_QACR0); ctrl_outl(((map->addr >> 26) << 2) & 0x1c, SQ_QACR1); -#else - unsigned long flags, pteh, ptel; - pgprot_t pgprot; - pgd_t *pgd; - pmd_t *pmd; - pte_t *pte; +#ifdef CONFIG_MMU /* * With an MMU on the other hand, things are slightly more involved. * Namely, we have to have a direct mapping between the SQ addr and @@ -161,7 +165,7 @@ * We could also probably get by without explicitly setting PTEA, but * we do it here just for good measure. */ - local_irq_save(flags); + spin_lock_irqsave(&sq_mapping_lock, flags); pteh = map->sq_addr; ctrl_outl((pteh & MMU_VPN_MASK) | get_asid(), MMU_PTEH); @@ -177,6 +181,8 @@ __asm__ __volatile__ ("ldtlb" : : : "memory"); + spin_unlock_irqrestore(&sq_mapping_lock, flags); + /* * Next, we need to map ourselves in the kernel page table, so that * future accesses after a TLB flush will be handled when we take a @@ -188,31 +194,17 @@ * writeout before we hit the TLB flush, we do it anyways. This way * we at least save ourselves the initial page fault overhead. */ - pgd = pgd_offset_k(map->sq_addr); + vma = __get_vm_area(map->size, VM_ALLOC, map->sq_addr, SQ_ADDRMAX); + if (!vma) + return ERR_PTR(-ENOMEM); - spin_lock(&init_mm.page_table_lock); + vma->phys_addr = map->addr; - pmd = pmd_alloc(&init_mm, pgd, map->sq_addr); - if (!pmd) - goto out; - - pte = pte_alloc_map(&init_mm, pmd, map->sq_addr); - if (!pte) - goto out; - if (!pte_none(*pte)) { - pte_unmap(pte); - goto out; + if (remap_area_pages((unsigned long)vma->addr, vma->phys_addr, + map->size, pgprot_val(pgprot))) { + vunmap(vma->addr); + return NULL; } - - set_pte(pte, mk_pte(phys_to_page(map->addr), pgprot)); - pte_unmap(pte); - -out: - spin_unlock(&init_mm.page_table_lock); - sq_flush((void *)pteh); - - local_irq_restore(flags); - #endif /* CONFIG_MMU */ return map; @@ -236,11 +228,20 @@ struct sq_mapping *sq_remap(unsigned long phys, unsigned int size, const char *name) { struct sq_mapping *map; - unsigned long virt; + unsigned long virt, end; unsigned int psz; + /* Don't allow wraparound or zero size */ + end = phys + size - 1; + if (!size || end < phys) + return NULL; + /* Don't allow anyone to remap normal memory.. */ + if (phys < virt_to_phys(high_memory)) + return NULL; + phys &= PAGE_MASK; + size = PAGE_ALIGN(end + 1) - phys; virt = __sq_get_next_addr(); psz = (size + (PAGE_SIZE - 1)) / PAGE_SIZE; map = __sq_alloc_mapping(virt, phys, size, name); @@ -264,30 +265,8 @@ */ void sq_unmap(struct sq_mapping *map) { -#ifdef CONFIG_MMU - pgd_t *pgd; - pmd_t *pmd; - pte_t *pte; - - pgd = pgd_offset_k(map->sq_addr); - pmd = pmd_offset(pgd, map->sq_addr); - - if (pmd_none(*pmd)) - return; - if (pmd_bad(*pmd)) { - pmd_ERROR(*pmd); - pmd_clear(pmd); - return; - } - - pte = pte_offset_kernel(pmd, map->sq_addr); - if (pte_none(*pte) || pte_not_present(*pte)) - return; - - ptep_get_and_clear(pte); - - __flush_tlb_page(get_asid(), map->sq_addr & PAGE_MASK); -#endif + if (map->sq_addr > (unsigned long)high_memory) + vfree((void *)(map->sq_addr & PAGE_MASK)); list_del(&map->list); kfree(map); @@ -475,6 +454,7 @@ MODULE_AUTHOR("Paul Mundt , M. R. Brown "); MODULE_DESCRIPTION("Simple API for SH-4 integrated Store Queues"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(STORE_QUEUE_MINOR); EXPORT_SYMBOL(sq_remap); EXPORT_SYMBOL(sq_unmap); diff -Nru a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S --- a/arch/sh/kernel/entry.S Sun Mar 28 13:12:07 2004 +++ b/arch/sh/kernel/entry.S Sun Mar 28 13:12:07 2004 @@ -1,4 +1,4 @@ -/* $Id: entry.S,v 1.34 2004/01/13 05:52:11 kkojima Exp $ +/* $Id: entry.S,v 1.35 2004/02/21 14:45:47 lethal Exp $ * * linux/arch/sh/entry.S * @@ -1129,9 +1129,6 @@ .long sys_utimes .long sys_fadvise64_64_wrapper .long sys_ni_syscall /* Reserved for vserver */ - - .rept NR_syscalls-(.-sys_call_table)/4 - .long sys_ni_syscall - .endr + .long sys_ni_syscall /* End of entry.S */ diff -Nru a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c --- a/arch/sh/kernel/io.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/kernel/io.c Sun Mar 28 13:12:07 2004 @@ -16,10 +16,11 @@ */ void memcpy_fromio(void * to, unsigned long from, unsigned long count) { + char *p = to; while (count) { count--; - *(char *) to = readb(from); - ((char *) to)++; + *p = readb(from); + p++; from++; } } @@ -30,10 +31,11 @@ */ void memcpy_toio(unsigned long to, const void * from, unsigned long count) { + const char *p = from; while (count) { count--; - writeb(*(char *) from, to); - ((char *) from)++; + writeb(*p, to); + p++; to++; } } diff -Nru a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c --- a/arch/sh/kernel/module.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/kernel/module.c Sun Mar 28 13:12:08 2004 @@ -55,20 +55,22 @@ #define COPY_UNALIGNED_WORD(sw, tw, align) \ { \ void *__s = &(sw), *__t = &(tw); \ + unsigned short *__s2 = __s, *__t2 = __t; \ + unsigned char *__s1 = __s, *__t1 = __t; \ switch ((align)) \ { \ case 0: \ *(unsigned long *) __t = *(unsigned long *) __s; \ break; \ case 2: \ - *((unsigned short *) __t)++ = *((unsigned short *) __s)++; \ - *((unsigned short *) __t) = *((unsigned short *) __s); \ + *__t2++ = *__s2++; \ + *__t2 = *__s2; \ break; \ default: \ - *((unsigned char *) __t)++ = *((unsigned char *) __s)++; \ - *((unsigned char *) __t)++ = *((unsigned char *) __s)++; \ - *((unsigned char *) __t)++ = *((unsigned char *) __s)++; \ - *((unsigned char *) __t) = *((unsigned char *) __s); \ + *__t1++ = *__s1++; \ + *__t1++ = *__s1++; \ + *__t1++ = *__s1++; \ + *__t1 = *__s1; \ break; \ } \ } diff -Nru a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c --- a/arch/sh/kernel/process.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/kernel/process.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.25 2004/01/13 05:52:11 kkojima Exp $ +/* $Id: process.c,v 1.26 2004/02/06 14:14:14 kkojima Exp $ * * linux/arch/sh/kernel/process.c * @@ -254,6 +254,13 @@ struct task_struct *p, struct pt_regs *regs) { struct pt_regs *childregs; +#if defined(CONFIG_CPU_SH4) + struct task_struct *tsk = current; + + unlazy_fpu(tsk, regs); + p->thread.fpu = tsk->thread.fpu; + p->used_math = tsk->used_math; +#endif childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info) @@ -279,16 +286,6 @@ p->thread.ubc_pc = 0; -#if defined(CONFIG_CPU_SH4) - { - struct task_struct *tsk = current; - - unlazy_fpu(tsk, regs); - p->thread.fpu = tsk->thread.fpu; - p->used_math = tsk->used_math; - clear_ti_thread_flag(p->thread_info, TIF_USEDFPU); - } -#endif return 0; } diff -Nru a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c --- a/arch/sh/kernel/sh_ksyms.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/kernel/sh_ksyms.c Sun Mar 28 13:12:07 2004 @@ -113,3 +113,5 @@ #ifdef CONFIG_SMP EXPORT_SYMBOL(synchronize_irq); #endif + +EXPORT_SYMBOL(csum_partial); diff -Nru a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c --- a/arch/sh/kernel/sys_sh.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/kernel/sys_sh.c Sun Mar 28 13:12:08 2004 @@ -44,7 +44,7 @@ return error; } -#if defined(CONFIG_CPU_SH4) +#if defined(HAVE_ARCH_UNMAPPED_AREA) /* * To avoid cache alias, we map the shard page with same color. */ @@ -53,7 +53,9 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { + struct mm_struct *mm = current->mm; struct vm_area_struct *vma; + unsigned long start_addr; if (flags & MAP_FIXED) { /* We do not accept a shared mapping if it would violate @@ -66,20 +68,44 @@ if (len > TASK_SIZE) return -ENOMEM; - if (!addr) - addr = TASK_UNMAPPED_BASE; + if (addr) { + if (flags & MAP_PRIVATE) + addr = PAGE_ALIGN(addr); + else + addr = COLOUR_ALIGN(addr); + vma = find_vma(mm, addr); + if (TASK_SIZE - len >= addr && + (!vma || addr + len <= vma->vm_start)) + return addr; + } if (flags & MAP_PRIVATE) - addr = PAGE_ALIGN(addr); + addr = PAGE_ALIGN(mm->free_area_cache); else - addr = COLOUR_ALIGN(addr); + addr = COLOUR_ALIGN(mm->free_area_cache); + start_addr = addr; - for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) { +full_search: + for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { /* At this point: (!vma || addr < vma->vm_end). */ - if (TASK_SIZE - len < addr) + if (TASK_SIZE - len < addr) { + /* + * Start a new search - just in case we missed + * some holes. + */ + if (start_addr != TASK_UNMAPPED_BASE) { + start_addr = addr = TASK_UNMAPPED_BASE; + goto full_search; + } return -ENOMEM; - if (!vma || addr + len <= vma->vm_start) + } + if (!vma || addr + len <= vma->vm_start) { + /* + * Remember the place where we stopped the search: + */ + mm->free_area_cache = addr + len; return addr; + } addr = vma->vm_end; if (!(flags & MAP_PRIVATE)) addr = COLOUR_ALIGN(addr); diff -Nru a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c --- a/arch/sh/kernel/time.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/kernel/time.c Sun Mar 28 13:12:07 2004 @@ -1,4 +1,4 @@ -/* $Id: time.c,v 1.18 2003/10/09 16:28:14 lethal Exp $ +/* $Id: time.c,v 1.19 2004/02/27 00:40:48 lethal Exp $ * * linux/arch/sh/kernel/time.c * @@ -86,10 +86,14 @@ #endif #if defined(CONFIG_CPU_SH3) -#error "FIXME" -static int ifc_table[] = { 1, 2, 4, 1, 3, 1, 1, 1 }; -static int pfc_table[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; -static int stc_table[] = { 1, 2, 4, 8, 3, 6, 1, 1 }; +static int stc_multipliers[] = { 1, 2, 3, 4, 6, 1, 1, 1 }; +static int stc_values[] = { 0, 1, 4, 2, 5, 0, 0, 0 }; +#define bfc_divisors stc_multipliers +#define bfc_values stc_values +static int ifc_divisors[] = { 1, 2, 3, 4, 1, 1, 1, 1 }; +static int ifc_values[] = { 0, 1, 4, 2, 0, 0, 0, 0 }; +static int pfc_divisors[] = { 1, 2, 3, 4, 6, 1, 1, 1 }; +static int pfc_values[] = { 0, 1, 4, 2, 5, 0, 0, 0 }; #elif defined(CONFIG_CPU_SH4) static int ifc_divisors[] = { 1, 2, 3, 4, 6, 8, 1, 1 }; static int ifc_values[] = { 0, 1, 2, 3, 0, 4, 0, 5 }; @@ -398,13 +402,13 @@ tmp = (frqcr & 0x8000) >> 13; tmp |= (frqcr & 0x0030) >> 4; - *bfc = stc_table[tmp]; + *bfc = stc_multipliers[tmp]; tmp = (frqcr & 0x4000) >> 12; tmp |= (frqcr & 0x000c) >> 2; - *ifc = ifc_table[tmp]; + *ifc = ifc_divisors[tmp]; tmp = (frqcr & 0x2000) >> 11; tmp |= frqcr & 0x0003; - *pfc = pfc_table[tmp]; + *pfc = pfc_divisors[tmp]; #elif defined(CONFIG_CPU_SH4) *ifc = ifc_divisors[(frqcr >> 6) & 0x0007]; *bfc = bfc_divisors[(frqcr >> 3) & 0x0007]; diff -Nru a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c --- a/arch/sh/kernel/traps.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/kernel/traps.c Sun Mar 28 13:12:07 2004 @@ -1,4 +1,4 @@ -/* $Id: traps.c,v 1.14 2003/11/14 18:40:10 lethal Exp $ +/* $Id: traps.c,v 1.16 2004/03/16 00:10:54 lethal Exp $ * * linux/arch/sh/traps.c * @@ -655,6 +655,10 @@ unsigned long module_start = VMALLOC_START; unsigned long module_end = VMALLOC_END; int i = 1; + + if (tsk && !sp) { + sp = (unsigned long *)tsk->thread.sp; + } if (!sp) { __asm__ __volatile__ ( diff -Nru a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile --- a/arch/sh/mm/Makefile Sun Mar 28 13:12:08 2004 +++ b/arch/sh/mm/Makefile Sun Mar 28 13:12:08 2004 @@ -2,13 +2,14 @@ # Makefile for the Linux SuperH-specific parts of the memory manager. # -obj-y := init.o extable.o +obj-y := init.o extable.o consistent.o obj-$(CONFIG_CPU_SH2) += cache-sh2.o obj-$(CONFIG_CPU_SH3) += cache-sh3.o obj-$(CONFIG_CPU_SH4) += cache-sh4.o pg-sh4.o obj-$(CONFIG_DMA_PAGE_OPS) += pg-dma.o +obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o mmu-y := fault-nommu.o tlb-nommu.o pg-nommu.o mmu-$(CONFIG_MMU) := fault.o clear_page.o copy_page.o diff -Nru a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c --- a/arch/sh/mm/cache-sh4.c Sun Mar 28 13:12:07 2004 +++ b/arch/sh/mm/cache-sh4.c Sun Mar 28 13:12:07 2004 @@ -1,9 +1,10 @@ -/* $Id: cache-sh4.c,v 1.24 2003/10/12 19:40:12 lethal Exp $ +/* $Id: cache-sh4.c,v 1.26 2004/02/19 12:47:24 lethal Exp $ * * linux/arch/sh/mm/cache-sh4.c * * Copyright (C) 1999, 2000, 2002 Niibe Yutaka - * Copyright (C) 2001, 2002, 2003 Paul Mundt + * Copyright (C) 2001, 2002, 2003, 2004 Paul Mundt + * Copyright (C) 2003 Richard Curnow */ #include @@ -29,10 +30,20 @@ int __init detect_cpu_and_cache_system(void) { - unsigned long pvr, prr, ccr; + unsigned long pvr, prr, ccr, cvr; + unsigned long size; + + static unsigned long sizes[16] = { + [1] = (1 << 12), + [2] = (1 << 13), + [4] = (1 << 14), + [8] = (1 << 15), + [9] = (1 << 16) + }; pvr = (ctrl_inl(CCN_PVR) >> 8) & 0xffff; prr = (ctrl_inl(CCN_PRR) >> 4) & 0xff; + cvr = (ctrl_inl(CCN_CVR)); /* * Setup some sane SH-4 defaults for the icache @@ -54,6 +65,9 @@ cpu_data->dcache.ways = 1; cpu_data->dcache.linesz = L1_CACHE_BYTES; + /* Set the FPU flag, virtually all SH-4's have one */ + set_bit(CPU_HAS_FPU, &(cpu_data->flags)); + /* * Probe the underlying processor version/revision and * adjust cpu_data setup accordingly. @@ -68,7 +82,7 @@ /* * FIXME: This is needed for 7750, but do we need it for the - * 7750S and 7750R too? For now, assume we do.. -- PFM + * 7750S too? For now, assume we do.. -- PFM */ set_bit(CPU_HAS_P2_FLUSH_BUG, &(cpu_data->flags)); @@ -83,12 +97,18 @@ cpu_data->type = CPU_ST40GX1; break; case 0x700: - /* XXX: Add proper CVR probing */ cpu_data->type = CPU_SH4_501; + cpu_data->icache.ways = 2; + cpu_data->dcache.ways = 2; + + /* No FPU on the SH4-500 series.. */ + clear_bit(CPU_HAS_FPU, &(cpu_data->flags)); break; case 0x600: cpu_data->type = CPU_SH4_202; - /* fall */ + cpu_data->icache.ways = 2; + cpu_data->dcache.ways = 2; + break; case 0x500 ... 0x501: switch (prr) { case 0x10: cpu_data->type = CPU_SH7750R; break; @@ -96,9 +116,20 @@ case 0x50: cpu_data->type = CPU_SH7760; break; } - if (cpu_data->type == CPU_SH7750R) - set_bit(CPU_HAS_P2_FLUSH_BUG, &(cpu_data->flags)); + cpu_data->icache.ways = 2; + cpu_data->dcache.ways = 2; + + break; + default: + cpu_data->type = CPU_SH_NONE; + break; + } + /* + * On anything that's not a direct-mapped cache, look to the CVR + * for I/D-cache specifics. + */ + if (cpu_data->dcache.ways > 1) { jump_to_P2(); ccr = ctrl_inl(CCR); @@ -110,19 +141,17 @@ back_to_P1(); - cpu_data->icache.ways = 2; - cpu_data->dcache.ways = 2; - - break; - default: - cpu_data->type = CPU_SH_NONE; - break; + size = sizes[(cvr >> 20) & 0xf]; + cpu_data->icache.way_shift = (size >> 1); + cpu_data->icache.entry_mask = ((size >> 2) - (1 << 5)); + cpu_data->icache.sets = (size >> 6); + + size = sizes[(cvr >> 16) & 0xf]; + cpu_data->dcache.way_shift = (size >> 1); + cpu_data->dcache.entry_mask = ((size >> 2) - (1 << 5)); + cpu_data->dcache.sets = (size >> 6); } - /* No FPU on the SH4-500 series.. */ - if (cpu_data->type != CPU_SH4_501) - set_bit(CPU_HAS_FPU, &(cpu_data->flags)); - return 0; } @@ -419,7 +448,7 @@ } pte++; p += PAGE_SIZE; - } while (p < end && (unsigned long)pte & PAGE_MASK); + } while (p < end && ((unsigned long)pte & ~PAGE_MASK)); pmd++; } while (p < end); loop_exit: diff -Nru a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/mm/consistent.c Sun Mar 28 13:12:08 2004 @@ -0,0 +1,79 @@ +/* + * arch/sh/mm/consistent.c + * + * Copyright (C) 2004 Paul Mundt + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ +#include +#include +#include + +void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle) +{ + struct page *page, *end, *free; + void *ret; + int order; + + size = PAGE_ALIGN(size); + order = get_order(size); + + page = alloc_pages(gfp, order); + if (!page) + return NULL; + + ret = (void *)P2SEGADDR(page_to_bus(page)); + + /* + * We must flush the cache before we pass it on to the device + */ + dma_cache_wback_inv(ret, size); + + *handle = (unsigned long)ret; + + free = page + (size >> PAGE_SHIFT); + end = page + (1 << order); + + do { + set_page_count(page, 1); + page++; + } while (size -= PAGE_SIZE); + + /* + * Free any unused pages + */ + while (page < end) { + set_page_count(page, 1); + __free_page(page); + page++; + } + + return ret; +} + +void consistent_free(void *vaddr, size_t size) +{ + unsigned long addr = P1SEGADDR((unsigned long)vaddr); + + free_pages(addr, get_order(size)); +} + +void consistent_sync(void *vaddr, size_t size, int direction) +{ + switch (direction) { + case DMA_FROM_DEVICE: /* invalidate only */ + dma_cache_inv(vaddr, size); + break; + case DMA_TO_DEVICE: /* writeback only */ + dma_cache_wback(vaddr, size); + break; + case DMA_BIDIRECTIONAL: /* writeback and invalidate */ + dma_cache_wback_inv(vaddr, size); + break; + default: + BUG(); + } +} + diff -Nru a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/sh/mm/hugetlbpage.c Sun Mar 28 13:12:08 2004 @@ -0,0 +1,519 @@ +/* + * arch/sh/mm/hugetlbpage.c + * + * SuperH HugeTLB page support. + * + * Cloned from sparc64 by Paul Mundt. + * + * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +static long htlbpagemem; +int htlbpage_max; +static long htlbzone_pages; + +static struct list_head hugepage_freelists[MAX_NUMNODES]; +static spinlock_t htlbpage_lock = SPIN_LOCK_UNLOCKED; + +static void enqueue_huge_page(struct page *page) +{ + list_add(&page->list, + &hugepage_freelists[page_zone(page)->zone_pgdat->node_id]); +} + +static struct page *dequeue_huge_page(void) +{ + int nid = numa_node_id(); + struct page *page = NULL; + + if (list_empty(&hugepage_freelists[nid])) { + for (nid = 0; nid < MAX_NUMNODES; ++nid) + if (!list_empty(&hugepage_freelists[nid])) + break; + } + if (nid >= 0 && nid < MAX_NUMNODES && + !list_empty(&hugepage_freelists[nid])) { + page = list_entry(hugepage_freelists[nid].next, + struct page, list); + list_del(&page->list); + } + return page; +} + +static struct page *alloc_fresh_huge_page(void) +{ + static int nid = 0; + struct page *page; + page = alloc_pages_node(nid, GFP_HIGHUSER, HUGETLB_PAGE_ORDER); + nid = (nid + 1) % numnodes; + return page; +} + +static void free_huge_page(struct page *page); + +static struct page *alloc_hugetlb_page(void) +{ + struct page *page; + + spin_lock(&htlbpage_lock); + page = dequeue_huge_page(); + if (!page) { + spin_unlock(&htlbpage_lock); + return NULL; + } + htlbpagemem--; + spin_unlock(&htlbpage_lock); + set_page_count(page, 1); + page->lru.prev = (void *)free_huge_page; + memset(page_address(page), 0, HPAGE_SIZE); + return page; +} + +static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) +{ + pgd_t *pgd; + pmd_t *pmd; + pte_t *pte = NULL; + + pgd = pgd_offset(mm, addr); + if (pgd) { + pmd = pmd_alloc(mm, pgd, addr); + if (pmd) + pte = pte_alloc_map(mm, pmd, addr); + } + return pte; +} + +static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) +{ + pgd_t *pgd; + pmd_t *pmd; + pte_t *pte = NULL; + + pgd = pgd_offset(mm, addr); + if (pgd) { + pmd = pmd_offset(pgd, addr); + if (pmd) + pte = pte_offset_map(pmd, addr); + } + return pte; +} + +#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, + struct page *page, pte_t * page_table, int write_access) +{ + unsigned long i; + pte_t entry; + + mm->rss += (HPAGE_SIZE / PAGE_SIZE); + + if (write_access) + entry = pte_mkwrite(pte_mkdirty(mk_pte(page, + vma->vm_page_prot))); + else + entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); + entry = pte_mkyoung(entry); + mk_pte_huge(entry); + + for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { + set_pte(page_table, entry); + page_table++; + + pte_val(entry) += PAGE_SIZE; + } +} + +/* + * This function checks for proper alignment of input addr and len parameters. + */ +int is_aligned_hugepage_range(unsigned long addr, unsigned long len) +{ + if (len & ~HPAGE_MASK) + return -EINVAL; + if (addr & ~HPAGE_MASK) + return -EINVAL; + return 0; +} + +int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, + struct vm_area_struct *vma) +{ + pte_t *src_pte, *dst_pte, entry; + struct page *ptepage; + unsigned long addr = vma->vm_start; + unsigned long end = vma->vm_end; + int i; + + while (addr < end) { + dst_pte = huge_pte_alloc(dst, addr); + if (!dst_pte) + goto nomem; + src_pte = huge_pte_offset(src, addr); + BUG_ON(!src_pte || pte_none(*src_pte)); + entry = *src_pte; + ptepage = pte_page(entry); + get_page(ptepage); + for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { + set_pte(dst_pte, entry); + pte_val(entry) += PAGE_SIZE; + dst_pte++; + } + dst->rss += (HPAGE_SIZE / PAGE_SIZE); + addr += HPAGE_SIZE; + } + return 0; + +nomem: + return -ENOMEM; +} + +int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, + struct page **pages, struct vm_area_struct **vmas, + unsigned long *position, int *length, int i) +{ + unsigned long vaddr = *position; + int remainder = *length; + + WARN_ON(!is_vm_hugetlb_page(vma)); + + while (vaddr < vma->vm_end && remainder) { + if (pages) { + pte_t *pte; + struct page *page; + + pte = huge_pte_offset(mm, vaddr); + + /* hugetlb should be locked, and hence, prefaulted */ + BUG_ON(!pte || pte_none(*pte)); + + page = pte_page(*pte); + + WARN_ON(!PageCompound(page)); + + get_page(page); + pages[i] = page; + } + + if (vmas) + vmas[i] = vma; + + vaddr += PAGE_SIZE; + --remainder; + ++i; + } + + *length = remainder; + *position = vaddr; + + return i; +} + +struct page *follow_huge_addr(struct mm_struct *mm, + struct vm_area_struct *vma, + unsigned long address, int write) +{ + return NULL; +} + +struct vm_area_struct *hugepage_vma(struct mm_struct *mm, unsigned long addr) +{ + return NULL; +} + +int pmd_huge(pmd_t pmd) +{ + return 0; +} + +struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, + pmd_t *pmd, int write) +{ + return NULL; +} + +static void free_huge_page(struct page *page) +{ + BUG_ON(page_count(page)); + BUG_ON(page->mapping); + + INIT_LIST_HEAD(&page->list); + + spin_lock(&htlbpage_lock); + enqueue_huge_page(page); + htlbpagemem++; + spin_unlock(&htlbpage_lock); +} + +void huge_page_release(struct page *page) +{ + if (!put_page_testzero(page)) + return; + + free_huge_page(page); +} + +void unmap_hugepage_range(struct vm_area_struct *vma, + unsigned long start, unsigned long end) +{ + struct mm_struct *mm = vma->vm_mm; + unsigned long address; + pte_t *pte; + struct page *page; + int i; + + BUG_ON(start & (HPAGE_SIZE - 1)); + BUG_ON(end & (HPAGE_SIZE - 1)); + + for (address = start; address < end; address += HPAGE_SIZE) { + pte = huge_pte_offset(mm, address); + BUG_ON(!pte); + if (pte_none(*pte)) + continue; + page = pte_page(*pte); + huge_page_release(page); + for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { + pte_clear(pte); + pte++; + } + } + mm->rss -= (end - start) >> PAGE_SHIFT; + flush_tlb_range(vma, start, end); +} + +void zap_hugepage_range(struct vm_area_struct *vma, + unsigned long start, unsigned long length) +{ + struct mm_struct *mm = vma->vm_mm; + + spin_lock(&mm->page_table_lock); + unmap_hugepage_range(vma, start, start + length); + spin_unlock(&mm->page_table_lock); +} + +int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) +{ + struct mm_struct *mm = current->mm; + unsigned long addr; + int ret = 0; + + BUG_ON(vma->vm_start & ~HPAGE_MASK); + BUG_ON(vma->vm_end & ~HPAGE_MASK); + + spin_lock(&mm->page_table_lock); + for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) { + unsigned long idx; + pte_t *pte = huge_pte_alloc(mm, addr); + struct page *page; + + if (!pte) { + ret = -ENOMEM; + goto out; + } + if (!pte_none(*pte)) + continue; + + idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) + + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); + page = find_get_page(mapping, idx); + if (!page) { + /* charge the fs quota first */ + if (hugetlb_get_quota(mapping)) { + ret = -ENOMEM; + goto out; + } + page = alloc_hugetlb_page(); + if (!page) { + hugetlb_put_quota(mapping); + ret = -ENOMEM; + goto out; + } + ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); + unlock_page(page); + if (ret) { + hugetlb_put_quota(mapping); + free_huge_page(page); + goto out; + } + } + set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); + } +out: + spin_unlock(&mm->page_table_lock); + return ret; +} + +static void update_and_free_page(struct page *page) +{ + int j; + struct page *map; + + map = page; + htlbzone_pages--; + for (j = 0; j < (HPAGE_SIZE / PAGE_SIZE); j++) { + map->flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced | + 1 << PG_dirty | 1 << PG_active | 1 << PG_reserved | + 1 << PG_private | 1<< PG_writeback); + set_page_count(map, 0); + map++; + } + set_page_count(page, 1); + __free_pages(page, HUGETLB_PAGE_ORDER); +} + +static int try_to_free_low(int count) +{ + struct list_head *p; + struct page *page, *map; + + map = NULL; + spin_lock(&htlbpage_lock); + /* all lowmem is on node 0 */ + list_for_each(p, &hugepage_freelists[0]) { + if (map) { + list_del(&map->list); + update_and_free_page(map); + htlbpagemem--; + map = NULL; + if (++count == 0) + break; + } + page = list_entry(p, struct page, list); + if (!PageHighMem(page)) + map = page; + } + if (map) { + list_del(&map->list); + update_and_free_page(map); + htlbpagemem--; + count++; + } + spin_unlock(&htlbpage_lock); + return count; +} + +static int set_hugetlb_mem_size(int count) +{ + int lcount; + struct page *page; + + if (count < 0) + lcount = count; + else + lcount = count - htlbzone_pages; + + if (lcount == 0) + return (int)htlbzone_pages; + if (lcount > 0) { /* Increase the mem size. */ + while (lcount--) { + page = alloc_fresh_huge_page(); + if (page == NULL) + break; + spin_lock(&htlbpage_lock); + enqueue_huge_page(page); + htlbpagemem++; + htlbzone_pages++; + spin_unlock(&htlbpage_lock); + } + return (int) htlbzone_pages; + } + /* Shrink the memory size. */ + lcount = try_to_free_low(lcount); + while (lcount++) { + page = alloc_hugetlb_page(); + if (page == NULL) + break; + spin_lock(&htlbpage_lock); + update_and_free_page(page); + spin_unlock(&htlbpage_lock); + } + return (int) htlbzone_pages; +} + +int hugetlb_sysctl_handler(struct ctl_table *table, int write, + struct file *file, void *buffer, size_t *length) +{ + proc_dointvec(table, write, file, buffer, length); + htlbpage_max = set_hugetlb_mem_size(htlbpage_max); + return 0; +} + +static int __init hugetlb_setup(char *s) +{ + if (sscanf(s, "%d", &htlbpage_max) <= 0) + htlbpage_max = 0; + return 1; +} +__setup("hugepages=", hugetlb_setup); + +static int __init hugetlb_init(void) +{ + int i; + struct page *page; + + for (i = 0; i < MAX_NUMNODES; ++i) + INIT_LIST_HEAD(&hugepage_freelists[i]); + + for (i = 0; i < htlbpage_max; ++i) { + page = alloc_fresh_huge_page(); + if (!page) + break; + spin_lock(&htlbpage_lock); + enqueue_huge_page(page); + spin_unlock(&htlbpage_lock); + } + htlbpage_max = htlbpagemem = htlbzone_pages = i; + printk("Total HugeTLB memory allocated, %ld\n", htlbpagemem); + return 0; +} +module_init(hugetlb_init); + +int hugetlb_report_meminfo(char *buf) +{ + return sprintf(buf, + "HugePages_Total: %5lu\n" + "HugePages_Free: %5lu\n" + "Hugepagesize: %5lu kB\n", + htlbzone_pages, + htlbpagemem, + HPAGE_SIZE/1024); +} + +int is_hugepage_mem_enough(size_t size) +{ + return (size + ~HPAGE_MASK)/HPAGE_SIZE <= htlbpagemem; +} + +/* + * We cannot handle pagefaults against hugetlb pages at all. They cause + * handle_mm_fault() to try to instantiate regular-sized pages in the + * hugegpage VMA. do_page_fault() is supposed to trap this, so BUG is we get + * this far. + */ +static struct page *hugetlb_nopage(struct vm_area_struct *vma, + unsigned long address, int *unused) +{ + BUG(); + return NULL; +} + +struct vm_operations_struct hugetlb_vm_ops = { + .nopage = hugetlb_nopage, +}; diff -Nru a/arch/sh/mm/init.c b/arch/sh/mm/init.c --- a/arch/sh/mm/init.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/mm/init.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.18 2003/10/31 09:26:59 kkojima Exp $ +/* $Id: init.c,v 1.19 2004/02/21 04:42:16 kkojima Exp $ * * linux/arch/sh/mm/init.c * @@ -174,6 +174,7 @@ extern unsigned long empty_zero_page[1024]; int codesize, reservedpages, datasize, initsize; int tmp; + extern unsigned long memory_start; #ifdef CONFIG_MMU high_memory = (void *)__va(MAX_LOW_PFN * PAGE_SIZE); @@ -183,7 +184,7 @@ high_memory = (void *)(memory_end & PAGE_MASK); #endif - max_mapnr = num_physpages = MAP_NR(high_memory); + max_mapnr = num_physpages = MAP_NR(high_memory) - MAP_NR(memory_start); /* clear the zero-page */ memset(empty_zero_page, 0, PAGE_SIZE); diff -Nru a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c --- a/arch/sh/mm/ioremap.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/mm/ioremap.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: ioremap.c,v 1.8 2003/10/09 15:25:42 lethal Exp $ +/* $Id: ioremap.c,v 1.9 2004/02/25 04:59:10 lethal Exp $ * * arch/sh/mm/ioremap.c * @@ -160,5 +160,5 @@ void p3_iounmap(void *addr) { if (addr > high_memory) - return vfree((void *) (PAGE_MASK & (unsigned long) addr)); + vfree((void *)(PAGE_MASK & (unsigned long)addr)); } diff -Nru a/arch/sh/mm/pg-dma.c b/arch/sh/mm/pg-dma.c --- a/arch/sh/mm/pg-dma.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/mm/pg-dma.c Sun Mar 28 13:12:08 2004 @@ -21,7 +21,7 @@ #include /* Channel to use for page ops, must be dual-address mode capable. */ -static int dma_channel = 3; +static int dma_channel = CONFIG_DMA_PAGE_OPS_CHANNEL; static void copy_page_dma(void *to, void *from) { diff -Nru a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c --- a/arch/sh/mm/tlb-sh4.c Sun Mar 28 13:12:08 2004 +++ b/arch/sh/mm/tlb-sh4.c Sun Mar 28 13:12:08 2004 @@ -68,7 +68,7 @@ /* Set PTEL register */ pteval &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */ #ifdef CONFIG_SH_WRITETHROUGH - pteval |= 1; + pteval |= _PAGE_WT; #endif /* conveniently, we want all the software flags to be 0 anyway */ ctrl_outl(pteval, MMU_PTEL); diff -Nru a/arch/sparc/Makefile b/arch/sparc/Makefile --- a/arch/sparc/Makefile Sun Mar 28 13:12:07 2004 +++ b/arch/sparc/Makefile Sun Mar 28 13:12:07 2004 @@ -67,7 +67,8 @@ $(call filechk,gen-asm-offsets) CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \ - arch/$(ARCH)/kernel/asm-offsets.s + arch/$(ARCH)/kernel/asm-offsets.s \ + arch/$(ARCH)/boot/System.map # Don't use tabs in echo arguments. define archhelp diff -Nru a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile --- a/arch/sparc/boot/Makefile Sun Mar 28 13:12:08 2004 +++ b/arch/sparc/boot/Makefile Sun Mar 28 13:12:08 2004 @@ -32,6 +32,3 @@ $(obj)/btfix.s: $(obj)/btfixupprep vmlinux FORCE $(call if_changed,btfix) - -clean: - rm $(obj)/System.map diff -Nru a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S --- a/arch/sparc/kernel/entry.S Sun Mar 28 13:12:07 2004 +++ b/arch/sparc/kernel/entry.S Sun Mar 28 13:12:07 2004 @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -1808,36 +1809,37 @@ retl nop - .globl ndelay -ndelay: + /* __ndelay and __udelay take two arguments: + * 0 - nsecs or usecs to delay + * 1 - per_cpu udelay_val (loops per jiffy) + * + * Note that ndelay gives HZ times higher resolution but has a 10ms + * limit. udelay can handle up to 1s. + */ + .globl __ndelay +__ndelay: save %sp, -STACKFRAME_SZ, %sp mov %i0, %o0 call .umul - mov 5, %o1 + mov 0x1ad, %o1 ! 2**32 / (1 000 000 000 / HZ) + call .umul + mov %i1, %o1 ! udelay_val ba delay_continue - nop + mov %o1, %o0 ! >>32 later for better resolution - .globl udelay -udelay: + .globl __udelay +__udelay: save %sp, -STACKFRAME_SZ, %sp mov %i0, %o0 sethi %hi(0x10c6), %o1 call .umul - or %o1, %lo(0x10c6), %o1 -delay_continue: -#ifndef CONFIG_SMP - sethi %hi(loops_per_jiffy), %o3 + or %o1, %lo(0x10c6), %o1 ! 2**32 / 1 000 000 call .umul - ld [%o3 + %lo(loops_per_jiffy)], %o1 -#else - GET_PROCESSOR_OFFSET(o4, o2) - set cpu_data, %o3 - call .umul - ld [%o3 + %o4], %o1 -#endif + mov %i1, %o1 ! udelay_val call .umul - mov 100, %o0 + mov HZ, %o0 ! >>32 earlier for wider range +delay_continue: cmp %o0, 0x0 1: bne 1b diff -Nru a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c --- a/arch/sparc/kernel/setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/sparc/kernel/setup.c Sun Mar 28 13:12:07 2004 @@ -331,6 +331,7 @@ if (highest_paddr < top) highest_paddr = top; } + pfn_base = phys_base >> PAGE_SHIFT; if (!root_flags) root_mountflags &= ~MS_RDONLY; diff -Nru a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c --- a/arch/sparc/kernel/smp.c Sun Mar 28 13:12:07 2004 +++ b/arch/sparc/kernel/smp.c Sun Mar 28 13:12:07 2004 @@ -20,11 +20,11 @@ #include #include #include +#include #include #include -#include #include #include #include diff -Nru a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c --- a/arch/sparc/kernel/sparc_ksyms.c Sun Mar 28 13:12:07 2004 +++ b/arch/sparc/kernel/sparc_ksyms.c Sun Mar 28 13:12:07 2004 @@ -145,6 +145,7 @@ EXPORT_SYMBOL(sparc_valid_addr_bitmap); EXPORT_SYMBOL(phys_base); +EXPORT_SYMBOL(pfn_base); /* Atomic operations. */ EXPORT_SYMBOL(___atomic24_add); @@ -164,8 +165,8 @@ EXPORT_SYMBOL(__cpu_logical_map); #endif -EXPORT_SYMBOL(udelay); -EXPORT_SYMBOL(ndelay); +EXPORT_SYMBOL(__udelay); +EXPORT_SYMBOL(__ndelay); EXPORT_SYMBOL(rtc_lock); EXPORT_SYMBOL(mostek_lock); EXPORT_SYMBOL(mstk48t02_regs); diff -Nru a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c --- a/arch/sparc/kernel/sun4d_smp.c Sun Mar 28 13:12:07 2004 +++ b/arch/sparc/kernel/sun4d_smp.c Sun Mar 28 13:12:07 2004 @@ -49,7 +49,6 @@ extern int smp_threads_ready; extern volatile unsigned long cpu_callin_map[NR_CPUS]; extern struct cpuinfo_sparc cpu_data[NR_CPUS]; -extern unsigned long cpu_offset[NR_CPUS]; extern unsigned char boot_cpu_id; extern int smp_activated; extern volatile int __cpu_number_map[NR_CPUS]; @@ -171,9 +170,6 @@ printk("Entering SMP Mode...\n"); - for (i = 0; i < NR_CPUS; i++) - cpu_offset[i] = (char *)&(cpu_data(i)) - (char *)&(cpu_data(0)); - if (boot_cpu_id) current_set[0] = NULL; @@ -426,9 +422,6 @@ } extern void sparc_do_profile(unsigned long pc, unsigned long o7); - -#define prof_multiplier(__cpu) cpu_data(__cpu).multiplier -#define prof_counter(__cpu) cpu_data(__cpu).counter void smp4d_percpu_timer_interrupt(struct pt_regs *regs) { diff -Nru a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c --- a/arch/sparc/kernel/sun4m_smp.c Sun Mar 28 13:12:08 2004 +++ b/arch/sparc/kernel/sun4m_smp.c Sun Mar 28 13:12:08 2004 @@ -44,7 +44,6 @@ extern int smp_num_cpus; extern int smp_threads_ready; extern volatile unsigned long cpu_callin_map[NR_CPUS]; -extern unsigned long cpu_offset[NR_CPUS]; extern unsigned char boot_cpu_id; extern int smp_activated; extern volatile int __cpu_number_map[NR_CPUS]; @@ -152,9 +151,7 @@ for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++) cpu_present_map |= (1<> PAGE_SHIFT); + unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); unsigned long curr_pfn, last_pfn; last_pfn = (sp_banks[0].base_addr + sp_banks[0].num_bytes) >> PAGE_SHIFT; @@ -189,9 +190,6 @@ */ start_pfn = (unsigned long)__pa(PAGE_ALIGN((unsigned long) &_end)); - /* Adjust up to the physical address where the kernel begins. */ - start_pfn += phys_base; - /* Now shift down to get the real physical page frame number. */ start_pfn >>= PAGE_SHIFT; @@ -202,8 +200,8 @@ max_low_pfn = max_pfn; highstart_pfn = highend_pfn = max_pfn; - if (max_low_pfn > (SRMMU_MAXMEM >> PAGE_SHIFT)) { - highstart_pfn = (SRMMU_MAXMEM >> PAGE_SHIFT); + if (max_low_pfn > pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT)) { + highstart_pfn = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); max_low_pfn = calc_max_low_pfn(); printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", calc_highpages() >> (20 - PAGE_SHIFT)); @@ -230,7 +228,8 @@ } #endif /* Initialize the boot-time allocator. */ - bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn, phys_base>>PAGE_SHIFT, max_low_pfn); + bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn, pfn_base, + max_low_pfn); /* Now register the available physical memory with the * allocator. @@ -267,8 +266,8 @@ reserve_bootmem(initrd_start, size); *pages_avail -= PAGE_ALIGN(size) >> PAGE_SHIFT; - initrd_start += PAGE_OFFSET; - initrd_end += PAGE_OFFSET; + initrd_start = (initrd_start - phys_base) + PAGE_OFFSET; + initrd_end = (initrd_end - phys_base) + PAGE_OFFSET; } #endif /* Reserve the kernel text/data/bss. */ @@ -432,7 +431,7 @@ taint_real_pages(); - max_mapnr = last_valid_pfn - (phys_base >> PAGE_SHIFT); + max_mapnr = last_valid_pfn - pfn_base; high_memory = __va(max_low_pfn << PAGE_SHIFT); num_physpages = totalram_pages = free_all_bootmem(); @@ -474,11 +473,9 @@ addr = (unsigned long)(&__init_begin); for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { - unsigned long page; struct page *p; - page = addr + phys_base; - p = virt_to_page(page); + p = virt_to_page(addr); ClearPageReserved(p); set_page_count(p, 1); diff -Nru a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c --- a/arch/sparc/mm/srmmu.c Sun Mar 28 13:12:08 2004 +++ b/arch/sparc/mm/srmmu.c Sun Mar 28 13:12:08 2004 @@ -213,7 +213,7 @@ * and a page entry and page directory to the page they refer to. */ static pte_t srmmu_mk_pte(struct page *page, pgprot_t pgprot) -{ return __pte(((page - mem_map) << (PAGE_SHIFT-4)) | pgprot_val(pgprot)); } +{ return __pte((page_to_pfn(page) << (PAGE_SHIFT-4)) | pgprot_val(pgprot)); } static pte_t srmmu_mk_pte_phys(unsigned long page, pgprot_t pgprot) { return __pte(((page) >> 4) | pgprot_val(pgprot)); } @@ -245,7 +245,7 @@ unsigned long ptp; /* Physical address, shifted right by 4 */ int i; - ptp = (ptep - mem_map) << (PAGE_SHIFT-4); /* watch for overflow */ + ptp = page_to_pfn(ptep) << (PAGE_SHIFT-4); /* watch for overflow */ for (i = 0; i < SRMMU_PTRS_PER_PTE_SOFT/SRMMU_PTRS_PER_PTE; i++) { srmmu_set_pte((pte_t *)&pmdp->pmdv[i], SRMMU_ET_PTD | ptp); ptp += (SRMMU_PTRS_PER_PTE*sizeof(pte_t) >> 4); @@ -480,7 +480,7 @@ if ((pte = (unsigned long)srmmu_pte_alloc_one_kernel(mm, address)) == 0) return NULL; - return mem_map + (__nocache_pa(pte) >> PAGE_SHIFT); + return pfn_to_page( __nocache_pa(pte) >> PAGE_SHIFT ); } static void srmmu_free_pte_fast(pte_t *pte) @@ -495,7 +495,7 @@ p = (unsigned long)page_address(pte); /* Cached address (for test) */ if (p == 0) BUG(); - p = ((pte - mem_map) << PAGE_SHIFT); /* Physical address */ + p = page_to_pfn(pte) << PAGE_SHIFT; /* Physical address */ p = (unsigned long) __nocache_va(p); /* Nocached virtual */ srmmu_free_nocache(p, SRMMU_PTE_SZ_SOFT); } @@ -1316,7 +1316,7 @@ for (znum = 0; znum < MAX_NR_ZONES; znum++) zones_size[znum] = zholes_size[znum] = 0; - npages = max_low_pfn - (phys_base >> PAGE_SHIFT); + npages = max_low_pfn - pfn_base; zones_size[ZONE_DMA] = npages; zholes_size[ZONE_DMA] = npages - pages_avail; @@ -1326,13 +1326,9 @@ zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); free_area_init_node(0, &contig_page_data, NULL, zones_size, - phys_base >> PAGE_SHIFT, zholes_size); + pfn_base, zholes_size); mem_map = contig_page_data.node_mem_map; } - -/* P3: easy to fix, todo. Current code is utterly broken, though. */ - if (phys_base != 0) - panic("phys_base nonzero"); } static void srmmu_mmu_info(struct seq_file *m) diff -Nru a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c --- a/arch/sparc/mm/sun4c.c Sun Mar 28 13:12:08 2004 +++ b/arch/sparc/mm/sun4c.c Sun Mar 28 13:12:08 2004 @@ -2088,7 +2088,7 @@ for (znum = 0; znum < MAX_NR_ZONES; znum++) zones_size[znum] = zholes_size[znum] = 0; - npages = max_low_pfn - (phys_base >> PAGE_SHIFT); + npages = max_low_pfn - pfn_base; zones_size[ZONE_DMA] = npages; zholes_size[ZONE_DMA] = npages - pages_avail; @@ -2098,7 +2098,7 @@ zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); free_area_init_node(0, &contig_page_data, NULL, zones_size, - phys_base >> PAGE_SHIFT, zholes_size); + pfn_base, zholes_size); mem_map = contig_page_data.node_mem_map; } diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig Sun Mar 28 13:12:07 2004 +++ b/arch/sparc64/defconfig Sun Mar 28 13:12:07 2004 @@ -277,7 +277,6 @@ CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # @@ -332,6 +331,7 @@ CONFIG_SCSI_SATA_SVW=m CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_PROMISE=m +CONFIG_SCSI_SATA_SIL=m CONFIG_SCSI_SATA_VIA=m CONFIG_SCSI_SATA_VITESSE=m # CONFIG_SCSI_BUSLOGIC is not set @@ -464,7 +464,6 @@ CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y CONFIG_ARPD=y -CONFIG_INET_ECN=y CONFIG_SYN_COOKIES=y CONFIG_INET_AH=y CONFIG_INET_ESP=y @@ -632,7 +631,6 @@ # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=m CONFIG_IP_SCTP=m # CONFIG_SCTP_DBG_MSG is not set # CONFIG_SCTP_DBG_OBJCNT is not set @@ -1205,7 +1203,7 @@ # CONFIG_DEVFS_DEBUG is not set CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY is not set -# CONFIG_TMPFS is not set +CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -1751,6 +1749,7 @@ CONFIG_CRYPTO_CAST6=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_TEST=m # diff -Nru a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c --- a/arch/sparc64/kernel/signal32.c Sun Mar 28 13:12:07 2004 +++ b/arch/sparc64/kernel/signal32.c Sun Mar 28 13:12:07 2004 @@ -394,7 +394,7 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs) { struct rt_signal_frame32 __user *sf; - unsigned int psr, pc, npc, fpu_save; + unsigned int psr, pc, npc, fpu_save, u_ss_sp; mm_segment_t old_fs; sigset_t set; compat_sigset_t seta; @@ -448,7 +448,8 @@ if (fpu_save) err |= restore_fpu_state32(regs, &sf->fpu_state); err |= copy_from_user(&seta, &sf->mask, sizeof(compat_sigset_t)); - err |= __get_user((long)st.ss_sp, &sf->stack.ss_sp); + err |= __get_user(u_ss_sp, &sf->stack.ss_sp); + st.ss_sp = (void *) (long) u_ss_sp; err |= __get_user(st.ss_flags, &sf->stack.ss_flags); err |= __get_user(st.ss_size, &sf->stack.ss_size); if (err) @@ -977,7 +978,7 @@ { svr4_gregset_t __user *gr; mm_segment_t old_fs; - u32 pc, npc, psr; + u32 pc, npc, psr, u_ss_sp; sigset_t set; svr4_sigset_t setv; int i, err; @@ -1017,7 +1018,8 @@ if (_NSIG_WORDS >= 2) set.sig[1] = setv.sigbits[2] | (((long)setv.sigbits[3]) << 32); - err |= __get_user((long)st.ss_sp, &c->stack.sp); + err |= __get_user(u_ss_sp, &c->stack.sp); + st.ss_sp = (void *) (long) u_ss_sp; err |= __get_user(st.ss_flags, &c->stack.flags); err |= __get_user(st.ss_size, &c->stack.size); if (err) @@ -1310,9 +1312,9 @@ /* Now see if we want to update the new state. */ if (ssptr) { - void *ss_sp; + u32 ss_sp; - if (get_user((long)ss_sp, &ssptr->the_stack)) + if (get_user(ss_sp, &ssptr->the_stack)) goto out; /* If the current stack was set with sigaltstack, don't @@ -1338,13 +1340,15 @@ asmlinkage int do_sys32_sigaltstack(u32 ussa, u32 uossa, unsigned long sp) { stack_t uss, uoss; + u32 u_ss_sp = 0; int ret; mm_segment_t old_fs; - if (ussa && (get_user((long)uss.ss_sp, &((stack_t32 __user *)(long)ussa)->ss_sp) || + if (ussa && (get_user(u_ss_sp, &((stack_t32 __user *)(long)ussa)->ss_sp) || __get_user(uss.ss_flags, &((stack_t32 __user *)(long)ussa)->ss_flags) || __get_user(uss.ss_size, &((stack_t32 __user *)(long)ussa)->ss_size))) return -EFAULT; + uss.ss_sp = (void *) (long) u_ss_sp; old_fs = get_fs(); set_fs(KERNEL_DS); ret = do_sigaltstack(ussa ? &uss : NULL, uossa ? &uoss : NULL, sp); diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c --- a/arch/sparc64/kernel/sys_sparc32.c Sun Mar 28 13:12:08 2004 +++ b/arch/sparc64/kernel/sys_sparc32.c Sun Mar 28 13:12:08 2004 @@ -27,9 +27,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -1089,7 +1086,7 @@ { struct linux_dirent32 * dirent; struct getdents_callback32 * buf = (struct getdents_callback32 *) __buf; - int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); + int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) @@ -1103,7 +1100,8 @@ put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; + put_user(d_type, (char *) dirent + reclen - 1); + dirent = (void *) dirent + reclen; buf->current_dir = dirent; buf->count -= reclen; return 0; @@ -1329,209 +1327,6 @@ return sys_sysfs(option, arg1, arg2); } -struct ncp_mount_data32_v3 { - int version; - unsigned int ncp_fd; - compat_uid_t mounted_uid; - compat_pid_t wdog_pid; - unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; - unsigned int time_out; - unsigned int retry_count; - unsigned int flags; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -struct ncp_mount_data32_v4 { - int version; - /* all members below are "long" in ABI ... i.e. 32bit on sparc32, while 64bits on sparc64 */ - unsigned int flags; - unsigned int mounted_uid; - int wdog_pid; - - unsigned int ncp_fd; - unsigned int time_out; - unsigned int retry_count; - - unsigned int uid; - unsigned int gid; - unsigned int file_mode; - unsigned int dir_mode; -}; - -static void *do_ncp_super_data_conv(void *raw_data) -{ - switch (*(int*)raw_data) { - case NCP_MOUNT_VERSION: - { - struct ncp_mount_data news, *n = &news; - struct ncp_mount_data32_v3 *n32 = (struct ncp_mount_data32_v3 *)raw_data; - - n->version = n32->version; - n->ncp_fd = n32->ncp_fd; - n->mounted_uid = low2highuid(n32->mounted_uid); - n->wdog_pid = n32->wdog_pid; - memmove (n->mounted_vol, n32->mounted_vol, sizeof (n32->mounted_vol)); - n->time_out = n32->time_out; - n->retry_count = n32->retry_count; - n->flags = n32->flags; - n->uid = low2highuid(n32->uid); - n->gid = low2highgid(n32->gid); - n->file_mode = n32->file_mode; - n->dir_mode = n32->dir_mode; - memcpy(raw_data, n, sizeof(*n)); - } - break; - case NCP_MOUNT_VERSION_V4: - { - struct ncp_mount_data_v4 news, *n = &news; - struct ncp_mount_data32_v4 *n32 = (struct ncp_mount_data32_v4 *)raw_data; - - n->version = n32->version; - n->flags = n32->flags; - n->mounted_uid = n32->mounted_uid; - n->wdog_pid = n32->wdog_pid; - n->ncp_fd = n32->ncp_fd; - n->time_out = n32->time_out; - n->retry_count = n32->retry_count; - n->uid = n32->uid; - n->gid = n32->gid; - n->file_mode = n32->file_mode; - n->dir_mode = n32->dir_mode; - memcpy(raw_data, n, sizeof(*n)); - } - break; - default: - /* do not touch unknown structures */ - break; - } - return raw_data; -} - -struct smb_mount_data32 { - int version; - compat_uid_t mounted_uid; - compat_uid_t uid; - compat_gid_t gid; - compat_mode_t file_mode; - compat_mode_t dir_mode; -}; - -static void *do_smb_super_data_conv(void *raw_data) -{ - struct smb_mount_data news, *s = &news; - struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data; - - if (s32->version != SMB_MOUNT_OLDVERSION) - goto out; - s->version = s32->version; - s->mounted_uid = low2highuid(s32->mounted_uid); - s->uid = low2highuid(s32->uid); - s->gid = low2highgid(s32->gid); - s->file_mode = s32->file_mode; - s->dir_mode = s32->dir_mode; - memcpy(raw_data, s, sizeof(struct smb_mount_data)); -out: - return raw_data; -} - -static int copy_mount_stuff_to_kernel(const void *user, unsigned long *kernel) -{ - int i; - unsigned long page; - struct vm_area_struct *vma; - - *kernel = 0; - if(!user) - return 0; - vma = find_vma(current->mm, (unsigned long)user); - if(!vma || (unsigned long)user < vma->vm_start) - return -EFAULT; - if(!(vma->vm_flags & VM_READ)) - return -EFAULT; - i = vma->vm_end - (unsigned long) user; - if(PAGE_SIZE <= (unsigned long) i) - i = PAGE_SIZE - 1; - if(!(page = __get_free_page(GFP_KERNEL))) - return -ENOMEM; - if(copy_from_user((void *) page, user, i)) { - free_page(page); - return -EFAULT; - } - *kernel = page; - return 0; -} - -#define SMBFS_NAME "smbfs" -#define NCPFS_NAME "ncpfs" - -asmlinkage int sys32_mount(char *dev_name, char *dir_name, char *type, unsigned long new_flags, u32 data) -{ - unsigned long type_page = 0; - unsigned long data_page = 0; - unsigned long dev_page = 0; - unsigned long dir_page = 0; - int err, is_smb, is_ncp; - - is_smb = is_ncp = 0; - - err = copy_mount_stuff_to_kernel((const void *)type, &type_page); - if (err) - goto out; - - if (!type_page) { - err = -EINVAL; - goto out; - } - - is_smb = !strcmp((char *)type_page, SMBFS_NAME); - is_ncp = !strcmp((char *)type_page, NCPFS_NAME); - - err = copy_mount_stuff_to_kernel((const void *)AA(data), &data_page); - if (err) - goto type_out; - - err = copy_mount_stuff_to_kernel(dev_name, &dev_page); - if (err) - goto data_out; - - err = copy_mount_stuff_to_kernel(dir_name, &dir_page); - if (err) - goto dev_out; - - if (!is_smb && !is_ncp) { - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } else { - if (is_ncp) - do_ncp_super_data_conv((void *)data_page); - else - do_smb_super_data_conv((void *)data_page); - - lock_kernel(); - err = do_mount((char*)dev_page, (char*)dir_page, - (char*)type_page, new_flags, (char*)data_page); - unlock_kernel(); - } - free_page(dir_page); - -dev_out: - free_page(dev_page); - -data_out: - free_page(data_page); - -type_out: - free_page(type_page); - -out: - return err; -} - struct sysinfo32 { s32 uptime; u32 loads[3]; @@ -1781,9 +1576,12 @@ if (act) { compat_old_sigset_t mask; + u32 u_handler, u_restorer; - ret = get_user((long)new_ka.sa.sa_handler, &act->sa_handler); - ret |= __get_user((long)new_ka.sa.sa_restorer, &act->sa_restorer); + ret = get_user(u_handler, &act->sa_handler); + new_ka.sa.sa_handler = (void *) (long) u_handler; + ret |= __get_user(u_restorer, &act->sa_restorer); + new_ka.sa.sa_restorer = (void *) (long) u_restorer; ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags); ret |= __get_user(mask, &act->sa_mask); if (ret) @@ -1822,8 +1620,11 @@ set_thread_flag(TIF_NEWSIGNALS); if (act) { + u32 u_handler, u_restorer; + new_ka.ka_restorer = restorer; - ret = get_user((long)new_ka.sa.sa_handler, &act->sa_handler); + ret = get_user(u_handler, &act->sa_handler); + new_ka.sa.sa_handler = (void *) (long) u_handler; ret |= __copy_from_user(&set32, &act->sa_mask, sizeof(compat_sigset_t)); switch (_NSIG_WORDS) { case 4: new_ka.sa.sa_mask.sig[3] = set32.sig[6] | (((long)set32.sig[7]) << 32); @@ -1832,7 +1633,8 @@ case 1: new_ka.sa.sa_mask.sig[0] = set32.sig[0] | (((long)set32.sig[1]) << 32); } ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags); - ret |= __get_user((long)new_ka.sa.sa_restorer, &act->sa_restorer); + ret |= __get_user(u_restorer, &act->sa_restorer); + new_ka.sa.sa_restorer = (void *) (long) u_restorer; if (ret) return -EFAULT; } diff -Nru a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c --- a/arch/sparc64/kernel/sys_sunos32.c Sun Mar 28 13:12:08 2004 +++ b/arch/sparc64/kernel/sys_sunos32.c Sun Mar 28 13:12:08 2004 @@ -302,7 +302,7 @@ put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; + dirent = (void *) dirent + reclen; buf->curr = dirent; buf->count -= reclen; return 0; @@ -382,7 +382,7 @@ put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; + dirent = (void *) dirent + reclen; buf->curr = dirent; buf->count -= reclen; return 0; @@ -1276,10 +1276,12 @@ if (act) { compat_old_sigset_t mask; + u32 u_handler; - if (get_user((long)new_ka.sa.sa_handler, &((struct old_sigaction32 *)A(act))->sa_handler) || + if (get_user(u_handler, &((struct old_sigaction32 *)A(act))->sa_handler) || __get_user(new_ka.sa.sa_flags, &((struct old_sigaction32 *)A(act))->sa_flags)) return -EFAULT; + new_ka.sa.sa_handler = (void *) (long) u_handler; __get_user(mask, &((struct old_sigaction32 *)A(act))->sa_mask); new_ka.sa.sa_restorer = NULL; new_ka.ka_restorer = NULL; diff -Nru a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S --- a/arch/sparc64/kernel/systbls.S Sun Mar 28 13:12:07 2004 +++ b/arch/sparc64/kernel/systbls.S Sun Mar 28 13:12:07 2004 @@ -52,7 +52,7 @@ /*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 .word compat_sys_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount /*160*/ .word compat_sys_sched_setaffinity, compat_sys_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall - .word sys_quotactl, sys_set_tid_address, sys32_mount, sys_ustat, sys_setxattr + .word sys_quotactl, sys_set_tid_address, compat_sys_mount, sys_ustat, sys_setxattr /*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys32_getdents .word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr /*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall diff -Nru a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c --- a/arch/sparc64/mm/init.c Sun Mar 28 13:12:07 2004 +++ b/arch/sparc64/mm/init.c Sun Mar 28 13:12:07 2004 @@ -104,7 +104,7 @@ if (page2) page2->lru.next = page->lru.next; else - (struct page *)pgd_quicklist = page->lru.next; + pgd_quicklist = (void *) page->lru.next; pgd_cache_size -= 2; __free_page(page); if (page2) diff -Nru a/arch/x86_64/defconfig b/arch/x86_64/defconfig --- a/arch/x86_64/defconfig Sun Mar 28 13:12:08 2004 +++ b/arch/x86_64/defconfig Sun Mar 28 13:12:08 2004 @@ -26,7 +26,7 @@ CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=17 +CONFIG_LOG_BUF_SHIFT=18 # CONFIG_HOTPLUG is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y @@ -47,7 +47,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y +# CONFIG_KMOD is not set CONFIG_STOP_MACHINE=y # @@ -94,14 +94,14 @@ CONFIG_ACPI_SLEEP=y CONFIG_ACPI_SLEEP_PROC_FS=y CONFIG_ACPI_AC=y -# CONFIG_ACPI_BATTERY is not set +CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_FAN=y CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y # CONFIG_ACPI_ASUS is not set -# CONFIG_ACPI_TOSHIBA is not set -# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_TOSHIBA=y +CONFIG_ACPI_DEBUG=y CONFIG_ACPI_BUS=y CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y @@ -120,17 +120,18 @@ CONFIG_PCI=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y -CONFIG_PCI_LEGACY_PROC=y +# CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set # # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y +# CONFIG_BINFMT_MISC is not set CONFIG_IA32_EMULATION=y CONFIG_IA32_AOUT=y CONFIG_COMPAT=y +CONFIG_SYSVIPC_COMPAT=y CONFIG_UID16=y # @@ -150,14 +151,7 @@ # # Parallel port support # -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_CML1=y -# 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=y +# CONFIG_PARPORT is not set # # Plug and Play support @@ -167,7 +161,6 @@ # 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 @@ -175,8 +168,11 @@ CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_LBD is not set +# CONFIG_BLK_DEV_CARMEL is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +CONFIG_LBD=y # # ATA/ATAPI/MFM/RLL support @@ -194,7 +190,7 @@ CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set -CONFIG_BLK_DEV_IDESCSI=m +# CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set # CONFIG_IDE_TASKFILE_IO is not set @@ -202,12 +198,11 @@ # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_CMD640=y -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set +# CONFIG_BLK_DEV_CMD640 is not set CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y +# CONFIG_BLK_DEV_GENERIC is not set # CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_RZ1000 is not set CONFIG_BLK_DEV_IDEDMA_PCI=y @@ -218,6 +213,7 @@ # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set CONFIG_BLK_DEV_AMD74XX=y +# CONFIG_BLK_DEV_ATIIXP is not set # CONFIG_BLK_DEV_CMD64X is not set # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CY82C693 is not set @@ -226,20 +222,19 @@ # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set +CONFIG_BLK_DEV_PIIX=y # CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set # CONFIG_BLK_DEV_SVWKS is not set # CONFIG_BLK_DEV_SIIMAGE is not set -CONFIG_BLK_DEV_SIS5513=y +# CONFIG_BLK_DEV_SIS5513 is not set # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y +# CONFIG_BLK_DEV_VIA82CXXX is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y -# CONFIG_DMA_NONPCI is not set # CONFIG_BLK_DEV_HD is not set # @@ -254,9 +249,8 @@ CONFIG_BLK_DEV_SD=y # CONFIG_CHR_DEV_ST is not set # CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs @@ -267,6 +261,12 @@ # CONFIG_SCSI_LOGGING is not set # +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set + +# # SCSI low-level drivers # CONFIG_BLK_DEV_3W_XXXX_RAID=y @@ -282,6 +282,7 @@ CONFIG_SCSI_ATA_PIIX=y # CONFIG_SCSI_SATA_PROMISE is not set CONFIG_SCSI_SATA_VIA=y +# 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 @@ -291,8 +292,6 @@ # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS 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 is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set @@ -317,7 +316,6 @@ # Fusion MPT device support # CONFIG_FUSION=y -CONFIG_FUSION_BOOT=y CONFIG_FUSION_MAX_SGE=40 # CONFIG_FUSION_ISENSE is not set # CONFIG_FUSION_CTL is not set @@ -332,10 +330,6 @@ # # -# Macintosh device drivers -# - -# # Networking support # CONFIG_NET=y @@ -345,111 +339,37 @@ # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set -CONFIG_NETLINK_DEV=y +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y -CONFIG_NET_KEY=m +# CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -CONFIG_IP_MROUTE=y -# CONFIG_IP_PIMSM_V1 is not set -# CONFIG_IP_PIMSM_V2 is not set +# CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set # CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y +# CONFIG_IPV6_PRIVACY is not set # CONFIG_INET6_AH is not set -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set # CONFIG_IPV6_TUNNEL is not set # CONFIG_DECNET is not set # CONFIG_BRIDGE is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -# CONFIG_IP_NF_MATCH_LIMIT is not set -# CONFIG_IP_NF_MATCH_IPRANGE is not set -# CONFIG_IP_NF_MATCH_MAC is not set -# CONFIG_IP_NF_MATCH_PKTTYPE is not set -# CONFIG_IP_NF_MATCH_MARK is not set -# CONFIG_IP_NF_MATCH_MULTIPORT is not set -# CONFIG_IP_NF_MATCH_TOS is not set -# CONFIG_IP_NF_MATCH_RECENT is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_DSCP is not set -# CONFIG_IP_NF_MATCH_AH_ESP is not set -# CONFIG_IP_NF_MATCH_LENGTH is not set -# CONFIG_IP_NF_MATCH_TTL is not set -# CONFIG_IP_NF_MATCH_TCPMSS is not set -# CONFIG_IP_NF_MATCH_HELPER is not set -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -# CONFIG_IP_NF_MATCH_OWNER is not set -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -# CONFIG_IP_NF_TARGET_REDIRECT is not set -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_LOCAL is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_MANGLE=m -# CONFIG_IP_NF_TARGET_TOS is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_DSCP is not set -CONFIG_IP_NF_TARGET_MARK=m -# CONFIG_IP_NF_TARGET_CLASSIFY is not set -CONFIG_IP_NF_TARGET_LOG=m -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_IP_NF_TARGET_TCPMSS=m -# CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_IP6_NF_QUEUE is not set -# CONFIG_IP6_NF_IPTABLES is not set -CONFIG_XFRM=y -CONFIG_XFRM_USER=m +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # CONFIG_IPV6_SCTP__=y -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -CONFIG_SCTP_HMAC_NONE=y -# CONFIG_SCTP_HMAC_SHA1 is not set -# CONFIG_SCTP_HMAC_MD5 is not set +# CONFIG_IP_SCTP is not set # CONFIG_ATM is not set # CONFIG_VLAN_8021Q is not set # CONFIG_LLC2 is not set @@ -478,11 +398,10 @@ # ARCnet devices # # CONFIG_ARCNET is not set -CONFIG_DUMMY=m +# CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set -CONFIG_TUN=m -CONFIG_ETHERTAP=m +# CONFIG_TUN is not set # # Ethernet (10 or 100Mbit) @@ -491,9 +410,7 @@ CONFIG_MII=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -# CONFIG_TYPHOON is not set +# CONFIG_NET_VENDOR_3COM is not set # # Tulip family network device support @@ -501,25 +418,25 @@ # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set CONFIG_NET_PCI=y -CONFIG_PCNET32=y -CONFIG_AMD8111_ETH=m +# CONFIG_PCNET32 is not set +CONFIG_AMD8111_ETH=y # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set +CONFIG_FORCEDETH=y # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -CONFIG_8139TOO=y +CONFIG_8139CP=m +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_8139_RXBUF_IDX=2 -CONFIG_SIS900=m +# CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set @@ -529,7 +446,7 @@ # # CONFIG_ACENIC is not set # CONFIG_DL2K is not set -CONFIG_E1000=m +CONFIG_E1000=y # CONFIG_E1000_NAPI is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set @@ -545,15 +462,7 @@ # CONFIG_IXGB 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 is not set -# CONFIG_PPP_SYNC_TTY is not set -# CONFIG_PPP_DEFLATE is not set -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m +# CONFIG_PPP is not set # CONFIG_SLIP is not set # @@ -567,6 +476,7 @@ # CONFIG_TR is not set # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set +CONFIG_NETCONSOLE=y # # Wan interfaces @@ -587,6 +497,10 @@ # Bluetooth support # # CONFIG_BT is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # # ISDN subsystem @@ -612,7 +526,7 @@ 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=y # CONFIG_INPUT_EVBUG is not set # @@ -624,7 +538,6 @@ 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 # @@ -633,11 +546,13 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y # CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set @@ -648,12 +563,7 @@ CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -# CONFIG_SYNCLINK is not set -# CONFIG_SYNCLINKMP is not set -# CONFIG_N_HDLC is not set -# CONFIG_STALDRV is not set +# CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers @@ -670,16 +580,8 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_PRINTER=y -# CONFIG_LP_CONSOLE is not set -# CONFIG_PPDEV is not set -# CONFIG_TIPAR is not set - -# -# Mice -# -CONFIG_BUSMOUSE=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_QIC02_TAPE is not set # @@ -703,17 +605,12 @@ # CONFIG_AGP=y CONFIG_AGP_AMD64=y -# CONFIG_AGP_INTEL is not set -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -# CONFIG_DRM_GAMMA is not set -# CONFIG_DRM_R128 is not set -CONFIG_DRM_RADEON=m -# CONFIG_DRM_SIS is not set +CONFIG_AGP_INTEL=y +# CONFIG_DRM is not set # CONFIG_MWAVE is not set -CONFIG_RAW_DRIVER=m +CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 -# CONFIG_HANGCHECK_TIMER is not set +CONFIG_HANGCHECK_TIMER=y # # I2C support @@ -761,11 +658,10 @@ # # Open Sound System # -CONFIG_SOUND_PRIME=m +CONFIG_SOUND_PRIME=y # CONFIG_SOUND_BT878 is not set # CONFIG_SOUND_CMPCI is not set -CONFIG_SOUND_EMU10K1=m -# CONFIG_MIDI_EMU10K1 is not set +# CONFIG_SOUND_EMU10K1 is not set # CONFIG_SOUND_FUSION is not set # CONFIG_SOUND_CS4281 is not set # CONFIG_SOUND_ES1370 is not set @@ -773,13 +669,12 @@ # CONFIG_SOUND_ESSSOLO1 is not set # CONFIG_SOUND_MAESTRO is not set # CONFIG_SOUND_MAESTRO3 is not set -CONFIG_SOUND_ICH=m +CONFIG_SOUND_ICH=y # CONFIG_SOUND_SONICVIBES is not set # CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_VIA82CXXX=m -# CONFIG_MIDI_VIA82CXXX is not set +# CONFIG_SOUND_VIA82CXXX is not set # CONFIG_SOUND_OSS is not set # CONFIG_SOUND_ALI5455 is not set # CONFIG_SOUND_FORTE is not set @@ -789,151 +684,7 @@ # # USB support # -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -CONFIG_USB_BANDWIDTH=y -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_UHCI_HCD=m - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_BLUETOOTH_TTY is not set -# CONFIG_USB_MIDI is not set -# CONFIG_USB_ACM is not set -CONFIG_USB_PRINTER=m -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# 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_XPAD 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 -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -# 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_USBNET=m - -# -# USB Host-to-Host Cables -# -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_GENESYS=y -CONFIG_USB_NET1080=y -CONFIG_USB_PL2301=y - -# -# Intelligent USB Devices/Gadgets -# -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -# CONFIG_USB_ZAURUS is not set -# CONFIG_USB_CDCETHER is not set - -# -# USB Network Adapters -# -CONFIG_USB_AX8817X=y - -# -# USB port drivers -# -# CONFIG_USB_USS720 is not set - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_BELKIN=m -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# 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_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# 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_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OMNINET is not set - -# -# 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_BRLVGER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_TEST is not set +# CONFIG_USB is not set # # USB Gadget Support @@ -945,17 +696,20 @@ # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y -# CONFIG_EXT2_FS_POSIX_ACL is not set +CONFIG_EXT2_FS_POSIX_ACL=y # CONFIG_EXT2_FS_SECURITY is not set CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +# CONFIG_EXT3_FS_SECURITY is not set 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=y +# CONFIG_REISERFS_PROC_INFO is not set # CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -967,16 +721,14 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y +# CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set -CONFIG_UDF_FS=m +# CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=m +# CONFIG_FAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -987,8 +739,8 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y # @@ -1014,7 +766,7 @@ CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V4 is not set -CONFIG_NFS_DIRECTIO=y +# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y # CONFIG_NFSD_V4 is not set @@ -1023,11 +775,12 @@ CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=y CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -1039,45 +792,7 @@ # # Native Language Support # -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 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=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 +# CONFIG_NLS is not set # # Profiling support @@ -1105,28 +820,9 @@ # # Cryptographic options # -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_ARC4 is not set -CONFIG_CRYPTO_DEFLATE=m -# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO is not set # # Library routines # CONFIG_CRC32=y -CONFIG_ZLIB_INFLATE=m -CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c --- a/arch/x86_64/ia32/ia32_ioctl.c Sun Mar 28 13:12:08 2004 +++ b/arch/x86_64/ia32/ia32_ioctl.c Sun Mar 28 13:12:08 2004 @@ -27,7 +27,7 @@ struct file *file = fget(fd); struct tty_struct *real_tty; - if (!fd) + if (!file) return -EBADF; if (file->f_op->ioctl != tty_ioctl) return -EINVAL; diff -Nru a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S --- a/arch/x86_64/ia32/ia32entry.S Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/ia32/ia32entry.S Sun Mar 28 13:12:07 2004 @@ -326,7 +326,7 @@ .quad sys_stat .quad sys32_lseek .quad sys_getpid /* 20 */ - .quad sys_mount /* mount */ + .quad compat_sys_mount /* mount */ .quad sys_oldumount /* old_umount */ .quad sys_setuid16 .quad sys_getuid16 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 Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/ia32/sys_ia32.c Sun Mar 28 13:12:07 2004 @@ -40,9 +40,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -512,7 +509,7 @@ { struct linux32_dirent * dirent; struct getdents32_callback * buf = (struct getdents32_callback *) __buf; - int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4); + int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2, 4); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) @@ -526,6 +523,7 @@ put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); + put_user(d_type, (char *)dirent + reclen - 1); dirent = ((void *)dirent) + reclen; buf->current_dir = dirent; buf->count -= reclen; @@ -872,39 +870,6 @@ sys32_sysfs(int option, u32 arg1, u32 arg2) { return sys_sysfs(option, arg1, arg2); -} - -static char *badfs[] = { - "smbfs", "ncpfs", NULL -}; - -static int checktype(char *user_type) -{ - int err = 0; - char **s,*kernel_type = getname(user_type); - if (!kernel_type || IS_ERR(kernel_type)) - return -EFAULT; - for (s = badfs; *s; ++s) - if (!strcmp(kernel_type, *s)) { - printk(KERN_ERR "mount32: unsupported fs `%s' -- use 64bit mount\n", *s); - err = -EINVAL; - break; - } - putname(user_type); - return err; -} - -asmlinkage long -sys32_mount(char *dev_name, char *dir_name, char *type, - unsigned long new_flags, u32 data) -{ - int err; - if(!capable(CAP_SYS_ADMIN)) - return -EPERM; - err = checktype(type); - if (err) - return err; - return sys_mount(dev_name, dir_name, type, new_flags, (void *)AA(data)); } struct sysinfo32 { diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile --- a/arch/x86_64/kernel/Makefile Sun Mar 28 13:12:08 2004 +++ b/arch/x86_64/kernel/Makefile Sun Mar 28 13:12:08 2004 @@ -11,6 +11,7 @@ obj-y += mce.o acpi/ obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ +obj-$(CONFIG_ACPI_BOOT) += acpi/ obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_X86_CPUID) += cpuid.o diff -Nru a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile --- a/arch/x86_64/kernel/acpi/Makefile Sun Mar 28 13:12:08 2004 +++ b/arch/x86_64/kernel/acpi/Makefile Sun Mar 28 13:12:08 2004 @@ -1,3 +1,3 @@ obj-$(CONFIG_ACPI_BOOT) := boot.o +boot-$(CONFIG_ACPI_BOOT) := ../../../i386/kernel/acpi/boot.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o - diff -Nru a/arch/x86_64/kernel/acpi/boot.c b/arch/x86_64/kernel/acpi/boot.c --- a/arch/x86_64/kernel/acpi/boot.c Sun Mar 28 13:12:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,608 +0,0 @@ -/* - * acpi.c - Architecture-Specific Low-Level ACPI Support - * - * Copyright (C) 2001, 2002 Paul Diefenbaugh - * Copyright (C) 2001 Jun Nakajima - * Copyright (C) 2001 Patrick Mochel - * Copyright (C) 2002 Andi Kleen, SuSE Labs (x86-64 port) - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define PREFIX "ACPI: " - -int acpi_noirq __initdata; /* skip ACPI IRQ initialization */ -int acpi_ht __initdata = 1; /* enable HT */ - -int acpi_lapic; -int acpi_ioapic; -int acpi_strict; - -/* -------------------------------------------------------------------------- - Boot-time Configuration - -------------------------------------------------------------------------- */ - -#ifdef CONFIG_ACPI_BOOT - -enum acpi_irq_model_id acpi_irq_model; - -/* rely on all ACPI tables being in the direct mapping */ -char * -__acpi_map_table ( - unsigned long phys_addr, - unsigned long size) -{ - if (!phys_addr || !size) - return NULL; - - if (phys_addr < (end_pfn_map << PAGE_SHIFT)) - return __va(phys_addr); - - return NULL; -} - -#ifdef CONFIG_PCI_MMCONFIG -static int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) -{ - struct acpi_table_mcfg *mcfg; - - if (!phys_addr || !size) - return -EINVAL; - - mcfg = (struct acpi_table_mcfg *) __acpi_map_table(phys_addr, size); - if (!mcfg) { - printk(KERN_WARNING PREFIX "Unable to map MCFG\n"); - return -ENODEV; - } - - if (mcfg->base_reserved) { - printk(KERN_ERR PREFIX "MMCONFIG not in low 4GB of memory\n"); - return -ENODEV; - } - - pci_mmcfg_base_addr = mcfg->base_address; - - return 0; -} -#endif /* CONFIG_PCI_MMCONFIG */ - -#ifdef CONFIG_X86_LOCAL_APIC - -static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; - - -static int __init -acpi_parse_madt ( - unsigned long phys_addr, - unsigned long size) -{ - struct acpi_table_madt *madt = NULL; - - if (!phys_addr || !size) - return -EINVAL; - - madt = (struct acpi_table_madt *) __acpi_map_table(phys_addr, size); - if (!madt) { - printk(KERN_WARNING PREFIX "Unable to map MADT\n"); - return -ENODEV; - } - - if (madt->lapic_address) - acpi_lapic_addr = (u64) madt->lapic_address; - - printk(KERN_INFO PREFIX "Local APIC address 0x%016x\n", - madt->lapic_address); - - return 0; -} - - -static int __init -acpi_parse_lapic ( - acpi_table_entry_header *header) -{ - struct acpi_table_lapic *processor = NULL; - - processor = (struct acpi_table_lapic*) header; - if (!processor) - return -EINVAL; - - acpi_table_print_madt_entry(header); - - /* no utility in registering a disabled processor */ - if (processor->flags.enabled == 0) - return 0; - - - mp_register_lapic ( - processor->id, /* APIC ID */ - processor->flags.enabled); /* Enabled? */ - - return 0; -} - - -static int __init -acpi_parse_lapic_addr_ovr ( - acpi_table_entry_header *header) -{ - struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL; - - lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr*) header; - if (!lapic_addr_ovr) - return -EINVAL; - - acpi_lapic_addr = lapic_addr_ovr->address; - - return 0; -} - - -static int __init -acpi_parse_lapic_nmi ( - acpi_table_entry_header *header) -{ - struct acpi_table_lapic_nmi *lapic_nmi = NULL; - - lapic_nmi = (struct acpi_table_lapic_nmi*) header; - if (!lapic_nmi) - return -EINVAL; - - acpi_table_print_madt_entry(header); - - if (lapic_nmi->lint != 1) - printk(KERN_WARNING PREFIX "NMI not connected to LINT 1!\n"); - - return 0; -} - -#endif /*CONFIG_X86_LOCAL_APIC*/ - -#ifdef CONFIG_X86_IO_APIC - -static int __init -acpi_parse_ioapic ( - acpi_table_entry_header *header) -{ - struct acpi_table_ioapic *ioapic = NULL; - - ioapic = (struct acpi_table_ioapic*) header; - if (!ioapic) - return -EINVAL; - - acpi_table_print_madt_entry(header); - - mp_register_ioapic ( - ioapic->id, - ioapic->address, - ioapic->global_irq_base); - - return 0; -} - - -static int __init -acpi_parse_int_src_ovr ( - acpi_table_entry_header *header) -{ - struct acpi_table_int_src_ovr *intsrc = NULL; - - intsrc = (struct acpi_table_int_src_ovr*) header; - if (!intsrc) - return -EINVAL; - - acpi_table_print_madt_entry(header); - - mp_override_legacy_irq ( - intsrc->bus_irq, - intsrc->flags.polarity, - intsrc->flags.trigger, - intsrc->global_irq); - - return 0; -} - - -static int __init -acpi_parse_nmi_src ( - acpi_table_entry_header *header) -{ - struct acpi_table_nmi_src *nmi_src = NULL; - - nmi_src = (struct acpi_table_nmi_src*) header; - if (!nmi_src) - return -EINVAL; - - acpi_table_print_madt_entry(header); - - /* TBD: Support nimsrc entries? */ - - return 0; -} - -#endif /*CONFIG_X86_IO_APIC*/ - -static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size) -{ - struct acpi_table_sbf *sb; - - if (!phys_addr || !size) - return -EINVAL; - - sb = (struct acpi_table_sbf *) __acpi_map_table(phys_addr, size); - if (!sb) { - printk(KERN_WARNING PREFIX "Unable to map SBF\n"); - return -ENODEV; - } - - sbf_port = sb->sbf_cmos; /* Save CMOS port */ - - return 0; -} - -#ifdef CONFIG_HPET_TIMER -static int __init -acpi_parse_hpet ( - unsigned long phys_addr, - unsigned long size) -{ - struct acpi_table_hpet *hpet_tbl; - - hpet_tbl = __va(phys_addr); - - if (hpet_tbl->addr.space_id != ACPI_SPACE_MEM) { - printk(KERN_WARNING "acpi: HPET timers must be located in memory.\n"); - return -1; - } - - vxtime.hpet_address = hpet_tbl->addr.addrl | - ((long) hpet_tbl->addr.addrh << 32); - - printk(KERN_INFO "acpi: HPET id: %#x base: %#lx\n", - hpet_tbl->id, vxtime.hpet_address); - - return 0; -} -#endif - -#ifdef CONFIG_ACPI_BUS -/* - * "acpi_pic_sci=level" (current default) - * programs the PIC-mode SCI to Level Trigger. - * (NO-OP if the BIOS set Level Trigger already) - * - * If a PIC-mode SCI is not recognized or gives spurious IRQ7's - * it may require Edge Trigger -- use "acpi_pic_sci=edge" - * (NO-OP if the BIOS set Edge Trigger already) - * - * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers - * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. - * ECLR1 is IRQ's 0-7 (IRQ 0, 1, 2 must be 0) - * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0) - */ - -static int __initdata acpi_pic_sci_trigger; /* 0: level, 1: edge */ - -void __init -acpi_pic_sci_set_trigger(unsigned int irq) -{ - unsigned char mask = 1 << (irq & 7); - unsigned int port = 0x4d0 + (irq >> 3); - unsigned char val = inb(port); - - - printk(PREFIX "IRQ%d SCI:", irq); - if (!(val & mask)) { - printk(" Edge"); - - if (!acpi_pic_sci_trigger) { - printk(" set to Level"); - outb(val | mask, port); - } - } else { - printk(" Level"); - - if (acpi_pic_sci_trigger) { - printk(" set to Edge"); - outb(val | mask, port); - } - } - printk(" Trigger.\n"); -} - -int __init -acpi_pic_sci_setup(char *str) -{ - while (str && *str) { - if (strncmp(str, "level", 5) == 0) - acpi_pic_sci_trigger = 0; /* force level trigger */ - if (strncmp(str, "edge", 4) == 0) - acpi_pic_sci_trigger = 1; /* force edge trigger */ - str = strchr(str, ','); - if (str) - str += strspn(str, ", \t"); - } - return 1; -} - -__setup("acpi_pic_sci=", acpi_pic_sci_setup); - -#endif /* CONFIG_ACPI_BUS */ - -static unsigned long __init -acpi_scan_rsdp ( - unsigned long start, - unsigned long length) -{ - unsigned long offset = 0; - unsigned long sig_len = sizeof("RSD PTR ") - 1; - - /* - * Scan all 16-byte boundaries of the physical memory region for the - * RSDP signature. - */ - for (offset = 0; offset < length; offset += 16) { - if (strncmp((char *) (start + offset), "RSD PTR ", sig_len)) - continue; - return (start + offset); - } - - return 0; -} - - -unsigned long __init -acpi_find_rsdp (void) -{ - unsigned long rsdp_phys = 0; - - /* - * Scan memory looking for the RSDP signature. First search EBDA (low - * memory) paragraphs and then search upper memory (E0000-FFFFF). - */ - rsdp_phys = acpi_scan_rsdp (0, 0x400); - if (!rsdp_phys) - rsdp_phys = acpi_scan_rsdp (0xE0000, 0xFFFFF); - - return rsdp_phys; -} - -/* - * acpi_boot_init() - * called from setup_arch(), always. - * 1. maps ACPI tables for later use - * 2. enumerates lapics - * 3. enumerates io-apics - * - * side effects: - * acpi_lapic = 1 if LAPIC found - * acpi_ioapic = 1 if IOAPIC found - * if (acpi_lapic && acpi_ioapic) smp_found_config = 1; - * if acpi_blacklisted() acpi_disabled = 1; - * acpi_irq_model=... - * ... - * - * return value: (currently ignored) - * 0: success - * !0: failure - */ - -int __init -acpi_boot_init (void) -{ - int result = 0; - - if (acpi_disabled && !acpi_ht) - return 1; - - /* - * The default interrupt routing model is PIC (8259). This gets - * overriden if IOAPICs are enumerated (below). - */ - acpi_irq_model = ACPI_IRQ_MODEL_PIC; - - /* - * Initialize the ACPI boot-time table parser. - */ - result = acpi_table_init(); - if (result) { - acpi_disabled = 1; - return result; - } - - (void) acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); - - result = acpi_blacklisted(); - if (result) { - printk(KERN_WARNING PREFIX "BIOS listed in blacklist, disabling ACPI support\n"); - acpi_disabled = 1; - return result; - } - - if (disable_apic) { - printk(KERN_INFO PREFIX "Skipping MADT probe because local APIC is disabled\n"); - return 0; - } - -#ifdef CONFIG_X86_LOCAL_APIC - - /* - * MADT - * ---- - * Parse the Multiple APIC Description Table (MADT), if exists. - * Note that this table provides platform SMP configuration - * information -- the successor to MPS tables. - */ - - result = acpi_table_parse(ACPI_APIC, acpi_parse_madt); - if (!result) { - printk(KERN_WARNING PREFIX "MADT not present\n"); - return 0; - } - else if (result < 0) { - printk(KERN_ERR PREFIX "Error parsing MADT\n"); - return result; - } - else if (result > 1) - printk(KERN_WARNING PREFIX "Multiple MADT tables exist\n"); - - /* - * Local APIC - * ---------- - * Note that the LAPIC address is obtained from the MADT (32-bit value) - * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). - */ - - result = acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, acpi_parse_lapic_addr_ovr, 0); - if (result < 0) { - printk(KERN_ERR PREFIX "Error parsing LAPIC address override entry\n"); - return result; - } - - mp_register_lapic_address(acpi_lapic_addr); - - result = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic, - MAX_APICS); - if (!result) { - printk(KERN_ERR PREFIX "No LAPIC entries present\n"); - /* TBD: Cleanup to allow fallback to MPS */ - return -ENODEV; - } - else if (result < 0) { - printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); - /* TBD: Cleanup to allow fallback to MPS */ - return result; - } - - result = acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0); - if (result < 0) { - printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); - /* TBD: Cleanup to allow fallback to MPS */ - return result; - } - - acpi_lapic = 1; - -#endif /*CONFIG_X86_LOCAL_APIC*/ - -#ifdef CONFIG_X86_IO_APIC - - /* - * I/O APIC - * -------- - */ - - /* - * ACPI interpreter is required to complete interrupt setup, - * so if it is off, don't enumerate the io-apics with ACPI. - * If MPS is present, it will handle them, - * otherwise the system will stay in PIC mode - */ - if (acpi_disabled || acpi_noirq) { - return 1; - } - - /* - * if "noapic" boot option, don't look for IO-APICs - */ - if (skip_ioapic_setup) { - printk(KERN_INFO PREFIX "Skipping IOAPIC probe " - "due to 'noapic' option.\n"); - return 1; - } - - result = acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic, MAX_IO_APICS); - if (!result) { - printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); - return -ENODEV; - } - else if (result < 0) { - printk(KERN_ERR PREFIX "Error parsing IOAPIC entry\n"); - return result; - } - - /* Build a default routing table for legacy (ISA) interrupts. */ - mp_config_acpi_legacy_irqs(); - - result = acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, NR_IRQ_VECTORS); - if (result < 0) { - printk(KERN_ERR PREFIX "Error parsing interrupt source overrides entry\n"); - /* TBD: Cleanup to allow fallback to MPS */ - return result; - } - - result = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, - NR_IRQ_VECTORS); - if (result < 0) { - printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); - /* TBD: Cleanup to allow fallback to MPS */ - return result; - } - - acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; - - acpi_irq_balance_set(NULL); - - acpi_ioapic = 1; - -#endif /*CONFIG_X86_IO_APIC*/ - -#ifdef CONFIG_X86_LOCAL_APIC - if (acpi_lapic && acpi_ioapic) - smp_found_config = 1; -#endif - -#ifdef CONFIG_HPET_TIMER - result = acpi_table_parse(ACPI_HPET, acpi_parse_hpet); - if (result < 0) - printk("ACPI: no HPET table found (%d).\n", result); -#endif - -#ifdef CONFIG_PCI_MMCONFIG - result = acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); - if (result) - printk(KERN_ERR PREFIX "Error %d parsing MCFG\n", result); -#endif - - return 0; -} - -#endif /*CONFIG_ACPI_BOOT*/ - diff -Nru a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S --- a/arch/x86_64/kernel/entry.S Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/kernel/entry.S Sun Mar 28 13:12:07 2004 @@ -402,9 +402,9 @@ /* 0(%rsp): interrupt number */ .macro interrupt func CFI_STARTPROC simple - CFI_DEF_CFA rsp,(SS-ORIG_RAX) - CFI_OFFSET rsp,(RSP-SS) - CFI_OFFSET rip,(RIP-SS) + CFI_DEF_CFA rsp,(SS-RDI) + CFI_REL_OFFSET rsp,(RSP-ORIG_RAX) + CFI_REL_OFFSET rip,(RIP-ORIG_RAX) cld #ifdef CONFIG_DEBUG_INFO SAVE_ALL @@ -805,6 +805,8 @@ paranoidentry do_debug /* switch back to process stack to restore the state ptrace touched */ movq %rax,%rsp + testl $3,CS(%rsp) + jnz paranoid_userspace jmp paranoid_exit CFI_ENDPROC @@ -816,8 +818,6 @@ paranoidentry do_nmi /* ebx: no swapgs flag */ paranoid_exit: - testl $3,CS(%rsp) - jnz paranoid_userspace testl %ebx,%ebx /* swapgs needed? */ jnz paranoid_restore paranoid_swapgs: @@ -870,6 +870,8 @@ CFI_STARTPROC paranoidentry do_double_fault movq %rax,%rsp + testl $3,CS(%rsp) + jnz paranoid_userspace jmp paranoid_exit CFI_ENDPROC @@ -884,6 +886,8 @@ CFI_STARTPROC paranoidentry do_stack_segment movq %rax,%rsp + testl $3,CS(%rsp) + jnz paranoid_userspace jmp paranoid_exit CFI_ENDPROC diff -Nru a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c --- a/arch/x86_64/kernel/mce.c Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/kernel/mce.c Sun Mar 28 13:12:07 2004 @@ -22,12 +22,13 @@ #include #define MISC_MCELOG_MINOR 227 +#define NR_BANKS 5 static int mce_disabled __initdata; /* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic */ static int tolerant = 2; static int banks; -static unsigned long disabled_banks; +static unsigned long bank[NR_BANKS] = { [0 ... NR_BANKS-1] = ~0UL }; /* * Lockless MCE logging infrastructure. @@ -144,7 +145,7 @@ mb(); for (i = 0; i < banks; i++) { - if (test_bit(i, &disabled_banks)) + if (!bank[i]) continue; rdmsrl(MSR_IA32_MC0_STATUS + i*4, m.status); @@ -179,7 +180,7 @@ confused it's normally not necessary to panic, unless you are paranoid (tolerant == 0) */ if (!user_space && (panic_on_oops || tolerant < 2)) - mce_panic("Uncorrected machine check in kernel", &m, mcestart); + mce_panic("Uncorrected machine check", &m, mcestart); /* do_exit takes an awful lot of locks and has as slight risk of deadlocking. If you don't want that don't set tolerant >= 2 */ @@ -238,17 +239,31 @@ wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); banks = cap & 0xff; + if (banks > NR_BANKS) { + printk(KERN_INFO "MCE: warning: using only %d banks\n", banks); + banks = NR_BANKS; + } mce_clear_all(); for (i = 0; i < banks; i++) { - u64 val = test_bit(i, &disabled_banks) ? 0 : ~0UL; - wrmsrl(MSR_IA32_MC0_CTL+4*i, val); + wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]); wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); } set_in_cr4(X86_CR4_MCE); } +/* Add per CPU specific workarounds here */ +static void __init mce_cpu_quirks(struct cpuinfo_x86 *c) +{ + /* This should be disabled by the BIOS, but isn't always */ + if (c->x86_vendor == X86_VENDOR_AMD && c->x86 == 15) { + /* disable GART TBL walk error reporting, which trips off + incorrectly with the IOMMU & 3ware & Cerberus. */ + clear_bit(10, &bank[4]); + } +} + /* * Called for each booted CPU to set up machine checks. * Must be called with preempt off. @@ -257,6 +272,8 @@ { static unsigned long mce_cpus __initdata = 0; + mce_cpu_quirks(c); + if (test_and_set_bit(smp_processor_id(), &mce_cpus) || !mce_available(c)) return; @@ -343,23 +360,9 @@ } } -#if 0 /* for testing */ -static ssize_t mce_write(struct file *f, const char __user *buf, size_t sz, loff_t *off) -{ - struct mce m; - if (sz != sizeof(struct mce)) - return -EINVAL; - copy_from_user(&m, buf, sizeof(struct mce)); - m.finished = 0; - mce_log(&m); - return sizeof(struct mce); -} -#endif - static struct file_operations mce_chrdev_ops = { .read = mce_read, .ioctl = mce_ioctl, - //.write = mce_write }; static struct miscdevice mce_log_device = { @@ -425,23 +428,27 @@ }; /* Why are there no generic functions for this? */ -#define ACCESSOR(name, start) \ +#define ACCESSOR(name, var, start) \ static ssize_t show_ ## name(struct sys_device *s, char *buf) { \ - return sprintf(buf, "%lu\n", (unsigned long)name); \ + return sprintf(buf, "%lu\n", (unsigned long)var); \ } \ static ssize_t set_ ## name(struct sys_device *s,const char *buf,size_t siz) { \ char *end; \ unsigned long new = simple_strtoul(buf, &end, 0); \ if (end == buf) return -EINVAL; \ - name = new; \ + var = new; \ start; \ return end-buf; \ } \ static SYSDEV_ATTR(name, 0644, show_ ## name, set_ ## name); -ACCESSOR(disabled_banks,mce_restart()) -ACCESSOR(tolerant,) -ACCESSOR(check_interval,mce_restart()) +ACCESSOR(bank0ctl,bank[0],mce_restart()) +ACCESSOR(bank1ctl,bank[1],mce_restart()) +ACCESSOR(bank2ctl,bank[2],mce_restart()) +ACCESSOR(bank3ctl,bank[3],mce_restart()) +ACCESSOR(bank4ctl,bank[4],mce_restart()) +ACCESSOR(tolerant,tolerant,) +ACCESSOR(check_interval,check_interval,mce_restart()) static __init int mce_init_device(void) { @@ -453,7 +460,11 @@ err = sysdev_register(&device_mce); if (!err) { /* could create per CPU objects, but is not worth it. */ - sysdev_create_file(&device_mce, &attr_disabled_banks); + sysdev_create_file(&device_mce, &attr_bank0ctl); + sysdev_create_file(&device_mce, &attr_bank1ctl); + sysdev_create_file(&device_mce, &attr_bank2ctl); + sysdev_create_file(&device_mce, &attr_bank3ctl); + sysdev_create_file(&device_mce, &attr_bank4ctl); sysdev_create_file(&device_mce, &attr_tolerant); sysdev_create_file(&device_mce, &attr_check_interval); } diff -Nru a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c --- a/arch/x86_64/kernel/mpparse.c Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/kernel/mpparse.c Sun Mar 28 13:12:07 2004 @@ -9,7 +9,7 @@ * Erich Boleyn : MP v1.4 and additional changes. * Alan Cox : Added EBDA scanning * Ingo Molnar : various cleanups and rewrites - * Maciej W. Rozycki : Bits for default MP configurations + * Maciej W. Rozycki: Bits for default MP configurations * Paul Diefenbaugh: Added full ACPI support */ @@ -33,6 +33,7 @@ /* Have we found an MP table */ int smp_found_config; +unsigned int __initdata maxcpus = NR_CPUS; int acpi_found_madt; @@ -117,6 +118,17 @@ Dprintk(" Bootup CPU\n"); boot_cpu_id = m->mpc_apicid; } + if (num_processors >= NR_CPUS) { + printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." + " Processor ignored.\n", NR_CPUS); + return; + } + if (num_processors >= maxcpus) { + printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." + " Processor ignored.\n", maxcpus); + return; + } + num_processors++; if (m->mpc_apicid > MAX_APICS) { @@ -690,25 +702,25 @@ struct mp_ioapic_routing { int apic_id; - int irq_start; - int irq_end; + int gsi_start; + int gsi_end; u32 pin_programmed[4]; } mp_ioapic_routing[MAX_IO_APICS]; static int __init mp_find_ioapic ( - int irq) + int gsi) { int i = 0; - /* Find the IOAPIC that manages this IRQ. */ + /* Find the IOAPIC that manages this GSI. */ for (i = 0; i < nr_ioapics; i++) { - if ((irq >= mp_ioapic_routing[i].irq_start) - && (irq <= mp_ioapic_routing[i].irq_end)) + if ((gsi >= mp_ioapic_routing[i].gsi_start) + && (gsi <= mp_ioapic_routing[i].gsi_end)) return i; } - printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d\n", irq); + printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi); return -1; } @@ -717,7 +729,7 @@ void __init mp_register_ioapic ( u8 id, u32 address, - u32 irq_base) + u32 gsi_base) { int idx = 0; @@ -743,19 +755,19 @@ mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); /* - * Build basic IRQ lookup table to facilitate irq->io_apic lookups + * Build basic IRQ lookup table to facilitate gsi->io_apic lookups * and to prevent reprogramming of IOAPIC pins (PCI IRQs). */ mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mpc_apicid; - mp_ioapic_routing[idx].irq_start = irq_base; - mp_ioapic_routing[idx].irq_end = irq_base + + mp_ioapic_routing[idx].gsi_start = gsi_base; + mp_ioapic_routing[idx].gsi_end = gsi_base + io_apic_get_redir_entries(idx); printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " - "IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, + "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, - mp_ioapic_routing[idx].irq_start, - mp_ioapic_routing[idx].irq_end); + mp_ioapic_routing[idx].gsi_start, + mp_ioapic_routing[idx].gsi_end); return; } @@ -765,7 +777,7 @@ u8 bus_irq, u8 polarity, u8 trigger, - u32 global_irq) + u32 gsi) { struct mpc_config_intsrc intsrc; int i = 0; @@ -774,12 +786,12 @@ int pin = -1; /* - * Convert 'global_irq' to 'ioapic.pin'. + * Convert 'gsi' to 'ioapic.pin'. */ - ioapic = mp_find_ioapic(global_irq); + ioapic = mp_find_ioapic(gsi); if (ioapic < 0) return; - pin = global_irq - mp_ioapic_routing[ioapic].irq_start; + pin = gsi - mp_ioapic_routing[ioapic].gsi_start; /* * TBD: This check is for faulty timer entries, where the override @@ -804,7 +816,7 @@ /* * If an existing [IOAPIC.PIN -> IRQ] routing entry exists we override it. - * Otherwise create a new entry (e.g. global_irq == 2). + * Otherwise create a new entry (e.g. gsi == 2). */ for (i = 0; i < mp_irq_entries; i++) { if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus) @@ -878,71 +890,6 @@ extern FADT_DESCRIPTOR acpi_fadt; -void __init mp_config_ioapic_for_sci(int irq) -{ -#ifdef CONFIG_ACPI_INTERPRETER - int ioapic; - int ioapic_pin; - struct acpi_table_madt *madt; - struct acpi_table_int_src_ovr *entry = NULL; - acpi_interrupt_flags flags; - void *madt_end; - acpi_status status; - - /* - * Ensure that if there is an interrupt source override entry - * for the ACPI SCI, we leave it as is. Unfortunately this involves - * walking the MADT again. - */ - status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING, - (struct acpi_table_header **) &madt); - if (ACPI_SUCCESS(status)) { - madt_end = (void *) (unsigned long)madt + madt->header.length; - - entry = (struct acpi_table_int_src_ovr *) - ((unsigned long) madt + sizeof(struct acpi_table_madt)); - - while ((void *) entry < madt_end) { - if (entry->header.type == ACPI_MADT_INT_SRC_OVR && - acpi_fadt.sci_int == entry->bus_irq) - goto found; - - entry = (struct acpi_table_int_src_ovr *) - ((unsigned long) entry + entry->header.length); - } - } - /* - * Although the ACPI spec says that the SCI should be level/low - * don't reprogram it unless there is an explicit MADT OVR entry - * instructing us to do so -- otherwise we break Tyan boards which - * have the SCI wired edge/high but no MADT OVR. - */ - return; - -found: - /* - * See the note at the end of ACPI 2.0b section - * 5.2.10.8 for what this is about. - */ - flags = entry->flags; - acpi_fadt.sci_int = entry->global_irq; - irq = entry->global_irq; - - ioapic = mp_find_ioapic(irq); - - ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; - - /* - * MPS INTI flags: - * trigger: 0=default, 1=edge, 3=level - * polarity: 0=default, 1=high, 3=low - * Per ACPI spec, default for SCI means level/low. - */ - io_apic_set_pci_routing(ioapic, ioapic_pin, irq, - (flags.trigger == 1 ? 0 : 1), (flags.polarity == 1 ? 0 : 1)); -#endif -} - #ifdef CONFIG_ACPI_PCI void __init mp_parse_prt (void) @@ -951,7 +898,7 @@ struct acpi_prt_entry *entry = NULL; int ioapic = -1; int ioapic_pin = 0; - int irq = 0; + int gsi = 0; int idx, bit = 0; int edge_level = 0; int active_high_low = 0; @@ -963,30 +910,30 @@ list_for_each(node, &acpi_prt.entries) { entry = list_entry(node, struct acpi_prt_entry, node); - /* Need to get irq for dynamic entry */ + /* Need to get gsi for dynamic entry */ if (entry->link.handle) { - irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low); - if (!irq) + gsi = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low); + if (!gsi) continue; } else { - /* Hardwired IRQ. Assume PCI standard settings */ - irq = entry->link.index; + /* Hardwired GSI. Assume PCI standard settings */ + gsi = entry->link.index; edge_level = 1; active_high_low = 1; } /* Don't set up the ACPI SCI because it's already set up */ - if (acpi_fadt.sci_int == irq) + if (acpi_fadt.sci_int == gsi) continue; - ioapic = mp_find_ioapic(irq); + ioapic = mp_find_ioapic(gsi); if (ioapic < 0) continue; - ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; + ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_start; /* * Avoid pin reprogramming. PRTs typically include entries - * with redundant pin->irq mappings (but unique PCI devices); + * with redundant pin->gsi mappings (but unique PCI devices); * we only only program the IOAPIC on the first. */ bit = ioapic_pin % 32; @@ -1000,20 +947,16 @@ if ((1<irq = irq; + acpi_gsi_to_irq(gsi, &entry->irq); continue; } mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<irq = irq; + if (!io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, edge_level, active_high_low)) { + acpi_gsi_to_irq(gsi, &entry->irq); } - printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d" - " -> IRQ %d\n", entry->id.segment, entry->id.bus, + printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> IRQ %d\n", + entry->id.segment, entry->id.bus, entry->id.device, ('A' + entry->pin), mp_ioapic_routing[ioapic].apic_id, ioapic_pin, entry->irq); 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 Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/kernel/pci-gart.c Sun Mar 28 13:12:07 2004 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +32,12 @@ #include #include +#ifdef CONFIG_PREEMPT +#define preempt_atomic() in_atomic() +#else +#define preempt_atomic() 1 +#endif + dma_addr_t bad_dma_address; unsigned long iommu_bus_base; /* GART remapping area (physical) */ @@ -96,6 +103,8 @@ static unsigned long next_bit; /* protected by iommu_bitmap_lock */ static int need_flush; /* global flush state. set for each gart wrap */ +static dma_addr_t pci_map_area(struct pci_dev *dev, unsigned long phys_mem, + size_t size, int dir); static unsigned long alloc_iommu(int size) { @@ -169,43 +178,44 @@ /* * Allocate memory for a consistent mapping. - * All mappings are consistent here, so this is just a wrapper around - * pci_map_single. */ void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) { void *memory; - int gfp = GFP_ATOMIC; - unsigned long dma_mask; + int gfp = preempt_atomic() ? GFP_ATOMIC : GFP_KERNEL; + unsigned long dma_mask = 0; + u64 bus; - if (hwdev == NULL) { - gfp |= GFP_DMA; - dma_mask = 0xffffffff; - } else { + if (hwdev) dma_mask = hwdev->dev.coherent_dma_mask; - } - if (dma_mask == 0) dma_mask = 0xffffffff; - if (dma_mask < 0xffffffff || no_iommu) - gfp |= GFP_DMA; /* Kludge to make it bug-to-bug compatible with i386. i386 uses the normal dma_mask for alloc_consistent. */ dma_mask &= hwdev->dma_mask; + again: memory = (void *)__get_free_pages(gfp, get_order(size)); - if (memory == NULL) { + if (memory == NULL) return NULL; - } else { + + { int high, mmu; - high = ((unsigned long)virt_to_bus(memory) + size) >= dma_mask; + bus = virt_to_bus(memory); + high = (bus + size) >= dma_mask; mmu = high; if (force_iommu && !(gfp & GFP_DMA)) mmu = 1; - if (no_iommu) { - if (high) goto error; + if (no_iommu || dma_mask < 0xffffffffUL) { + if (high) { + if (!(gfp & GFP_DMA)) { + gfp |= GFP_DMA; + goto again; + } + goto free; + } mmu = 0; } memset(memory, 0, size); @@ -215,15 +225,16 @@ } } - *dma_handle = pci_map_single(hwdev, memory, size, 0); + *dma_handle = pci_map_area(hwdev, bus, size, PCI_DMA_BIDIRECTIONAL); if (*dma_handle == bad_dma_address) goto error; - + flush_gart(hwdev); return memory; error: if (panic_on_overflow) - panic("pci_map_single: overflow %lu bytes\n", size); + panic("pci_alloc_consistent: overflow %lu bytes\n", size); +free: free_pages((unsigned long)memory, get_order(size)); return NULL; } @@ -608,6 +619,7 @@ EXPORT_SYMBOL(pci_dma_supported); EXPORT_SYMBOL(no_iommu); EXPORT_SYMBOL(force_iommu); +EXPORT_SYMBOL(bad_dma_address); static __init unsigned long check_iommu_size(unsigned long aper, u64 aper_size) { @@ -733,7 +745,7 @@ if (swiotlb) { no_iommu = 1; - printk(KERN_INFO "PCI-DMA: Using SWIOTLB :-(\n"); + printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); return -1; } @@ -837,6 +849,7 @@ forcesac For SAC mode for masks <40bits (experimental) fullflush Flush IOMMU on each allocation (default) nofullflush Don't use IOMMU fullflush + soft Use software bounce buffering (default for Intel machines) */ __init int iommu_setup(char *opt) { @@ -876,6 +889,8 @@ iommu_fullflush = 1; if (!memcmp(p, "nofullflush", 11)) iommu_fullflush = 0; + if (!memcmp(p, "soft", 4)) + swiotlb = 1; #ifdef CONFIG_IOMMU_LEAK if (!memcmp(p,"leak", 4)) { leak_trace = 1; diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c --- a/arch/x86_64/kernel/process.c Sun Mar 28 13:12:08 2004 +++ b/arch/x86_64/kernel/process.c Sun Mar 28 13:12:08 2004 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -205,7 +206,8 @@ printk("\n"); print_modules(); - printk("Pid: %d, comm: %.20s %s\n", current->pid, current->comm, print_tainted()); + printk("Pid: %d, comm: %.20s %s %s\n", + current->pid, current->comm, print_tainted(), UTS_RELEASE); printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); printk_address(regs->rip); printk("\nRSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, regs->eflags); diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/kernel/setup.c Sun Mar 28 13:12:07 2004 @@ -68,6 +68,7 @@ #ifdef CONFIG_ACPI_BOOT extern int __initdata acpi_ht; +extern acpi_interrupt_flags acpi_sci_flags; /* int __initdata acpi_force = 0; */ #endif @@ -201,7 +202,18 @@ for (;;) { if (c != ' ') goto next_char; - + +#ifdef CONFIG_SMP + /* + * If the BIOS enumerates physical processors before logical, + * maxcpus=N at enumeration-time can be used to disable HT. + */ + else if (!memcmp(from, "maxcpus=", 8)) { + extern unsigned int maxcpus; + + maxcpus = simple_strtoul(from + 8, NULL, 0); + } +#endif #ifdef CONFIG_ACPI_BOOT /* "acpi=off" disables both ACPI table parsing and interpreter init */ if (!memcmp(from, "acpi=off", 8)) @@ -218,6 +230,17 @@ if (!memcmp(from, "acpi=ht", 7)) { acpi_ht = 1; } + else if (!memcmp(from, "pci=noacpi", 10)) + acpi_noirq_set(); + + else if (!memcmp(from, "acpi_sci=edge", 13)) + acpi_sci_flags.trigger = 1; + else if (!memcmp(from, "acpi_sci=level", 14)) + acpi_sci_flags.trigger = 3; + else if (!memcmp(from, "acpi_sci=high", 13)) + acpi_sci_flags.polarity = 1; + else if (!memcmp(from, "acpi_sci=low", 12)) + acpi_sci_flags.polarity = 3; /* acpi=strict disables out-of-spec workarounds */ else if (!memcmp(from, "acpi=strict", 11)) { @@ -232,7 +255,7 @@ if (!memcmp(from, "noapic", 6)) skip_ioapic_setup = 1; - if (!memcmp(from, "apic", 6)) { + if (!memcmp(from, "apic", 4)) { skip_ioapic_setup = 0; ioapic_force = 1; } @@ -453,9 +476,7 @@ paging_init(); #ifndef CONFIG_SMP - /* Temporary hack: disable the IO-APIC for UP Nvidia and - This is until we sort out the ACPI problems. */ - if (!acpi_disabled) + /* Temporary hack: disable the IO-APIC for UP Nvidia and VIA. */ check_ioapic(); #endif #ifdef CONFIG_ACPI_BOOT diff -Nru a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c --- a/arch/x86_64/mm/init.c Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/mm/init.c Sun Mar 28 13:12:07 2004 @@ -405,10 +405,10 @@ int tmp; #ifdef CONFIG_SWIOTLB - if (!iommu_aperture && end_pfn >= 0xffffffff>>PAGE_SHIFT) { - swiotlb_init(); + if (!iommu_aperture && end_pfn >= 0xffffffff>>PAGE_SHIFT) swiotlb = 1; - } + if (swiotlb) + swiotlb_init(); #endif /* How many end-of-memory variables you have, grandma! */ diff -Nru a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c --- a/arch/x86_64/pci/mmconfig.c Sun Mar 28 13:12:07 2004 +++ b/arch/x86_64/pci/mmconfig.c Sun Mar 28 13:12:07 2004 @@ -88,7 +88,7 @@ return 0; } - printk(KERN_INFO "PCI: Using MMCONFIG at %lx\n", pci_mmcfg_base_addr); + printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_base_addr); raw_pci_ops = &pci_mmcfg; pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; diff -Nru a/crypto/Kconfig b/crypto/Kconfig --- a/crypto/Kconfig Sun Mar 28 13:12:08 2004 +++ b/crypto/Kconfig Sun Mar 28 13:12:08 2004 @@ -161,6 +161,15 @@ You will most probably want this if using IPSec. +config CRYPTO_MICHAEL_MIC + tristate "Michael MIC keyed digest algorithm" + depends on CRYPTO + help + Michael MIC is used for message integrity protection in TKIP + (IEEE 802.11i). This algorithm is required for TKIP, but it + should not be used for other purposes because of the weakness + of the algorithm. + config CRYPTO_TEST tristate "Testing module" depends on CRYPTO diff -Nru a/crypto/Makefile b/crypto/Makefile --- a/crypto/Makefile Sun Mar 28 13:12:08 2004 +++ b/crypto/Makefile Sun Mar 28 13:12:08 2004 @@ -23,5 +23,6 @@ obj-$(CONFIG_CRYPTO_CAST6) += cast6.o obj-$(CONFIG_CRYPTO_ARC4) += arc4.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o +obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o diff -Nru a/crypto/arc4.c b/crypto/arc4.c --- a/crypto/arc4.c Sun Mar 28 13:12:07 2004 +++ b/crypto/arc4.c Sun Mar 28 13:12:07 2004 @@ -45,10 +45,6 @@ k = 0; } - /* TODO: dump the first 768 bytes generated as recommended - by Ilya Mironov (http://eprint.iacr.org/2002/067/) to - increase the statistical strength of the state table */ - return 0; } diff -Nru a/crypto/digest.c b/crypto/digest.c --- a/crypto/digest.c Sun Mar 28 13:12:07 2004 +++ b/crypto/digest.c Sun Mar 28 13:12:07 2004 @@ -42,6 +42,15 @@ tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), out); } +static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) +{ + u32 flags; + if (tfm->__crt_alg->cra_digest.dia_setkey == NULL) + return -ENOSYS; + return tfm->__crt_alg->cra_digest.dia_setkey(crypto_tfm_ctx(tfm), + key, keylen, &flags); +} + static void digest(struct crypto_tfm *tfm, struct scatterlist *sg, unsigned int nsg, u8 *out) { @@ -72,6 +81,7 @@ ops->dit_update = update; ops->dit_final = final; ops->dit_digest = digest; + ops->dit_setkey = setkey; return crypto_alloc_hmac_block(tfm); } diff -Nru a/crypto/michael_mic.c b/crypto/michael_mic.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/crypto/michael_mic.c Sun Mar 28 13:12:08 2004 @@ -0,0 +1,193 @@ +/* + * Cryptographic API + * + * Michael MIC (IEEE 802.11i/TKIP) keyed digest + * + * Copyright (c) 2004 Jouni Malinen + * + * 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 + + +struct michael_mic_ctx { + u8 pending[4]; + size_t pending_len; + + u32 l, r; +}; + + +static inline u32 rotl(u32 val, int bits) +{ + return (val << bits) | (val >> (32 - bits)); +} + + +static inline u32 rotr(u32 val, int bits) +{ + return (val >> bits) | (val << (32 - bits)); +} + + +static inline u32 xswap(u32 val) +{ + return ((val & 0x00ff00ff) << 8) | ((val & 0xff00ff00) >> 8); +} + + +#define michael_block(l, r) \ +do { \ + r ^= rotl(l, 17); \ + l += r; \ + r ^= xswap(l); \ + l += r; \ + r ^= rotl(l, 3); \ + l += r; \ + r ^= rotr(l, 2); \ + l += r; \ +} while (0) + + +static inline u32 get_le32(const u8 *p) +{ + return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); +} + + +static inline void put_le32(u8 *p, u32 v) +{ + p[0] = v; + p[1] = v >> 8; + p[2] = v >> 16; + p[3] = v >> 24; +} + + +static void michael_init(void *ctx) +{ + struct michael_mic_ctx *mctx = ctx; + mctx->pending_len = 0; +} + + +static void michael_update(void *ctx, const u8 *data, unsigned int len) +{ + struct michael_mic_ctx *mctx = ctx; + + if (mctx->pending_len) { + int flen = 4 - mctx->pending_len; + if (flen > len) + flen = len; + memcpy(&mctx->pending[mctx->pending_len], data, flen); + mctx->pending_len += flen; + data += flen; + len -= flen; + + if (mctx->pending_len < 4) + return; + + mctx->l ^= get_le32(mctx->pending); + michael_block(mctx->l, mctx->r); + mctx->pending_len = 0; + } + + while (len >= 4) { + mctx->l ^= get_le32(data); + michael_block(mctx->l, mctx->r); + data += 4; + len -= 4; + } + + if (len > 0) { + mctx->pending_len = len; + memcpy(mctx->pending, data, len); + } +} + + +static void michael_final(void *ctx, u8 *out) +{ + struct michael_mic_ctx *mctx = ctx; + u8 *data = mctx->pending; + + /* Last block and padding (0x5a, 4..7 x 0) */ + switch (mctx->pending_len) { + case 0: + mctx->l ^= 0x5a; + break; + case 1: + mctx->l ^= data[0] | 0x5a00; + break; + case 2: + mctx->l ^= data[0] | (data[1] << 8) | 0x5a0000; + break; + case 3: + mctx->l ^= data[0] | (data[1] << 8) | (data[2] << 16) | + 0x5a000000; + break; + } + michael_block(mctx->l, mctx->r); + /* l ^= 0; */ + michael_block(mctx->l, mctx->r); + + put_le32(out, mctx->l); + put_le32(out + 4, mctx->r); +} + + +static int michael_setkey(void *ctx, const u8 *key, unsigned int keylen, + u32 *flags) +{ + struct michael_mic_ctx *mctx = ctx; + if (keylen != 8) { + if (flags) + *flags = CRYPTO_TFM_RES_BAD_KEY_LEN; + return -EINVAL; + } + mctx->l = get_le32(key); + mctx->r = get_le32(key + 4); + return 0; +} + + +static struct crypto_alg michael_mic_alg = { + .cra_name = "michael_mic", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = 8, + .cra_ctxsize = sizeof(struct michael_mic_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(michael_mic_alg.cra_list), + .cra_u = { .digest = { + .dia_digestsize = 8, + .dia_init = michael_init, + .dia_update = michael_update, + .dia_final = michael_final, + .dia_setkey = michael_setkey } } +}; + + +static int __init michael_mic_init(void) +{ + return crypto_register_alg(&michael_mic_alg); +} + + +static void __exit michael_mic_exit(void) +{ + crypto_unregister_alg(&michael_mic_alg); +} + + +module_init(michael_mic_init); +module_exit(michael_mic_exit); + +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("Michael MIC"); +MODULE_AUTHOR("Jouni Malinen "); diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c --- a/crypto/tcrypt.c Sun Mar 28 13:12:08 2004 +++ b/crypto/tcrypt.c Sun Mar 28 13:12:08 2004 @@ -61,7 +61,7 @@ static char *check[] = { "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", - "arc4", "deflate", NULL + "arc4", "michael_mic", "deflate", NULL }; static void @@ -112,6 +112,10 @@ sg[0].length = hash_tv[i].psize; crypto_digest_init (tfm); + if (tfm->crt_u.digest.dit_setkey) { + crypto_digest_setkey (tfm, hash_tv[i].key, + hash_tv[i].ksize); + } crypto_digest_update (tfm, sg, 1); crypto_digest_final (tfm, result); @@ -568,6 +572,8 @@ test_hmac("sha1", hmac_sha1_tv_template, HMAC_SHA1_TEST_VECTORS); test_hmac("sha256", hmac_sha256_tv_template, HMAC_SHA256_TEST_VECTORS); #endif + + test_hash("michael_mic", michael_mic_tv_template, MICHAEL_MIC_TEST_VECTORS); break; case 1: @@ -645,6 +651,10 @@ case 16: test_cipher ("arc4", MODE_ECB, ENCRYPT, arc4_enc_tv_template, ARC4_ENC_TEST_VECTORS); test_cipher ("arc4", MODE_ECB, DECRYPT, arc4_dec_tv_template, ARC4_DEC_TEST_VECTORS); + break; + + case 17: + test_hash("michael_mic", michael_mic_tv_template, MICHAEL_MIC_TEST_VECTORS); break; #ifdef CONFIG_CRYPTO_HMAC diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h --- a/crypto/tcrypt.h Sun Mar 28 13:12:08 2004 +++ b/crypto/tcrypt.h Sun Mar 28 13:12:08 2004 @@ -30,6 +30,8 @@ char digest[MAX_DIGEST_SIZE]; unsigned char np; unsigned char tap[MAX_TAP]; + char key[128]; /* only used with keyed hash algorithms */ + unsigned char ksize; }; struct hmac_testvec { @@ -1719,4 +1721,54 @@ }, }; +/* + * Michael MIC test vectors from IEEE 802.11i + */ +#define MICHAEL_MIC_TEST_VECTORS 6 + +struct hash_testvec michael_mic_tv_template[] = +{ + { + .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + .ksize = 8, + .plaintext = { }, + .psize = 0, + .digest = { 0x82, 0x92, 0x5c, 0x1c, 0xa1, 0xd1, 0x30, 0xb8 } + }, + { + .key = { 0x82, 0x92, 0x5c, 0x1c, 0xa1, 0xd1, 0x30, 0xb8 }, + .ksize = 8, + .plaintext = { 'M' }, + .psize = 1, + .digest = { 0x43, 0x47, 0x21, 0xca, 0x40, 0x63, 0x9b, 0x3f } + }, + { + .key = { 0x43, 0x47, 0x21, 0xca, 0x40, 0x63, 0x9b, 0x3f }, + .ksize = 8, + .plaintext = { 'M', 'i' }, + .psize = 2, + .digest = { 0xe8, 0xf9, 0xbe, 0xca, 0xe9, 0x7e, 0x5d, 0x29 } + }, + { + .key = { 0xe8, 0xf9, 0xbe, 0xca, 0xe9, 0x7e, 0x5d, 0x29 }, + .ksize = 8, + .plaintext = { 'M', 'i', 'c' }, + .psize = 3, + .digest = { 0x90, 0x03, 0x8f, 0xc6, 0xcf, 0x13, 0xc1, 0xdb } + }, + { + .key = { 0x90, 0x03, 0x8f, 0xc6, 0xcf, 0x13, 0xc1, 0xdb }, + .ksize = 8, + .plaintext = { 'M', 'i', 'c', 'h' }, + .psize = 4, + .digest = { 0xd5, 0x5e, 0x10, 0x05, 0x10, 0x12, 0x89, 0x86 } + }, + { + .key = { 0xd5, 0x5e, 0x10, 0x05, 0x10, 0x12, 0x89, 0x86 }, + .ksize = 8, + .plaintext = { 'M', 'i', 'c', 'h', 'a', 'e', 'l' }, + .psize = 7, + .digest = { 0x0a, 0x94, 0x2b, 0x12, 0x4e, 0xca, 0xa5, 0x46 }, + } +}; #endif /* _CRYPTO_TCRYPT_H */ diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/Kconfig Sun Mar 28 13:12:08 2004 @@ -255,6 +255,7 @@ bool "Power Management Timer Support" depends on X86 && ACPI depends on ACPI_BOOT && EXPERIMENTAL + depends on !X86_64 default n help The Power Management Timer is available on all ACPI-capable, diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c --- a/drivers/acpi/bus.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/bus.c Sun Mar 28 13:12:08 2004 @@ -39,7 +39,9 @@ #define _COMPONENT ACPI_BUS_COMPONENT ACPI_MODULE_NAME ("acpi_bus") -extern void __init acpi_pic_sci_set_trigger(unsigned int irq); +#ifdef CONFIG_X86 +extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); +#endif FADT_DESCRIPTOR acpi_fadt; struct acpi_device *acpi_root; @@ -611,11 +613,18 @@ } #ifdef CONFIG_X86 - /* Ensure the SCI is set to level-triggered, active-low */ - if (acpi_ioapic) - mp_config_ioapic_for_sci(acpi_fadt.sci_int); - else - acpi_pic_sci_set_trigger(acpi_fadt.sci_int); + if (!acpi_ioapic) { + extern acpi_interrupt_flags acpi_sci_flags; + /* Set PIC-mode SCI trigger type */ + acpi_pic_sci_set_trigger(acpi_fadt.sci_int, acpi_sci_flags.trigger); + } else { + extern int acpi_sci_override_gsi; + /* + * now that acpi_fadt is initialized, + * update it with result from INT_SRC_OVR parsing + */ + acpi_fadt.sci_int = acpi_sci_override_gsi; + } #endif status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION); @@ -704,29 +713,14 @@ pm_active = 1; else { printk(KERN_INFO PREFIX "APM is already active, exiting\n"); - acpi_disabled = 1; + disable_acpi(); result = -ENODEV; } #endif } else - acpi_disabled = 1; + disable_acpi(); return_VALUE(result); } - -static int __init acpi_setup(char *str) -{ - while (str && *str) { - if (strncmp(str, "off", 3) == 0) - acpi_disabled = 1; - str = strchr(str, ','); - if (str) - str += strspn(str, ", \t"); - } - return 1; -} - subsys_initcall(acpi_init); - -__setup("acpi=", acpi_setup); diff -Nru a/drivers/acpi/ec.c b/drivers/acpi/ec.c --- a/drivers/acpi/ec.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/ec.c Sun Mar 28 13:12:08 2004 @@ -719,7 +719,7 @@ * Install GPE handler */ status = acpi_install_gpe_handler(NULL, ec->gpe_bit, - ACPI_EVENT_EDGE_TRIGGERED, &acpi_ec_gpe_handler, ec); + ACPI_GPE_EDGE_TRIGGERED, &acpi_ec_gpe_handler, ec); if (ACPI_FAILURE(status)) { return_VALUE(-ENODEV); } @@ -803,7 +803,7 @@ * Install GPE handler */ status = acpi_install_gpe_handler(NULL, ec_ecdt->gpe_bit, - ACPI_EVENT_EDGE_TRIGGERED, &acpi_ec_gpe_handler, + ACPI_GPE_EDGE_TRIGGERED, &acpi_ec_gpe_handler, ec_ecdt); if (ACPI_FAILURE(status)) { goto error; diff -Nru a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c --- a/drivers/acpi/events/evgpe.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/events/evgpe.c Sun Mar 28 13:12:08 2004 @@ -99,9 +99,8 @@ return (NULL); } - /* - * A Non-null gpe_device means this is a GPE Block Device. - */ + /* A Non-NULL gpe_device means this is a GPE Block Device */ + obj_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) gpe_device); if (!obj_desc || !obj_desc->device.gpe_block) { @@ -297,7 +296,7 @@ } } - if (local_gpe_event_info.flags & ACPI_EVENT_LEVEL_TRIGGERED) { + if ((local_gpe_event_info.flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_LEVEL_TRIGGERED) { /* * GPE is level-triggered, we clear the GPE status bit after handling * the event. @@ -346,7 +345,7 @@ * If edge-triggered, clear the GPE status bit now. Note that * level-triggered events are cleared after the GPE is serviced. */ - if (gpe_event_info->flags & ACPI_EVENT_EDGE_TRIGGERED) { + if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_EDGE_TRIGGERED) { status = acpi_hw_clear_gpe (gpe_event_info); if (ACPI_FAILURE (status)) { ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to clear GPE[%2X]\n", @@ -369,7 +368,7 @@ /* It is now safe to clear level-triggered events. */ - if (gpe_event_info->flags & ACPI_EVENT_LEVEL_TRIGGERED) { + if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == ACPI_GPE_LEVEL_TRIGGERED) { status = acpi_hw_clear_gpe (gpe_event_info); if (ACPI_FAILURE (status)) { ACPI_REPORT_ERROR (( diff -Nru a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c --- a/drivers/acpi/events/evgpeblk.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/events/evgpeblk.c Sun Mar 28 13:12:08 2004 @@ -168,11 +168,11 @@ * information for quick lookup during GPE dispatch * * The name of each GPE control method is of the form: - * "_Lnn" or "_Enn" - * Where: - * L - means that the GPE is level triggered - * E - means that the GPE is edge triggered - * nn - is the GPE number [in HEX] + * "_Lxx" or "_Exx" + * Where: + * L - means that the GPE is level triggered + * E - means that the GPE is edge triggered + * xx - is the GPE number [in HEX] * ******************************************************************************/ @@ -188,36 +188,41 @@ u32 gpe_number; char name[ACPI_NAME_SIZE + 1]; u8 type; - acpi_status status; ACPI_FUNCTION_TRACE ("ev_save_method_info"); - /* Extract the name from the object and convert to a string */ - + /* + * _Lxx and _Exx GPE method support + * + * 1) Extract the name from the object and convert to a string + */ ACPI_MOVE_32_TO_32 (name, &((struct acpi_namespace_node *) obj_handle)->name.integer); name[ACPI_NAME_SIZE] = 0; /* - * Edge/Level determination is based on the 2nd character - * of the method name + * 2) Edge/Level determination is based on the 2nd character + * of the method name + * + * NOTE: Default GPE type is RUNTIME. May be changed later to WAKE if a + * _PRW object is found that points to this GPE. */ switch (name[1]) { case 'L': - type = ACPI_EVENT_LEVEL_TRIGGERED; + type = ACPI_GPE_LEVEL_TRIGGERED | ACPI_GPE_TYPE_RUNTIME; break; case 'E': - type = ACPI_EVENT_EDGE_TRIGGERED; + type = ACPI_GPE_EDGE_TRIGGERED | ACPI_GPE_TYPE_RUNTIME; break; default: /* Unknown method type, just ignore it! */ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Unknown GPE method type: %s (name not of form _Lnn or _Enn)\n", + "Unknown GPE method type: %s (name not of form _Lxx or _Exx)\n", name)); return_ACPI_STATUS (AE_OK); } @@ -229,7 +234,7 @@ /* Conversion failed; invalid method, just ignore it */ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Could not extract GPE number from name: %s (name is not of form _Lnn or _Enn)\n", + "Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)\n", name)); return_ACPI_STATUS (AE_OK); } @@ -255,13 +260,6 @@ gpe_event_info->flags = type; gpe_event_info->method_node = (struct acpi_namespace_node *) obj_handle; - /* Enable the GPE (SCIs should be disabled at this point) */ - - status = acpi_hw_enable_gpe (gpe_event_info); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); - } - ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Registered GPE method %s as GPE number 0x%.2X\n", name, gpe_number)); @@ -271,6 +269,122 @@ /******************************************************************************* * + * FUNCTION: acpi_ev_get_gpe_type + * + * PARAMETERS: Callback from walk_namespace + * + * RETURN: Status + * + * DESCRIPTION: Called from acpi_walk_namespace. Expects each object to be a + * Device. Run the _PRW method. If present, extract the GPE + * number and mark the GPE as a WAKE GPE. + * + ******************************************************************************/ + +static acpi_status +acpi_ev_get_gpe_type ( + acpi_handle obj_handle, + u32 level, + void *info, + void **return_value) +{ + struct acpi_gpe_walk_info *gpe_info = (void *) info; + struct acpi_namespace_node *gpe_device; + struct acpi_gpe_block_info *gpe_block; + struct acpi_namespace_node *target_gpe_device; + struct acpi_gpe_event_info *gpe_event_info; + union acpi_operand_object *pkg_desc; + union acpi_operand_object *obj_desc; + u32 gpe_number; + acpi_status status; + + + ACPI_FUNCTION_TRACE ("ev_get_gpe_type"); + + + /* Check for a _PRW method under this device */ + + status = acpi_ut_evaluate_object (obj_handle, METHOD_NAME__PRW, + ACPI_BTYPE_PACKAGE, &pkg_desc); + if (status == AE_NOT_FOUND) { + return_ACPI_STATUS (AE_OK); + } + else if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + + /* The returned _PRW package must have at least two elements */ + + if (pkg_desc->package.count < 2) { + goto cleanup; + } + + /* Extract pointers from the input context */ + + gpe_device = gpe_info->gpe_device; + gpe_block = gpe_info->gpe_block; + + /* + * The _PRW object must return a package, we are only interested + * in the first element + */ + obj_desc = pkg_desc->package.elements[0]; + + if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) { + /* Use FADT-defined GPE device (from definition of _PRW) */ + + target_gpe_device = acpi_gbl_fadt_gpe_device; + + /* Integer is the GPE number in the FADT described GPE blocks */ + + gpe_number = (u32) obj_desc->integer.value; + } + else if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_PACKAGE) { + /* Package contains a GPE reference and GPE number within a GPE block */ + + if ((obj_desc->package.count < 2) || + (ACPI_GET_OBJECT_TYPE (obj_desc->package.elements[0]) != ACPI_TYPE_LOCAL_REFERENCE) || + (ACPI_GET_OBJECT_TYPE (obj_desc->package.elements[1]) != ACPI_TYPE_INTEGER)) { + goto cleanup; + } + + /* Get GPE block reference and decode */ + + target_gpe_device = obj_desc->package.elements[0]->reference.node; + gpe_number = (u32) obj_desc->package.elements[1]->integer.value; + } + else { + /* Unknown type, just ignore it */ + + goto cleanup; + } + + /* + * Is this GPE within this block? + * + * TRUE iff these conditions are true: + * 1) The GPE devices match. + * 2) The GPE index(number) is within the range of the Gpe Block + * associated with the GPE device. + */ + if ((gpe_device == target_gpe_device) && + (gpe_number >= gpe_block->block_base_number) && + (gpe_number < gpe_block->block_base_number + (gpe_block->register_count * 8))) { + /* Mark GPE for WAKE but DISABLED (even for wake) */ + + gpe_event_info = &gpe_block->event_info[gpe_number - gpe_block->block_base_number]; + gpe_event_info->flags |= ACPI_GPE_TYPE_WAKE; + } + +cleanup: + acpi_ut_remove_reference (pkg_desc); + + return_ACPI_STATUS (status); +} + + +/******************************************************************************* + * * FUNCTION: acpi_ev_get_gpe_xrupt_block * * PARAMETERS: interrupt_level - Interrupt for a GPE block @@ -695,8 +809,13 @@ struct acpi_gpe_block_info **return_gpe_block) { struct acpi_gpe_block_info *gpe_block; + struct acpi_gpe_event_info *gpe_event_info; + acpi_native_uint i; + acpi_native_uint j; + u32 wake_gpe_count; + u32 gpe_enabled_count; acpi_status status; - + struct acpi_gpe_walk_info gpe_info; ACPI_FUNCTION_TRACE ("ev_create_gpe_block"); @@ -737,7 +856,8 @@ /* Dump info about this GPE block */ - ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "GPE %02d to %02d [%4.4s] %d regs at %8.8X%8.8X on int %d\n", + ACPI_DEBUG_PRINT ((ACPI_DB_INIT, + "GPE %02d to %02d [%4.4s] %d regs at %8.8X%8.8X on int %d\n", gpe_block->block_base_number, (u32) (gpe_block->block_base_number + ((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)), @@ -752,6 +872,58 @@ ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK, acpi_ev_save_method_info, gpe_block, NULL); + /* + * Runtime option: Should Wake GPEs be enabled at runtime? The default is + * No,they should only be enabled just as the machine goes to sleep. + */ + if (acpi_gbl_leave_wake_gpes_disabled) { + /* + * Differentiate RUNTIME vs WAKE GPEs, via the _PRW control methods. (Each + * GPE that has one or more _PRWs that reference it is by definition a + * WAKE GPE and will not be enabled while the machine is running.) + */ + gpe_info.gpe_block = gpe_block; + gpe_info.gpe_device = gpe_device; + + status = acpi_ns_walk_namespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK, acpi_ev_get_gpe_type, + &gpe_info, NULL); + } + + /* + * Enable all GPEs in this block that are 1) "runtime" GPEs, and 2) have + * a corresponding _Lxx or _Exx method. All other GPEs must be enabled via + * the acpi_enable_gpe() external interface. + */ + wake_gpe_count = 0; + gpe_enabled_count = 0; + + for (i = 0; i < gpe_block->register_count; i++) { + for (j = 0; j < 8; j++) { + /* Get the info block for this particular GPE */ + + gpe_event_info = &gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j]; + if ((gpe_event_info->method_node) && + ((gpe_event_info->flags & ACPI_GPE_TYPE_MASK) == ACPI_GPE_TYPE_RUNTIME)) { + /* Enable this GPE, it is 1) RUNTIME and 2) has an _Lxx or _Exx method */ + + status = acpi_hw_enable_gpe (gpe_event_info); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + gpe_enabled_count++; + } + + if ((gpe_event_info->flags & ACPI_GPE_TYPE_MASK) == ACPI_GPE_TYPE_WAKE) { + wake_gpe_count++; + } + } + } + + ACPI_DEBUG_PRINT ((ACPI_DB_INIT, + "Found %u Wake, Enabled %u Runtime GPEs in this block\n", + wake_gpe_count, gpe_enabled_count)); + /* Return the new block */ if (return_gpe_block) { @@ -775,27 +947,25 @@ ******************************************************************************/ acpi_status -acpi_ev_gpe_initialize (void) +acpi_ev_gpe_initialize ( + void) { u32 register_count0 = 0; u32 register_count1 = 0; u32 gpe_number_max = 0; - acpi_handle gpe_device; acpi_status status; ACPI_FUNCTION_TRACE ("ev_gpe_initialize"); - /* Get a handle to the predefined _GPE object */ - - status = acpi_get_handle (NULL, "\\_GPE", &gpe_device); + status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } /* - * Initialize the GPE Blocks defined in the FADT + * Initialize the GPE Block(s) defined in the FADT * * Why the GPE register block lengths are divided by 2: From the ACPI Spec, * section "General-Purpose Event Registers", we have: @@ -829,8 +999,9 @@ /* Install GPE Block 0 */ - status = acpi_ev_create_gpe_block (gpe_device, &acpi_gbl_FADT->xgpe0_blk, + status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device, &acpi_gbl_FADT->xgpe0_blk, register_count0, 0, acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[0]); + if (ACPI_FAILURE (status)) { ACPI_REPORT_ERROR (( "Could not create GPE Block 0, %s\n", @@ -861,9 +1032,10 @@ else { /* Install GPE Block 1 */ - status = acpi_ev_create_gpe_block (gpe_device, &acpi_gbl_FADT->xgpe1_blk, + status = acpi_ev_create_gpe_block (acpi_gbl_fadt_gpe_device, &acpi_gbl_FADT->xgpe1_blk, register_count1, acpi_gbl_FADT->gpe1_base, acpi_gbl_FADT->sci_int, &acpi_gbl_gpe_fadt_blocks[1]); + if (ACPI_FAILURE (status)) { ACPI_REPORT_ERROR (( "Could not create GPE Block 1, %s\n", @@ -885,7 +1057,8 @@ /* GPEs are not required by ACPI, this is OK */ ACPI_REPORT_INFO (("There are no GPE blocks defined in the FADT\n")); - return_ACPI_STATUS (AE_OK); + status = AE_OK; + goto cleanup; } /* Check for Max GPE number out-of-range */ @@ -893,9 +1066,12 @@ if (gpe_number_max > ACPI_GPE_MAX) { ACPI_REPORT_ERROR (("Maximum GPE number from FADT is too large: 0x%X\n", gpe_number_max)); - return_ACPI_STATUS (AE_BAD_VALUE); + status = AE_BAD_VALUE; + goto cleanup; } +cleanup: + (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); return_ACPI_STATUS (AE_OK); } diff -Nru a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c --- a/drivers/acpi/events/evmisc.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/events/evmisc.c Sun Mar 28 13:12:08 2004 @@ -97,6 +97,20 @@ * ******************************************************************************/ +#ifdef ACPI_DEBUG_OUTPUT +static const char *acpi_notify_value_names[] = +{ + "Bus Check", + "Device Check", + "Device Wake", + "Eject request", + "Device Check Light", + "Frequency Mismatch", + "Bus Mode Mismatch", + "Power Fault" +}; +#endif + acpi_status acpi_ev_queue_notify_request ( struct acpi_namespace_node *node, @@ -112,7 +126,7 @@ /* - * For value 1 (Ejection Request), some device method may need to be run. + * For value 3 (Ejection Request), some device method may need to be run. * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need to be run. * For value 0x80 (Status Change) on the power button or sleep button, * initiate soft-off or sleep operation? @@ -120,26 +134,13 @@ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Dispatching Notify(%X) on node %p\n", notify_value, node)); - switch (notify_value) { - case 0: - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Re-enumerate Devices\n")); - break; - - case 1: - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Ejection Request\n")); - break; - - case 2: - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Device Wake\n")); - break; - - case 0x80: - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Status Change\n")); - break; - - default: - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Unknown Notify Value: %X \n", notify_value)); - break; + if (notify_value <= 7) { + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: %s\n", + acpi_notify_value_names[notify_value])); + } + else { + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "notify value: 0x2.2_x **Device Specific**\n", + notify_value)); } /* diff -Nru a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c --- a/drivers/acpi/events/evxfevnt.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/events/evxfevnt.c Sun Mar 28 13:12:07 2004 @@ -247,16 +247,29 @@ goto unlock_and_exit; } - /* Enable the requested GPE number */ - - status = acpi_hw_enable_gpe (gpe_event_info); - if (ACPI_FAILURE (status)) { - goto unlock_and_exit; - } + /* Check for Wake vs Runtime GPE */ if (flags & ACPI_EVENT_WAKE_ENABLE) { + /* Ensure the requested wake GPE is disabled */ + + status = acpi_hw_disable_gpe (gpe_event_info); + if (ACPI_FAILURE (status)) { + goto unlock_and_exit; + } + + /* Defer Enable of Wake GPE until sleep time */ + acpi_hw_enable_gpe_for_wakeup (gpe_event_info); } + else { + /* Enable the requested runtime GPE */ + + status = acpi_hw_enable_gpe (gpe_event_info); + if (ACPI_FAILURE (status)) { + goto unlock_and_exit; + } + } + unlock_and_exit: if (flags & ACPI_NOT_ISR) { diff -Nru a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c --- a/drivers/acpi/executer/excreate.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/executer/excreate.c Sun Mar 28 13:12:08 2004 @@ -84,14 +84,15 @@ alias_node = (struct acpi_namespace_node *) walk_state->operands[0]; target_node = (struct acpi_namespace_node *) walk_state->operands[1]; - if (target_node->type == ACPI_TYPE_LOCAL_ALIAS) { + if ((target_node->type == ACPI_TYPE_LOCAL_ALIAS) || + (target_node->type == ACPI_TYPE_LOCAL_METHOD_ALIAS)) { /* * Dereference an existing alias so that we don't create a chain * of aliases. With this code, we guarantee that an alias is * always exactly one level of indirection away from the * actual aliased name. */ - target_node = (struct acpi_namespace_node *) target_node->object; + target_node = ACPI_CAST_PTR (struct acpi_namespace_node, target_node->object); } /* @@ -114,6 +115,17 @@ * types, the object can change dynamically via a Store. */ alias_node->type = ACPI_TYPE_LOCAL_ALIAS; + alias_node->object = ACPI_CAST_PTR (union acpi_operand_object, target_node); + break; + + case ACPI_TYPE_METHOD: + + /* + * The new alias has the type ALIAS and points to the original + * NS node, not the object itself. This is because for these + * types, the object can change dynamically via a Store. + */ + alias_node->type = ACPI_TYPE_LOCAL_METHOD_ALIAS; alias_node->object = ACPI_CAST_PTR (union acpi_operand_object, target_node); break; diff -Nru a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c --- a/drivers/acpi/executer/exdump.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/executer/exdump.c Sun Mar 28 13:12:07 2004 @@ -774,6 +774,7 @@ case ACPI_TYPE_LOCAL_ALIAS: + case ACPI_TYPE_LOCAL_METHOD_ALIAS: case ACPI_TYPE_LOCAL_EXTRA: case ACPI_TYPE_LOCAL_DATA: default: diff -Nru a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c --- a/drivers/acpi/executer/exresnte.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/executer/exresnte.c Sun Mar 28 13:12:07 2004 @@ -108,10 +108,11 @@ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Entry=%p source_desc=%p [%s]\n", node, source_desc, acpi_ut_get_type_name (entry_type))); - if (entry_type == ACPI_TYPE_LOCAL_ALIAS) { + if ((entry_type == ACPI_TYPE_LOCAL_ALIAS) || + (entry_type == ACPI_TYPE_LOCAL_METHOD_ALIAS)) { /* There is always exactly one level of indirection */ - node = (struct acpi_namespace_node *) node->object; + node = ACPI_CAST_PTR (struct acpi_namespace_node, node->object); source_desc = acpi_ns_get_attached_object (node); entry_type = acpi_ns_get_type ((acpi_handle) node); *object_ptr = node; diff -Nru a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c --- a/drivers/acpi/executer/exstoren.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/executer/exstoren.c Sun Mar 28 13:12:07 2004 @@ -138,6 +138,7 @@ case ACPI_TYPE_LOCAL_ALIAS: + case ACPI_TYPE_LOCAL_METHOD_ALIAS: /* * Aliases are resolved by acpi_ex_prep_operands diff -Nru a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c --- a/drivers/acpi/hardware/hwgpe.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/hardware/hwgpe.c Sun Mar 28 13:12:07 2004 @@ -53,9 +53,9 @@ * * FUNCTION: acpi_hw_enable_gpe * - * PARAMETERS: gpe_number - The GPE + * PARAMETERS: gpe_event_info - Info block for the GPE to be enabled * - * RETURN: None + * RETURN: Status * * DESCRIPTION: Enable a single GPE. * @@ -95,7 +95,7 @@ * * FUNCTION: acpi_hw_enable_gpe_for_wakeup * - * PARAMETERS: gpe_number - The GPE + * PARAMETERS: gpe_event_info - Info block for the GPE to be enabled * * RETURN: None * @@ -122,9 +122,11 @@ } /* - * Set the bit so we will not disable this when sleeping + * Set the bit so we will not enable this GPE when sleeping (and disable + * it upon wake) */ gpe_register_info->wake_enable |= gpe_event_info->bit_mask; + gpe_event_info->flags |= (ACPI_GPE_TYPE_WAKE | ACPI_GPE_ENABLED); } @@ -132,9 +134,9 @@ * * FUNCTION: acpi_hw_disable_gpe * - * PARAMETERS: gpe_number - The GPE + * PARAMETERS: gpe_event_info - Info block for the GPE to be disabled * - * RETURN: None + * RETURN: Status * * DESCRIPTION: Disable a single GPE. * @@ -177,6 +179,8 @@ return (status); } + /* Make sure this GPE is disabled for wake, also */ + acpi_hw_disable_gpe_for_wakeup (gpe_event_info); return (AE_OK); } @@ -186,7 +190,7 @@ * * FUNCTION: acpi_hw_disable_gpe_for_wakeup * - * PARAMETERS: gpe_number - The GPE + * PARAMETERS: gpe_event_info - Info block for the GPE to be disabled * * RETURN: None * @@ -212,9 +216,8 @@ return; } - /* - * Clear the bit so we will disable this when sleeping - */ + /* Clear the bit so we will disable this when sleeping */ + gpe_register_info->wake_enable &= ~(gpe_event_info->bit_mask); } @@ -223,11 +226,11 @@ * * FUNCTION: acpi_hw_clear_gpe * - * PARAMETERS: gpe_number - The GPE + * PARAMETERS: gpe_event_info - Info block for the GPE to be cleared * - * RETURN: None + * RETURN: status_status * - * DESCRIPTION: Clear a single GPE. + * DESCRIPTION: Clear the status bit for a single GPE. * ******************************************************************************/ @@ -256,9 +259,10 @@ * * FUNCTION: acpi_hw_get_gpe_status * - * PARAMETERS: gpe_number - The GPE + * PARAMETERS: gpe_event_info - Info block for the GPE to queried + * event_status - Where the GPE status is returned * - * RETURN: None + * RETURN: Status * * DESCRIPTION: Return the status of a single GPE. * @@ -376,7 +380,7 @@ * * RETURN: Status * - * DESCRIPTION: Clear all GPEs within a GPE block + * DESCRIPTION: Clear status bits for all GPEs within a GPE block * ******************************************************************************/ @@ -392,7 +396,7 @@ /* Examine each GPE Register within the block */ for (i = 0; i < gpe_block->register_count; i++) { - /* Clear all GPEs in this register */ + /* Clear status on all GPEs in this register */ status = acpi_hw_low_level_write (8, 0xFF, &gpe_block->register_info[i].status_address); @@ -407,19 +411,20 @@ /****************************************************************************** * - * FUNCTION: acpi_hw_disable_non_wakeup_gpe_block + * FUNCTION: acpi_hw_prepare_gpe_block_for_sleep * * PARAMETERS: gpe_xrupt_info - GPE Interrupt info * gpe_block - Gpe Block info * * RETURN: Status * - * DESCRIPTION: Disable all GPEs except wakeup GPEs in a GPE block + * DESCRIPTION: Disable all runtime GPEs and enable all wakeup GPEs -- within + * a single GPE block * ******************************************************************************/ static acpi_status -acpi_hw_disable_non_wakeup_gpe_block ( +acpi_hw_prepare_gpe_block_for_sleep ( struct acpi_gpe_xrupt_info *gpe_xrupt_info, struct acpi_gpe_block_info *gpe_block) { @@ -437,8 +442,11 @@ for (i = 0; i < gpe_block->register_count; i++) { /* - * Read the enabled status of all GPEs. We + * Read the enabled/disabled status of all GPEs. We * will be using it to restore all the GPEs later. + * + * NOTE: Wake GPEs are are ALL disabled at this time, so when we wake + * and restore this register, they will be automatically disabled. */ status = acpi_hw_low_level_read (8, &in_value, &gpe_register_info->enable_address); @@ -449,7 +457,8 @@ gpe_register_info->enable = (u8) in_value; /* - * Disable all GPEs except wakeup GPEs. + * 1) Disable all runtime GPEs + * 2) Enable all wakeup GPEs */ status = acpi_hw_low_level_write (8, gpe_register_info->wake_enable, &gpe_register_info->enable_address); @@ -457,6 +466,8 @@ return (status); } + /* Point to next GPE register */ + gpe_register_info++; } @@ -466,22 +477,22 @@ /****************************************************************************** * - * FUNCTION: acpi_hw_disable_non_wakeup_gpes + * FUNCTION: acpi_hw_prepare_gpes_for_sleep * * PARAMETERS: None * - * RETURN: None + * RETURN: Status * - * DESCRIPTION: Disable all non-wakeup GPEs + * DESCRIPTION: Disable all runtime GPEs, enable all wake GPEs. * Called with interrupts disabled. The interrupt handler also * modifies gpe_register_info->Enable, so it should not be - * given the chance to run until after non-wake GPEs are + * given the chance to run until after the runtime GPEs are * re-enabled. * ******************************************************************************/ acpi_status -acpi_hw_disable_non_wakeup_gpes ( +acpi_hw_prepare_gpes_for_sleep ( void) { acpi_status status; @@ -490,27 +501,27 @@ ACPI_FUNCTION_ENTRY (); - status = acpi_ev_walk_gpe_list (acpi_hw_disable_non_wakeup_gpe_block); - + status = acpi_ev_walk_gpe_list (acpi_hw_prepare_gpe_block_for_sleep); return (status); } /****************************************************************************** * - * FUNCTION: acpi_hw_enable_non_wakeup_gpe_block + * FUNCTION: acpi_hw_restore_gpe_block_on_wake * * PARAMETERS: gpe_xrupt_info - GPE Interrupt info * gpe_block - Gpe Block info * * RETURN: Status * - * DESCRIPTION: Enable a single GPE. + * DESCRIPTION: Enable all runtime GPEs and disable all wake GPEs -- in one + * GPE block * ******************************************************************************/ static acpi_status -acpi_hw_enable_non_wakeup_gpe_block ( +acpi_hw_restore_gpe_block_on_wake ( struct acpi_gpe_xrupt_info *gpe_xrupt_info, struct acpi_gpe_block_info *gpe_block) { @@ -537,8 +548,12 @@ } /* - * We previously stored the enabled status of all GPEs. - * Blast them back in. + * Restore the GPE Enable register, which will do the following: + * + * 1) Disable all wakeup GPEs + * 2) Enable all runtime GPEs + * + * (On sleep, we saved the enabled status of all GPEs) */ status = acpi_hw_low_level_write (8, gpe_register_info->enable, &gpe_register_info->enable_address); @@ -546,28 +561,30 @@ return (status); } + /* Point to next GPE register */ + gpe_register_info++; } - return (AE_OK); } /****************************************************************************** * - * FUNCTION: acpi_hw_enable_non_wakeup_gpes + * FUNCTION: acpi_hw_restore_gpes_on_wake * * PARAMETERS: None * - * RETURN: None + * RETURN: Status * - * DESCRIPTION: Enable all non-wakeup GPEs we previously enabled. + * DESCRIPTION: Enable all runtime GPEs and disable all wake GPEs -- in all + * GPE blocks * ******************************************************************************/ acpi_status -acpi_hw_enable_non_wakeup_gpes ( +acpi_hw_restore_gpes_on_wake ( void) { acpi_status status; @@ -576,7 +593,6 @@ ACPI_FUNCTION_ENTRY (); - status = acpi_ev_walk_gpe_list (acpi_hw_enable_non_wakeup_gpe_block); - + status = acpi_ev_walk_gpe_list (acpi_hw_restore_gpe_block_on_wake); return (status); } diff -Nru a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c --- a/drivers/acpi/hardware/hwsleep.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/hardware/hwsleep.c Sun Mar 28 13:12:07 2004 @@ -286,7 +286,11 @@ } } - status = acpi_hw_disable_non_wakeup_gpes (); + /* + * 1) Disable all runtime GPEs + * 2) Enable all wakeup GPEs + */ + status = acpi_hw_prepare_gpes_for_sleep (); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } @@ -415,7 +419,11 @@ return_ACPI_STATUS (status); } - status = acpi_hw_disable_non_wakeup_gpes (); + /* + * 1) Disable all runtime GPEs + * 2) Enable all wakeup GPEs + */ + status = acpi_hw_prepare_gpes_for_sleep (); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } @@ -528,10 +536,14 @@ if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) { ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", acpi_format_exception (status))); } + /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ - /* _WAK returns stuff - do we want to look at it? */ - - status = acpi_hw_enable_non_wakeup_gpes (); + /* + * Restore the GPEs: + * 1) Disable all wakeup GPEs + * 2) Enable all runtime GPEs + */ + status = acpi_hw_restore_gpes_on_wake (); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } diff -Nru a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c --- a/drivers/acpi/namespace/nsaccess.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/namespace/nsaccess.c Sun Mar 28 13:12:08 2004 @@ -247,6 +247,14 @@ unlock_and_exit: (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); + + /* Save a handle to "_GPE", it is always present */ + + if (ACPI_SUCCESS (status)) { + status = acpi_ns_get_node_by_path ("\\_GPE", NULL, ACPI_NS_NO_UPSEARCH, + &acpi_gbl_fadt_gpe_device); + } + return_ACPI_STATUS (status); } @@ -577,6 +585,7 @@ if ((num_segments == 0) && (type_to_check_for != ACPI_TYPE_ANY) && (type_to_check_for != ACPI_TYPE_LOCAL_ALIAS) && + (type_to_check_for != ACPI_TYPE_LOCAL_METHOD_ALIAS) && (type_to_check_for != ACPI_TYPE_LOCAL_SCOPE) && (this_node->type != ACPI_TYPE_ANY) && (this_node->type != type_to_check_for)) { diff -Nru a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c --- a/drivers/acpi/namespace/nsdump.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/namespace/nsdump.c Sun Mar 28 13:12:08 2004 @@ -351,6 +351,7 @@ case ACPI_TYPE_LOCAL_ALIAS: + case ACPI_TYPE_LOCAL_METHOD_ALIAS: acpi_os_printf ("Target %4.4s (%p)\n", acpi_ut_get_node_name (obj_desc), obj_desc); break; diff -Nru a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c --- a/drivers/acpi/namespace/nseval.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/namespace/nseval.c Sun Mar 28 13:12:07 2004 @@ -311,6 +311,15 @@ } /* + * For a method alias, we must grab the actual method node + * so that proper scoping context will be established + * before execution. + */ + if (acpi_ns_get_type (node) == ACPI_TYPE_LOCAL_METHOD_ALIAS) { + node = ACPI_CAST_PTR (struct acpi_namespace_node, node->object); + } + + /* * Two major cases here: * 1) The object is an actual control method -- execute it. * 2) The object is not a method -- just return it's current diff -Nru a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c --- a/drivers/acpi/namespace/nssearch.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/namespace/nssearch.c Sun Mar 28 13:12:08 2004 @@ -113,6 +113,12 @@ /* Check for match against the name */ if (next_node->name.integer == target_name) { + /* Resolve a control method alias if any */ + + if (acpi_ns_get_type (next_node) == ACPI_TYPE_LOCAL_METHOD_ALIAS) { + next_node = ACPI_CAST_PTR (struct acpi_namespace_node, next_node->object); + } + /* * Found matching entry. */ diff -Nru a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c --- a/drivers/acpi/namespace/nsutils.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/namespace/nsutils.c Sun Mar 28 13:12:08 2004 @@ -256,7 +256,7 @@ if (!node) { - ACPI_REPORT_WARNING (("ns_get_type: Null Node ptr")); + ACPI_REPORT_WARNING (("ns_get_type: Null Node input pointer\n")); return_VALUE (ACPI_TYPE_ANY); } diff -Nru a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c --- a/drivers/acpi/namespace/nsxfeval.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/namespace/nsxfeval.c Sun Mar 28 13:12:08 2004 @@ -45,6 +45,7 @@ #include #include +#include #define _COMPONENT ACPI_NAMESPACE @@ -149,11 +150,11 @@ * FUNCTION: acpi_evaluate_object * * PARAMETERS: Handle - Object handle (optional) - * *Pathname - Object pathname (optional) - * **external_params - List of parameters to pass to method, + * Pathname - Object pathname (optional) + * external_params - List of parameters to pass to method, * terminated by NULL. May be NULL * if no parameters are being passed. - * *return_buffer - Where to put method's return value (if + * return_buffer - Where to put method's return value (if * any). If NULL, no value is returned. * * RETURN: Status @@ -172,6 +173,7 @@ struct acpi_buffer *return_buffer) { acpi_status status; + acpi_status status2; union acpi_operand_object **internal_params = NULL; union acpi_operand_object *internal_return_obj = NULL; acpi_size buffer_space_needed; @@ -203,7 +205,7 @@ */ for (i = 0; i < external_params->count; i++) { status = acpi_ut_copy_eobject_to_iobject (&external_params->pointer[i], - &internal_params[i]); + &internal_params[i]); if (ACPI_FAILURE (status)) { acpi_ut_delete_internal_object_list (internal_params); return_ACPI_STATUS (status); @@ -321,14 +323,20 @@ } } - /* Delete the return and parameter objects */ - if (internal_return_obj) { /* - * Delete the internal return object. (Or at least - * decrement the reference count by one) + * Delete the internal return object. NOTE: Interpreter + * must be locked to avoid race condition. */ - acpi_ut_remove_reference (internal_return_obj); + status2 = acpi_ex_enter_interpreter (); + if (ACPI_SUCCESS (status2)) { + /* + * Delete the internal return object. (Or at least + * decrement the reference count by one) + */ + acpi_ut_remove_reference (internal_return_obj); + acpi_ex_exit_interpreter (); + } } /* diff -Nru a/drivers/acpi/numa.c b/drivers/acpi/numa.c --- a/drivers/acpi/numa.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/numa.c Sun Mar 28 13:12:08 2004 @@ -32,12 +32,19 @@ #include #include +#define ACPI_NUMA 0x80000000 +#define _COMPONENT ACPI_NUMA + ACPI_MODULE_NAME ("numa") + extern int __init acpi_table_parse_madt_family (enum acpi_table_id id, unsigned long madt_size, int entry_id, acpi_madt_entry_handler handler, unsigned int max_entries); void __init acpi_table_print_srat_entry ( acpi_table_entry_header *header) { + + ACPI_FUNCTION_NAME ("acpi_table_print_srat_entry"); + if (!header) return; @@ -47,7 +54,7 @@ { struct acpi_table_processor_affinity *p = (struct acpi_table_processor_affinity*) header; - ACPI_DEBUG_PRINT((ACPI_DB_INFO "SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n", p->apic_id, p->lsapic_eid, p->proximity_domain, p->flags.enabled?"enabled":"disabled")); } @@ -57,7 +64,7 @@ { struct acpi_table_memory_affinity *p = (struct acpi_table_memory_affinity*) header; - ACPI_DEBUG_PRINT((ACPI_DB_INFO "SRAT Memory (0x%08x%08x length 0x%08x%08x type 0x%x) in proximity domain %d %s%s\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "SRAT Memory (0x%08x%08x length 0x%08x%08x type 0x%x) in proximity domain %d %s%s\n", p->base_addr_hi, p->base_addr_lo, p->length_hi, p->length_lo, p->memory_type, p->proximity_domain, p->flags.enabled ? "enabled" : "disabled", diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c --- a/drivers/acpi/osl.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/osl.c Sun Mar 28 13:12:08 2004 @@ -1048,3 +1048,24 @@ __setup("acpi_serialize", acpi_serialize_setup); +/* + * Wake and Run-Time GPES are expected to be separate. + * We disable wake-GPEs at run-time to prevent spurious + * interrupts. + * + * However, if a system exists that shares Wake and + * Run-time events on the same GPE this flag is available + * to tell Linux to keep the wake-time GPEs enabled at run-time. + */ +int __init +acpi_wake_gpes_always_on_setup(char *str) +{ + printk(KERN_INFO PREFIX "wake GPEs not disabled\n"); + + acpi_gbl_leave_wake_gpes_disabled = FALSE; + + return 1; +} + +__setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup); + diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c --- a/drivers/acpi/pci_irq.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/pci_irq.c Sun Mar 28 13:12:07 2004 @@ -273,6 +273,10 @@ return_VALUE(entry->irq); } +/* + * current thinking is that acpi_pci_irq_derive() adds no value + * and should be deleted, so warn if it actually does something. + */ static int acpi_pci_irq_derive ( @@ -303,7 +307,8 @@ return_VALUE(0); } - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derived IRQ %d\n", irq)); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Derive IRQ %d for device %s from %s\n", + irq, pci_name(dev), pci_name(bridge))); return_VALUE(irq); } @@ -338,6 +343,13 @@ * values override any BIOS-assigned IRQs set during boot. */ irq = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin); + + /* + * Check if the device has an IRQ, + * Hotplug devices may get IRQs by scanning + */ + if (!irq && dev->irq) + irq = dev->irq; /* * If no PRT entry was found, we'll try to derive an IRQ from the diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c --- a/drivers/acpi/pci_link.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/pci_link.c Sun Mar 28 13:12:07 2004 @@ -72,6 +72,7 @@ u8 edge_level; /* All IRQs */ u8 active_high_low; /* All IRQs */ u8 setonboot; + u8 resource_type; u8 possible_count; u8 possible[ACPI_PCI_LINK_MAX_POSSIBLE]; }; @@ -123,6 +124,7 @@ } link->irq.edge_level = p->edge_level; link->irq.active_high_low = p->active_high_low; + link->irq.resource_type = ACPI_RSTYPE_IRQ; break; } case ACPI_RSTYPE_EXT_IRQ: @@ -143,6 +145,7 @@ } link->irq.edge_level = p->edge_level; link->irq.active_high_low = p->active_high_low; + link->irq.resource_type = ACPI_RSTYPE_EXT_IRQ; break; } default: @@ -342,13 +345,18 @@ } } + resource_type = link->irq.resource_type; + + if (resource_type != ACPI_RSTYPE_IRQ && + resource_type != ACPI_RSTYPE_EXT_IRQ){ /* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with * an extended one */ - if (irq <= 15) { - resource_type = ACPI_RSTYPE_IRQ; - } else { - resource_type = ACPI_RSTYPE_EXT_IRQ; - } + if (irq <= 15) { + resource_type = ACPI_RSTYPE_IRQ; + } else { + resource_type = ACPI_RSTYPE_EXT_IRQ; + } + } retry_programming: diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c --- a/drivers/acpi/processor.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/processor.c Sun Mar 28 13:12:08 2004 @@ -67,8 +67,6 @@ #define C3_OVERHEAD 4 /* 1us (3.579 ticks per us) */ -const u32 POWER_OF_2[] = {1,2,4,8,16,32,64}; - #define ACPI_PROCESSOR_LIMIT_USER 0 #define ACPI_PROCESSOR_LIMIT_THERMAL 1 @@ -1489,7 +1487,7 @@ return_VALUE(0); } - pr->throttling.state_count = POWER_OF_2[acpi_fadt.duty_width]; + pr->throttling.state_count = 1 << acpi_fadt.duty_width; /* * Compute state values. Note that throttling displays a linear power/ diff -Nru a/drivers/acpi/resources/rsaddr.c b/drivers/acpi/resources/rsaddr.c --- a/drivers/acpi/resources/rsaddr.c Sun Mar 28 13:12:08 2004 +++ b/drivers/acpi/resources/rsaddr.c Sun Mar 28 13:12:08 2004 @@ -88,6 +88,7 @@ ACPI_FUNCTION_TRACE ("rs_address16_resource"); + /* * Point past the Descriptor to get the number of bytes consumed */ @@ -149,7 +150,7 @@ output_struct->data.address16.attribute.memory.read_write_attribute = (u16) (temp8 & 0x01); output_struct->data.address16.attribute.memory.cache_attribute = - (u16) ((temp8 >> 1) & 0x0F); + (u16) ((temp8 >> 1) & 0x03); } else { if (ACPI_IO_RANGE == output_struct->data.address16.resource_type) { @@ -347,7 +348,7 @@ temp8 |= (linked_list->data.address16.attribute.memory.cache_attribute & - 0x0F) << 1; + 0x03) << 1; } else if (ACPI_IO_RANGE == linked_list->data.address16.resource_type) { temp8 = (u8) @@ -539,7 +540,7 @@ (u16) (temp8 & 0x01); output_struct->data.address32.attribute.memory.cache_attribute = - (u16) ((temp8 >> 1) & 0x0F); + (u16) ((temp8 >> 1) & 0x03); } else { if (ACPI_IO_RANGE == output_struct->data.address32.resource_type) { @@ -735,7 +736,7 @@ temp8 |= (linked_list->data.address32.attribute.memory.cache_attribute & - 0x0F) << 1; + 0x03) << 1; } else if (ACPI_IO_RANGE == linked_list->data.address32.resource_type) { temp8 = (u8) @@ -926,7 +927,7 @@ (u16) (temp8 & 0x01); output_struct->data.address64.attribute.memory.cache_attribute = - (u16) ((temp8 >> 1) & 0x0F); + (u16) ((temp8 >> 1) & 0x03); } else { if (ACPI_IO_RANGE == output_struct->data.address64.resource_type) { @@ -1124,7 +1125,7 @@ temp8 |= (linked_list->data.address64.attribute.memory.cache_attribute & - 0x0F) << 1; + 0x03) << 1; } else if (ACPI_IO_RANGE == linked_list->data.address64.resource_type) { temp8 = (u8) diff -Nru a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c --- a/drivers/acpi/toshiba_acpi.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/toshiba_acpi.c Sun Mar 28 13:12:07 2004 @@ -33,7 +33,7 @@ * */ -#define TOSHIBA_ACPI_VERSION "0.17" +#define TOSHIBA_ACPI_VERSION "0.18" #define PROC_INTERFACE_VERSION 1 #include @@ -41,6 +41,7 @@ #include #include #include +#include #include @@ -105,24 +106,6 @@ *word = (*word & ~mask) | (mask * value); } -/* an sscanf that takes explicit string length */ -static int -snscanf(const char* str, int n, const char* format, ...) -{ - va_list args; - int result; - char* str2 = kmalloc(n + 1, GFP_KERNEL); - if (str2 == 0) return 0; - /* NOTE: don't even _think_ about replacing this with strlcpy */ - strncpy(str2, str, n); - str2[n] = 0; - va_start(args, format); - result = vsscanf(str2, format, args); - va_end(args); - kfree(str2); - return result; -} - /* acpi interface wrappers */ @@ -269,10 +252,26 @@ } static int -dispatch_write(struct file* file, const char* buffer, unsigned long count, - ProcItem* item) +dispatch_write(struct file* file, __user const char* buffer, + unsigned long count, ProcItem* item) { - return item->write_func(buffer, count); + int result; + char* tmp_buffer; + + /* Arg buffer points to userspace memory, which can't be accessed + * directly. Since we're making a copy, zero-terminate the + * destination so that sscanf can be used on it safely. + */ + tmp_buffer = kmalloc(count + 1, GFP_KERNEL); + if (copy_from_user(tmp_buffer, buffer, count)) { + result = -EFAULT; + } + else { + tmp_buffer[count] = 0; + result = item->write_func(tmp_buffer, count); + } + kfree(tmp_buffer); + return result; } static char* @@ -300,7 +299,7 @@ int value; u32 hci_result; - if (snscanf(buffer, count, " brightness : %i", &value) == 1 && + if (sscanf(buffer, " brightness : %i", &value) == 1 && value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS) { value = value << HCI_LCD_BRIGHTNESS_SHIFT; hci_write1(HCI_LCD_BRIGHTNESS, value, &hci_result); @@ -350,11 +349,11 @@ * NOTE: to keep scanning simple, invalid fields are ignored */ while (remain) { - if (snscanf(buffer, remain, " lcd_out : %i", &value) == 1) + if (sscanf(buffer, " lcd_out : %i", &value) == 1) lcd_out = value & 1; - else if (snscanf(buffer, remain, " crt_out : %i", &value) == 1) + else if (sscanf(buffer, " crt_out : %i", &value) == 1) crt_out = value & 1; - else if (snscanf(buffer, remain, " tv_out : %i", &value) == 1) + else if (sscanf(buffer, " tv_out : %i", &value) == 1) tv_out = value & 1; /* advance to one character past the next ; */ do { @@ -407,7 +406,7 @@ int value; u32 hci_result; - if (snscanf(buffer, count, " force_on : %i", &value) == 1 && + if (sscanf(buffer, " force_on : %i", &value) == 1 && value >= 0 && value <= 1) { hci_write1(HCI_FAN, value, &hci_result); if (hci_result != HCI_SUCCESS) @@ -458,7 +457,7 @@ { int value; - if (snscanf(buffer, count, " hotkey_ready : %i", &value) == 1 && + if (sscanf(buffer, " hotkey_ready : %i", &value) == 1 && value == 0) { key_event_valid = 0; } else { diff -Nru a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c --- a/drivers/acpi/utilities/utglobal.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/utilities/utglobal.c Sun Mar 28 13:12:07 2004 @@ -253,14 +253,15 @@ ACPI_NS_NORMAL, /* 19 index_field */ ACPI_NS_NORMAL, /* 20 Reference */ ACPI_NS_NORMAL, /* 21 Alias */ - ACPI_NS_NORMAL, /* 22 Notify */ - ACPI_NS_NORMAL, /* 23 Address Handler */ - ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 24 Resource Desc */ - ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Field */ - ACPI_NS_NEWSCOPE, /* 26 Scope */ - ACPI_NS_NORMAL, /* 27 Extra */ - ACPI_NS_NORMAL, /* 28 Data */ - ACPI_NS_NORMAL /* 29 Invalid */ + ACPI_NS_NORMAL, /* 22 method_alias */ + ACPI_NS_NORMAL, /* 23 Notify */ + ACPI_NS_NORMAL, /* 24 Address Handler */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Desc */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 26 Resource Field */ + ACPI_NS_NEWSCOPE, /* 27 Scope */ + ACPI_NS_NORMAL, /* 28 Extra */ + ACPI_NS_NORMAL, /* 29 Data */ + ACPI_NS_NORMAL /* 30 Invalid */ }; @@ -501,14 +502,15 @@ /* 19 */ "index_field", /* 20 */ "Reference", /* 21 */ "Alias", - /* 22 */ "Notify", - /* 23 */ "addr_handler", - /* 24 */ "resource_desc", - /* 25 */ "resource_fld", - /* 26 */ "Scope", - /* 27 */ "Extra", - /* 28 */ "Data", - /* 39 */ "Invalid" + /* 22 */ "method_alias", + /* 23 */ "Notify", + /* 24 */ "addr_handler", + /* 25 */ "resource_desc", + /* 26 */ "resource_fld", + /* 27 */ "Scope", + /* 28 */ "Extra", + /* 29 */ "Data", + /* 30 */ "Invalid" }; @@ -556,7 +558,7 @@ acpi_ut_get_node_name ( void *object) { - struct acpi_namespace_node *node; + struct acpi_namespace_node *node = (struct acpi_namespace_node *) object; if (!object) @@ -564,7 +566,10 @@ return ("NULL NODE"); } - node = (struct acpi_namespace_node *) object; + if (object == ACPI_ROOT_OBJECT) + { + node = acpi_gbl_root_node; + } if (node->descriptor != ACPI_DESC_TYPE_NAMED) { @@ -782,6 +787,7 @@ acpi_gbl_create_osi_method = TRUE; acpi_gbl_all_methods_serialized = FALSE; + acpi_gbl_leave_wake_gpes_disabled = TRUE; /* Memory allocation and cache lists */ diff -Nru a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c --- a/drivers/acpi/utilities/utmisc.c Sun Mar 28 13:12:07 2004 +++ b/drivers/acpi/utilities/utmisc.c Sun Mar 28 13:12:07 2004 @@ -529,6 +529,7 @@ return (src_string); } + /******************************************************************************* * * FUNCTION: acpi_ut_mutex_initialize @@ -562,10 +563,8 @@ } } - status = acpi_os_create_lock (&acpi_gbl_gpe_lock); - - return_ACPI_STATUS (AE_OK); + return_ACPI_STATUS (status); } diff -Nru a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c --- a/drivers/atm/nicstar.c Sun Mar 28 13:12:07 2004 +++ b/drivers/atm/nicstar.c Sun Mar 28 13:12:07 2004 @@ -112,9 +112,6 @@ /* Macros *********************************************************************/ -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - #define CMD_BUSY(card) (readl((card)->membase + STAT) & NS_STAT_CMDBZ) #define NS_DELAY mdelay(1) @@ -2483,7 +2480,7 @@ for (j = 1; j < NS_SKB(iovb)->iovcnt; j++) { lb = (struct sk_buff *) iov->iov_base; - tocopy = MIN(remaining, iov->iov_len); + tocopy = min_t(int, remaining, iov->iov_len); memcpy(hb->tail, lb->data, tocopy); skb_put(hb, tocopy); iov++; diff -Nru a/drivers/block/Kconfig b/drivers/block/Kconfig --- a/drivers/block/Kconfig Sun Mar 28 13:12:07 2004 +++ b/drivers/block/Kconfig Sun Mar 28 13:12:07 2004 @@ -6,7 +6,7 @@ config BLK_DEV_FD tristate "Normal floppy disk support" - depends on (!X86_PC9800 && !ARCH_S390 && !M68K) || Q40 || (SUN3X && BROKEN) + depends on (!X86_PC9800 && !ARCH_S390 && !M68K && !IA64) || Q40 || (SUN3X && BROKEN) ---help--- If you want to use the floppy disk drive(s) of your PC under Linux, say Y. Information about this driver, especially important for IBM diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c --- a/drivers/bluetooth/hci_usb.c Sun Mar 28 13:12:08 2004 +++ b/drivers/bluetooth/hci_usb.c Sun Mar 28 13:12:08 2004 @@ -73,6 +73,9 @@ /* Generic Bluetooth USB device */ { USB_DEVICE_INFO(HCI_DEV_CLASS, HCI_DEV_SUBCLASS, HCI_DEV_PROTOCOL) }, + /* AVM BlueFRITZ! USB v2.0 */ + { USB_DEVICE(0x057c, 0x3800) }, + /* Ericsson with non-standard id */ { USB_DEVICE(0x0bdb, 0x1002) }, diff -Nru a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c --- a/drivers/cdrom/cdrom.c Sun Mar 28 13:12:07 2004 +++ b/drivers/cdrom/cdrom.c Sun Mar 28 13:12:07 2004 @@ -725,7 +725,7 @@ disc_information di; if (cdrom_get_disc_info(cdi, &di)) - return 0; + return -1; return di.erasable; } @@ -735,7 +735,16 @@ */ static int cdrom_dvdram_open_write(struct cdrom_device_info *cdi) { - return !cdrom_media_erasable(cdi); + int ret = cdrom_media_erasable(cdi); + + /* + * allow writable open if media info read worked and media is + * erasable, _or_ if it fails since not all drives support it + */ + if (!ret) + return 1; + + return 0; } static int cdrom_mrw_open_write(struct cdrom_device_info *cdi) diff -Nru a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c --- a/drivers/cdrom/viocd.c Sun Mar 28 13:12:08 2004 +++ b/drivers/cdrom/viocd.c Sun Mar 28 13:12:08 2004 @@ -338,8 +338,9 @@ struct request *req; while ((rwreq == 0) && ((req = elv_next_request(q)) != NULL)) { - /* check for any kind of error */ - if (send_request(req) < 0) { + if (!blk_fs_request(req)) + end_request(req, 0); + else if (send_request(req) < 0) { printk(VIOCD_KERN_WARNING "unable to send message to OS/400!"); end_request(req, 0); diff -Nru a/drivers/char/cyclades.c b/drivers/char/cyclades.c --- a/drivers/char/cyclades.c Sun Mar 28 13:12:07 2004 +++ b/drivers/char/cyclades.c Sun Mar 28 13:12:07 2004 @@ -2679,7 +2679,8 @@ struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; unsigned char *base_addr; int card,chip,channel,index; - unsigned long orig_jiffies, char_time; + unsigned long orig_jiffies; + signed long char_time; if (serial_paranoia_check(info, tty->name, "cy_wait_until_sent")) return; @@ -2699,7 +2700,7 @@ */ char_time = (info->timeout - HZ/50) / info->xmit_fifo_size; char_time = char_time / 5; - if (char_time == 0) + if (char_time <= 0) char_time = 1; if (timeout < 0) timeout = 0; diff -Nru a/drivers/char/efirtc.c b/drivers/char/efirtc.c --- a/drivers/char/efirtc.c Sun Mar 28 13:12:08 2004 +++ b/drivers/char/efirtc.c Sun Mar 28 13:12:08 2004 @@ -6,13 +6,13 @@ * * Based on skeleton from the drivers/char/rtc.c driver by P. Gortmaker * - * This code provides a architected & portable interface to the real time + * This code provides an architected & portable interface to the real time * clock by using EFI instead of direct bit fiddling. The functionalities are * quite different from the rtc.c driver. The only way to talk to the device * is by using ioctl(). There is a /proc interface which provides the raw * information. * - * Please note that we have kept the API as close as possible from the + * Please note that we have kept the API as close as possible to the * legacy RTC. The standard /sbin/hwclock program should work normally * when used to get/set the time. * @@ -297,7 +297,7 @@ }; /* - * We export RAW EFI information to /proc/efirtc + * We export RAW EFI information to /proc/driver/efirtc */ static int efi_rtc_get_status(char *buf) @@ -307,6 +307,10 @@ char *p = buf; efi_bool_t enabled, pending; unsigned long flags; + + memset(&eft, 0, sizeof(eft)); + memset(&alm, 0, sizeof(alm)); + memset(&cap, 0, sizeof(cap)); spin_lock_irqsave(&efi_rtc_lock, flags); diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c --- a/drivers/char/mem.c Sun Mar 28 13:12:08 2004 +++ b/drivers/char/mem.c Sun Mar 28 13:12:08 2004 @@ -311,7 +311,7 @@ len = PAGE_SIZE; if (len) { written = copy_from_user(kbuf, buf, len); - if (written != len) { + if (written) { ssize_t ret; free_page((unsigned long)kbuf); diff -Nru a/drivers/char/rtc.c b/drivers/char/rtc.c --- a/drivers/char/rtc.c Sun Mar 28 13:12:08 2004 +++ b/drivers/char/rtc.c Sun Mar 28 13:12:08 2004 @@ -110,6 +110,8 @@ #define hpet_rtc_timer_init() do { } while (0) #define hpet_rtc_dropped_irq() 0 static inline irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) {return 0;} +#else +extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs); #endif /* diff -Nru a/drivers/char/sn_serial.c b/drivers/char/sn_serial.c --- a/drivers/char/sn_serial.c Sun Mar 28 13:12:08 2004 +++ b/drivers/char/sn_serial.c Sun Mar 28 13:12:08 2004 @@ -352,7 +352,7 @@ if (xmit_count > 0) { result = sn_func->sal_puts((char *)start, xmit_count); if (!result) - sn_debug_printf("\n*** synch_flush_xmit failed to flush\n"); + DPRINTF("\n*** synch_flush_xmit failed to flush\n"); if (result > 0) { xmit_count -= result; sn_total_tx_count += result; @@ -389,12 +389,12 @@ xmit_count = (head < tail) ? (SN_SAL_BUFFER_SIZE - tail) : (head - tail); if (xmit_count == 0) - sn_debug_printf("\n*** empty xmit_count\n"); + DPRINTF("\n*** empty xmit_count\n"); /* use the ops, as we could be on the simulator */ result = sn_func->sal_puts((char *)start, xmit_count); if (!result) - sn_debug_printf("\n*** error in synchronous sal_puts\n"); + DPRINTF("\n*** error in synchronous sal_puts\n"); /* XXX chadt clean this up */ if (result > 0) { xmit_count -= result; @@ -447,7 +447,7 @@ result = ia64_sn_console_xmit_chars((char *)start, xmit_count); #ifdef DEBUG if (!result) - sn_debug_printf("`"); + DPRINTF("`"); #endif if (result > 0) { xmit_count -= result; @@ -511,7 +511,7 @@ if (result >= 0) return console_irq; - printk(KERN_INFO "sn_serial: console proceeding in polled mode\n"); + printk(KERN_WARNING "sn_serial: console proceeding in polled mode\n"); return 0; } @@ -823,7 +823,7 @@ return; } - sn_debug_printf("sn_serial: switch to asynchronous console\n"); + DPRINTF("sn_serial: switch to asynchronous console\n"); /* early_printk invocation may have done this for us */ if (!sn_func) { @@ -859,7 +859,7 @@ { int irq; - sn_debug_printf("sn_serial: switching to interrupt driven console\n"); + DPRINTF("sn_serial: switching to interrupt driven console\n"); irq = sn_sal_connect_interrupt(); if (irq) { @@ -883,7 +883,7 @@ { int retval; - printk("sn_serial: sn_sal_module_init\n"); + DPRINTF("sn_serial: sn_sal_module_init\n"); if (!ia64_platform_is("sn2")) return -ENODEV; @@ -1016,7 +1016,7 @@ { if (ia64_platform_is("sn2")) { sn_sal_switch_to_asynch(); - sn_debug_printf("sn_sal_serial_console_init : register console\n"); + DPRINTF("sn_sal_serial_console_init : register console\n"); register_console(&sal_console); } return 0; diff -Nru a/drivers/char/sonypi.h b/drivers/char/sonypi.h --- a/drivers/char/sonypi.h Sun Mar 28 13:12:08 2004 +++ b/drivers/char/sonypi.h Sun Mar 28 13:12:08 2004 @@ -396,7 +396,6 @@ } #ifdef CONFIG_ACPI -extern int acpi_disabled; #define SONYPI_ACPI_ACTIVE (!acpi_disabled) #else #define SONYPI_ACPI_ACTIVE 0 diff -Nru a/drivers/char/viocons.c b/drivers/char/viocons.c --- a/drivers/char/viocons.c Sun Mar 28 13:12:07 2004 +++ b/drivers/char/viocons.c Sun Mar 28 13:12:07 2004 @@ -9,7 +9,7 @@ * Colin Devilbiss * Stephen Rothwell * - * (C) Copyright 2000, 2001, 2002, 2003 IBM Corporation + * (C) Copyright 2000, 2001, 2002, 2003, 2004 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 @@ -57,7 +57,9 @@ #define VIOTTY_MAGIC (0x0DCB) #define VTTY_PORTS 10 -#define VIOTTY_SERIAL_START 65 + +#define VIOCONS_KERN_WARN KERN_WARNING "viocons: " +#define VIOCONS_KERN_INFO KERN_INFO "viocons: " static spinlock_t consolelock = SPIN_LOCK_UNLOCKED; static spinlock_t consoleloglock = SPIN_LOCK_UNLOCKED; @@ -138,7 +140,6 @@ static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp); static struct tty_driver *viotty_driver; -static struct tty_driver *viottyS_driver; void hvlog(char *fmt, ...) { @@ -189,10 +190,10 @@ static inline int viotty_paranoia_check(struct port_info *pi, char *name, const char *routine) { - static const char *bad_pi_addr = KERN_WARNING_VIO - "Warning: bad address for port_info struct (%s) in %s\n"; - static const char *badmagic = KERN_WARNING_VIO - "Warning: bad magic number for port_info struct (%s) in %s\n"; + static const char *bad_pi_addr = VIOCONS_KERN_WARN + "warning: bad address for port_info struct (%s) in %s\n"; + static const char *badmagic = VIOCONS_KERN_WARN + "warning: bad magic number for port_info struct (%s) in %s\n"; if ((pi < &port_info[0]) || (viochar_port(pi) > VTTY_PORTS)) { printk(bad_pi_addr, name, routine); @@ -395,8 +396,8 @@ vio_free_event_buffer(viomajorsubtype_chario, viochar); spin_unlock_irqrestore(&consolelock, flags); - printk(KERN_WARNING_VIO - "console error sending event! return code %d\n", + printk(VIOCONS_KERN_WARN + "error sending event! return code %d\n", (int)hvrc); return; } @@ -655,14 +656,14 @@ * console device I/O methods */ static struct console viocons_early = { - .name = "ttyS", + .name = "viocons", .write = viocons_write_early, .flags = CON_PRINTBUFFER, .index = -1, }; static struct console viocons = { - .name = "ttyS", + .name = "viocons", .write = viocons_write, .device = viocons_device, .flags = CON_PRINTBUFFER, @@ -680,9 +681,6 @@ port = tty->index; - if (port >= VIOTTY_SERIAL_START) - port -= VIOTTY_SERIAL_START; - if ((port < 0) || (port >= VTTY_PORTS)) return -ENODEV; @@ -692,8 +690,8 @@ /* If some other TTY is already connected here, reject the open */ if ((pi->tty) && (pi->tty != tty)) { spin_unlock_irqrestore(&consolelock, flags); - printk(KERN_WARNING_VIO - "console attempt to open device twice from different ttys\n"); + printk(VIOCONS_KERN_WARN + "attempt to open device twice from different ttys\n"); return -EBUSY; } tty->driver_data = pi; @@ -820,13 +818,6 @@ } /* - * TTY flush_chars method - */ -static void viotty_flush_chars(struct tty_struct *tty) -{ -} - -/* * TTY write_room method */ static int viotty_write_room(struct tty_struct *tty) @@ -864,17 +855,13 @@ } /* - * TTY chars_in_buffer_room method + * TTY chars_in_buffer method */ static int viotty_chars_in_buffer(struct tty_struct *tty) { return 0; } -static void viotty_flush_buffer(struct tty_struct *tty) -{ -} - static int viotty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { @@ -894,43 +881,6 @@ return n_tty_ioctl(tty, file, cmd, arg); } -static void viotty_throttle(struct tty_struct *tty) -{ -} - -static void viotty_unthrottle(struct tty_struct *tty) -{ -} - -static void viotty_set_termios(struct tty_struct *tty, - struct termios *old_termios) -{ -} - -static void viotty_stop(struct tty_struct *tty) -{ -} - -static void viotty_start(struct tty_struct *tty) -{ -} - -static void viotty_hangup(struct tty_struct *tty) -{ -} - -static void viotty_break(struct tty_struct *tty, int break_state) -{ -} - -static void viotty_send_xchar(struct tty_struct *tty, char ch) -{ -} - -static void viotty_wait_until_sent(struct tty_struct *tty, int timeout) -{ -} - /* * Handle an open charLpEvent. Could be either interrupt or ack */ @@ -964,23 +914,22 @@ spin_unlock_irqrestore(&consolelock, flags); if (event->xRc != HvLpEvent_Rc_Good) - printk(KERN_WARNING_VIO - "viocons: event->xRc != HvLpEvent_Rc_Good, event->xRc == (%d).\n", + printk(VIOCONS_KERN_WARN + "handle_open_event: event->xRc == (%d).\n", event->xRc); if (event->xCorrelationToken != 0) { atomic_t *aptr= (atomic_t *)event->xCorrelationToken; atomic_set(aptr, 1); } else - printk(KERN_WARNING_VIO - "viocons: wierd...got open ack without atomic\n"); + printk(VIOCONS_KERN_WARN + "wierd...got open ack without atomic\n"); return; } /* This had better require an ack, otherwise complain */ if (event->xFlags.xAckInd != HvLpEvent_AckInd_DoAck) { - printk(KERN_WARNING_VIO - "console: viocharopen without ack bit!\n"); + printk(VIOCONS_KERN_WARN "viocharopen without ack bit!\n"); return; } @@ -1019,11 +968,10 @@ spin_unlock_irqrestore(&consolelock, flags); if (reject == 1) - printk(KERN_WARNING_VIO - "viocons: console open rejected : bad virtual tty.\n"); + printk(VIOCONS_KERN_WARN "open rejected: bad virtual tty.\n"); else if (reject == 2) - printk(KERN_WARNING_VIO - "viocons: console open rejected : console in exclusive use by another partition.\n"); + printk(VIOCONS_KERN_WARN + "open rejected: console in exclusive use by another partition.\n"); /* Return the acknowledgement */ HvCallEvent_ackLpEvent(event); @@ -1050,7 +998,8 @@ if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (port >= VTTY_PORTS) { - printk(KERN_WARNING_VIO "viocons: close message from invalid virtual device.\n"); + printk(VIOCONS_KERN_WARN + "close message from invalid virtual device.\n"); return; } @@ -1062,11 +1011,10 @@ port_info[port].lp = HvLpIndexInvalid; spin_unlock_irqrestore(&consolelock, flags); - printk(KERN_INFO_VIO - "console close from %d\n", event->xSourceLp); + printk(VIOCONS_KERN_INFO "close from %d\n", event->xSourceLp); } else - printk(KERN_WARNING_VIO - "console got unexpected close acknowlegement\n"); + printk(VIOCONS_KERN_WARN + "got unexpected close acknowlegement\n"); } /* @@ -1079,12 +1027,11 @@ HvCall_writeLogBuffer(cevent->data, cevent->len); if (cevent->data[0] == 0x01) - printk(KERN_INFO_VIO - "console window resized to %d: %d: %d: %d\n", + printk(VIOCONS_KERN_INFO "window resized to %d: %d: %d: %d\n", cevent->data[1], cevent->data[2], cevent->data[3], cevent->data[4]); else - printk(KERN_WARNING_VIO "console unknown config event\n"); + printk(VIOCONS_KERN_WARN "unknown config event\n"); } /* @@ -1100,8 +1047,8 @@ u8 port = cevent->virtual_device; if (port >= VTTY_PORTS) { - printk(KERN_WARNING_VIO - "console data on invalid virtual device %d\n", port); + printk(VIOCONS_KERN_WARN "data on invalid virtual device %d\n", + port); return; } @@ -1130,13 +1077,14 @@ tty = pi->tty; if (tty == NULL) { spin_unlock_irqrestore(&consolelock, flags); - printk(KERN_WARNING_VIO "no tty for virtual device %d\n", port); + printk(VIOCONS_KERN_WARN "no tty for virtual device %d\n", + port); return; } if (tty->magic != TTY_MAGIC) { spin_unlock_irqrestore(&consolelock, flags); - printk(KERN_WARNING_VIO "tty bad magic\n"); + printk(VIOCONS_KERN_WARN "tty bad magic\n"); return; } @@ -1186,8 +1134,7 @@ * have room for because it would fail without indication. */ if ((tty->flip.count + 1) > TTY_FLIPBUF_SIZE) { - printk(KERN_WARNING_VIO - "console input buffer overflow!\n"); + printk(VIOCONS_KERN_WARN "input buffer overflow!\n"); break; } tty_insert_flip_char(tty, cevent->data[index], TTY_NORMAL); @@ -1209,8 +1156,7 @@ u8 port = cevent->virtual_device; if (port >= VTTY_PORTS) { - printk(KERN_WARNING_VIO - "viocons: data on invalid virtual device\n"); + printk(VIOCONS_KERN_WARN "data on invalid virtual device\n"); return; } @@ -1278,20 +1224,9 @@ .close = viotty_close, .write = viotty_write, .put_char = viotty_put_char, - .flush_chars = viotty_flush_chars, .write_room = viotty_write_room, .chars_in_buffer = viotty_chars_in_buffer, - .flush_buffer = viotty_flush_buffer, .ioctl = viotty_ioctl, - .throttle = viotty_throttle, - .unthrottle = viotty_unthrottle, - .set_termios = viotty_set_termios, - .stop = viotty_stop, - .start = viotty_start, - .hangup = viotty_hangup, - .break_ctl = viotty_break, - .send_xchar = viotty_send_xchar, - .wait_until_sent = viotty_wait_until_sent, }; static int __init viocons_init2(void) @@ -1299,14 +1234,11 @@ atomic_t wait_flag; int rc; - /* Now open to the primary LP */ - printk(KERN_INFO_VIO "console open path to primary\n"); /* +2 for fudge */ rc = viopath_open(HvLpConfig_getPrimaryLpIndex(), viomajorsubtype_chario, VIOCHAR_WINDOW + 2); if (rc) - printk(KERN_WARNING_VIO "console error opening to primary %d\n", - rc); + printk(VIOCONS_KERN_WARN "error opening to primary %d\n", rc); if (viopath_hostLp == HvLpIndexInvalid) vio_set_hostlp(); @@ -1317,30 +1249,28 @@ */ if ((viopath_hostLp != HvLpIndexInvalid) && (viopath_hostLp != HvLpConfig_getPrimaryLpIndex())) { - printk(KERN_INFO_VIO "console open path to hosting (%d)\n", + printk(VIOCONS_KERN_INFO "open path to hosting (%d)\n", viopath_hostLp); rc = viopath_open(viopath_hostLp, viomajorsubtype_chario, VIOCHAR_WINDOW + 2); /* +2 for fudge */ if (rc) - printk(KERN_WARNING_VIO - "console error opening to partition %d: %d\n", + printk(VIOCONS_KERN_WARN + "error opening to partition %d: %d\n", viopath_hostLp, rc); } if (vio_setHandler(viomajorsubtype_chario, vioHandleCharEvent) < 0) - printk(KERN_WARNING_VIO - "Error seting handler for console events!\n"); + printk(VIOCONS_KERN_WARN + "error seting handler for console events!\n"); - printk(KERN_INFO_VIO "console major number is %d\n", TTY_MAJOR); - - /* First, try to open the console to the hosting lp. + /* + * First, try to open the console to the hosting lp. * Wait on a semaphore for the response. */ atomic_set(&wait_flag, 0); if ((viopath_isactive(viopath_hostLp)) && (send_open(viopath_hostLp, (void *)&wait_flag) == 0)) { - printk(KERN_INFO_VIO - "opening console to hosting partition %d\n", + printk(VIOCONS_KERN_INFO "hosting partition %d\n", viopath_hostLp); while (atomic_read(&wait_flag) == 0) mb(); @@ -1354,7 +1284,7 @@ (viopath_isactive(HvLpConfig_getPrimaryLpIndex())) && (send_open(HvLpConfig_getPrimaryLpIndex(), (void *)&wait_flag) == 0)) { - printk(KERN_INFO_VIO "opening console to primary partition\n"); + printk(VIOCONS_KERN_INFO "opening console to primary partition\n"); while (atomic_read(&wait_flag) == 0) mb(); } @@ -1374,31 +1304,12 @@ viotty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS; tty_set_operations(viotty_driver, &serial_ops); - viottyS_driver = alloc_tty_driver(VTTY_PORTS); - viottyS_driver->owner = THIS_MODULE; - viottyS_driver->driver_name = "vioconsole"; - viottyS_driver->devfs_name = "tts/"; - viottyS_driver->name = "ttyS"; - viottyS_driver->major = TTY_MAJOR; - viottyS_driver->minor_start = VIOTTY_SERIAL_START; - viottyS_driver->type = TTY_DRIVER_TYPE_SERIAL; - viottyS_driver->subtype = 1; - viottyS_driver->init_termios = tty_std_termios; - viottyS_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS; - tty_set_operations(viottyS_driver, &serial_ops); - if (tty_register_driver(viotty_driver)) { - printk(KERN_WARNING_VIO "Couldn't register console driver\n"); + printk(VIOCONS_KERN_WARN "couldn't register console driver\n"); put_tty_driver(viotty_driver); viotty_driver = NULL; } - if (tty_register_driver(viottyS_driver)) { - printk(KERN_WARNING_VIO "Couldn't register console S driver\n"); - put_tty_driver(viottyS_driver); - viottyS_driver = NULL; - } - viocons_init_cfu_buffer(); unregister_console(&viocons_early); @@ -1411,7 +1322,7 @@ { int i; - printk(KERN_INFO_VIO "registering console\n"); + printk(VIOCONS_KERN_INFO "registering console\n"); for (i = 0; i < VTTY_PORTS; i++) { port_info[i].lp = HvLpIndexInvalid; port_info[i].magic = VIOTTY_MAGIC; diff -Nru a/drivers/char/viotape.c b/drivers/char/viotape.c --- a/drivers/char/viotape.c Sun Mar 28 13:12:08 2004 +++ b/drivers/char/viotape.c Sun Mar 28 13:12:08 2004 @@ -913,8 +913,6 @@ char tapename[32]; int i; - printk(VIOTAPE_KERN_INFO "driver version " VIOTAPE_VERSION "\n"); - op_struct_list = NULL; if ((ret = add_op_structs(VIOTAPE_MAXREQ)) < 0) { printk(VIOTAPE_KERN_WARN "couldn't allocate op structs\n"); @@ -932,8 +930,6 @@ } } - printk(VIOTAPE_KERN_INFO "init - open path to hosting (%d)\n", - viopath_hostLp); ret = viopath_open(viopath_hostLp, viomajorsubtype_tape, VIOTAPE_MAXREQ + 2); if (ret) { @@ -942,6 +938,9 @@ ret = -EIO; goto clear_op; } + + printk(VIOTAPE_KERN_INFO "vers " VIOTAPE_VERSION + ", hosting partition %d\n", viopath_hostLp); vio_setHandler(viomajorsubtype_tape, vioHandleTapeEvent); diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c --- a/drivers/char/vt.c Sun Mar 28 13:12:08 2004 +++ b/drivers/char/vt.c Sun Mar 28 13:12:08 2004 @@ -2481,19 +2481,20 @@ return 0; } -static void con_close(struct tty_struct *tty, struct file * filp) +static void con_close(struct tty_struct *tty, struct file *filp) { - struct vt_struct *vt; - - if (!tty || tty->count != 1) - return; - - vcs_remove_devfs(tty); acquire_console_sem(); - vt = (struct vt_struct*)tty->driver_data; - if (vt) - vc_cons[vt->vc_num].d->vc_tty = NULL; - tty->driver_data = 0; + if (tty && tty->count == 1) { + struct vt_struct *vt; + + vt = tty->driver_data; + if (vt) + vc_cons[vt->vc_num].d->vc_tty = NULL; + tty->driver_data = 0; + release_console_sem(); + vcs_remove_devfs(tty); + return; + } release_console_sem(); } diff -Nru a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig --- a/drivers/char/watchdog/Kconfig Sun Mar 28 13:12:08 2004 +++ b/drivers/char/watchdog/Kconfig Sun Mar 28 13:12:08 2004 @@ -374,7 +374,7 @@ tristate "Berkshire Products ISA-PC Watchdog" depends on WATCHDOG && ISA ---help--- - This is the driver for the Berkshire Products PC Watchdog card. + This is the driver for the Berkshire Products ISA-PC Watchdog card. This card simply watches your kernel to make sure it doesn't freeze, and if it does, it reboots your computer after a certain amount of time. This driver is like the WDT501 driver but for different @@ -406,10 +406,8 @@ ---help--- If you have a WDT500P or WDT501P watchdog board, say Y here, otherwise N. It is not possible to probe for this board, which means - that you have to inform the kernel about the IO port and IRQ using - the "wdt=" kernel option (try "man bootparam" or see the - documentation of your boot loader (lilo or loadlin) about how to - pass options to the kernel at boot time). + that you have to inform the kernel about the IO port and IRQ that + is needed (you can do this via the io and irq parameters) To compile this driver as a module, choose M here: the module will be called wdt. @@ -425,11 +423,8 @@ Fahrenheit. This works only if you have a WDT501P watchdog board installed. -config WDT_501_FAN - bool "Fan Tachometer" - depends on WDT_501 - help - Enable the Fan Tachometer on the WDT501. Only do this if you have a + If you want to enable the Fan Tachometer on the WDT501P, then you + can do this via the tachometer parameter. Only do this if you have a fan tachometer actually set up. # @@ -455,29 +450,28 @@ Most people will say N. config WDTPCI - tristate "WDT PCI Watchdog timer" + tristate "PCI-WDT500/501 Watchdog timer" depends on WATCHDOG && PCI ---help--- - If you have a PCI WDT500/501 watchdog board, say Y here, otherwise - N. It is not possible to probe for this board, which means that you - have to inform the kernel about the IO port and IRQ using the "wdt=" - kernel option (try "man bootparam" or see the documentation of your - boot loader (lilo or loadlin) about how to pass options to the - kernel at boot time). + If you have a PCI-WDT500/501 watchdog board, say Y here, otherwise N. To compile this driver as a module, choose M here: the module will be called wdt_pci. config WDT_501_PCI - bool "WDT501-PCI features" + bool "PCI-WDT501 features" depends on WDTPCI help Saying Y here and creating a character special file /dev/temperature with major number 10 and minor number 131 ("man mknod") will give you a thermometer inside your computer: reading from /dev/temperature yields one byte, the temperature in degrees - Fahrenheit. This works only if you have a WDT501P watchdog board + Fahrenheit. This works only if you have a PCI-WDT501 watchdog board installed. + + If you want to enable the Fan Tachometer on the PCI-WDT501, then you + can do this via the tachometer parameter. Only do this if you have a + fan tachometer actually set up. # # USB-based Watchdog Cards diff -Nru a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c --- a/drivers/char/watchdog/pcwd.c Sun Mar 28 13:12:07 2004 +++ b/drivers/char/watchdog/pcwd.c Sun Mar 28 13:12:07 2004 @@ -71,7 +71,7 @@ */ static int pcwd_ioports[] = { 0x270, 0x350, 0x370, 0x000 }; -#define WD_VER "1.12 (12/14/2001)" +#define WD_VER "1.14 (03/12/2004)" /* * It should be noted that PCWD_REVISION_B was removed because A and B @@ -227,6 +227,45 @@ } } +static int pcwd_start(void) +{ + int stat_reg; + + /* Enable the port */ + if (revision == PCWD_REVISION_C) { + spin_lock(&io_lock); + outb_p(0x00, current_readport + 3); + stat_reg = inb_p(current_readport + 2); + spin_unlock(&io_lock); + if (stat_reg & 0x10) + { + printk(KERN_INFO "pcwd: Could not start watchdog.\n"); + return -EIO; + } + } + return 0; +} + +static int pcwd_stop(void) +{ + int stat_reg; + + /* Disable the board */ + if (revision == PCWD_REVISION_C) { + spin_lock(&io_lock); + outb_p(0xA5, current_readport + 3); + outb_p(0xA5, current_readport + 3); + stat_reg = inb_p(current_readport + 2); + spin_unlock(&io_lock); + if ((stat_reg & 0x10) == 0) + { + printk(KERN_INFO "pcwd: Could not stop watchdog.\n"); + return -EIO; + } + } + return 0; +} + static void pcwd_send_heartbeat(void) { int wdrst_stat; @@ -242,13 +281,41 @@ outb_p(wdrst_stat, current_readport); } +static int pcwd_get_temperature(int *temperature) +{ + /* check that port 0 gives temperature info and no command results */ + if (mode_debug) + return -1; + + *temperature = 0; + if (!supports_temp) + return -ENODEV; + + /* + * Convert celsius to fahrenheit, since this was + * the decided 'standard' for this return value. + */ + spin_lock(&io_lock); + *temperature = ((inb(current_readport)) * 9 / 5) + 32; + spin_unlock(&io_lock); + + return 0; +} + +/* + * /dev/watchdog handling + */ + static int pcwd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { int cdat, rv; + int temperature; static struct watchdog_info ident= { - .options = WDIOF_OVERHEAT|WDIOF_CARDRESET, + .options = WDIOF_OVERHEAT | + WDIOF_CARDRESET | + WDIOF_MAGICCLOSE, .firmware_version = 1, .identity = "PCWD", }; @@ -332,17 +399,10 @@ case WDIOC_GETTEMP: - rv = 0; - if ((supports_temp) && (mode_debug == 0)) - { - spin_lock(&io_lock); - rv = inb(current_readport); - spin_unlock(&io_lock); - if(put_user(rv, (int*) arg)) - return -EFAULT; - } else if(put_user(rv, (int*) arg)) - return -EFAULT; - return 0; + if (pcwd_get_temperature(&temperature)) + return -EFAULT; + + return put_user(temperature, (int *) arg); case WDIOC_SETOPTIONS: if (revision == PCWD_REVISION_C) @@ -352,32 +412,12 @@ if (rv & WDIOS_DISABLECARD) { - spin_lock(&io_lock); - outb_p(0xA5, current_readport + 3); - outb_p(0xA5, current_readport + 3); - cdat = inb_p(current_readport + 2); - spin_unlock(&io_lock); - if ((cdat & 0x10) == 0) - { - printk(KERN_INFO "pcwd: Could not disable card.\n"); - return -EIO; - } - - return 0; + return pcwd_stop(); } if (rv & WDIOS_ENABLECARD) { - spin_lock(&io_lock); - outb_p(0x00, current_readport + 3); - cdat = inb_p(current_readport + 2); - spin_unlock(&io_lock); - if (cdat & 0x10) - { - printk(KERN_INFO "pcwd: Could not enable card.\n"); - return -EIO; - } - return 0; + return pcwd_start(); } if (rv & WDIOS_TEMPPANIC) @@ -423,72 +463,66 @@ return len; } -static int pcwd_open(struct inode *ino, struct file *filep) +static int pcwd_open(struct inode *inode, struct file *file) { - switch (iminor(ino)) { - case WATCHDOG_MINOR: - if (!atomic_dec_and_test(&open_allowed) ) { - atomic_inc( &open_allowed ); - return -EBUSY; - } + if (!atomic_dec_and_test(&open_allowed) ) { + atomic_inc( &open_allowed ); + return -EBUSY; + } + + if (nowayout) __module_get(THIS_MODULE); - /* Enable the port */ - if (revision == PCWD_REVISION_C) { - spin_lock(&io_lock); - outb_p(0x00, current_readport + 3); - spin_unlock(&io_lock); - } - return(0); - case TEMP_MINOR: - return(0); - default: - return (-ENODEV); + /* Activate */ + pcwd_start(); + return(0); +} + +static int pcwd_close(struct inode *inode, struct file *file) +{ + if (expect_close == 42) { + pcwd_stop(); + atomic_inc( &open_allowed ); + } else { + printk(KERN_CRIT "pcwd: Unexpected close, not stopping watchdog!\n"); + pcwd_send_heartbeat(); } + expect_close = 0; + return 0; } -static ssize_t pcwd_read(struct file *file, char *buf, size_t count, +/* + * /dev/temperature handling + */ + +static ssize_t pcwd_temp_read(struct file *file, char *buf, size_t count, loff_t *ppos) { - unsigned short c; - unsigned char cp; + int temperature; /* Can't seek (pread) on this device */ if (ppos != &file->f_pos) return -ESPIPE; - switch(iminor(file->f_dentry->d_inode)) - { - case TEMP_MINOR: - /* - * Convert metric to Fahrenheit, since this was - * the decided 'standard' for this return value. - */ - - c = inb(current_readport); - cp = (c * 9 / 5) + 32; - if(copy_to_user(buf, &cp, 1)) - return -EFAULT; - return 1; - default: - return -EINVAL; - } + + if (pcwd_get_temperature(&temperature)) + return -EFAULT; + + if (copy_to_user(buf, &temperature, 1)) + return -EFAULT; + + return 1; } -static int pcwd_close(struct inode *ino, struct file *filep) -{ - if (iminor(ino)==WATCHDOG_MINOR) { - if (expect_close == 42) { - /* Disable the board */ - if (revision == PCWD_REVISION_C) { - spin_lock(&io_lock); - outb_p(0xA5, current_readport + 3); - outb_p(0xA5, current_readport + 3); - spin_unlock(&io_lock); - } - atomic_inc( &open_allowed ); - } - } - expect_close = 0; +static int pcwd_temp_open(struct inode *inode, struct file *file) +{ + if (!supports_temp) + return -ENODEV; + + return 0; +} + +static int pcwd_temp_close(struct inode *inode, struct file *file) +{ return 0; } @@ -569,7 +603,7 @@ static struct file_operations pcwd_fops = { .owner = THIS_MODULE, - .read = pcwd_read, + .llseek = no_llseek, .write = pcwd_write, .ioctl = pcwd_ioctl, .open = pcwd_open, @@ -582,10 +616,18 @@ .fops = &pcwd_fops, }; +static struct file_operations pcwd_temp_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .read = pcwd_temp_read, + .open = pcwd_temp_open, + .release = pcwd_temp_close, +}; + static struct miscdevice temp_miscdev = { .minor = TEMP_MINOR, .name = "temperature", - .fops = &pcwd_fops, + .fops = &pcwd_temp_fops, }; static void __init pcwd_validate_timeout(void) diff -Nru a/drivers/char/watchdog/shwdt.c b/drivers/char/watchdog/shwdt.c --- a/drivers/char/watchdog/shwdt.c Sun Mar 28 13:12:07 2004 +++ b/drivers/char/watchdog/shwdt.c Sun Mar 28 13:12:07 2004 @@ -412,7 +412,7 @@ return rc; } - rc = misc_register(&sh_wdt_miscdev) + rc = misc_register(&sh_wdt_miscdev); if (rc) { printk(KERN_ERR PFX "Can't register miscdev on minor=%d (err=%d)\n", sh_wdt_miscdev.minor, rc); diff -Nru a/drivers/char/watchdog/softdog.c b/drivers/char/watchdog/softdog.c --- a/drivers/char/watchdog/softdog.c Sun Mar 28 13:12:07 2004 +++ b/drivers/char/watchdog/softdog.c Sun Mar 28 13:12:07 2004 @@ -1,5 +1,5 @@ /* - * SoftDog 0.06: A Software Watchdog Device + * SoftDog 0.07: A Software Watchdog Device * * (c) Copyright 1996 Alan Cox , All Rights Reserved. * http://www.redhat.com @@ -40,26 +40,21 @@ #include #include #include +#include #include #include #include +#include #include #include #include -#define TIMER_MARGIN 60 /* (secs) Default is 1 minute */ +#define PFX "SoftDog: " -static char expect_close; +#define TIMER_MARGIN 60 /* Default is 60 seconds */ static int soft_margin = TIMER_MARGIN; /* in seconds */ -#ifdef ONLY_TESTING -static int soft_noboot = 1; -#else -static int soft_noboot = 0; -#endif /* ONLY_TESTING */ - module_param(soft_margin, int, 0); -module_param(soft_noboot, int, 0); -MODULE_LICENSE("GPL"); +MODULE_PARM_DESC(soft_margin, "Watchdog soft_margin in seconds. (0 0xFFFF)) + return -EINVAL; + + soft_margin = t; + return 0; +} + +/* + * /dev/watchdog handling */ static int softdog_open(struct inode *inode, struct file *file) @@ -110,7 +140,7 @@ /* * Activate timer */ - mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ)); + softdog_keepalive(); return 0; } @@ -121,9 +151,10 @@ * Lock it in if it's a module and we set nowayout */ if (expect_close == 42) { - del_timer(&watchdog_ticktock); + softdog_stop(); } else { - printk(KERN_CRIT "SOFTDOG: WDT device closed unexpectedly. WDT will not stop!\n"); + printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n"); + softdog_keepalive(); } clear_bit(0, &timer_alive); expect_close = 0; @@ -155,7 +186,7 @@ expect_close = 42; } } - mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ)); + softdog_keepalive(); } return len; } @@ -165,37 +196,57 @@ { int new_margin; static struct watchdog_info ident = { - .options = WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE, - .identity = "Software Watchdog", + .options = WDIOF_SETTIMEOUT | + WDIOF_KEEPALIVEPING | + WDIOF_MAGICCLOSE, + .firmware_version = 0, + .identity = "Software Watchdog", }; switch (cmd) { default: return -ENOIOCTLCMD; case WDIOC_GETSUPPORT: - if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))) - return -EFAULT; - return 0; + return copy_to_user((struct watchdog_info *)arg, &ident, + sizeof(ident)) ? -EFAULT : 0; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: return put_user(0,(int *)arg); case WDIOC_KEEPALIVE: - mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ)); + softdog_keepalive(); return 0; case WDIOC_SETTIMEOUT: if (get_user(new_margin, (int *)arg)) return -EFAULT; - if (new_margin < 1) + if (softdog_set_heartbeat(new_margin)) return -EINVAL; - soft_margin = new_margin; - mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ)); + softdog_keepalive(); /* Fall */ case WDIOC_GETTIMEOUT: return put_user(soft_margin, (int *)arg); } } +/* + * Notifier for system down + */ + +static int softdog_notify_sys(struct notifier_block *this, unsigned long code, + void *unused) +{ + if(code==SYS_DOWN || code==SYS_HALT) { + /* Turn the WDT off */ + softdog_stop(); + } + return NOTIFY_DONE; +} + +/* + * Kernel Interfaces + */ + static struct file_operations softdog_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = softdog_write, .ioctl = softdog_ioctl, .open = softdog_open, @@ -208,18 +259,39 @@ .fops = &softdog_fops, }; -static char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.06, soft_margin: %d sec, nowayout: %d\n"; +static struct notifier_block softdog_notifier = { + .notifier_call = softdog_notify_sys, +}; + +static char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.07 initialized. soft_noboot=%d soft_margin=%d sec (nowayout= %d)\n"; static int __init watchdog_init(void) { int ret; - ret = misc_register(&softdog_miscdev); + /* Check that the soft_margin value is within it's range ; if not reset to the default */ + if (softdog_set_heartbeat(soft_margin)) { + softdog_set_heartbeat(TIMER_MARGIN); + printk(KERN_INFO PFX "soft_margin value must be 0, All Rights Reserved. * http://www.redhat.com @@ -15,7 +15,7 @@ * * (c) Copyright 1995 Alan Cox * - * Release 0.09. + * Release 0.10. * * Fixes * Dave Gregorich : Modularisation and minor bugs @@ -53,17 +53,15 @@ static char expect_close; /* - * You must set these - there is no sane way to probe for this board. - * You can use wdt=x,y to set these now. + * Module parameters */ -static int io=0x240; -static int irq=11; +#define WD_TIMO 60 /* Default heartbeat = 60 seconds */ -/* Default margin */ -#define WD_TIMO (100*60) /* 1 minute */ - -static int wd_margin = WD_TIMO; +static int heartbeat = WD_TIMO; +static int wd_heartbeat; +module_param(heartbeat, int, 0); +MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0>8, WDT_COUNT0+ctr); } -/* - * Kernel methods. +/** + * wdt_start: + * + * Start the watchdog driver. + */ + +static int wdt_start(void) +{ + inb_p(WDT_DC); /* Disable watchdog */ + wdt_ctr_mode(0,3); /* Program CTR0 for Mode 3: Square Wave Generator */ + wdt_ctr_mode(1,2); /* Program CTR1 for Mode 2: Rate Generator */ + wdt_ctr_mode(2,0); /* Program CTR2 for Mode 0: Pulse on Terminal Count */ + wdt_ctr_load(0, 8948); /* Count at 100Hz */ + wdt_ctr_load(1,wd_heartbeat); /* Heartbeat */ + wdt_ctr_load(2,65535); /* Length of reset pulse */ + outb_p(0, WDT_DC); /* Enable watchdog */ + return 0; +} + +/** + * wdt_stop: + * + * Stop the watchdog driver. + */ + +static int wdt_stop (void) +{ + /* Turn the card off */ + inb_p(WDT_DC); /* Disable watchdog */ + wdt_ctr_load(2,0); /* 0 length reset pulses now */ + return 0; +} + +/** + * wdt_ping: + * + * Reload counter one with the watchdog heartbeat. We don't bother reloading + * the cascade counter. */ +static int wdt_ping(void) +{ + /* Write a watchdog value */ + inb_p(WDT_DC); /* Disable watchdog */ + wdt_ctr_mode(1,2); /* Re-Program CTR1 for Mode 2: Rate Generator */ + wdt_ctr_load(1,wd_heartbeat); /* Heartbeat */ + outb_p(0, WDT_DC); /* Enable watchdog */ + return 0; +} /** - * wdt_status: + * wdt_set_heartbeat: + * @t: the new heartbeat value that needs to be set. + * + * Set a new heartbeat value for the watchdog device. If the heartbeat value is + * incorrect we keep the old value and return -EINVAL. If successfull we + * return 0. + */ +static int wdt_set_heartbeat(int t) +{ + if ((t < 1) || (t > 65535)) + return -EINVAL; + + heartbeat = t; + wd_heartbeat = t * 100; + return 0; +} + +/** + * wdt_get_status: + * @status: the new status. * * Extract the status information from a WDT watchdog device. There are * several board variants so we have to know which bits are valid. Some @@ -112,31 +186,46 @@ * we then map the bits onto the status ioctl flags. */ -static int wdt_status(void) +static int wdt_get_status(int *status) { - /* - * Status register to bit flags - */ + unsigned char new_status=inb_p(WDT_SR); - int flag=0; - unsigned char status=inb_p(WDT_SR); - status|=FEATUREMAP1; - status&=~FEATUREMAP2; + *status=0; + if (new_status & WDC_SR_ISOI0) + *status |= WDIOF_EXTERN1; + if (new_status & WDC_SR_ISII1) + *status |= WDIOF_EXTERN2; +#ifdef CONFIG_WDT_501 + if (!(new_status & WDC_SR_TGOOD)) + *status |= WDIOF_OVERHEAT; + if (!(new_status & WDC_SR_PSUOVER)) + *status |= WDIOF_POWEROVER; + if (!(new_status & WDC_SR_PSUUNDR)) + *status |= WDIOF_POWERUNDER; + if (tachometer) { + if (!(new_status & WDC_SR_FANGOOD)) + *status |= WDIOF_FANFAULT; + } +#endif /* CONFIG_WDT_501 */ + return 0; +} - if(!(status&WDC_SR_TGOOD)) - flag|=WDIOF_OVERHEAT; - if(!(status&WDC_SR_PSUOVER)) - flag|=WDIOF_POWEROVER; - if(!(status&WDC_SR_PSUUNDR)) - flag|=WDIOF_POWERUNDER; - if(!(status&WDC_SR_FANGOOD)) - flag|=WDIOF_FANFAULT; - if(status&WDC_SR_ISOI0) - flag|=WDIOF_EXTERN1; - if(status&WDC_SR_ISII1) - flag|=WDIOF_EXTERN2; - return flag; +#ifdef CONFIG_WDT_501 +/** + * wdt_get_temperature: + * + * Reports the temperature in degrees Fahrenheit. The API is in + * farenheit. It was designed by an imperial measurement luddite. + */ + +static int wdt_get_temperature(int *temperature) +{ + unsigned short c=inb_p(WDT_RT); + + *temperature = (c * 11 / 15) + 7; + return 0; } +#endif /* CONFIG_WDT_501 */ /** * wdt_interrupt: @@ -155,23 +244,23 @@ * Read the status register see what is up and * then printk it. */ - unsigned char status=inb_p(WDT_SR); - status|=FEATUREMAP1; - status&=~FEATUREMAP2; - printk(KERN_CRIT "WDT status %d\n", status); - if(!(status&WDC_SR_TGOOD)) +#ifdef CONFIG_WDT_501 + if (!(status & WDC_SR_TGOOD)) printk(KERN_CRIT "Overheat alarm.(%d)\n",inb_p(WDT_RT)); - if(!(status&WDC_SR_PSUOVER)) + if (!(status & WDC_SR_PSUOVER)) printk(KERN_CRIT "PSU over voltage.\n"); - if(!(status&WDC_SR_PSUUNDR)) + if (!(status & WDC_SR_PSUUNDR)) printk(KERN_CRIT "PSU under voltage.\n"); - if(!(status&WDC_SR_FANGOOD)) - printk(KERN_CRIT "Possible fan fault.\n"); - if(!(status&WDC_SR_WCCR)) + if (tachometer) { + if (!(status & WDC_SR_FANGOOD)) + printk(KERN_CRIT "Possible fan fault.\n"); + } +#endif /* CONFIG_WDT_501 */ + if (!(status & WDC_SR_WCCR)) #ifdef SOFTWARE_REBOOT #ifdef ONLY_TESTING printk(KERN_CRIT "Would Reboot.\n"); @@ -187,22 +276,6 @@ /** - * wdt_ping: - * - * Reload counter one with the watchdog timeout. We don't bother reloading - * the cascade counter. - */ - -static void wdt_ping(void) -{ - /* Write a watchdog value */ - inb_p(WDT_DC); - wdt_ctr_mode(1,2); - wdt_ctr_load(1,wd_margin); /* Timeout */ - outb_p(0, WDT_DC); -} - -/** * wdt_write: * @file: file handle to the watchdog * @buf: buffer to write (unused as data does not matter here @@ -240,40 +313,6 @@ } /** - * wdt_read: - * @file: file handle to the watchdog board - * @buf: buffer to write 1 byte into - * @count: length of buffer - * @ptr: offset (no seek allowed) - * - * Read reports the temperature in degrees Fahrenheit. The API is in - * farenheit. It was designed by an imperial measurement luddite. - */ - -static ssize_t wdt_read(struct file *file, char *buf, size_t count, loff_t *ptr) -{ - unsigned short c=inb_p(WDT_RT); - unsigned char cp; - - /* Can't seek (pread) on this device */ - if (ptr != &file->f_pos) - return -ESPIPE; - - switch(iminor(file->f_dentry->d_inode)) - { - case TEMP_MINOR: - c*=11; - c/=15; - cp=c+7; - if(copy_to_user(buf,&cp,1)) - return -EFAULT; - return 1; - default: - return -EINVAL; - } -} - -/** * wdt_ioctl: * @inode: inode of the device * @file: file handle to the device @@ -288,18 +327,25 @@ static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - int new_margin; + int new_heartbeat; + int status; - static struct watchdog_info ident= - { - .options = WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER - |WDIOF_EXTERN1|WDIOF_EXTERN2|WDIOF_FANFAULT - |WDIOF_SETTIMEOUT|WDIOF_MAGICCLOSE, - .firmware_version = 1, - .identity = "WDT500/501", + static struct watchdog_info ident = { + .options = WDIOF_SETTIMEOUT| + WDIOF_MAGICCLOSE| + WDIOF_KEEPALIVEPING, + .firmware_version = 1, + .identity = "WDT500/501", }; - ident.options&=WDT_OPTION_MASK; /* Mask down to the card we have */ + /* Add options according to the card we have */ + ident.options |= (WDIOF_EXTERN1|WDIOF_EXTERN2); +#ifdef CONFIG_WDT_501 + ident.options |= (WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER); + if (tachometer) + ident.options |= WDIOF_FANFAULT; +#endif /* CONFIG_WDT_501 */ + switch(cmd) { default: @@ -308,23 +354,24 @@ return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0; case WDIOC_GETSTATUS: - return put_user(wdt_status(),(int *)arg); + wdt_get_status(&status); + return put_user(status,(int *)arg); case WDIOC_GETBOOTSTATUS: return put_user(0, (int *)arg); case WDIOC_KEEPALIVE: wdt_ping(); return 0; case WDIOC_SETTIMEOUT: - if (get_user(new_margin, (int *)arg)) + if (get_user(new_heartbeat, (int *)arg)) return -EFAULT; - /* Arbitrary, can't find the card's limits */ - if ((new_margin < 0) || (new_margin > 60)) + + if (wdt_set_heartbeat(new_heartbeat)) return -EINVAL; - wd_margin = new_margin * 100; + wdt_ping(); /* Fall */ case WDIOC_GETTIMEOUT: - return put_user(wd_margin / 100, (int *)arg); + return put_user(heartbeat, (int *)arg); } } @@ -333,43 +380,26 @@ * @inode: inode of device * @file: file handle to device * - * One of our two misc devices has been opened. The watchdog device is - * single open and on opening we load the counters. Counter zero is a - * 100Hz cascade, into counter 1 which downcounts to reboot. When the - * counter triggers counter 2 downcounts the length of the reset pulse - * which set set to be as long as possible. + * The watchdog device has been opened. The watchdog device is single + * open and on opening we load the counters. Counter zero is a 100Hz + * cascade, into counter 1 which downcounts to reboot. When the counter + * triggers counter 2 downcounts the length of the reset pulse which + * set set to be as long as possible. */ static int wdt_open(struct inode *inode, struct file *file) { - switch(iminor(inode)) - { - case WATCHDOG_MINOR: - if(test_and_set_bit(0, &wdt_is_open)) - return -EBUSY; - /* - * Activate - */ - - wdt_is_open=1; - inb_p(WDT_DC); /* Disable */ - wdt_ctr_mode(0,3); - wdt_ctr_mode(1,2); - wdt_ctr_mode(2,0); - wdt_ctr_load(0, 8948); /* count at 100Hz */ - wdt_ctr_load(1,wd_margin); /* Timeout 120 seconds */ - wdt_ctr_load(2,65535); - outb_p(0, WDT_DC); /* Enable */ - return 0; - case TEMP_MINOR: - return 0; - default: - return -ENODEV; - } + if(test_and_set_bit(0, &wdt_is_open)) + return -EBUSY; + /* + * Activate + */ + wdt_start(); + return 0; } /** - * wdt_close: + * wdt_release: * @inode: inode to board * @file: file handle to board * @@ -382,21 +412,74 @@ static int wdt_release(struct inode *inode, struct file *file) { - if(iminor(inode)==WATCHDOG_MINOR) - { - if (expect_close == 42) { - inb_p(WDT_DC); /* Disable counters */ - wdt_ctr_load(2,0); /* 0 length reset pulses now */ - } else { - printk(KERN_CRIT "wdt: WDT device closed unexpectedly. WDT will not stop!\n"); - } + if (expect_close == 42) { + wdt_stop(); clear_bit(0, &wdt_is_open); - expect_close = 0; + } else { + printk(KERN_CRIT "wdt: WDT device closed unexpectedly. WDT will not stop!\n"); + wdt_ping(); } + expect_close = 0; + return 0; +} + +#ifdef CONFIG_WDT_501 +/** + * wdt_temp_read: + * @file: file handle to the watchdog board + * @buf: buffer to write 1 byte into + * @count: length of buffer + * @ptr: offset (no seek allowed) + * + * Temp_read reports the temperature in degrees Fahrenheit. The API is in + * farenheit. It was designed by an imperial measurement luddite. + */ + +static ssize_t wdt_temp_read(struct file *file, char *buf, size_t count, loff_t *ptr) +{ + int temperature; + + /* Can't seek (pread) on this device */ + if (ptr != &file->f_pos) + return -ESPIPE; + + if (wdt_get_temperature(&temperature)) + return -EFAULT; + + if (copy_to_user (buf, &temperature, 1)) + return -EFAULT; + + return 1; +} + +/** + * wdt_temp_open: + * @inode: inode of device + * @file: file handle to device + * + * The temperature device has been opened. + */ + +static int wdt_temp_open(struct inode *inode, struct file *file) +{ return 0; } /** + * wdt_temp_release: + * @inode: inode to board + * @file: file handle to board + * + * The temperature device has been closed. + */ + +static int wdt_temp_release(struct inode *inode, struct file *file) +{ + return 0; +} +#endif /* CONFIG_WDT_501 */ + +/** * notify_sys: * @this: our notifier block * @code: the event being reported @@ -411,11 +494,9 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { - if(code==SYS_DOWN || code==SYS_HALT) - { + if(code==SYS_DOWN || code==SYS_HALT) { /* Turn the card off */ - inb_p(WDT_DC); - wdt_ctr_load(2,0); + wdt_stop(); } return NOTIFY_DONE; } @@ -428,36 +509,40 @@ static struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, - .read = wdt_read, .write = wdt_write, .ioctl = wdt_ioctl, .open = wdt_open, .release = wdt_release, }; -static struct miscdevice wdt_miscdev= -{ +static struct miscdevice wdt_miscdev = { .minor = WATCHDOG_MINOR, .name = "watchdog", .fops = &wdt_fops, }; #ifdef CONFIG_WDT_501 -static struct miscdevice temp_miscdev= -{ +static struct file_operations wdt_temp_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .read = wdt_temp_read, + .open = wdt_temp_open, + .release = wdt_temp_release, +}; + +static struct miscdevice temp_miscdev = { .minor = TEMP_MINOR, .name = "temperature", - .fops = &wdt_fops, + .fops = &wdt_temp_fops, }; -#endif +#endif /* CONFIG_WDT_501 */ /* * The WDT card needs to learn about soft shutdowns in order to * turn the timebomb registers off. */ -static struct notifier_block wdt_notifier= -{ +static struct notifier_block wdt_notifier = { .notifier_call = wdt_notify_sys, }; @@ -476,10 +561,10 @@ misc_deregister(&wdt_miscdev); #ifdef CONFIG_WDT_501 misc_deregister(&temp_miscdev); -#endif +#endif /* CONFIG_WDT_501 */ unregister_reboot_notifier(&wdt_notifier); - release_region(io,8); free_irq(irq, NULL); + release_region(io,8); } /** @@ -494,51 +579,67 @@ { int ret; - ret = misc_register(&wdt_miscdev); - if (ret) { - printk(KERN_ERR "wdt: can't misc_register on minor=%d\n", WATCHDOG_MINOR); + /* Check that the heartbeat value is within it's range ; if not reset to the default */ + if (wdt_set_heartbeat(heartbeat)) { + wdt_set_heartbeat(WD_TIMO); + printk(KERN_INFO "wdt: heartbeat value must be 0, All Rights Reserved. * http://www.redhat.com @@ -15,7 +15,7 @@ * * (c) Copyright 1995 Alan Cox * - * Release 0.09. + * Release 0.10. * * Fixes * Dave Gregorich : Modularisation and minor bugs @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -70,6 +71,9 @@ #define PCI_DEVICE_ID_WDG_CSM 0x22c0 #endif +/* We can only use 1 card due to the /dev/watchdog restriction */ +static int dev_count; + static struct semaphore open_sem; static spinlock_t wdtpci_lock; static char expect_close; @@ -78,10 +82,12 @@ static int irq; /* Default timeout */ -#define WD_TIMO (100*60) /* 1 minute */ -#define WD_TIMO_MAX (WD_TIMO*60) /* 1 hour(?) */ +#define WD_TIMO 60 /* Default heartbeat = 60 seconds */ -static int wd_margin = WD_TIMO; +static int heartbeat = WD_TIMO; +static int wd_heartbeat; +module_param(heartbeat, int, 0); +MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0>8, WDT_COUNT0+ctr); } -/* - * Kernel methods. +/** + * wdtpci_start: + * + * Start the watchdog driver. */ +static int wdtpci_start(void) +{ + unsigned long flags; + + spin_lock_irqsave(&wdtpci_lock, flags); + + /* + * "pet" the watchdog, as Access says. + * This resets the clock outputs. + */ + inb_p(WDT_DC); /* Disable watchdog */ + wdtpci_ctr_mode(2,0); /* Program CTR2 for Mode 0: Pulse on Terminal Count */ + outb_p(0, WDT_DC); /* Enable watchdog */ + + inb_p(WDT_DC); /* Disable watchdog */ + outb_p(0, WDT_CLOCK); /* 2.0833MHz clock */ + inb_p(WDT_BUZZER); /* disable */ + inb_p(WDT_OPTONOTRST); /* disable */ + inb_p(WDT_OPTORST); /* disable */ + inb_p(WDT_PROGOUT); /* disable */ + wdtpci_ctr_mode(0,3); /* Program CTR0 for Mode 3: Square Wave Generator */ + wdtpci_ctr_mode(1,2); /* Program CTR1 for Mode 2: Rate Generator */ + wdtpci_ctr_mode(2,1); /* Program CTR2 for Mode 1: Retriggerable One-Shot */ + wdtpci_ctr_load(0,20833); /* count at 100Hz */ + wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */ + /* DO NOT LOAD CTR2 on PCI card! -- JPN */ + outb_p(0, WDT_DC); /* Enable watchdog */ + + spin_unlock_irqrestore(&wdtpci_lock, flags); + return 0; +} + +/** + * wdtpci_stop: + * + * Stop the watchdog driver. + */ + +static int wdtpci_stop (void) +{ + unsigned long flags; + + /* Turn the card off */ + spin_lock_irqsave(&wdtpci_lock, flags); + inb_p(WDT_DC); /* Disable watchdog */ + wdtpci_ctr_load(2,0); /* 0 length reset pulses now */ + spin_unlock_irqrestore(&wdtpci_lock, flags); + return 0; +} + +/** + * wdtpci_ping: + * + * Reload counter one with the watchdog heartbeat. We don't bother reloading + * the cascade counter. + */ + +static int wdtpci_ping(void) +{ + unsigned long flags; + + /* Write a watchdog value */ + spin_lock_irqsave(&wdtpci_lock, flags); + inb_p(WDT_DC); /* Disable watchdog */ + wdtpci_ctr_mode(1,2); /* Re-Program CTR1 for Mode 2: Rate Generator */ + wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */ + outb_p(0, WDT_DC); /* Enable watchdog */ + spin_unlock_irqrestore(&wdtpci_lock, flags); + return 0; +} + +/** + * wdtpci_set_heartbeat: + * @t: the new heartbeat value that needs to be set. + * + * Set a new heartbeat value for the watchdog device. If the heartbeat value is + * incorrect we keep the old value and return -EINVAL. If successfull we + * return 0. + */ +static int wdtpci_set_heartbeat(int t) +{ + /* Arbitrary, can't find the card's limits */ + if ((t < 1) || (t > 65535)) + return -EINVAL; + + heartbeat = t; + wd_heartbeat = t * 100; + return 0; +} /** - * wdtpci_status: + * wdtpci_get_status: + * @status: the new status. * * Extract the status information from a WDT watchdog device. There are * several board variants so we have to know which bits are valid. Some @@ -125,31 +231,46 @@ * we then map the bits onto the status ioctl flags. */ -static int wdtpci_status(void) +static int wdtpci_get_status(int *status) { - /* - * Status register to bit flags - */ + unsigned char new_status=inb_p(WDT_SR); - int flag=0; - unsigned char status=inb_p(WDT_SR); - status|=FEATUREMAP1; - status&=~FEATUREMAP2; + *status=0; + if (new_status & WDC_SR_ISOI0) + *status |= WDIOF_EXTERN1; + if (new_status & WDC_SR_ISII1) + *status |= WDIOF_EXTERN2; +#ifdef CONFIG_WDT_501_PCI + if (!(new_status & WDC_SR_TGOOD)) + *status |= WDIOF_OVERHEAT; + if (!(new_status & WDC_SR_PSUOVER)) + *status |= WDIOF_POWEROVER; + if (!(new_status & WDC_SR_PSUUNDR)) + *status |= WDIOF_POWERUNDER; + if (tachometer) { + if (!(new_status & WDC_SR_FANGOOD)) + *status |= WDIOF_FANFAULT; + } +#endif /* CONFIG_WDT_501_PCI */ + return 0; +} - if(!(status&WDC_SR_TGOOD)) - flag|=WDIOF_OVERHEAT; - if(!(status&WDC_SR_PSUOVER)) - flag|=WDIOF_POWEROVER; - if(!(status&WDC_SR_PSUUNDR)) - flag|=WDIOF_POWERUNDER; - if(!(status&WDC_SR_FANGOOD)) - flag|=WDIOF_FANFAULT; - if(status&WDC_SR_ISOI0) - flag|=WDIOF_EXTERN1; - if(status&WDC_SR_ISII1) - flag|=WDIOF_EXTERN2; - return flag; +#ifdef CONFIG_WDT_501_PCI +/** + * wdtpci_get_temperature: + * + * Reports the temperature in degrees Fahrenheit. The API is in + * farenheit. It was designed by an imperial measurement luddite. + */ + +static int wdtpci_get_temperature(int *temperature) +{ + unsigned short c=inb_p(WDT_RT); + + *temperature = (c * 11 / 15) + 7; + return 0; } +#endif /* CONFIG_WDT_501_PCI */ /** * wdtpci_interrupt: @@ -168,58 +289,38 @@ * Read the status register see what is up and * then printk it. */ - unsigned char status=inb_p(WDT_SR); - status|=FEATUREMAP1; - status&=~FEATUREMAP2; - - printk(KERN_CRIT "WDT status %d\n", status); + printk(KERN_CRIT PFX "status %d\n", status); - if(!(status&WDC_SR_TGOOD)) - printk(KERN_CRIT "Overheat alarm.(%d)\n",inb_p(WDT_RT)); - if(!(status&WDC_SR_PSUOVER)) - printk(KERN_CRIT "PSU over voltage.\n"); - if(!(status&WDC_SR_PSUUNDR)) - printk(KERN_CRIT "PSU under voltage.\n"); - if(!(status&WDC_SR_FANGOOD)) - printk(KERN_CRIT "Possible fan fault.\n"); - if(!(status&WDC_SR_WCCR)) +#ifdef CONFIG_WDT_501_PCI + if (!(status & WDC_SR_TGOOD)) + printk(KERN_CRIT PFX "Overheat alarm.(%d)\n",inb_p(WDT_RT)); + if (!(status & WDC_SR_PSUOVER)) + printk(KERN_CRIT PFX "PSU over voltage.\n"); + if (!(status & WDC_SR_PSUUNDR)) + printk(KERN_CRIT PFX "PSU under voltage.\n"); + if (tachometer) { + if (!(status & WDC_SR_FANGOOD)) + printk(KERN_CRIT PFX "Possible fan fault.\n"); + } +#endif /* CONFIG_WDT_501_PCI */ + if (!(status&WDC_SR_WCCR)) #ifdef SOFTWARE_REBOOT #ifdef ONLY_TESTING - printk(KERN_CRIT "Would Reboot.\n"); + printk(KERN_CRIT PFX "Would Reboot.\n"); #else - printk(KERN_CRIT "Initiating system reboot.\n"); + printk(KERN_CRIT PFX "Initiating system reboot.\n"); machine_restart(NULL); #endif #else - printk(KERN_CRIT "Reset in 5ms.\n"); + printk(KERN_CRIT PFX "Reset in 5ms.\n"); #endif return IRQ_HANDLED; } /** - * wdtpci_ping: - * - * Reload counter one with the watchdog timeout. We don't bother reloading - * the cascade counter. - */ - -static void wdtpci_ping(void) -{ - unsigned long flags; - - /* Write a watchdog value */ - spin_lock_irqsave(&wdtpci_lock, flags); - inb_p(WDT_DC); - wdtpci_ctr_mode(1,2); - wdtpci_ctr_load(1,wd_margin); /* Timeout */ - outb_p(0, WDT_DC); - spin_unlock_irqrestore(&wdtpci_lock, flags); -} - -/** * wdtpci_write: * @file: file handle to the watchdog * @buf: buffer to write (unused as data does not matter here @@ -257,40 +358,6 @@ } /** - * wdtpci_read: - * @file: file handle to the watchdog board - * @buf: buffer to write 1 byte into - * @count: length of buffer - * @ptr: offset (no seek allowed) - * - * Read reports the temperature in degrees Fahrenheit. The API is in - * fahrenheit. It was designed by an imperial measurement luddite. - */ - -static ssize_t wdtpci_read(struct file *file, char *buf, size_t count, loff_t *ptr) -{ - unsigned short c=inb_p(WDT_RT); - unsigned char cp; - - /* Can't seek (pread) on this device */ - if (ptr != &file->f_pos) - return -ESPIPE; - - switch(iminor(file->f_dentry->d_inode)) - { - case TEMP_MINOR: - c*=11; - c/=15; - cp=c+7; - if(copy_to_user(buf,&cp,1)) - return -EFAULT; - return 1; - default: - return -EINVAL; - } -} - -/** * wdtpci_ioctl: * @inode: inode of the device * @file: file handle to the device @@ -305,17 +372,25 @@ static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - int new_margin; + int new_heartbeat; + int status; + static struct watchdog_info ident = { - .options = WDIOF_OVERHEAT | WDIOF_POWERUNDER | - WDIOF_POWEROVER | WDIOF_EXTERN1 | - WDIOF_EXTERN2 | WDIOF_FANFAULT | - WDIOF_SETTIMEOUT|WDIOF_MAGICCLOSE, - .firmware_version = 1, - .identity = "WDT500/501PCI", + .options = WDIOF_SETTIMEOUT| + WDIOF_MAGICCLOSE| + WDIOF_KEEPALIVEPING, + .firmware_version = 1, + .identity = "PCI-WDT500/501", }; - ident.options&=WDT_OPTION_MASK; /* Mask down to the card we have */ + /* Add options according to the card we have */ + ident.options |= (WDIOF_EXTERN1|WDIOF_EXTERN2); +#ifdef CONFIG_WDT_501_PCI + ident.options |= (WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER); + if (tachometer) + ident.options |= WDIOF_FANFAULT; +#endif /* CONFIG_WDT_501_PCI */ + switch(cmd) { default: @@ -324,24 +399,24 @@ return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0; case WDIOC_GETSTATUS: - return put_user(wdtpci_status(),(int *)arg); + wdtpci_get_status(&status); + return put_user(status,(int *)arg); case WDIOC_GETBOOTSTATUS: return put_user(0, (int *)arg); case WDIOC_KEEPALIVE: wdtpci_ping(); return 0; case WDIOC_SETTIMEOUT: - if (get_user(new_margin, (int *)arg)) + if (get_user(new_heartbeat, (int *)arg)) return -EFAULT; - /* Arbitrary, can't find the card's limits */ - new_margin *= 100; - if ((new_margin < 0) || (new_margin > WD_TIMO_MAX)) + + if (wdtpci_set_heartbeat(new_heartbeat)) return -EINVAL; - wd_margin = new_margin; + wdtpci_ping(); /* Fall */ case WDIOC_GETTIMEOUT: - return put_user(wd_margin / 100, (int *)arg); + return put_user(heartbeat, (int *)arg); } } @@ -350,66 +425,30 @@ * @inode: inode of device * @file: file handle to device * - * One of our two misc devices has been opened. The watchdog device is - * single open and on opening we load the counters. Counter zero is a - * 100Hz cascade, into counter 1 which downcounts to reboot. When the - * counter triggers counter 2 downcounts the length of the reset pulse - * which set set to be as long as possible. + * The watchdog device has been opened. The watchdog device is single + * open and on opening we load the counters. Counter zero is a 100Hz + * cascade, into counter 1 which downcounts to reboot. When the counter + * triggers counter 2 downcounts the length of the reset pulse which + * set set to be as long as possible. */ static int wdtpci_open(struct inode *inode, struct file *file) { - unsigned long flags; + if (down_trylock(&open_sem)) + return -EBUSY; - switch(iminor(inode)) - { - case WATCHDOG_MINOR: - if (down_trylock(&open_sem)) - return -EBUSY; - - if (nowayout) { - __module_get(THIS_MODULE); - } - /* - * Activate - */ - spin_lock_irqsave(&wdtpci_lock, flags); - - inb_p(WDT_DC); /* Disable */ - - /* - * "pet" the watchdog, as Access says. - * This resets the clock outputs. - */ - - wdtpci_ctr_mode(2,0); - outb_p(0, WDT_DC); - - inb_p(WDT_DC); - - outb_p(0, WDT_CLOCK); /* 2.0833MHz clock */ - inb_p(WDT_BUZZER); /* disable */ - inb_p(WDT_OPTONOTRST); /* disable */ - inb_p(WDT_OPTORST); /* disable */ - inb_p(WDT_PROGOUT); /* disable */ - wdtpci_ctr_mode(0,3); - wdtpci_ctr_mode(1,2); - wdtpci_ctr_mode(2,1); - wdtpci_ctr_load(0,20833); /* count at 100Hz */ - wdtpci_ctr_load(1,wd_margin);/* Timeout 60 seconds */ - /* DO NOT LOAD CTR2 on PCI card! -- JPN */ - outb_p(0, WDT_DC); /* Enable */ - spin_unlock_irqrestore(&wdtpci_lock, flags); - return 0; - case TEMP_MINOR: - return 0; - default: - return -ENODEV; + if (nowayout) { + __module_get(THIS_MODULE); } + /* + * Activate + */ + wdtpci_start(); + return 0; } /** - * wdtpci_close: + * wdtpci_release: * @inode: inode to board * @file: file handle to board * @@ -422,24 +461,73 @@ static int wdtpci_release(struct inode *inode, struct file *file) { - - if (iminor(inode)==WATCHDOG_MINOR) { - unsigned long flags; - if (expect_close == 42) { - spin_lock_irqsave(&wdtpci_lock, flags); - inb_p(WDT_DC); /* Disable counters */ - wdtpci_ctr_load(2,0); /* 0 length reset pulses now */ - spin_unlock_irqrestore(&wdtpci_lock, flags); - } else { - printk(KERN_CRIT PFX "Unexpected close, not stopping timer!"); - wdtpci_ping(); - } - expect_close = 0; - up(&open_sem); + if (expect_close == 42) { + wdtpci_stop(); + } else { + printk(KERN_CRIT PFX "Unexpected close, not stopping timer!"); + wdtpci_ping(); } + expect_close = 0; + up(&open_sem); return 0; } +#ifdef CONFIG_WDT_501_PCI +/** + * wdtpci_temp_read: + * @file: file handle to the watchdog board + * @buf: buffer to write 1 byte into + * @count: length of buffer + * @ptr: offset (no seek allowed) + * + * Read reports the temperature in degrees Fahrenheit. The API is in + * fahrenheit. It was designed by an imperial measurement luddite. + */ + +static ssize_t wdtpci_temp_read(struct file *file, char *buf, size_t count, loff_t *ptr) +{ + int temperature; + + /* Can't seek (pread) on this device */ + if (ptr != &file->f_pos) + return -ESPIPE; + + if (wdtpci_get_temperature(&temperature)) + return -EFAULT; + + if (copy_to_user (buf, &temperature, 1)) + return -EFAULT; + + return 1; +} + +/** + * wdtpci_temp_open: + * @inode: inode of device + * @file: file handle to device + * + * The temperature device has been opened. + */ + +static int wdtpci_temp_open(struct inode *inode, struct file *file) +{ + return 0; +} + +/** + * wdtpci_temp_release: + * @inode: inode to board + * @file: file handle to board + * + * The temperature device has been closed. + */ + +static int wdtpci_temp_release(struct inode *inode, struct file *file) +{ + return 0; +} +#endif /* CONFIG_WDT_501_PCI */ + /** * notify_sys: * @this: our notifier block @@ -455,14 +543,9 @@ static int wdtpci_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { - unsigned long flags; - if (code==SYS_DOWN || code==SYS_HALT) { /* Turn the card off */ - spin_lock_irqsave(&wdtpci_lock, flags); - inb_p(WDT_DC); - wdtpci_ctr_load(2,0); - spin_unlock_irqrestore(&wdtpci_lock, flags); + wdtpci_stop(); } return NOTIFY_DONE; } @@ -475,7 +558,6 @@ static struct file_operations wdtpci_fops = { .owner = THIS_MODULE, .llseek = no_llseek, - .read = wdtpci_read, .write = wdtpci_write, .ioctl = wdtpci_ioctl, .open = wdtpci_open, @@ -489,12 +571,20 @@ }; #ifdef CONFIG_WDT_501_PCI +static struct file_operations wdtpci_temp_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .read = wdtpci_temp_read, + .open = wdtpci_temp_open, + .release = wdtpci_temp_release, +}; + static struct miscdevice temp_miscdev = { .minor = TEMP_MINOR, .name = "temperature", - .fops = &wdtpci_fops, + .fops = &wdtpci_temp_fops, }; -#endif +#endif /* CONFIG_WDT_501_PCI */ /* * The WDT card needs to learn about soft shutdowns in order to @@ -509,71 +599,96 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev, const struct pci_device_id *ent) { - static int dev_count = 0; int ret = -EIO; dev_count++; if (dev_count > 1) { - printk (KERN_ERR PFX - "this driver only supports 1 device\n"); + printk (KERN_ERR PFX "this driver only supports 1 device\n"); return -ENODEV; } - if (pci_enable_device (dev)) - goto out; + if (pci_enable_device (dev)) { + printk (KERN_ERR PFX "Not possible to enable PCI Device\n"); + return -ENODEV; + } + + if (pci_resource_start (dev, 2) == 0x0000) { + printk (KERN_ERR PFX "No I/O-Address for card detected\n"); + ret = -ENODEV; + goto out_pci; + } sema_init(&open_sem, 1); spin_lock_init(&wdtpci_lock); irq = dev->irq; io = pci_resource_start (dev, 2); - printk ("WDT501-P(PCI-WDG-CSM) driver 0.07 at %X " - "(Interrupt %d)\n", io, irq); - if (request_region (io, 16, "wdt-pci") == NULL) { - printk (KERN_ERR PFX "I/O %d is not free.\n", io); - goto out; + if (request_region (io, 16, "wdt_pci") == NULL) { + printk (KERN_ERR PFX "I/O address 0x%04x already in use\n", io); + goto out_pci; } if (request_irq (irq, wdtpci_interrupt, SA_INTERRUPT | SA_SHIRQ, - "wdt-pci", &wdtpci_miscdev)) { - printk (KERN_ERR PFX "IRQ %d is not free.\n", irq); + "wdt_pci", &wdtpci_miscdev)) { + printk (KERN_ERR PFX "IRQ %d is not free\n", irq); goto out_reg; } - ret = misc_register (&wdtpci_miscdev); - if (ret) { - printk (KERN_ERR PFX "can't misc_register on minor=%d\n", WATCHDOG_MINOR); - goto out_irq; + printk ("PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n", + io, irq); + + /* Check that the heartbeat value is within it's range ; if not reset to the default */ + if (wdtpci_set_heartbeat(heartbeat)) { + wdtpci_set_heartbeat(WD_TIMO); + printk(KERN_INFO PFX "heartbeat value must be 0parent->name, nchan, nchan > 1 ? "s" : "", bsteps); - pmac_low_i2c_unlock(np); return 0; } diff -Nru a/drivers/ide/Kconfig b/drivers/ide/Kconfig --- a/drivers/ide/Kconfig Sun Mar 28 13:12:07 2004 +++ b/drivers/ide/Kconfig Sun Mar 28 13:12:07 2004 @@ -1114,9 +1114,6 @@ config IDEDMA_AUTO def_bool IDEDMA_PCI_AUTO || BLK_DEV_IDEDMA_PMAC_AUTO || IDEDMA_ICS_AUTO -config DMA_NONPCI - def_bool BLK_DEV_TIVO - endif config BLK_DEV_HD_ONLY diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c --- a/drivers/ide/ide-cd.c Sun Mar 28 13:12:07 2004 +++ b/drivers/ide/ide-cd.c Sun Mar 28 13:12:07 2004 @@ -2372,7 +2372,7 @@ /* Now try to get the total cdrom capacity. */ stat = cdrom_get_last_written(cdi, &last_written); - if (!stat && last_written) { + if (!stat && (last_written > toc->capacity)) { toc->capacity = last_written; set_capacity(drive->disk, toc->capacity * sectors_per_frame); } @@ -3510,6 +3510,7 @@ cdrom_read_toc(drive, &sense); g->fops = &idecd_ops; + g->flags |= GENHD_FL_REMOVABLE; add_disk(g); return 0; failed: diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c --- a/drivers/ide/ide-iops.c Sun Mar 28 13:12:07 2004 +++ b/drivers/ide/ide-iops.c Sun Mar 28 13:12:07 2004 @@ -829,10 +829,10 @@ // while (HWGROUP(drive)->busy) // ide_delay_50ms(); -#if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI) +#ifdef CONFIG_BLK_DEV_IDEDMA if (hwif->ide_dma_check) /* check if host supports DMA */ hwif->ide_dma_host_off(drive); -#endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */ +#endif /* * Don't use ide_wait_cmd here - it will @@ -906,14 +906,12 @@ drive->id->dma_mword &= ~0x0F00; drive->id->dma_1word &= ~0x0F00; -#if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI) - if (speed >= XFER_SW_DMA_0) { +#ifdef CONFIG_BLK_DEV_IDEDMA + if (speed >= XFER_SW_DMA_0) hwif->ide_dma_host_on(drive); - } else { - if (hwif->ide_dma_check) /* check if host supports DMA */ - hwif->ide_dma_off_quietly(drive); - } -#endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */ + else if (hwif->ide_dma_check) /* check if host supports DMA */ + hwif->ide_dma_off_quietly(drive); +#endif switch(speed) { case XFER_UDMA_7: drive->id->dma_ultra |= 0x8080; break; diff -Nru a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c --- a/drivers/ide/ide-pnp.c Sun Mar 28 13:12:08 2004 +++ b/drivers/ide/ide-pnp.c Sun Mar 28 13:12:08 2004 @@ -64,7 +64,6 @@ if (index != -1) { printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index); pnp_set_drvdata(dev,hwif); - hwif->pnp_dev = dev; return 0; } diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c Sun Mar 28 13:12:07 2004 +++ b/drivers/ide/ide.c Sun Mar 28 13:12:07 2004 @@ -482,23 +482,14 @@ static struct resource* hwif_request_region(ide_hwif_t *hwif, unsigned long addr, int num) { - struct resource *res; - - if (hwif->mmio) - res = request_mem_region(addr, num, hwif->name); - else - res = request_region(addr, num, hwif->name); + struct resource *res = request_region(addr, num, hwif->name); if (!res) - printk(KERN_ERR "%s: %s resource 0x%lX-0x%lX not free.\n", - hwif->name, hwif->mmio ? "MMIO" : "I/O", - addr, addr+num-1); + printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n", + hwif->name, addr, addr+num-1); return res; } -#define hwif_release_region(addr, num) \ - ((hwif->mmio) ? release_mem_region((addr),(num)) : release_region((addr),(num))) - /** * ide_hwif_request_regions - request resources for IDE * @hwif: interface to use @@ -515,6 +506,7 @@ if (hwif->mmio == 2) return 0; + BUG_ON(hwif->mmio == 1); addr = hwif->io_ports[IDE_CONTROL_OFFSET]; if (addr && !hwif_request_region(hwif, addr, 1)) goto control_region_busy; @@ -530,7 +522,7 @@ addr = hwif->io_ports[i]; if (!hwif_request_region(hwif, addr, 1)) { while (--i) - hwif_release_region(addr, 1); + release_region(addr, 1); goto data_region_busy; } } @@ -539,7 +531,7 @@ data_region_busy: addr = hwif->io_ports[IDE_CONTROL_OFFSET]; if (addr) - hwif_release_region(addr, 1); + release_region(addr, 1); control_region_busy: /* If any errors are return, we drop the hwif interface. */ return -EBUSY; @@ -565,14 +557,14 @@ if (hwif->mmio == 2) return; if (hwif->io_ports[IDE_CONTROL_OFFSET]) - hwif_release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1); + release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1); if (hwif->straight8) { - hwif_release_region(hwif->io_ports[IDE_DATA_OFFSET], 8); + release_region(hwif->io_ports[IDE_DATA_OFFSET], 8); return; } for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) if (hwif->io_ports[i]) - hwif_release_region(hwif->io_ports[i], 1); + release_region(hwif->io_ports[i], 1); } EXPORT_SYMBOL(ide_hwif_release_regions); @@ -745,7 +737,6 @@ unregister_blkdev(hwif->major, hwif->name); spin_lock_irq(&ide_lock); -#if !defined(CONFIG_DMA_NONPCI) if (hwif->dma_base) { (void) ide_release_dma(hwif); @@ -757,7 +748,7 @@ hwif->dma_vendor3 = 0; hwif->dma_prdtable = 0; } -#endif /* !(CONFIG_DMA_NONPCI) */ + old_hwif = *hwif; init_hwif_data(index); /* restore hwif data to pristine status */ hwif->hwgroup = old_hwif.hwgroup; @@ -2432,10 +2423,8 @@ for (index = 0; index < MAX_HWIFS; ++index) { ide_unregister(index); -#if !defined(CONFIG_DMA_NONPCI) if (ide_hwifs[index].dma_base) (void) ide_release_dma(&ide_hwifs[index]); -#endif /* !(CONFIG_DMA_NONPCI) */ } #ifdef CONFIG_PROC_FS diff -Nru a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c --- a/drivers/input/keyboard/maple_keyb.c Sun Mar 28 13:12:07 2004 +++ b/drivers/input/keyboard/maple_keyb.c Sun Mar 28 13:12:07 2004 @@ -1,5 +1,5 @@ /* - * $Id: maple_keyb.c,v 1.1 2001/11/02 17:27:32 jsimmons Exp $ + * $Id: maple_keyb.c,v 1.4 2004/03/22 01:18:15 lethal Exp $ * SEGA Dreamcast keyboard driver * Based on drivers/usb/usbkbd.c */ @@ -125,8 +125,11 @@ kbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP); + init_input_dev(&kbd->dev); + for (i=0; i<255; i++) set_bit(dc_kbd_keycode[i], kbd->dev.keybit); + clear_bit(0, kbd->dev.keybit); kbd->dev.private = kbd; @@ -141,10 +144,7 @@ maple_getcond_callback(dev, dc_kbd_callback, 1, MAPLE_FUNC_KEYBOARD); - printk(KERN_INFO "input%d: keyboard(0x%lx): %s\n", - kbd->dev.number, data, kbd->dev.name); - - MOD_INC_USE_COUNT; + printk(KERN_INFO "input: keyboard(0x%lx): %s\n", data, kbd->dev.name); return 0; } @@ -155,10 +155,7 @@ struct dc_kbd *kbd = dev->private_data; input_unregister_device(&kbd->dev); - kfree(kbd); - - MOD_DEC_USE_COUNT; } diff -Nru a/drivers/input/mouse/maplemouse.c b/drivers/input/mouse/maplemouse.c --- a/drivers/input/mouse/maplemouse.c Sun Mar 28 13:12:08 2004 +++ b/drivers/input/mouse/maplemouse.c Sun Mar 28 13:12:08 2004 @@ -1,5 +1,5 @@ /* - * $Id: maplemouse.c,v 1.1 2001/11/02 17:27:32 jsimmons Exp $ + * $Id: maplemouse.c,v 1.2 2004/03/22 01:18:15 lethal Exp $ * SEGA Dreamcast mouse driver * Based on drivers/usb/usbmouse.c */ @@ -74,22 +74,21 @@ mouse->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); mouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL); + init_input_dev(&mouse->dev); + mouse->dev.private = mouse; mouse->dev.open = dc_mouse_open; mouse->dev.close = dc_mouse_close; mouse->dev.event = NULL; mouse->dev.name = dev->product_name; - mouse->dev.idbus = BUS_MAPLE; + mouse->dev.id.bustype = BUS_MAPLE; input_register_device(&mouse->dev); maple_getcond_callback(dev, dc_mouse_callback, 1, MAPLE_FUNC_MOUSE); - printk(KERN_INFO "input%d: mouse(0x%lx): %s\n", - mouse->dev.number, data, mouse->dev.name); - - MOD_INC_USE_COUNT; + printk(KERN_INFO "input: mouse(0x%lx): %s\n", data, mouse->dev.name); return 0; } @@ -100,10 +99,7 @@ struct dc_mouse *mouse = dev->private_data; input_unregister_device(&mouse->dev); - kfree(mouse); - - MOD_DEC_USE_COUNT; } diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c --- a/drivers/input/serio/i8042.c Sun Mar 28 13:12:07 2004 +++ b/drivers/input/serio/i8042.c Sun Mar 28 13:12:07 2004 @@ -722,6 +722,14 @@ } /* + * If the chip is configured into nontranslated mode by the BIOS, don't + * bother enabling translating and be happy. + */ + + if (~i8042_ctr & I8042_CTR_XLATE) + i8042_direct = 1; + +/* * Set nontranslated mode for the kbd interface if requested by an option. * After this the kbd interface becomes a simple serial in/out, like the aux * interface is. We don't do this by default, since it can confuse notebook diff -Nru a/drivers/isdn/hardware/eicon/adapter.h b/drivers/isdn/hardware/eicon/adapter.h --- a/drivers/isdn/hardware/eicon/adapter.h Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/adapter.h Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: adapter.h,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $ */ +/* $Id: adapter.h,v 1.4 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVA_USER_MODE_IDI_ADAPTER_H__ #define __DIVA_USER_MODE_IDI_ADAPTER_H__ @@ -6,10 +6,10 @@ #define DIVA_UM_IDI_ADAPTER_REMOVED 0x00000001 typedef struct _diva_um_idi_adapter { - diva_entity_link_t link; + struct list_head link; DESCRIPTOR d; int adapter_nr; - diva_entity_queue_t entity_q; /* entities linked to this adapter */ + struct list_head entity_q; /* entities linked to this adapter */ dword status; } diva_um_idi_adapter_t; diff -Nru a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c --- a/drivers/isdn/hardware/eicon/capifunc.c Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/capifunc.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: capifunc.c,v 1.48 2004/01/11 19:20:54 armin Exp $ +/* $Id: capifunc.c,v 1.60 2004/03/22 16:28:27 armin Exp $ * * ISDN interface module for Eicon active cards DIVA. * CAPI Interface common functions @@ -39,9 +39,9 @@ extern word api_put(APPL *, CAPI_MSG *); static diva_os_spin_lock_t api_lock; -static diva_os_spin_lock_t ll_lock; -static diva_card *cards; +static LIST_HEAD(cards); + static dword notify_handle; static void DIRequest(ENTITY * e); static DESCRIPTOR MAdapter; @@ -152,26 +152,15 @@ static int find_free_id(void) { int num = 0; - diva_card *p; - diva_os_spin_lock_magic_t old_irql; + DIVA_CAPI_ADAPTER *a; - diva_os_enter_spin_lock(&ll_lock, &old_irql, "find free id"); - while (num < 100) { - num++; - p = cards; - while (p) { - if (p->Id == num) + while (num < MAX_DESCRIPTORS) { + a = &adapter[num]; + if (!a->Id) break; - p = p->next; - } - if(!p) { - diva_os_leave_spin_lock(&ll_lock, &old_irql, - "find free id"); - return (num); - } + num++; } - diva_os_leave_spin_lock(&ll_lock, &old_irql, "find free id"); - return (999); + return(num + 1); } /* @@ -179,21 +168,17 @@ */ static diva_card *find_card_by_ctrl(word controller) { - diva_card *p; - diva_os_spin_lock_magic_t old_irql; - - diva_os_enter_spin_lock(&ll_lock, &old_irql, "find card ctrl"); - p = cards; + struct list_head *tmp; + diva_card *card; - while (p) { - if (ControllerMap[p->Id] == controller) { - diva_os_leave_spin_lock(&ll_lock, &old_irql, - "find card ctrl"); - return p; + list_for_each(tmp, &cards) { + card = list_entry(tmp, diva_card, list); + if (ControllerMap[card->Id] == controller) { + if (card->remove_in_progress) + card = NULL; + return(card); } - p = p->next; } - diva_os_leave_spin_lock(&ll_lock, &old_irql, "find card ctrl"); return (diva_card *) 0; } @@ -358,28 +343,18 @@ /* * cleanup adapter */ -static void clean_adapter(int id) +static void clean_adapter(int id, struct list_head *free_mem_q) { DIVA_CAPI_ADAPTER *a; -#if IMPLEMENT_LINE_INTERCONNECT2 int i, k; -#endif /* IMPLEMENT_LINE_INTERCONNECT2 */ a = &adapter[id]; -#if IMPLEMENT_LINE_INTERCONNECT - if (a->li_pri) { - if (a->li_config.pri) - diva_os_free(0, a->li_config.pri); - } else { - if (a->li_config.bri) - diva_os_free(0, a->li_config.bri); - } -#endif /* IMPLEMENT_LINE_INTERCONNECT */ -#if IMPLEMENT_LINE_INTERCONNECT2 k = li_total_channels - a->li_channels; if (k == 0) { - diva_os_free(0, li_config_table); + if (li_config_table) { + list_add((struct list_head *)li_config_table, free_mem_q); li_config_table = NULL; + } } else { if (a->li_base < k) { memmove(&li_config_table[a->li_base], @@ -401,9 +376,8 @@ if (adapter[i].request) adapter[i].li_base -= a->li_channels; } -#endif /* IMPLEMENT_LINE_INTERCONNECT2 */ if (a->plci) - diva_os_free(0, a->plci); + list_add((struct list_head *)a->plci, free_mem_q); memset(a, 0x00, sizeof(DIVA_CAPI_ADAPTER)); while ((max_adapter != 0) && !adapter[max_adapter - 1].request) @@ -411,67 +385,85 @@ } /* - * remove cards + * remove a card, but ensures consistent state of LI tables + * in the time adapter is removed */ -static void DIVA_EXIT_FUNCTION divacapi_remove_cards(void) +static void divacapi_remove_card(DESCRIPTOR * d) { - diva_card *last; - diva_card *card; + diva_card *card = NULL; diva_os_spin_lock_magic_t old_irql; + LIST_HEAD(free_mem_q); + struct list_head *link; + struct list_head *tmp; + + /* + * Set "remove in progress flag". + * Ensures that there is no call from sendf to CAPI in + * the time CAPI controller is about to be removed. + */ + diva_os_enter_spin_lock(&api_lock, &old_irql, "remove card"); + list_for_each(tmp, &cards) { + card = list_entry(tmp, diva_card, list); + if (card->d.request == d->request) { + card->remove_in_progress = 1; + list_del(tmp); + break; + } + } + diva_os_leave_spin_lock(&api_lock, &old_irql, "remove card"); - diva_os_enter_spin_lock(&ll_lock, &old_irql, "remove cards"); - card = cards; - - while (card) { + if (card) { + /* + * Detach CAPI. Sendf cannot call to CAPI any more. + * After detach no call to send_message() is done too. + */ detach_capi_ctr(&card->capi_ctrl); - clean_adapter(card->Id - 1); - DBG_TRC(("adapter remove, max_adapter=%d", max_adapter)); - card = card->next; - } - card = cards; - while (card) { - last = card; - card = card->next; - diva_os_free(0, last); + /* + * Now get API lock (to ensure stable state of LI tables) + * and update the adapter map/LI table. + */ + diva_os_enter_spin_lock(&api_lock, &old_irql, "remove card"); + + clean_adapter(card->Id - 1, &free_mem_q); + DBG_TRC(("DelAdapterMap (%d) -> (%d)", + ControllerMap[card->Id], card->Id)) + ControllerMap[card->Id] = 0; + DBG_TRC(("adapter remove, max_adapter=%d", + max_adapter)); + diva_os_leave_spin_lock(&api_lock, &old_irql, "remove card"); + + /* After releasing the lock, we can free the memory */ + diva_os_free (0, card); + } + + /* free queued memory areas */ + list_for_each_safe(link, tmp, &free_mem_q) { + list_del(link); + diva_os_free(0, link); } - diva_os_leave_spin_lock(&ll_lock, &old_irql, "remove cards"); } /* - * remove a card + * remove cards */ -static void divacapi_remove_card(DESCRIPTOR * d) +static void divacapi_remove_cards(void) { - diva_card *last; + DESCRIPTOR d; + struct list_head *tmp; diva_card *card; diva_os_spin_lock_magic_t old_irql; - diva_os_enter_spin_lock(&ll_lock, &old_irql, "remove card"); - last = card = cards; - while (card) { - if (card->d.request == d->request) { - detach_capi_ctr(&card->capi_ctrl); - clean_adapter(card->Id - 1); - DBG_TRC( - ("DelAdapterMap (%d) -> (%d)", - ControllerMap[card->Id], card->Id)) - ControllerMap[card->Id] = 0; - DBG_TRC( - ("adapter remove, max_adapter=%d", - max_adapter)); - if (card == last) - cards = card->next; - else - last->next = card->next; - - diva_os_free(0, card); - break; - } - last = card; - card = card->next; +rescan: + diva_os_enter_spin_lock(&api_lock, &old_irql, "remove cards"); + list_for_each(tmp, &cards) { + card = list_entry(tmp, diva_card, list); + diva_os_leave_spin_lock(&api_lock, &old_irql, "remove cards"); + d.request = card->d.request; + divacapi_remove_card(&d); + goto rescan; } - diva_os_leave_spin_lock(&ll_lock, &old_irql, "remove card"); + diva_os_leave_spin_lock(&api_lock, &old_irql, "remove cards"); } /* @@ -500,10 +492,9 @@ DIVA_CAPI_ADAPTER *a = NULL; IDI_SYNC_REQ sync_req; char serial[16]; -#if IMPLEMENT_LINE_INTERCONNECT2 + void* mem_to_free; LI_CONFIG *new_li_config_table; int j; -#endif /* IMPLEMENT_LINE_INTERCONNECT2 */ if (!(card = (diva_card *) diva_os_malloc(0, sizeof(diva_card)))) { DBG_ERR(("diva_add_card: failed to allocate card struct.")) @@ -529,7 +520,11 @@ diva_os_free(0, card); return (0); } + + diva_os_enter_spin_lock(&api_lock, &old_irql, "find id"); card->Id = find_free_id(); + diva_os_leave_spin_lock(&api_lock, &old_irql, "find id"); + strlcpy(ctrl->manu, M_COMPANY, sizeof(ctrl->manu)); ctrl->version.majorversion = 2; ctrl->version.minorversion = 0; @@ -600,9 +595,7 @@ #if IMPLEMENT_DTMF a->profile.Global_Options |= 0x8; #endif /* IMPLEMENT_DTMF */ -#if (IMPLEMENT_LINE_INTERCONNECT || IMPLEMENT_LINE_INTERCONNECT2) - a->profile.Global_Options |= 0x80; -#endif /* (IMPLEMENT_LINE_INTERCONNECT || IMPLEMENT_LINE_INTERCONNECT2) */ + a->profile.Global_Options |= 0x80; /* Line Interconnect */ #if IMPLEMENT_ECHO_CANCELLER a->profile.Global_Options |= 0x100; #endif /* IMPLEMENT_ECHO_CANCELLER */ @@ -620,25 +613,6 @@ a->manufacturer_features = 0; } -#if IMPLEMENT_LINE_INTERCONNECT - a->li_pri = (a->profile.Channels > 2); - if (a->li_pri) { - if (!(a->li_config.pri = (LI_CONFIG_PRI *) diva_os_malloc(0, sizeof(LI_CONFIG_PRI)))) { - DBG_ERR(("diva_add_card: failed alloc li_config.pri struct.")) - memset(a, 0, sizeof(DIVA_CAPI_ADAPTER)); - return (0); - } - memset(a->li_config.pri, 0, sizeof(LI_CONFIG_PRI)); - } else - if (!(a->li_config.bri = (LI_CONFIG_BRI *) diva_os_malloc(0, sizeof(LI_CONFIG_BRI)))) { - DBG_ERR(("diva_add_card: failed alloc li_config.bri struct.")) - memset(a, 0, sizeof(DIVA_CAPI_ADAPTER)); - return (0); - } - memset(a->li_config.bri, 0, sizeof(LI_CONFIG_BRI)); - } -#endif /* IMPLEMENT_LINE_INTERCONNECT */ -#if IMPLEMENT_LINE_INTERCONNECT2 a->li_pri = (a->profile.Channels > 2); a->li_channels = a->li_pri ? MIXER_CHANNELS_PRI : MIXER_CHANNELS_BRI; a->li_base = 0; @@ -654,6 +628,10 @@ memset(a, 0, sizeof(DIVA_CAPI_ADAPTER)); return (0); } + + /* Prevent access to line interconnect table in process update */ + diva_os_enter_spin_lock(&api_lock, &old_irql, "add card"); + j = 0; for (i = 0; i < k; i++) { if ((i >= a->li_base) && (i < a->li_base + a->li_channels)) @@ -694,25 +672,26 @@ } li_total_channels = k; - if (li_config_table != NULL) - diva_os_free(0, li_config_table); + mem_to_free = li_config_table; li_config_table = new_li_config_table; for (i = card->Id; i < max_adapter; i++) { if (adapter[i].request) adapter[i].li_base += a->li_channels; } -#endif /* IMPLEMENT_LINE_INTERCONNECT2 */ if (a == &adapter[max_adapter]) max_adapter++; - diva_os_enter_spin_lock(&ll_lock, &old_irql, "add card"); - card->next = cards; - cards = card; - diva_os_leave_spin_lock(&ll_lock, &old_irql, "add card"); - + list_add(&(card->list), &cards); AutomaticLaw(a); + + diva_os_leave_spin_lock(&api_lock, &old_irql, "add card"); + + if (mem_to_free) { + diva_os_free (0, mem_to_free); + } + i = 0; while (i++ < 30) { if (a->automatic_law > 3) @@ -863,6 +842,7 @@ { diva_os_spin_lock_magic_t old_irql; APPL *this = &application[appl - 1]; + void *mem_to_free = NULL; DBG_TRC(("application %d(%d) cleanup", this->Id, appl)) @@ -874,13 +854,15 @@ diva_os_enter_spin_lock(&api_lock, &old_irql, "release_appl"); if (this->Id) { CapiRelease(this->Id); - if (this->DataNCCI) - diva_os_free(0, this->DataNCCI); + mem_to_free = this->DataNCCI; this->DataNCCI = NULL; this->Id = 0; } diva_os_leave_spin_lock(&api_lock, &old_irql, "release_appl"); + if (mem_to_free) + diva_os_free(0, mem_to_free); + } /* @@ -906,6 +888,11 @@ } DBG_PRV1(("Write - appl = %d, cmd = 0x%x", this->Id, command)) + if (card->remove_in_progress) { + DBG_ERR(("CAPI_SEND_MSG - remove in progress!")) + return CAPI_REGOSRESOURCEERR; + } + if (!this->Id) { return CAPI_ILLAPPNR; } @@ -1163,11 +1150,30 @@ } /* + * api_remove_start + */ +static void do_api_remove_start(void) +{ + diva_os_spin_lock_magic_t old_irql; + int ret = 1, count = 100; + + do { + diva_os_enter_spin_lock(&api_lock, &old_irql, "api remove start"); + ret = api_remove_start(); + diva_os_leave_spin_lock(&api_lock, &old_irql, "api remove start"); + + diva_os_sleep(10); + } while (ret && count--); + + if (ret) + DBG_ERR(("could not remove signaling ID's")) +} + +/* * init */ int DIVA_INIT_FUNCTION init_capifunc(void) { - diva_os_initialize_spin_lock(&ll_lock, "capifunc"); diva_os_initialize_spin_lock(&api_lock, "capifunc"); memset(ControllerMap, 0, MAX_DESCRIPTORS + 1); max_adapter = 0; @@ -1175,12 +1181,16 @@ if (!init_main_structs()) { DBG_ERR(("init: failed to init main structs.")) + diva_os_destroy_spin_lock(&api_lock, "capifunc"); return (0); } if (!divacapi_connect_didd()) { DBG_ERR(("init: failed to connect to DIDD.")) + do_api_remove_start(); + divacapi_remove_cards(); remove_main_structs(); + diva_os_destroy_spin_lock(&api_lock, "capifunc"); return (0); } @@ -1192,21 +1202,9 @@ */ void DIVA_EXIT_FUNCTION finit_capifunc(void) { - int count = 100; - word ret = 1; - - while (ret && count--) { - ret = api_remove_start(); - diva_os_sleep(10); - } - if (ret) - DBG_ERR(("could not remove signaling ID's")) - + do_api_remove_start(); divacapi_disconnect_didd(); divacapi_remove_cards(); - remove_main_structs(); - diva_os_destroy_spin_lock(&api_lock, "capifunc"); - diva_os_destroy_spin_lock(&ll_lock, "capifunc"); } diff -Nru a/drivers/isdn/hardware/eicon/capifunc.h b/drivers/isdn/hardware/eicon/capifunc.h --- a/drivers/isdn/hardware/eicon/capifunc.h Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/capifunc.h Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: capifunc.h,v 1.10 2003/08/25 10:06:37 schindler Exp $ +/* $Id: capifunc.h,v 1.11 2004/03/20 17:19:58 armin Exp $ * * ISDN interface module for Eicon active cards DIVA. * CAPI Interface common functions @@ -24,8 +24,9 @@ extern char DRIVERRELEASE_CAPI[]; typedef struct _diva_card { + struct list_head list; + int remove_in_progress; int Id; - struct _diva_card *next; struct capi_ctr capi_ctrl; DIVA_CAPI_ADAPTER *adapter; DESCRIPTOR d; diff -Nru a/drivers/isdn/hardware/eicon/diva.c b/drivers/isdn/hardware/eicon/diva.c --- a/drivers/isdn/hardware/eicon/diva.c Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/diva.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: diva.c,v 1.17 2003/09/09 06:52:01 schindler Exp $ */ +/* $Id: diva.c,v 1.21 2004/03/21 17:30:25 armin Exp $ */ #define CARDTYPE_H_WANT_DATA 1 #define CARDTYPE_H_WANT_IDI_DATA 0 @@ -8,7 +8,6 @@ #include "platform.h" #include "debuglib.h" #include "cardtype.h" -#include "dlist.h" #include "pc.h" #include "di_defs.h" #include "di.h" @@ -75,14 +74,9 @@ struct pt_regs; /* - * include queue functions - */ -#include "dlist.c" - -/* ** LOCALS */ -diva_entity_queue_t adapter_queue; +static LIST_HEAD(adapter_queue); typedef struct _diva_get_xlog { word command; @@ -158,6 +152,16 @@ return (0); } +static diva_os_xdi_adapter_t *diva_q_get_next(struct list_head * what) +{ + diva_os_xdi_adapter_t *a = NULL; + + if (what && !list_empty(what)) + a = list_entry(what->next, diva_os_xdi_adapter_t, link); + + return(a); +} + /* -------------------------------------------------------------------------- Add card to the card list -------------------------------------------------------------------------- */ @@ -204,7 +208,7 @@ diva_os_enter_spin_lock(&adapter_lock, &old_irql, "add card"); pa = pdiva; for (j = 1; j < nr; j++) { /* slave adapters, if any */ - pa = (diva_os_xdi_adapter_t *) diva_q_get_next(&pa->link); + pa = diva_q_get_next(&pa->link); if (pa && !pa->interface.cleanup_adapter_proc) { pa->controller = i + 1 + j; pa->xdi_adapter.ANum = pa->controller; @@ -246,7 +250,6 @@ int divasa_xdi_driver_entry(void) { diva_os_initialize_spin_lock(&adapter_lock, "adapter"); - diva_q_init(&adapter_queue); memset(&IoAdapters[0], 0x00, sizeof(IoAdapters)); diva_init_request_array(); @@ -259,12 +262,14 @@ static diva_os_xdi_adapter_t *get_and_remove_from_queue(void) { diva_os_spin_lock_magic_t old_irql; - diva_os_xdi_adapter_t *a; + diva_os_xdi_adapter_t *a = NULL; diva_os_enter_spin_lock(&adapter_lock, &old_irql, "driver_unload"); - if ((a = (diva_os_xdi_adapter_t *) diva_q_get_head(&adapter_queue))) - diva_q_remove(&adapter_queue, &a->link); + if (!list_empty(&adapter_queue)) { + a = list_entry(adapter_queue.next, diva_os_xdi_adapter_t, link); + list_del(adapter_queue.next); + } diva_os_leave_spin_lock(&adapter_lock, &old_irql, "driver_unload"); return (a); @@ -286,7 +291,7 @@ diva_os_enter_spin_lock(&adapter_lock, &old_irql, "remode adapter"); for (i = 1; i < 4; i++) { - if ((pa = (diva_os_xdi_adapter_t *) diva_q_get_next(&pa->link)) + if ((pa = diva_q_get_next(&pa->link)) && !pa->interface.cleanup_adapter_proc) { a[i] = pa; } else { @@ -295,7 +300,7 @@ } for (i = 0; ((i < 4) && a[i]); i++) { - diva_q_remove(&adapter_queue, &a[i]->link); + list_del(&a[i]->link); } diva_os_leave_spin_lock(&adapter_lock, &old_irql, "driver_unload"); @@ -345,12 +350,12 @@ numbers as master adapter */ diva_os_enter_spin_lock(&adapter_lock, &old_irql, "found_pci_card"); - diva_q_add_tail(&adapter_queue, &a->link); + list_add_tail(&a->link, &adapter_queue); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "found_pci_card"); if ((*(pI->init_card)) (a)) { diva_os_enter_spin_lock(&adapter_lock, &old_irql, "found_pci_card"); - diva_q_remove(&adapter_queue, &a->link); + list_del(&a->link); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "found_pci_card"); diva_os_free(0, a); DBG_ERR(("A: can't get adapter resources")); @@ -383,21 +388,14 @@ /* ** Receive and process command from user mode utility */ -static int cmp_adapter_nr(const void *what, const diva_entity_link_t * p) -{ - diva_os_xdi_adapter_t *a = (diva_os_xdi_adapter_t *) p; - dword nr = (dword) (unsigned long) what; - - return (nr != a->controller); -} - void *diva_xdi_open_adapter(void *os_handle, const void *src, int length, divas_xdi_copy_from_user_fn_t cp_fn) { diva_xdi_um_cfg_cmd_t msg; - diva_os_xdi_adapter_t *a; + diva_os_xdi_adapter_t *a = NULL; diva_os_spin_lock_magic_t old_irql; + struct list_head *tmp; if (length < sizeof(diva_xdi_um_cfg_cmd_t)) { DBG_ERR(("A: A(?) open, msg too small (%d < %d)", @@ -409,10 +407,12 @@ return (0); } diva_os_enter_spin_lock(&adapter_lock, &old_irql, "open_adapter"); - a = (diva_os_xdi_adapter_t *) diva_q_find(&adapter_queue, - (void *) (unsigned long) - msg.adapter, - cmp_adapter_nr); + list_for_each(tmp, &adapter_queue) { + a = list_entry(tmp, diva_os_xdi_adapter_t, link); + if (a->controller == (int)msg.adapter) + break; + a = NULL; + } diva_os_leave_spin_lock(&adapter_lock, &old_irql, "open_adapter"); if (!a) { @@ -611,7 +611,7 @@ diva_os_spin_lock_magic_t old_irql; diva_os_enter_spin_lock(&adapter_lock, &old_irql, "add_slave"); - diva_q_add_tail(&adapter_queue, &a->link); + list_add_tail(&a->link, &adapter_queue); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "add_slave"); } diff -Nru a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c --- a/drivers/isdn/hardware/eicon/divasmain.c Sun Mar 28 13:12:07 2004 +++ b/drivers/isdn/hardware/eicon/divasmain.c Sun Mar 28 13:12:07 2004 @@ -1,4 +1,4 @@ -/* $Id: divasmain.c,v 1.48 2004/02/24 17:46:28 armin Exp $ +/* $Id: divasmain.c,v 1.52 2004/03/21 17:26:01 armin Exp $ * * Low level driver for Eicon DIVA Server ISDN cards. * @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -29,7 +30,6 @@ #undef ID_MASK #undef N_DATA #include "pc.h" -#include "dlist.h" #include "di_defs.h" #include "divasync.h" #include "diva.h" @@ -41,7 +41,7 @@ #include "diva_dma.h" #include "diva_pci.h" -static char *main_revision = "$Revision: 1.48 $"; +static char *main_revision = "$Revision: 1.52 $"; static int major; @@ -69,7 +69,7 @@ extern void divasfunc_exit(void); typedef struct _diva_os_thread_dpc { - struct work_struct divas_task; + struct tasklet_struct divas_task; struct work_struct trap_script_task; diva_os_soft_isr_t *psoft_isr; int card_failed; @@ -552,7 +552,7 @@ /* -------------------------------------------------------------------------- DPC framework implementation -------------------------------------------------------------------------- */ -static void diva_os_dpc_proc(void *context) +static void diva_os_dpc_proc(unsigned long context) { diva_os_thread_dpc_t *psoft_isr = (diva_os_thread_dpc_t *) context; diva_os_soft_isr_t *pisr = psoft_isr->psoft_isr; @@ -575,7 +575,7 @@ psoft_isr->callback_context = callback_context; pdpc->psoft_isr = psoft_isr; INIT_WORK(&pdpc->trap_script_task, diva_adapter_trapped, pdpc); - INIT_WORK(&pdpc->divas_task, diva_os_dpc_proc, pdpc); + tasklet_init(&pdpc->divas_task, diva_os_dpc_proc, (unsigned long)pdpc); return (0); } @@ -586,7 +586,7 @@ diva_os_thread_dpc_t *pdpc = (diva_os_thread_dpc_t *) psoft_isr->object; - schedule_work(&pdpc->divas_task); + tasklet_schedule(&pdpc->divas_task); } return (1); @@ -594,14 +594,22 @@ int diva_os_cancel_soft_isr(diva_os_soft_isr_t * psoft_isr) { + if (psoft_isr && psoft_isr->object) { + diva_os_thread_dpc_t *pdpc = + (diva_os_thread_dpc_t *) psoft_isr->object; + tasklet_kill(&pdpc->divas_task); + } return (0); } void diva_os_remove_soft_isr(diva_os_soft_isr_t * psoft_isr) { if (psoft_isr && psoft_isr->object) { + diva_os_thread_dpc_t *pdpc = + (diva_os_thread_dpc_t *) psoft_isr->object; void *mem; + tasklet_kill(&pdpc->divas_task); flush_scheduled_work(); mem = psoft_isr->object; psoft_isr->object = 0; diff -Nru a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c --- a/drivers/isdn/hardware/eicon/divasproc.c Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/divasproc.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: divasproc.c,v 1.18 2003/09/09 06:46:29 schindler Exp $ +/* $Id: divasproc.c,v 1.19 2004/03/21 17:26:01 armin Exp $ * * Low level driver for Eicon DIVA Server ISDN cards. * /proc functions @@ -15,10 +15,10 @@ #include #include #include +#include #include "platform.h" #include "debuglib.h" -#include "dlist.h" #undef ID_MASK #undef N_DATA #include "pc.h" @@ -33,7 +33,6 @@ extern PISDN_ADAPTER IoAdapters[MAX_ADAPTER]; -extern diva_entity_queue_t adapter_queue; extern void divas_get_version(char *); extern void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf); diff -Nru a/drivers/isdn/hardware/eicon/dlist.c b/drivers/isdn/hardware/eicon/dlist.c --- a/drivers/isdn/hardware/eicon/dlist.c Sun Mar 28 13:12:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,76 +0,0 @@ -/* $Id: dlist.c,v 1.6 2003/08/25 16:03:35 schindler Exp $ */ - -#include "platform.h" -#include "dlist.h" - -/* -** Initialize linked list -*/ - -static void diva_q_init(diva_entity_queue_t * q) -{ - memset(q, 0x00, sizeof(*q)); -} - -/* -** Remove element from linked list -*/ -static void diva_q_remove(diva_entity_queue_t * q, diva_entity_link_t * what) -{ - if (!what->prev) { - if ((q->head = what->next)) { - q->head->prev = 0; - } else { - q->tail = 0; - } - } else if (!what->next) { - q->tail = what->prev; - q->tail->next = 0; - } else { - what->prev->next = what->next; - what->next->prev = what->prev; - } - what->prev = what->next = 0; -} - -/* -** Add element to the tail of linked list -*/ -static void diva_q_add_tail(diva_entity_queue_t * q, diva_entity_link_t * what) -{ - what->next = 0; - if (!q->head) { - what->prev = 0; - q->head = q->tail = what; - } else { - what->prev = q->tail; - q->tail->next = what; - q->tail = what; - } -} - -static diva_entity_link_t *diva_q_find(const diva_entity_queue_t * q, - const void *what, diva_q_cmp_fn_t cmp_fn) -{ - diva_entity_link_t *diva_current = q->head; - - while (diva_current) { - if (!(*cmp_fn) (what, diva_current)) { - break; - } - diva_current = diva_current->next; - } - - return (diva_current); -} - -static diva_entity_link_t *diva_q_get_head(diva_entity_queue_t * q) -{ - return (q->head); -} - -static diva_entity_link_t *diva_q_get_next(diva_entity_link_t * what) -{ - return ((what) ? what->next : 0); -} - diff -Nru a/drivers/isdn/hardware/eicon/dlist.h b/drivers/isdn/hardware/eicon/dlist.h --- a/drivers/isdn/hardware/eicon/dlist.h Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,20 +0,0 @@ -/* $Id: dlist.h,v 1.5 2003/08/25 16:03:35 schindler Exp $ */ - -#ifndef __DIVA_LINK_H__ -#define __DIVA_LINK_H__ - -struct _diva_entity_link; -typedef struct _diva_entity_link { - struct _diva_entity_link *prev; - struct _diva_entity_link *next; -} diva_entity_link_t; - -typedef struct _diva_entity_queue { - diva_entity_link_t *head; - diva_entity_link_t *tail; -} diva_entity_queue_t; - -typedef int (*diva_q_cmp_fn_t) (const void *what, - const diva_entity_link_t *); - -#endif diff -Nru a/drivers/isdn/hardware/eicon/entity.h b/drivers/isdn/hardware/eicon/entity.h --- a/drivers/isdn/hardware/eicon/entity.h Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/entity.h Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: entity.h,v 1.1.2.1 2001/02/08 12:25:43 armin Exp $ */ +/* $Id: entity.h,v 1.4 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVAS_USER_MODE_IDI_ENTITY__ #define __DIVAS_USER_MODE_IDI_ENTITY__ @@ -10,7 +10,7 @@ #define DIVA_UM_IDI_ASSIGN_PENDING 0x00000010 typedef struct _divas_um_idi_entity { - diva_entity_link_t link; /* should be first */ + struct list_head link; diva_um_idi_adapter_t* adapter; /* Back to adapter */ ENTITY e; void* os_ref; diff -Nru a/drivers/isdn/hardware/eicon/i4l_idi.c b/drivers/isdn/hardware/eicon/i4l_idi.c --- a/drivers/isdn/hardware/eicon/i4l_idi.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,3135 +0,0 @@ -/* $Id: i4l_idi.c,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $ - * - * ISDN interface module for Eicon active cards. - * I4L - IDI Interface - * - * Copyright 1998-2000 by Armin Schindler (mac@melware.de) - * Copyright 1999-2002 Cytronics & Melware (info@melware.de) - * - * Thanks to Deutsche Mailbox Saar-Lor-Lux GmbH - * for sponsoring and testing fax - * capabilities with Diva Server cards. - * (dor@deutschemailbox.de) - * - * This software may be used and distributed according to the terms - * of the GNU General Public License, incorporated herein by reference. - */ - -#include -#include "i4lididrv.h" - -#undef EICON_FULL_SERVICE_OKTETT - -char *eicon_idi_revision = "$Revision: 1.1.2.2 $"; - -eicon_manifbuf *manbuf; - -static int eicon_idi_manage_assign(eicon_card *card); -static int idi_fill_in_T30(eicon_chan *chan, unsigned char *buffer); - -static int -idi_assign_req(eicon_REQ *reqbuf, int signet, eicon_chan *chan) -{ - int l = 0; - int tmp; - - tmp = 0; - if (!signet) { - /* Signal Layer */ - reqbuf->XBuffer.P[l++] = CAI; - reqbuf->XBuffer.P[l++] = 1; - reqbuf->XBuffer.P[l++] = 0; - reqbuf->XBuffer.P[l++] = KEY; - reqbuf->XBuffer.P[l++] = 3; - reqbuf->XBuffer.P[l++] = 'I'; - reqbuf->XBuffer.P[l++] = '4'; - reqbuf->XBuffer.P[l++] = 'L'; - reqbuf->XBuffer.P[l++] = SHIFT|6; - reqbuf->XBuffer.P[l++] = SIN; - reqbuf->XBuffer.P[l++] = 2; - reqbuf->XBuffer.P[l++] = 0; - reqbuf->XBuffer.P[l++] = 0; - reqbuf->XBuffer.P[l++] = 0; /* end */ - reqbuf->Req = ASSIGN; - reqbuf->ReqCh = 0; - reqbuf->ReqId = DSIG_ID; - reqbuf->XBuffer.length = l; - reqbuf->Reference = 0; /* Sig Entity */ - } - else { - /* Network Layer */ - reqbuf->XBuffer.P[l++] = CAI; - reqbuf->XBuffer.P[l++] = 1; - reqbuf->XBuffer.P[l++] = chan->e.D3Id; - reqbuf->XBuffer.P[l++] = LLC; - reqbuf->XBuffer.P[l++] = 2; - switch(chan->l2prot) { - case ISDN_PROTO_L2_V11096: - case ISDN_PROTO_L2_V11019: - case ISDN_PROTO_L2_V11038: - case ISDN_PROTO_L2_TRANS: - reqbuf->XBuffer.P[l++] = 2; /* transparent */ - break; - case ISDN_PROTO_L2_X75I: - case ISDN_PROTO_L2_X75UI: - case ISDN_PROTO_L2_X75BUI: - reqbuf->XBuffer.P[l++] = 5; /* X.75 */ - break; - case ISDN_PROTO_L2_MODEM: - if (chan->fsm_state == EICON_STATE_IWAIT) - reqbuf->XBuffer.P[l++] = 9; /* V.42 incoming */ - else - reqbuf->XBuffer.P[l++] = 10; /* V.42 */ - break; - case ISDN_PROTO_L2_HDLC: - case ISDN_PROTO_L2_FAX: - if (chan->fsm_state == EICON_STATE_IWAIT) - reqbuf->XBuffer.P[l++] = 3; /* autoconnect on incoming */ - else - reqbuf->XBuffer.P[l++] = 2; /* transparent */ - break; - default: - reqbuf->XBuffer.P[l++] = 1; - } - switch(chan->l3prot) { - case ISDN_PROTO_L3_FCLASS2: -#ifdef CONFIG_ISDN_TTY_FAX - reqbuf->XBuffer.P[l++] = 6; - reqbuf->XBuffer.P[l++] = NLC; - tmp = idi_fill_in_T30(chan, &reqbuf->XBuffer.P[l+1]); - reqbuf->XBuffer.P[l++] = tmp; - l += tmp; - break; -#endif - case ISDN_PROTO_L3_TRANS: - default: - reqbuf->XBuffer.P[l++] = 4; - } - /* Additional DLC element */ - switch(chan->l2prot) { - case ISDN_PROTO_L2_X75I: - case ISDN_PROTO_L2_X75UI: - case ISDN_PROTO_L2_X75BUI: - case ISDN_PROTO_L2_FAX: - reqbuf->XBuffer.P[l++] = DLC; - reqbuf->XBuffer.P[l++] = 2; - reqbuf->XBuffer.P[l++] = (2138 % 256); /* max. info (lo byte) */ - reqbuf->XBuffer.P[l++] = (2138 / 256); /* max. info (hi byte) */ - break; - } - reqbuf->XBuffer.P[l++] = 0; /* end */ - reqbuf->Req = ASSIGN; - reqbuf->ReqCh = 0; - reqbuf->ReqId = NL_ID; - reqbuf->XBuffer.length = l; - reqbuf->Reference = 1; /* Net Entity */ - } - return(0); -} - -static int -idi_put_req(eicon_REQ *reqbuf, int rq, int signet, int Ch) -{ - reqbuf->Req = rq; - reqbuf->ReqCh = Ch; - reqbuf->ReqId = 1; - reqbuf->XBuffer.length = 1; - reqbuf->XBuffer.P[0] = 0; - reqbuf->Reference = signet; - return(0); -} - -static int -idi_put_suspend_req(eicon_REQ *reqbuf, eicon_chan *chan) -{ - reqbuf->Req = SUSPEND; - reqbuf->ReqCh = 0; - reqbuf->ReqId = 1; - reqbuf->XBuffer.P[0] = CAI; - reqbuf->XBuffer.P[1] = 1; - reqbuf->XBuffer.P[2] = chan->No; - reqbuf->XBuffer.P[3] = 0; - reqbuf->XBuffer.length = 4; - reqbuf->Reference = 0; /* Sig Entity */ - return(0); -} - -static int -idi_call_res_req(eicon_REQ *reqbuf, eicon_chan *chan) -{ - int l = 9; - reqbuf->Req = CALL_RES; - reqbuf->ReqCh = 0; - reqbuf->ReqId = 1; - reqbuf->XBuffer.P[0] = CAI; - reqbuf->XBuffer.P[1] = 6; - reqbuf->XBuffer.P[2] = 9; - reqbuf->XBuffer.P[3] = 0; - reqbuf->XBuffer.P[4] = 0; - reqbuf->XBuffer.P[5] = 0; - reqbuf->XBuffer.P[6] = 32; - reqbuf->XBuffer.P[7] = 0; - switch(chan->l2prot) { - case ISDN_PROTO_L2_X75I: - case ISDN_PROTO_L2_X75UI: - case ISDN_PROTO_L2_X75BUI: - case ISDN_PROTO_L2_HDLC: - reqbuf->XBuffer.P[1] = 1; - reqbuf->XBuffer.P[2] = 0x05; - l = 4; - break; - case ISDN_PROTO_L2_V11096: - reqbuf->XBuffer.P[2] = 0x0d; - reqbuf->XBuffer.P[3] = 5; - reqbuf->XBuffer.P[4] = 0; - break; - case ISDN_PROTO_L2_V11019: - reqbuf->XBuffer.P[2] = 0x0d; - reqbuf->XBuffer.P[3] = 6; - reqbuf->XBuffer.P[4] = 0; - break; - case ISDN_PROTO_L2_V11038: - reqbuf->XBuffer.P[2] = 0x0d; - reqbuf->XBuffer.P[3] = 7; - reqbuf->XBuffer.P[4] = 0; - break; - case ISDN_PROTO_L2_MODEM: - /* reqbuf->XBuffer.P[1] = 12; */ - reqbuf->XBuffer.P[2] = 0x11; - reqbuf->XBuffer.P[3] = 9; - reqbuf->XBuffer.P[4] = 0; - reqbuf->XBuffer.P[5] = 0; - reqbuf->XBuffer.P[6] = 32; - reqbuf->XBuffer.P[7] = 0; - break; - case ISDN_PROTO_L2_FAX: - reqbuf->XBuffer.P[2] = 0x10; - reqbuf->XBuffer.P[3] = 0; - reqbuf->XBuffer.P[4] = 0; - reqbuf->XBuffer.P[5] = 0; - reqbuf->XBuffer.P[6] = 32; - reqbuf->XBuffer.P[7] = 0; - break; - case ISDN_PROTO_L2_TRANS: - switch(chan->l3prot) { - case ISDN_PROTO_L3_TRANSDSP: - reqbuf->XBuffer.P[2] = 22; /* DTMF, audio events on */ - } - break; - } - reqbuf->XBuffer.P[l-1] = 0; - reqbuf->XBuffer.length = l; - reqbuf->Reference = 0; /* Sig Entity */ - eicon_log(NULL, 8, "idi_req: Ch%d: Call_Res\n", chan->No); - return(0); -} - -int -idi_do_req(eicon_card *card, eicon_chan *chan, int cmd, int layer) -{ - struct sk_buff *skb; - struct sk_buff *skb2; - eicon_REQ *reqbuf; - eicon_chan_ptr *chan2; - - skb = alloc_skb(270 + sizeof(eicon_REQ), GFP_ATOMIC); - skb2 = alloc_skb(sizeof(eicon_chan_ptr), GFP_ATOMIC); - - if ((!skb) || (!skb2)) { - eicon_log(card, 1, "idi_err: Ch%d: alloc_skb failed in do_req()\n", chan->No); - if (skb) - dev_kfree_skb(skb); - if (skb2) - dev_kfree_skb(skb2); - return -ENOMEM; - } - - chan2 = (eicon_chan_ptr *)skb_put(skb2, sizeof(eicon_chan_ptr)); - chan2->ptr = chan; - - reqbuf = (eicon_REQ *)skb_put(skb, 270 + sizeof(eicon_REQ)); - eicon_log(card, 8, "idi_req: Ch%d: req %x (%s)\n", chan->No, cmd, (layer)?"Net":"Sig"); - if (layer) cmd |= 0x700; - switch(cmd) { - case ASSIGN: - case ASSIGN|0x700: - idi_assign_req(reqbuf, layer, chan); - break; - case REMOVE: - case REMOVE|0x700: - idi_put_req(reqbuf, REMOVE, layer, 0); - break; - case INDICATE_REQ: - idi_put_req(reqbuf, INDICATE_REQ, 0, 0); - break; - case HANGUP: - idi_put_req(reqbuf, HANGUP, 0, 0); - break; - case SUSPEND: - idi_put_suspend_req(reqbuf, chan); - break; - case RESUME: - idi_put_req(reqbuf, RESUME, 0 ,0); - break; - case REJECT: - idi_put_req(reqbuf, REJECT, 0 ,0); - break; - case CALL_ALERT: - idi_put_req(reqbuf, CALL_ALERT, 0, 0); - break; - case CALL_RES: - idi_call_res_req(reqbuf, chan); - break; - case CALL_HOLD: - idi_put_req(reqbuf, CALL_HOLD, 0, 0); - break; - case N_CONNECT|0x700: - idi_put_req(reqbuf, N_CONNECT, 1, 0); - break; - case N_CONNECT_ACK|0x700: - idi_put_req(reqbuf, N_CONNECT_ACK, 1, 0); - break; - case N_DISC|0x700: - idi_put_req(reqbuf, N_DISC, 1, chan->e.IndCh); - break; - case N_DISC_ACK|0x700: - idi_put_req(reqbuf, N_DISC_ACK, 1, chan->e.IndCh); - break; - default: - eicon_log(card, 1, "idi_req: Ch%d: Unknown request\n", chan->No); - dev_kfree_skb(skb); - dev_kfree_skb(skb2); - return(-1); - } - - skb_queue_tail(&chan->e.X, skb); - skb_queue_tail(&card->sndq, skb2); - eicon_tx_request(card); - return(0); -} - -int -eicon_idi_listen_req(eicon_card *card, eicon_chan *chan) -{ - if ((!card) || (!chan)) - return 1; - - eicon_log(card, 16, "idi_req: Ch%d: Listen_Req eazmask=0x%x\n",chan->No, chan->eazmask); - if (!chan->e.D3Id) { - idi_do_req(card, chan, ASSIGN, 0); - } - if (chan->fsm_state == EICON_STATE_NULL) { - if (!(chan->statectrl & HAVE_CONN_REQ)) { - idi_do_req(card, chan, INDICATE_REQ, 0); - chan->fsm_state = EICON_STATE_LISTEN; - } - } - return(0); -} - -static unsigned char -idi_si2bc(int si1, int si2, char *bc, char *hlc) -{ - hlc[0] = 0; - switch(si1) { - case 1: - bc[0] = 0x90; /* 3,1 kHz audio */ - bc[1] = 0x90; /* 64 kbit/s */ - bc[2] = 0xa3; /* G.711 A-law */ -#ifdef EICON_FULL_SERVICE_OKTETT - if (si2 == 1) { - bc[0] = 0x80; /* Speech */ - hlc[0] = 0x02; /* hlc len */ - hlc[1] = 0x91; /* first hic */ - hlc[2] = 0x81; /* Telephony */ - } -#endif - return(3); - case 2: - bc[0] = 0x90; /* 3,1 kHz audio */ - bc[1] = 0x90; /* 64 kbit/s */ - bc[2] = 0xa3; /* G.711 A-law */ -#ifdef EICON_FULL_SERVICE_OKTETT - if (si2 == 2) { - hlc[0] = 0x02; /* hlc len */ - hlc[1] = 0x91; /* first hic */ - hlc[2] = 0x84; /* Fax Gr.2/3 */ - } -#endif - return(3); - case 5: - case 7: - default: - bc[0] = 0x88; - bc[1] = 0x90; - return(2); - } - return (0); -} - -int -idi_hangup(eicon_card *card, eicon_chan *chan) -{ - if ((!card) || (!chan)) - return 1; - - if ((chan->fsm_state == EICON_STATE_ACTIVE) || - (chan->fsm_state == EICON_STATE_WMCONN)) { - if (chan->e.B2Id) idi_do_req(card, chan, N_DISC, 1); - } - if (chan->e.B2Id) idi_do_req(card, chan, REMOVE, 1); - if (chan->fsm_state != EICON_STATE_NULL) { - chan->statectrl |= WAITING_FOR_HANGUP; - idi_do_req(card, chan, HANGUP, 0); - chan->fsm_state = EICON_STATE_NULL; - } - eicon_log(card, 8, "idi_req: Ch%d: Hangup\n", chan->No); -#ifdef CONFIG_ISDN_TTY_FAX - chan->fax = 0; -#endif - return(0); -} - -int -capipmsg(eicon_card *card, eicon_chan *chan, capi_msg *cm) -{ - if ((cm->para[0] != 3) || (cm->para[1] != 0)) - return -1; - if (cm->para[2] < 3) - return -1; - if (cm->para[4] != 0) - return -1; - switch(cm->para[3]) { - case 4: /* Suspend */ - eicon_log(card, 8, "idi_req: Ch%d: Call Suspend\n", chan->No); - if (cm->para[5]) { - idi_do_req(card, chan, SUSPEND, 0); - } else { - idi_do_req(card, chan, CALL_HOLD, 0); - } - break; - case 5: /* Resume */ - eicon_log(card, 8, "idi_req: Ch%d: Call Resume\n", chan->No); - idi_do_req(card, chan, RESUME, 0); - break; - } - return 0; -} - -int -idi_connect_res(eicon_card *card, eicon_chan *chan) -{ - if ((!card) || (!chan)) - return 1; - - chan->fsm_state = EICON_STATE_IWAIT; - - /* check if old NetID has been removed */ - if (chan->e.B2Id) { - eicon_log(card, 1, "idi_conn_res: Ch%d: old net_id %x still exist, removing.\n", - chan->No, chan->e.B2Id); - idi_do_req(card, chan, REMOVE, 1); - } - - idi_do_req(card, chan, ASSIGN, 1); - idi_do_req(card, chan, CALL_RES, 0); - return(0); -} - -int -idi_connect_req(eicon_card *card, eicon_chan *chan, char *phone, - char *eazmsn, int si1, int si2) -{ - int l = 0; - int i; - unsigned char tmp; - unsigned char *sub, *sp; - unsigned char bc[5]; - unsigned char hlc[5]; - struct sk_buff *skb; - struct sk_buff *skb2; - eicon_REQ *reqbuf; - eicon_chan_ptr *chan2; - - if ((!card) || (!chan)) - return 1; - - skb = alloc_skb(270 + sizeof(eicon_REQ), GFP_ATOMIC); - skb2 = alloc_skb(sizeof(eicon_chan_ptr), GFP_ATOMIC); - - if ((!skb) || (!skb2)) { - eicon_log(card, 1, "idi_err: Ch%d: alloc_skb failed in connect_req()\n", chan->No); - if (skb) - dev_kfree_skb(skb); - if (skb2) - dev_kfree_skb(skb2); - return -ENOMEM; - } - - chan2 = (eicon_chan_ptr *)skb_put(skb2, sizeof(eicon_chan_ptr)); - chan2->ptr = chan; - - reqbuf = (eicon_REQ *)skb_put(skb, 270 + sizeof(eicon_REQ)); - reqbuf->Req = CALL_REQ; - reqbuf->ReqCh = 0; - reqbuf->ReqId = 1; - - sub = NULL; - sp = phone; - while (*sp) { - if (*sp == '.') { - sub = sp + 1; - *sp = 0; - } else - sp++; - } - reqbuf->XBuffer.P[l++] = CPN; - reqbuf->XBuffer.P[l++] = strlen(phone) + 1; - reqbuf->XBuffer.P[l++] = 0x81; - for(i=0; iXBuffer.P[l++] = phone[i] & 0x7f; - if (sub) { - reqbuf->XBuffer.P[l++] = DSA; - reqbuf->XBuffer.P[l++] = strlen(sub) + 2; - reqbuf->XBuffer.P[l++] = 0x80; /* NSAP coded */ - reqbuf->XBuffer.P[l++] = 0x50; /* local IDI format */ - while (*sub) - reqbuf->XBuffer.P[l++] = *sub++ & 0x7f; - } - - sub = NULL; - sp = eazmsn; - while (*sp) { - if (*sp == '.') { - sub = sp + 1; - *sp = 0; - } else - sp++; - } - reqbuf->XBuffer.P[l++] = OAD; - reqbuf->XBuffer.P[l++] = strlen(eazmsn) + 2; - reqbuf->XBuffer.P[l++] = 0x01; - reqbuf->XBuffer.P[l++] = 0x80; - for(i=0; iXBuffer.P[l++] = eazmsn[i] & 0x7f; - if (sub) { - reqbuf->XBuffer.P[l++] = OSA; - reqbuf->XBuffer.P[l++] = strlen(sub) + 2; - reqbuf->XBuffer.P[l++] = 0x80; /* NSAP coded */ - reqbuf->XBuffer.P[l++] = 0x50; /* local IDI format */ - while (*sub) - reqbuf->XBuffer.P[l++] = *sub++ & 0x7f; - } - - if (si2 > 2) { - reqbuf->XBuffer.P[l++] = SHIFT|6; - reqbuf->XBuffer.P[l++] = SIN; - reqbuf->XBuffer.P[l++] = 2; - reqbuf->XBuffer.P[l++] = si1; - reqbuf->XBuffer.P[l++] = si2; - } - else if ((tmp = idi_si2bc(si1, si2, bc, hlc)) > 0) { - reqbuf->XBuffer.P[l++] = BC; - reqbuf->XBuffer.P[l++] = tmp; - for(i=0; iXBuffer.P[l++] = bc[i]; - if ((tmp=hlc[0])) { - reqbuf->XBuffer.P[l++] = HLC; - reqbuf->XBuffer.P[l++] = tmp; - for(i=1; i<=tmp;i++) - reqbuf->XBuffer.P[l++] = hlc[i]; - } - } - - reqbuf->XBuffer.P[l++] = CAI; - reqbuf->XBuffer.P[l++] = 6; - reqbuf->XBuffer.P[l++] = 0x09; - reqbuf->XBuffer.P[l++] = 0; - reqbuf->XBuffer.P[l++] = 0; - reqbuf->XBuffer.P[l++] = 0; - reqbuf->XBuffer.P[l++] = 32; - reqbuf->XBuffer.P[l++] = 0; - switch(chan->l2prot) { - case ISDN_PROTO_L2_X75I: - case ISDN_PROTO_L2_X75UI: - case ISDN_PROTO_L2_X75BUI: - case ISDN_PROTO_L2_HDLC: - reqbuf->XBuffer.P[l-6] = 5; - reqbuf->XBuffer.P[l-7] = 1; - l -= 5; - break; - case ISDN_PROTO_L2_V11096: - reqbuf->XBuffer.P[l-7] = 3; - reqbuf->XBuffer.P[l-6] = 0x0d; - reqbuf->XBuffer.P[l-5] = 5; - reqbuf->XBuffer.P[l-4] = 0; - l -= 3; - break; - case ISDN_PROTO_L2_V11019: - reqbuf->XBuffer.P[l-7] = 3; - reqbuf->XBuffer.P[l-6] = 0x0d; - reqbuf->XBuffer.P[l-5] = 6; - reqbuf->XBuffer.P[l-4] = 0; - l -= 3; - break; - case ISDN_PROTO_L2_V11038: - reqbuf->XBuffer.P[l-7] = 3; - reqbuf->XBuffer.P[l-6] = 0x0d; - reqbuf->XBuffer.P[l-5] = 7; - reqbuf->XBuffer.P[l-4] = 0; - l -= 3; - break; - case ISDN_PROTO_L2_MODEM: - /* reqbuf->XBuffer.P[l-7] = 12; */ - reqbuf->XBuffer.P[l-6] = 0x11; - reqbuf->XBuffer.P[l-5] = 7; - reqbuf->XBuffer.P[l-4] = 0; - reqbuf->XBuffer.P[l-3] = 0; - reqbuf->XBuffer.P[l-2] = 32; - reqbuf->XBuffer.P[l-1] = 0; - break; - case ISDN_PROTO_L2_FAX: - reqbuf->XBuffer.P[l-6] = 0x10; - reqbuf->XBuffer.P[l-5] = 0; - reqbuf->XBuffer.P[l-4] = 0; - reqbuf->XBuffer.P[l-3] = 0; - reqbuf->XBuffer.P[l-2] = 32; - reqbuf->XBuffer.P[l-1] = 0; - break; - case ISDN_PROTO_L2_TRANS: - switch(chan->l3prot) { - case ISDN_PROTO_L3_TRANSDSP: - reqbuf->XBuffer.P[l-6] = 22; /* DTMF, audio events on */ - } - break; - } - - reqbuf->XBuffer.P[l++] = 0; /* end */ - reqbuf->XBuffer.length = l; - reqbuf->Reference = 0; /* Sig Entity */ - - if (chan->statectrl & WAITING_FOR_HANGUP) { - /* If the line did not disconnect yet, - we have to delay this command */ - eicon_log(card, 32, "idi_req: Ch%d: delaying conn_req\n", chan->No); - chan->statectrl |= HAVE_CONN_REQ; - chan->tskb1 = skb; - chan->tskb2 = skb2; - } else { - skb_queue_tail(&chan->e.X, skb); - skb_queue_tail(&card->sndq, skb2); - eicon_tx_request(card); - } - - eicon_log(card, 8, "idi_req: Ch%d: Conn_Req %s -> %s\n",chan->No, eazmsn, phone); - return(0); -} - - -static void -idi_IndParse(eicon_card *ccard, eicon_chan *chan, idi_ind_message *message, unsigned char *buffer, int len) -{ - int i,j; - int pos = 0; - int codeset = 0; - int wlen = 0; - int lock = 0; - __u8 w; - __u16 code; - isdn_ctrl cmd; - - memset(message, 0, sizeof(idi_ind_message)); - - if ((!len) || (!buffer[pos])) return; - - while(pos <= len) { - w = buffer[pos++]; - if (!w) return; - if (w & 0x80) { - wlen = 0; - } - else { - wlen = buffer[pos++]; - } - - if (pos > len) return; - - if (lock & 0x80) lock &= 0x7f; - else codeset = lock; - - if((w&0xf0) == SHIFT) { - codeset = w; - if(!(codeset & 0x08)) lock = codeset & 7; - codeset &= 7; - lock |= 0x80; - } - else { - if (w==ESC && wlen >=2) { - code = buffer[pos++]|0x800; - wlen--; - } - else code = w; - code |= (codeset<<8); - - if (pos + wlen > len) { - eicon_log(ccard, 1, "idi_err: Ch%d: IElen %d of %x exceeds Ind_Length (+%d)\n", chan->No, - wlen, code, (pos + wlen) - len); - return; - } - - switch(code) { - case OAD: - if (wlen > sizeof(message->oad)) { - pos += wlen; - break; - } - j = 1; - if (wlen) { - message->plan = buffer[pos++]; - if (message->plan &0x80) - message->screen = 0; - else { - message->screen = buffer[pos++]; - j = 2; - } - } - for(i=0; i < wlen-j; i++) - message->oad[i] = buffer[pos++]; - eicon_log(ccard, 2, "idi_inf: Ch%d: OAD=(0x%02x,0x%02x) %s\n", chan->No, - message->plan, message->screen, message->oad); - break; - case RDN: - if (wlen > sizeof(message->rdn)) { - pos += wlen; - break; - } - j = 1; - if (wlen) { - if (!(buffer[pos++] & 0x80)) { - pos++; - j = 2; - } - } - for(i=0; i < wlen-j; i++) - message->rdn[i] = buffer[pos++]; - eicon_log(ccard, 2, "idi_inf: Ch%d: RDN= %s\n", chan->No, - message->rdn); - break; - case CPN: - if (wlen > sizeof(message->cpn)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->cpn[i] = buffer[pos++]; - eicon_log(ccard, 2, "idi_inf: Ch%d: CPN=(0x%02x) %s\n", chan->No, - (__u8)message->cpn[0], message->cpn + 1); - break; - case DSA: - if (wlen > sizeof(message->dsa)) { - pos += wlen; - break; - } - pos += 2; - for(i=0; i < wlen-2; i++) - message->dsa[i] = buffer[pos++]; - eicon_log(ccard, 2, "idi_inf: Ch%d: DSA=%s\n", chan->No, message->dsa); - break; - case OSA: - if (wlen > sizeof(message->osa)) { - pos += wlen; - break; - } - pos += 2; - for(i=0; i < wlen-2; i++) - message->osa[i] = buffer[pos++]; - eicon_log(ccard, 2, "idi_inf: Ch%d: OSA=%s\n", chan->No, message->osa); - break; - case CAD: - pos += wlen; - eicon_log(ccard, 2, "idi_inf: Ch%d: Connected Address in ind, len:%x\n", - chan->No, wlen); - break; - case BC: - if (wlen > sizeof(message->bc)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->bc[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: BC = 0x%02x 0x%02x 0x%02x\n", chan->No, - message->bc[0],message->bc[1],message->bc[2]); - break; - case 0x800|BC: - if (wlen > sizeof(message->e_bc)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->e_bc[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: ESC/BC=%d\n", chan->No, message->bc[0]); - break; - case LLC: - if (wlen > sizeof(message->llc)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->llc[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: LLC=%d %d %d %d ...\n", chan->No, message->llc[0], - message->llc[1],message->llc[2],message->llc[3]); - break; - case HLC: - if (wlen > sizeof(message->hlc)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->hlc[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: HLC=%x %x %x %x %x ...\n", chan->No, - message->hlc[0], message->hlc[1], - message->hlc[2], message->hlc[3], message->hlc[4]); - break; - case DSP: - case 0x600|DSP: - if (wlen > sizeof(message->display)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->display[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: Display: %s\n", chan->No, - message->display); - break; - case 0x600|KEY: - if (wlen > sizeof(message->keypad)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->keypad[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: Keypad: %s\n", chan->No, - message->keypad); - break; - case NI: - case 0x600|NI: - if (wlen) { - switch(buffer[pos] & 127) { - case 0: - eicon_log(ccard, 4, "idi_inf: Ch%d: User suspended.\n", chan->No); - break; - case 1: - eicon_log(ccard, 4, "idi_inf: Ch%d: User resumed.\n", chan->No); - break; - case 2: - eicon_log(ccard, 4, "idi_inf: Ch%d: Bearer service change.\n", chan->No); - break; - default: - eicon_log(ccard, 4, "idi_inf: Ch%d: Unknown Notification %x.\n", - chan->No, buffer[pos] & 127); - } - pos += wlen; - } - break; - case PI: - case 0x600|PI: - if (wlen > 1) { - switch(buffer[pos+1] & 127) { - case 1: - eicon_log(ccard, 4, "idi_inf: Ch%d: Call is not end-to-end ISDN.\n", chan->No); - break; - case 2: - eicon_log(ccard, 4, "idi_inf: Ch%d: Destination address is non ISDN.\n", chan->No); - break; - case 3: - eicon_log(ccard, 4, "idi_inf: Ch%d: Origination address is non ISDN.\n", chan->No); - break; - case 4: - eicon_log(ccard, 4, "idi_inf: Ch%d: Call has returned to the ISDN.\n", chan->No); - break; - case 5: - eicon_log(ccard, 4, "idi_inf: Ch%d: Interworking has occurred.\n", chan->No); - break; - case 8: - eicon_log(ccard, 4, "idi_inf: Ch%d: In-band information available.\n", chan->No); - break; - default: - eicon_log(ccard, 4, "idi_inf: Ch%d: Unknown Progress %x.\n", - chan->No, buffer[pos+1] & 127); - } - } - pos += wlen; - break; - case CAU: - if (wlen > sizeof(message->cau)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->cau[i] = buffer[pos++]; - memcpy(&chan->cause, &message->cau, 2); - eicon_log(ccard, 4, "idi_inf: Ch%d: CAU=%d %d\n", chan->No, - message->cau[0],message->cau[1]); - break; - case 0x800|CAU: - if (wlen > sizeof(message->e_cau)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->e_cau[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: ECAU=%d %d\n", chan->No, - message->e_cau[0],message->e_cau[1]); - break; - case 0x800|CHI: - if (wlen > sizeof(message->e_chi)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->e_chi[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: ESC/CHI=%d\n", chan->No, - message->e_cau[0]); - break; - case 0x800|0x7a: - pos ++; - message->e_mt=buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: EMT=0x%x\n", chan->No, message->e_mt); - break; - case DT: - if (wlen > sizeof(message->dt)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->dt[i] = buffer[pos++]; - eicon_log(ccard, 4, "idi_inf: Ch%d: DT: %02d.%02d.%02d %02d:%02d:%02d\n", chan->No, - message->dt[2], message->dt[1], message->dt[0], - message->dt[3], message->dt[4], message->dt[5]); - break; - case 0x600|SIN: - if (wlen > sizeof(message->sin)) { - pos += wlen; - break; - } - for(i=0; i < wlen; i++) - message->sin[i] = buffer[pos++]; - eicon_log(ccard, 2, "idi_inf: Ch%d: SIN=%d %d\n", chan->No, - message->sin[0],message->sin[1]); - break; - case 0x600|CPS: - eicon_log(ccard, 2, "idi_inf: Ch%d: Called Party Status in ind\n", chan->No); - pos += wlen; - break; - case 0x600|CIF: - for (i = 0; i < wlen; i++) - if (buffer[pos + i] != '0') break; - memcpy(&cmd.parm.num, &buffer[pos + i], wlen - i); - cmd.parm.num[wlen - i] = 0; - eicon_log(ccard, 2, "idi_inf: Ch%d: CIF=%s\n", chan->No, cmd.parm.num); - pos += wlen; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_CINF; - cmd.arg = chan->No; - ccard->interface.statcallb(&cmd); - break; - case 0x600|DATE: - eicon_log(ccard, 2, "idi_inf: Ch%d: Date in ind\n", chan->No); - pos += wlen; - break; - case 0xa1: - eicon_log(ccard, 2, "idi_inf: Ch%d: Sending Complete in ind.\n", chan->No); - pos += wlen; - break; - case 0xe08: - case 0xe7a: - case 0xe04: - case 0xe00: - /* *** TODO *** */ - case CHA: - /* Charge advice */ - case FTY: - case 0x600|FTY: - case CHI: - case 0x800: - /* Not yet interested in this */ - pos += wlen; - break; - case 0x880: - /* Managment Information Element */ - if (!manbuf) { - eicon_log(ccard, 1, "idi_err: manbuf not allocated\n"); - } - else { - memcpy(&manbuf->data[manbuf->pos], &buffer[pos], wlen); - manbuf->length[manbuf->count] = wlen; - manbuf->count++; - manbuf->pos += wlen; - } - pos += wlen; - break; - default: - pos += wlen; - eicon_log(ccard, 6, "idi_inf: Ch%d: unknown information element 0x%x in ind, len:%x\n", - chan->No, code, wlen); - } - } - } -} - -static void -idi_bc2si(unsigned char *bc, unsigned char *hlc, unsigned char *sin, unsigned char *si1, unsigned char *si2) -{ - si1[0] = 0; - si2[0] = 0; - - switch (bc[0] & 0x7f) { - case 0x00: /* Speech */ - si1[0] = 1; -#ifdef EICON_FULL_SERVICE_OKTETT - si1[0] = sin[0]; - si2[0] = sin[1]; -#endif - break; - case 0x10: /* 3.1 Khz audio */ - si1[0] = 1; -#ifdef EICON_FULL_SERVICE_OKTETT - si1[0] = sin[0]; - si2[0] = sin[1]; -#endif - break; - case 0x08: /* Unrestricted digital information */ - si1[0] = 7; - si2[0] = sin[1]; - break; - case 0x09: /* Restricted digital information */ - si1[0] = 2; - break; - case 0x11: - /* Unrestr. digital information with - * tones/announcements ( or 7 kHz audio - */ - si1[0] = 3; - break; - case 0x18: /* Video */ - si1[0] = 4; - break; - } - switch (bc[1] & 0x7f) { - case 0x40: /* packed mode */ - si1[0] = 8; - break; - case 0x10: /* 64 kbit */ - case 0x11: /* 2*64 kbit */ - case 0x13: /* 384 kbit */ - case 0x15: /* 1536 kbit */ - case 0x17: /* 1920 kbit */ - /* moderate = bc[1] & 0x7f; */ - break; - } -} - -/********************* FAX stuff ***************************/ - -#ifdef CONFIG_ISDN_TTY_FAX - -static int -idi_fill_in_T30(eicon_chan *chan, unsigned char *buffer) -{ - eicon_t30_s *t30 = (eicon_t30_s *) buffer; - - if (!chan->fax) { - eicon_log(NULL, 1,"idi_T30: fill_in with NULL fax struct, ERROR\n"); - return 0; - } - memset(t30, 0, sizeof(eicon_t30_s)); - t30->station_id_len = EICON_FAXID_LEN; - memcpy(&t30->station_id[0], &chan->fax->id[0], EICON_FAXID_LEN); - t30->resolution = chan->fax->resolution; - t30->rate = chan->fax->rate + 1; /* eicon rate starts with 1 */ - t30->format = T30_FORMAT_SFF; - t30->pages_low = 0; - t30->pages_high = 0; - t30->atf = 1; /* optimised for AT+F command set */ - t30->code = 0; - t30->feature_bits_low = 0; - t30->feature_bits_high = 0; - t30->control_bits_low = 0; - t30->control_bits_high = 0; - - if (chan->fax->nbc) { - /* set compression by DCC value */ - switch(chan->fax->compression) { - case (0): /* 1-D modified */ - break; - case (1): /* 2-D modified Read */ - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_2D_CODING; - t30->feature_bits_low |= T30_FEATURE_BIT_2D_CODING; - break; - case (2): /* 2-D uncompressed */ - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_UNCOMPR; - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_2D_CODING; - t30->feature_bits_low |= T30_FEATURE_BIT_UNCOMPR_ENABLED; - t30->feature_bits_low |= T30_FEATURE_BIT_2D_CODING; - break; - case (3): /* 2-D modified Read */ - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_T6_CODING; - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_2D_CODING; - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_UNCOMPR; - t30->feature_bits_low |= T30_FEATURE_BIT_UNCOMPR_ENABLED; - t30->feature_bits_low |= T30_FEATURE_BIT_T6_CODING; - t30->feature_bits_low |= T30_FEATURE_BIT_2D_CODING; - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_ECM; - t30->feature_bits_low |= T30_FEATURE_BIT_ECM; - break; - } - } else { - /* set compression to best */ - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_T6_CODING; - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_2D_CODING; - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_UNCOMPR; - t30->feature_bits_low |= T30_FEATURE_BIT_UNCOMPR_ENABLED; - t30->feature_bits_low |= T30_FEATURE_BIT_T6_CODING; - t30->feature_bits_low |= T30_FEATURE_BIT_2D_CODING; - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_ECM; - t30->feature_bits_low |= T30_FEATURE_BIT_ECM; - } - switch(chan->fax->ecm) { - case (0): /* disable ECM */ - break; - case (1): - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_ECM; - t30->control_bits_low |= T30_CONTROL_BIT_ECM_64_BYTES; - t30->feature_bits_low |= T30_FEATURE_BIT_ECM; - t30->feature_bits_low |= T30_FEATURE_BIT_ECM_64_BYTES; - break; - case (2): - t30->control_bits_low |= T30_CONTROL_BIT_ENABLE_ECM; - t30->feature_bits_low |= T30_FEATURE_BIT_ECM; - break; - } - - if (DebugVar & 128) { - char st[40]; - eicon_log(NULL, 128, "sT30:code = %x\n", t30->code); - eicon_log(NULL, 128, "sT30:rate = %x\n", t30->rate); - eicon_log(NULL, 128, "sT30:res = %x\n", t30->resolution); - eicon_log(NULL, 128, "sT30:format = %x\n", t30->format); - eicon_log(NULL, 128, "sT30:pages_low = %x\n", t30->pages_low); - eicon_log(NULL, 128, "sT30:pages_high = %x\n", t30->pages_high); - eicon_log(NULL, 128, "sT30:atf = %x\n", t30->atf); - eicon_log(NULL, 128, "sT30:control_bits_low = %x\n", t30->control_bits_low); - eicon_log(NULL, 128, "sT30:control_bits_high = %x\n", t30->control_bits_high); - eicon_log(NULL, 128, "sT30:feature_bits_low = %x\n", t30->feature_bits_low); - eicon_log(NULL, 128, "sT30:feature_bits_high = %x\n", t30->feature_bits_high); - //eicon_log(NULL, 128, "sT30:universal_5 = %x\n", t30->universal_5); - //eicon_log(NULL, 128, "sT30:universal_6 = %x\n", t30->universal_6); - //eicon_log(NULL, 128, "sT30:universal_7 = %x\n", t30->universal_7); - eicon_log(NULL, 128, "sT30:station_id_len = %x\n", t30->station_id_len); - eicon_log(NULL, 128, "sT30:head_line_len = %x\n", t30->head_line_len); - strlcpy(st, t30->station_id, t30->station_id_len + 1); - eicon_log(NULL, 128, "sT30:station_id = <%s>\n", st); - } - return(sizeof(eicon_t30_s)); -} - -/* send fax struct */ -static int -idi_send_edata(eicon_card *card, eicon_chan *chan) -{ - struct sk_buff *skb; - struct sk_buff *skb2; - eicon_REQ *reqbuf; - eicon_chan_ptr *chan2; - - if ((chan->fsm_state == EICON_STATE_NULL) || (chan->fsm_state == EICON_STATE_LISTEN)) { - eicon_log(card, 1, "idi_snd: Ch%d: send edata on state %d !\n", chan->No, chan->fsm_state); - return -ENODEV; - } - eicon_log(card, 128, "idi_snd: Ch%d: edata (fax)\n", chan->No); - - skb = alloc_skb(sizeof(eicon_REQ) + sizeof(eicon_t30_s), GFP_ATOMIC); - skb2 = alloc_skb(sizeof(eicon_chan_ptr), GFP_ATOMIC); - - if ((!skb) || (!skb2)) { - eicon_log(card, 1, "idi_err: Ch%d: alloc_skb failed in send_edata()\n", chan->No); - if (skb) - dev_kfree_skb(skb); - if (skb2) - dev_kfree_skb(skb2); - return -ENOMEM; - } - - chan2 = (eicon_chan_ptr *)skb_put(skb2, sizeof(eicon_chan_ptr)); - chan2->ptr = chan; - - reqbuf = (eicon_REQ *)skb_put(skb, sizeof(eicon_t30_s) + sizeof(eicon_REQ)); - - reqbuf->Req = N_EDATA; - reqbuf->ReqCh = chan->e.IndCh; - reqbuf->ReqId = 1; - - reqbuf->XBuffer.length = idi_fill_in_T30(chan, reqbuf->XBuffer.P); - reqbuf->Reference = 1; /* Net Entity */ - - skb_queue_tail(&chan->e.X, skb); - skb_queue_tail(&card->sndq, skb2); - eicon_tx_request(card); - return (0); -} - -static void -idi_parse_edata(eicon_card *ccard, eicon_chan *chan, unsigned char *buffer, int len) -{ - eicon_t30_s *p = (eicon_t30_s *)buffer; - int i; - - if (DebugVar & 128) { - char st[40]; - eicon_log(ccard, 128, "rT30:len %d , size %d\n", len, sizeof(eicon_t30_s)); - eicon_log(ccard, 128, "rT30:code = %x\n", p->code); - eicon_log(ccard, 128, "rT30:rate = %x\n", p->rate); - eicon_log(ccard, 128, "rT30:res = %x\n", p->resolution); - eicon_log(ccard, 128, "rT30:format = %x\n", p->format); - eicon_log(ccard, 128, "rT30:pages_low = %x\n", p->pages_low); - eicon_log(ccard, 128, "rT30:pages_high = %x\n", p->pages_high); - eicon_log(ccard, 128, "rT30:atf = %x\n", p->atf); - eicon_log(ccard, 128, "rT30:control_bits_low = %x\n", p->control_bits_low); - eicon_log(ccard, 128, "rT30:control_bits_high = %x\n", p->control_bits_high); - eicon_log(ccard, 128, "rT30:feature_bits_low = %x\n", p->feature_bits_low); - eicon_log(ccard, 128, "rT30:feature_bits_high = %x\n", p->feature_bits_high); - //eicon_log(ccard, 128, "rT30:universal_5 = %x\n", p->universal_5); - //eicon_log(ccard, 128, "rT30:universal_6 = %x\n", p->universal_6); - //eicon_log(ccard, 128, "rT30:universal_7 = %x\n", p->universal_7); - eicon_log(ccard, 128, "rT30:station_id_len = %x\n", p->station_id_len); - eicon_log(ccard, 128, "rT30:head_line_len = %x\n", p->head_line_len); - strlcpy(st, p->station_id, p->station_id_len + 1); - eicon_log(ccard, 128, "rT30:station_id = <%s>\n", st); - } - if (!chan->fax) { - eicon_log(ccard, 1, "idi_edata: parse to NULL fax struct, ERROR\n"); - return; - } - chan->fax->code = p->code; - i = (p->station_id_len < FAXIDLEN) ? p->station_id_len : (FAXIDLEN - 1); - memcpy(chan->fax->r_id, p->station_id, i); - chan->fax->r_id[i] = 0; - chan->fax->r_resolution = p->resolution; - chan->fax->r_rate = p->rate - 1; - chan->fax->r_binary = 0; /* no binary support */ - chan->fax->r_width = 0; - chan->fax->r_length = 2; - chan->fax->r_scantime = 0; - chan->fax->r_compression = 0; - chan->fax->r_ecm = 0; - if (p->feature_bits_low & T30_FEATURE_BIT_2D_CODING) { - chan->fax->r_compression = 1; - if (p->feature_bits_low & T30_FEATURE_BIT_UNCOMPR_ENABLED) { - chan->fax->r_compression = 2; - } - } - if (p->feature_bits_low & T30_FEATURE_BIT_T6_CODING) { - chan->fax->r_compression = 3; - } - - if (p->feature_bits_low & T30_FEATURE_BIT_ECM) { - chan->fax->r_ecm = 2; - if (p->feature_bits_low & T30_FEATURE_BIT_ECM_64_BYTES) - chan->fax->r_ecm = 1; - } -} - -static void -idi_fax_send_header(eicon_card *card, eicon_chan *chan, int header) -{ - static __u16 wd2sff[] = { - 1728, 2048, 2432, 1216, 864 - }; - static __u16 ln2sff[2][3] = { - { 1143, 1401, 0 } , { 2287, 2802, 0 } - }; - struct sk_buff *skb; - eicon_sff_dochead *doc; - eicon_sff_pagehead *page; - u_char *docp; - - if (!chan->fax) { - eicon_log(card, 1, "idi_fax: send head with NULL fax struct, ERROR\n"); - return; - } - if (header == 2) { /* DocHeader + PageHeader */ - skb = alloc_skb(sizeof(eicon_sff_dochead) + sizeof(eicon_sff_pagehead), GFP_ATOMIC); - } else { - skb = alloc_skb(sizeof(eicon_sff_pagehead), GFP_ATOMIC); - } - if (!skb) { - eicon_log(card, 1, "idi_err: Ch%d: alloc_skb failed in fax_send_header()\n", chan->No); - return; - } - - if (header == 2) { /* DocHeader + PageHeader */ - docp = skb_put(skb, sizeof(eicon_sff_dochead) + sizeof(eicon_sff_pagehead)); - doc = (eicon_sff_dochead *) docp; - page = (eicon_sff_pagehead *) (docp + sizeof(eicon_sff_dochead)); - memset(docp, 0,sizeof(eicon_sff_dochead) + sizeof(eicon_sff_pagehead)); - doc->id = 0x66666653; - doc->version = 0x01; - doc->off1pagehead = sizeof(eicon_sff_dochead); - } else { - page = (eicon_sff_pagehead *)skb_put(skb, sizeof(eicon_sff_pagehead)); - memset(page, 0, sizeof(eicon_sff_pagehead)); - } - - switch(header) { - case 1: /* PageHeaderEnd */ - page->pageheadid = 254; - page->pageheadlen = 0; - break; - case 0: /* PageHeader */ - case 2: /* DocHeader + PageHeader */ - page->pageheadid = 254; - page->pageheadlen = sizeof(eicon_sff_pagehead) - 2; - page->resvert = chan->fax->resolution; - page->reshoriz = 0; /* always 203 dpi */ - page->coding = 0; /* always 1D */ - page->linelength = wd2sff[chan->fax->width]; - page->pagelength = ln2sff[chan->fax->resolution][chan->fax->length]; - eicon_log(card, 128, "sSFF-Head: linelength = %d\n", page->linelength); - eicon_log(card, 128, "sSFF-Head: pagelength = %d\n", page->pagelength); - break; - } - idi_send_data(card, chan, 0, skb, 0, 0); -} - -void -idi_fax_cmd(eicon_card *card, eicon_chan *chan) -{ - isdn_ctrl cmd; - - if ((!card) || (!chan)) - return; - - if (!chan->fax) { - eicon_log(card, 1, "idi_fax: cmd with NULL fax struct, ERROR\n"); - return; - } - switch (chan->fax->code) { - case ISDN_TTY_FAX_DT: - if (chan->fax->phase == ISDN_FAX_PHASE_B) { - idi_send_edata(card, chan); - break; - } - if (chan->fax->phase == ISDN_FAX_PHASE_D) { - idi_send_edata(card, chan); - break; - } - break; - - case ISDN_TTY_FAX_DR: - if (chan->fax->phase == ISDN_FAX_PHASE_B) { - idi_send_edata(card, chan); - - cmd.driver = card->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_CFR; - card->interface.statcallb(&cmd); - - cmd.driver = card->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_RID; - card->interface.statcallb(&cmd); - - /* telling 1-D compression */ - chan->fax->r_compression = 0; - cmd.driver = card->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_DCS; - card->interface.statcallb(&cmd); - - chan->fax2.NextObject = FAX_OBJECT_DOCU; - chan->fax2.PrevObject = FAX_OBJECT_DOCU; - - break; - } - if (chan->fax->phase == ISDN_FAX_PHASE_D) { - idi_send_edata(card, chan); - break; - } - break; - - case ISDN_TTY_FAX_ET: - switch(chan->fax->fet) { - case 0: - case 1: - idi_fax_send_header(card, chan, 0); - break; - case 2: - idi_fax_send_header(card, chan, 1); - break; - } - break; - } -} - -static void -idi_edata_rcveop(eicon_card *card, eicon_chan *chan) -{ - isdn_ctrl cmd; - - if (!chan->fax) { - eicon_log(card, 1, "idi_edata: rcveop with NULL fax struct, ERROR\n"); - return; - } - cmd.driver = card->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_ET; - card->interface.statcallb(&cmd); -} - -static void -idi_reset_fax_stat(eicon_chan *chan) -{ - chan->fax2.LineLen = 0; - chan->fax2.LineData = 0; - chan->fax2.LineDataLen = 0; - chan->fax2.NullByteExist = 0; - chan->fax2.Dle = 0; - chan->fax2.PageCount = 0; - chan->fax2.Eop = 0; -} - -static void -idi_edata_action(eicon_card *ccard, eicon_chan *chan, char *buffer, int len) -{ - isdn_ctrl cmd; - - if (!chan->fax) { - eicon_log(ccard, 1, "idi_edata: action with NULL fax struct, ERROR\n"); - return; - } - if (chan->fax->direction == ISDN_TTY_FAX_CONN_OUT) { - idi_parse_edata(ccard, chan, buffer, len); - - if (chan->fax->phase == ISDN_FAX_PHASE_A) { - idi_reset_fax_stat(chan); - - chan->fsm_state = EICON_STATE_ACTIVE; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_BCONN; - cmd.arg = chan->No; - strcpy(cmd.parm.num, ""); - ccard->interface.statcallb(&cmd); - - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_FCON; - ccard->interface.statcallb(&cmd); - - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_RID; - ccard->interface.statcallb(&cmd); - - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_DIS; - ccard->interface.statcallb(&cmd); - - if (chan->fax->r_compression != 0) { - /* telling fake compression in second DIS message */ - chan->fax->r_compression = 0; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_DIS; - ccard->interface.statcallb(&cmd); - } - - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_SENT; /* OK message */ - ccard->interface.statcallb(&cmd); - } else - if (chan->fax->phase == ISDN_FAX_PHASE_D) { - - if ((chan->fax->code == EDATA_T30_MCF) && - (chan->fax->fet != 2)) { - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_PTS; - ccard->interface.statcallb(&cmd); - } - - switch(chan->fax->fet) { - case 0: /* new page */ - /* stay in phase D , wait on cmd +FDT */ - break; - case 1: /* new document */ - /* link-level switch to phase B */ - break; - case 2: /* session end */ - default: - /* send_edata produces error on some */ - /* fax-machines here, so we don't */ - /* idi_send_edata(ccard, chan); */ - break; - } - } - } - - if (chan->fax->direction == ISDN_TTY_FAX_CONN_IN) { - idi_parse_edata(ccard, chan, buffer, len); - - if ((chan->fax->code == EDATA_T30_DCS) && - (chan->fax->phase == ISDN_FAX_PHASE_A)) { - idi_reset_fax_stat(chan); - - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_BCONN; - cmd.arg = chan->No; - strcpy(cmd.parm.num, ""); - ccard->interface.statcallb(&cmd); - - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_FCON_I; - ccard->interface.statcallb(&cmd); - } else - if ((chan->fax->code == EDATA_T30_TRAIN_OK) && - (chan->fax->phase == ISDN_FAX_PHASE_A)) { - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_RID; - ccard->interface.statcallb(&cmd); - - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_TRAIN_OK; - ccard->interface.statcallb(&cmd); - } else - if ((chan->fax->code == EDATA_T30_TRAIN_OK) && - (chan->fax->phase == ISDN_FAX_PHASE_B)) { - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_TRAIN_OK; - ccard->interface.statcallb(&cmd); - } else - if (chan->fax->phase == ISDN_FAX_PHASE_C) { - switch(chan->fax->code) { - case EDATA_T30_TRAIN_OK: - idi_send_edata(ccard, chan); - break; - case EDATA_T30_MPS: - chan->fax->fet = 0; - idi_edata_rcveop(ccard, chan); - break; - case EDATA_T30_EOM: - chan->fax->fet = 1; - idi_edata_rcveop(ccard, chan); - break; - case EDATA_T30_EOP: - chan->fax->fet = 2; - idi_edata_rcveop(ccard, chan); - break; - } - } - } -} - -static void -fax_put_rcv(eicon_card *ccard, eicon_chan *chan, u_char *Data, int len) -{ - struct sk_buff *skb; - - skb = alloc_skb(len + MAX_HEADER_LEN, GFP_ATOMIC); - if (!skb) { - eicon_log(ccard, 1, "idi_err: Ch%d: alloc_skb failed in fax_put_rcv()\n", chan->No); - return; - } - skb_reserve(skb, MAX_HEADER_LEN); - memcpy(skb_put(skb, len), Data, len); - ccard->interface.rcvcallb_skb(ccard->myid, chan->No, skb); -} - -static void -idi_faxdata_rcv(eicon_card *ccard, eicon_chan *chan, struct sk_buff *skb) -{ - eicon_OBJBUFFER InBuf; - eicon_OBJBUFFER LineBuf; - unsigned int Length = 0; - unsigned int aLength = 0; - unsigned int ObjectSize = 0; - unsigned int ObjHeadLen = 0; - unsigned int ObjDataLen = 0; - __u8 Recordtype; - __u8 PageHeaderLen; - __u8 Event; - eicon_sff_pagehead *ob_page; - - __u16 Cl2Eol = 0x8000; - -# define EVENT_NONE 0 -# define EVENT_NEEDDATA 1 - - if (!chan->fax) { - eicon_log(ccard, 1, "idi_fax: rcvdata with NULL fax struct, ERROR\n"); - return; - } - - - - if (chan->fax->direction == ISDN_TTY_FAX_CONN_IN) { - InBuf.Data = skb->data; - InBuf.Size = skb->len; - InBuf.Len = 0; - InBuf.Next = InBuf.Data; - LineBuf.Data = chan->fax2.abLine; - LineBuf.Size = sizeof(chan->fax2.abLine); - LineBuf.Len = chan->fax2.LineLen; - LineBuf.Next = LineBuf.Data + LineBuf.Len; - - Event = EVENT_NONE; - while (Event == EVENT_NONE) { - switch(chan->fax2.NextObject) { - case FAX_OBJECT_DOCU: - Length = LineBuf.Len + (InBuf.Size - InBuf.Len); - if (Length < sizeof(eicon_sff_dochead)) { - Event = EVENT_NEEDDATA; - break; - } - ObjectSize = sizeof(eicon_sff_dochead); - Length = ObjectSize; - if (LineBuf.Len < Length) { - Length -= LineBuf.Len; - LineBuf.Len = 0; - LineBuf.Next = LineBuf.Data; - InBuf.Len += Length; - InBuf.Next += Length; - } else { - LineBuf.Len -= Length; - LineBuf.Next = LineBuf.Data + LineBuf.Len; - memmove(LineBuf.Data, LineBuf.Data + Length, LineBuf.Len); - } - chan->fax2.PrevObject = FAX_OBJECT_DOCU; - chan->fax2.NextObject = FAX_OBJECT_PAGE; - break; - - case FAX_OBJECT_PAGE: - Length = LineBuf.Len + (InBuf.Size - InBuf.Len); - if (Length < 2) { - Event = EVENT_NEEDDATA; - break; - } - if (LineBuf.Len == 0) { - *LineBuf.Next++ = *InBuf.Next++; - LineBuf.Len++; - InBuf.Len++; - } - if (LineBuf.Len == 1) { - *LineBuf.Next++ = *InBuf.Next++; - LineBuf.Len++; - InBuf.Len++; - } - PageHeaderLen = *(LineBuf.Data + 1); - ObjectSize = (PageHeaderLen == 0) ? 2 : sizeof(eicon_sff_pagehead); - if (Length < ObjectSize) { - Event = EVENT_NEEDDATA; - break; - } - Length = ObjectSize; - /* extract page dimensions */ - if (LineBuf.Len < Length) { - aLength = Length - LineBuf.Len; - memcpy(LineBuf.Next, InBuf.Next, aLength); - LineBuf.Next += aLength; - InBuf.Next += aLength; - LineBuf.Len += aLength; - InBuf.Len += aLength; - } - if (Length > 2) { - ob_page = (eicon_sff_pagehead *)LineBuf.Data; - switch(ob_page->linelength) { - case 2048: - chan->fax->r_width = 1; - break; - case 2432: - chan->fax->r_width = 2; - break; - case 1216: - chan->fax->r_width = 3; - break; - case 864: - chan->fax->r_width = 4; - break; - case 1728: - default: - chan->fax->r_width = 0; - } - switch(ob_page->pagelength) { - case 1143: - case 2287: - chan->fax->r_length = 0; - break; - case 1401: - case 2802: - chan->fax->r_length = 1; - break; - default: - chan->fax->r_length = 2; - } - eicon_log(ccard, 128, "rSFF-Head: linelength = %d\n", ob_page->linelength); - eicon_log(ccard, 128, "rSFF-Head: pagelength = %d\n", ob_page->pagelength); - } - LineBuf.Len -= Length; - LineBuf.Next = LineBuf.Data + LineBuf.Len; - memmove(LineBuf.Data, LineBuf.Data + Length, LineBuf.Len); - - chan->fax2.PrevObject = FAX_OBJECT_PAGE; - chan->fax2.NextObject = FAX_OBJECT_LINE; - break; - - case FAX_OBJECT_LINE: - Length = LineBuf.Len + (InBuf.Size - InBuf.Len); - if (Length < 1) { - Event = EVENT_NEEDDATA; - break; - } - if (LineBuf.Len == 0) { - *LineBuf.Next++ = *InBuf.Next++; - LineBuf.Len++; - InBuf.Len++; - } - Recordtype = *LineBuf.Data; - if (Recordtype == 0) { - /* recordtype pixel row (2 byte length) */ - ObjHeadLen = 3; - if (Length < ObjHeadLen) { - Event = EVENT_NEEDDATA; - break; - } - while (LineBuf.Len < ObjHeadLen) { - *LineBuf.Next++ = *InBuf.Next++; - LineBuf.Len++; - InBuf.Len++; - } - ObjDataLen = *((__u16*) (LineBuf.Data + 1)); - ObjectSize = ObjHeadLen + ObjDataLen; - if (Length < ObjectSize) { - Event = EVENT_NEEDDATA; - break; - } - } else - if ((Recordtype >= 1) && (Recordtype <= 216)) { - /* recordtype pixel row (1 byte length) */ - ObjHeadLen = 1; - ObjDataLen = Recordtype; - ObjectSize = ObjHeadLen + ObjDataLen; - if (Length < ObjectSize) { - Event = EVENT_NEEDDATA; - break; - } - } else - if ((Recordtype >= 217) && (Recordtype <= 253)) { - /* recordtype empty lines */ - ObjHeadLen = 1; - ObjDataLen = 0; - ObjectSize = ObjHeadLen + ObjDataLen; - LineBuf.Len--; - LineBuf.Next = LineBuf.Data + LineBuf.Len; - memmove(LineBuf.Data, LineBuf.Data + 1, LineBuf.Len); - break; - } else - if (Recordtype == 254) { - /* recordtype page header */ - chan->fax2.PrevObject = FAX_OBJECT_LINE; - chan->fax2.NextObject = FAX_OBJECT_PAGE; - break; - } else { - /* recordtype user information */ - ObjHeadLen = 2; - if (Length < ObjHeadLen) { - Event = EVENT_NEEDDATA; - break; - } - while (LineBuf.Len < ObjHeadLen) { - *LineBuf.Next++ = *InBuf.Next++; - LineBuf.Len++; - InBuf.Len++; - } - ObjDataLen = *(LineBuf.Data + 1); - ObjectSize = ObjHeadLen + ObjDataLen; - if (ObjDataLen == 0) { - /* illegal line coding */ - LineBuf.Len -= ObjHeadLen; - LineBuf.Next = LineBuf.Data + LineBuf.Len; - memmove(LineBuf.Data, LineBuf.Data + ObjHeadLen, LineBuf.Len); - break; - } else { - /* user information */ - if (Length < ObjectSize) { - Event = EVENT_NEEDDATA; - break; - } - Length = ObjectSize; - if (LineBuf.Len < Length) { - Length -= LineBuf.Len; - LineBuf.Len = 0; - LineBuf.Next = LineBuf.Data; - InBuf.Len += Length; - InBuf.Next += Length; - } else { - LineBuf.Len -= Length; - LineBuf.Next = LineBuf.Data + LineBuf.Len; - memmove(LineBuf.Data, LineBuf.Data + Length, LineBuf.Len); - } - } - break; - } - Length = ObjectSize; - if (LineBuf.Len > ObjHeadLen) { - fax_put_rcv(ccard, chan, LineBuf.Data + ObjHeadLen, - (LineBuf.Len - ObjHeadLen)); - } - Length -= LineBuf.Len; - LineBuf.Len = 0; - LineBuf.Next = LineBuf.Data; - if (Length > 0) { - fax_put_rcv(ccard, chan, InBuf.Next, Length); - InBuf.Len += Length; - InBuf.Next += Length; - } - fax_put_rcv(ccard, chan, (__u8 *)&Cl2Eol, sizeof(Cl2Eol)); - break; - } /* end of switch (chan->fax2.NextObject) */ - } /* end of while (Event==EVENT_NONE) */ - if (InBuf.Len < InBuf.Size) { - Length = InBuf.Size - InBuf.Len; - if ((LineBuf.Len + Length) > LineBuf.Size) { - eicon_log(ccard, 1, "idi_fax: Ch%d: %d bytes dropping, small buffer\n", chan->No, - Length); - } else { - memcpy(LineBuf.Next, InBuf.Next, Length); - LineBuf.Len += Length; - } - } - chan->fax2.LineLen = LineBuf.Len; - } else { /* CONN_OUT */ - /* On CONN_OUT we do not need incoming data, drop it */ - /* maybe later for polling */ - } - -# undef EVENT_NONE -# undef EVENT_NEEDDATA - - return; -} - -static int -idi_fax_send_outbuf(eicon_card *ccard, eicon_chan *chan, eicon_OBJBUFFER *OutBuf) -{ - struct sk_buff *skb; - - skb = alloc_skb(OutBuf->Len, GFP_ATOMIC); - if (!skb) { - eicon_log(ccard, 1, "idi_err: Ch%d: alloc_skb failed in fax_send_outbuf()\n", chan->No); - return(-1); - } - memcpy(skb_put(skb, OutBuf->Len), OutBuf->Data, OutBuf->Len); - - OutBuf->Len = 0; - OutBuf->Next = OutBuf->Data; - - return(idi_send_data(ccard, chan, 0, skb, 1, 0)); -} - -int -idi_faxdata_send(eicon_card *ccard, eicon_chan *chan, struct sk_buff *skb) -{ - isdn_ctrl cmd; - eicon_OBJBUFFER InBuf; - __u8 InData; - __u8 InMask; - eicon_OBJBUFFER OutBuf; - eicon_OBJBUFFER LineBuf; - __u32 LineData; - unsigned int LineDataLen; - __u8 Byte; - __u8 Event; - int ret = 1; - -# define EVENT_NONE 0 -# define EVENT_EOD 1 -# define EVENT_EOL 2 -# define EVENT_EOP 3 - - if ((!ccard) || (!chan)) - return -1; - - if (!chan->fax) { - eicon_log(ccard, 1, "idi_fax: senddata with NULL fax struct, ERROR\n"); - return -1; - } - - if (chan->fax->direction == ISDN_TTY_FAX_CONN_IN) { - /* Simply ignore any data written in data mode when receiving a fax. */ - /* This is not completely correct because only XON's should come here. */ - dev_kfree_skb(skb); - return 1; - } - - if (chan->fax->phase != ISDN_FAX_PHASE_C) { - dev_kfree_skb(skb); - return 1; - } - - if (chan->queued + skb->len > 1200) - return 0; - if (chan->pqueued > 1) - return 0; - - InBuf.Data = skb->data; - InBuf.Size = skb->len; - InBuf.Len = 0; - InBuf.Next = InBuf.Data; - InData = 0; - InMask = 0; - - LineBuf.Data = chan->fax2.abLine; - LineBuf.Size = sizeof(chan->fax2.abLine); - LineBuf.Len = chan->fax2.LineLen; - LineBuf.Next = LineBuf.Data + LineBuf.Len; - LineData = chan->fax2.LineData; - LineDataLen = chan->fax2.LineDataLen; - - OutBuf.Data = chan->fax2.abFrame; - OutBuf.Size = sizeof(chan->fax2.abFrame); - OutBuf.Len = 0; - OutBuf.Next = OutBuf.Data; - - Event = EVENT_NONE; - - chan->fax2.Eop = 0; - - for (;;) { - for (;;) { - if (InMask == 0) { - if (InBuf.Len >= InBuf.Size) { - Event = EVENT_EOD; - break; - } - if ((chan->fax2.Dle != _DLE_) && *InBuf.Next == _DLE_) { - chan->fax2.Dle = _DLE_; - InBuf.Next++; - InBuf.Len++; - if (InBuf.Len >= InBuf.Size) { - Event = EVENT_EOD; - break; - } - } - if (chan->fax2.Dle == _DLE_) { - chan->fax2.Dle = 0; - if (*InBuf.Next == _ETX_) { - Event = EVENT_EOP; - break; - } else - if (*InBuf.Next == _DLE_) { - /* do nothing */ - } else { - eicon_log(ccard, 1, - "idi_err: Ch%d: unknown DLE escape %02x found\n", - chan->No, *InBuf.Next); - InBuf.Next++; - InBuf.Len++; - if (InBuf.Len >= InBuf.Size) { - Event = EVENT_EOD; - break; - } - } - } - InBuf.Len++; - InData = *InBuf.Next++; - InMask = (chan->fax->bor) ? 0x80 : 0x01; - } - while (InMask) { - LineData >>= 1; - LineDataLen++; - if (InData & InMask) - LineData |= 0x80000000; - if (chan->fax->bor) - InMask >>= 1; - else - InMask <<= 1; - - if ((LineDataLen >= T4_EOL_BITSIZE) && - ((LineData & T4_EOL_MASK_DWORD) == T4_EOL_DWORD)) { - Event = EVENT_EOL; - if (LineDataLen > T4_EOL_BITSIZE) { - Byte = (__u8) - ((LineData & ~T4_EOL_MASK_DWORD) >> - (32 - LineDataLen)); - if (Byte == 0) { - if (! chan->fax2.NullByteExist) { - chan->fax2.NullBytesPos = LineBuf.Len; - chan->fax2.NullByteExist = 1; - } - } else { - chan->fax2.NullByteExist = 0; - } - if (LineBuf.Len < LineBuf.Size) { - *LineBuf.Next++ = Byte; - LineBuf.Len++; - } - } - LineDataLen = 0; - break; - } - if (LineDataLen >= T4_EOL_BITSIZE + 8) { - Byte = (__u8) - ((LineData & ~T4_EOL_MASK_DWORD) >> - (32 - T4_EOL_BITSIZE - 8)); - LineData &= T4_EOL_MASK_DWORD; - LineDataLen = T4_EOL_BITSIZE; - if (Byte == 0) { - if (! chan->fax2.NullByteExist) { - chan->fax2.NullBytesPos = LineBuf.Len; - chan->fax2.NullByteExist = 1; - } - } else { - chan->fax2.NullByteExist = 0; - } - if (LineBuf.Len < LineBuf.Size) { - *LineBuf.Next++ = Byte; - LineBuf.Len++; - } - } - } - if (Event != EVENT_NONE) - break; - } - - if ((Event != EVENT_EOL) && (Event != EVENT_EOP)) - break; - - if ((Event == EVENT_EOP) && (LineDataLen > 0)) { - LineData >>= 32 - LineDataLen; - LineDataLen = 0; - while (LineData != 0) { - Byte = (__u8) LineData; - LineData >>= 8; - if (Byte == 0) { - if (! chan->fax2.NullByteExist) { - chan->fax2.NullBytesPos = LineBuf.Len; - chan->fax2.NullByteExist = 1; - } - } else { - chan->fax2.NullByteExist = 0; - } - if (LineBuf.Len < LineBuf.Size) { - *LineBuf.Next++ = Byte; - LineBuf.Len++; - } - - } - } - if (chan->fax2.NullByteExist) { - if (chan->fax2.NullBytesPos == 0) { - LineBuf.Len = 0; - } else { - LineBuf.Len = chan->fax2.NullBytesPos + 1; - } - } - if (LineBuf.Len > 0) { - if (OutBuf.Len + LineBuf.Len + SFF_LEN_FLD_SIZE > OutBuf.Size) { - ret = idi_fax_send_outbuf(ccard, chan, &OutBuf); - } - if (LineBuf.Len <= 216) { - *OutBuf.Next++ = (__u8) LineBuf.Len; - OutBuf.Len++; - } else { - *OutBuf.Next++ = 0; - *((__u16 *) OutBuf.Next)++ = (__u16) LineBuf.Len; - OutBuf.Len += 3; - } - memcpy(OutBuf.Next, LineBuf.Data, LineBuf.Len); - OutBuf.Next += LineBuf.Len; - OutBuf.Len += LineBuf.Len; - } - LineBuf.Len = 0; - LineBuf.Next = LineBuf.Data; - chan->fax2.NullByteExist = 0; - if (Event == EVENT_EOP) - break; - - Event = EVENT_NONE; - } - - if (Event == EVENT_EOP) { - chan->fax2.Eop = 1; - chan->fax2.PageCount++; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_EOP; - ccard->interface.statcallb(&cmd); - } - if (OutBuf.Len > 0) { - ret = idi_fax_send_outbuf(ccard, chan, &OutBuf); - } - - chan->fax2.LineLen = LineBuf.Len; - chan->fax2.LineData = LineData; - chan->fax2.LineDataLen = LineDataLen; - -# undef EVENT_NONE -# undef EVENT_EOD -# undef EVENT_EOL -# undef EVENT_EOP - - if (ret >= 0) - dev_kfree_skb(skb); - if (ret == 0) - ret = 1; - return(ret); -} - -static void -idi_fax_hangup(eicon_card *ccard, eicon_chan *chan) -{ - isdn_ctrl cmd; - - if (!chan->fax) { - eicon_log(ccard, 1, "idi_fax: hangup with NULL fax struct, ERROR\n"); - return; - } - if ((chan->fax->direction == ISDN_TTY_FAX_CONN_OUT) && - (chan->fax->code == 0)) { - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_PTS; - ccard->interface.statcallb(&cmd); - } - if ((chan->fax->code > 1) && (chan->fax->code < 120)) - chan->fax->code += 120; - eicon_log(ccard, 8, "idi_fax: Ch%d: Hangup (code=%d)\n", chan->No, chan->fax->code); - chan->fax->r_code = ISDN_TTY_FAX_HNG; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - ccard->interface.statcallb(&cmd); -} - -#endif /******** FAX ********/ - -static int -idi_send_udata(eicon_card *card, eicon_chan *chan, int UReq, u_char *buffer, int len) -{ - struct sk_buff *skb; - struct sk_buff *skb2; - eicon_REQ *reqbuf; - eicon_chan_ptr *chan2; - - if ((chan->fsm_state == EICON_STATE_NULL) || (chan->fsm_state == EICON_STATE_LISTEN)) { - eicon_log(card, 1, "idi_snd: Ch%d: send udata on state %d !\n", chan->No, chan->fsm_state); - return -ENODEV; - } - eicon_log(card, 8, "idi_snd: Ch%d: udata 0x%x: %d %d %d %d\n", chan->No, - UReq, buffer[0], buffer[1], buffer[2], buffer[3]); - - skb = alloc_skb(sizeof(eicon_REQ) + len + 1, GFP_ATOMIC); - skb2 = alloc_skb(sizeof(eicon_chan_ptr), GFP_ATOMIC); - - if ((!skb) || (!skb2)) { - eicon_log(card, 1, "idi_err: Ch%d: alloc_skb failed in send_udata()\n", chan->No); - if (skb) - dev_kfree_skb(skb); - if (skb2) - dev_kfree_skb(skb2); - return -ENOMEM; - } - - chan2 = (eicon_chan_ptr *)skb_put(skb2, sizeof(eicon_chan_ptr)); - chan2->ptr = chan; - - reqbuf = (eicon_REQ *)skb_put(skb, 1 + len + sizeof(eicon_REQ)); - - reqbuf->Req = N_UDATA; - reqbuf->ReqCh = chan->e.IndCh; - reqbuf->ReqId = 1; - - reqbuf->XBuffer.length = len + 1; - reqbuf->XBuffer.P[0] = UReq; - memcpy(&reqbuf->XBuffer.P[1], buffer, len); - reqbuf->Reference = 1; /* Net Entity */ - - skb_queue_tail(&chan->e.X, skb); - skb_queue_tail(&card->sndq, skb2); - eicon_tx_request(card); - return (0); -} - -void -idi_audio_cmd(eicon_card *ccard, eicon_chan *chan, int cmd, u_char *value) -{ - u_char buf[6]; - struct enable_dtmf_s *dtmf_buf = (struct enable_dtmf_s *)buf; - - if ((!ccard) || (!chan)) - return; - - memset(buf, 0, 6); - switch(cmd) { - case ISDN_AUDIO_SETDD: - if (value[0]) { - dtmf_buf->tone = (__u16) (value[1] * 5); - dtmf_buf->gap = (__u16) (value[1] * 5); - idi_send_udata(ccard, chan, - DSP_UDATA_REQUEST_ENABLE_DTMF_RECEIVER, - buf, 4); - } else { - idi_send_udata(ccard, chan, - DSP_UDATA_REQUEST_DISABLE_DTMF_RECEIVER, - buf, 0); - } - break; - } -} - -static void -idi_parse_udata(eicon_card *ccard, eicon_chan *chan, unsigned char *buffer, int len) -{ - isdn_ctrl cmd; - eicon_dsp_ind *p = (eicon_dsp_ind *) (&buffer[1]); - static char *connmsg[] = - {"", "V.21", "V.23", "V.22", "V.22bis", "V.32bis", "V.34", - "V.8", "Bell 212A", "Bell 103", "V.29 Leased", "V.33 Leased", "V.90", - "V.21 CH2", "V.27ter", "V.29", "V.33", "V.17", "V.32", "K56Flex", - "X2", "V.18", "V.18LH", "V.18HL", "V.21LH", "V.21HL", - "Bell 103LH", "Bell 103HL", "V.23", "V.23", "EDT 110", - "Baudot45", "Baudot47", "Baudot50", "DTMF" }; - static u_char dtmf_code[] = { - '1','4','7','*','2','5','8','0','3','6','9','#','A','B','C','D' - }; - - if ((!ccard) || (!chan)) - return; - - switch (buffer[0]) { - case DSP_UDATA_INDICATION_SYNC: - eicon_log(ccard, 16, "idi_ind: Ch%d: UDATA_SYNC time %d\n", chan->No, p->time); - break; - case DSP_UDATA_INDICATION_DCD_OFF: - eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_DCD_OFF time %d\n", chan->No, p->time); - break; - case DSP_UDATA_INDICATION_DCD_ON: - if ((chan->l2prot == ISDN_PROTO_L2_MODEM) && - ((chan->fsm_state == EICON_STATE_IBWAIT) || - (chan->fsm_state == EICON_STATE_WMCONN))) { - chan->fsm_state = EICON_STATE_ACTIVE; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_BCONN; - cmd.arg = chan->No; - if (p->norm > 34) { - sprintf(cmd.parm.num, "%d/(%d)", p->speed, p->norm); - } else { - sprintf(cmd.parm.num, "%d/%s", p->speed, connmsg[p->norm]); - } - ccard->interface.statcallb(&cmd); - } - eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_DCD_ON time %d\n", chan->No, p->time); - eicon_log(ccard, 8, "idi_ind: Ch%d: %d %d %d %d\n", chan->No, - p->norm, p->options, p->speed, p->delay); - break; - case DSP_UDATA_INDICATION_CTS_OFF: - eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_CTS_OFF time %d\n", chan->No, p->time); - break; - case DSP_UDATA_INDICATION_CTS_ON: - eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_CTS_ON time %d\n", chan->No, p->time); - eicon_log(ccard, 8, "idi_ind: Ch%d: %d %d %d %d\n", chan->No, - p->norm, p->options, p->speed, p->delay); - break; - case DSP_UDATA_INDICATION_DISCONNECT: - eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_DISCONNECT cause %d\n", chan->No, buffer[1]); - break; - case DSP_UDATA_INDICATION_DTMF_DIGITS_RECEIVED: - eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_DTMF_REC '%c'\n", chan->No, - dtmf_code[buffer[1]]); - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_AUDIO; - cmd.parm.num[0] = ISDN_AUDIO_DTMF; - cmd.parm.num[1] = dtmf_code[buffer[1]]; - cmd.arg = chan->No; - ccard->interface.statcallb(&cmd); - break; - default: - eicon_log(ccard, 8, "idi_ind: Ch%d: UNHANDLED UDATA Indication 0x%02x\n", chan->No, buffer[0]); - } -} - -static void -eicon_parse_trace(eicon_card *ccard, unsigned char *buffer, int len) -{ - int i,j,n; - int buflen = len * 3 + 30; - char *p; - struct trace_s { - unsigned long time; - unsigned short size; - unsigned short code; - unsigned char data[1]; - } *q; - - if (!(p = kmalloc(buflen, GFP_ATOMIC))) { - eicon_log(ccard, 1, "idi_err: Ch??: could not allocate trace buffer\n"); - return; - } - memset(p, 0, buflen); - q = (struct trace_s *)buffer; - - if (DebugVar & 512) { - if ((q->code == 3) || (q->code == 4)) { - n = (short) *(q->data); - if (n) { - j = sprintf(p, "DTRC:"); - for (i = 0; i < n; i++) { - j += sprintf(p + j, "%02x ", q->data[i+2]); - } - j += sprintf(p + j, "\n"); - } - } - } else { - j = sprintf(p, "XLOG: %lx %04x %04x ", - q->time, q->size, q->code); - - for (i = 0; i < q->size; i++) { - j += sprintf(p + j, "%02x ", q->data[i]); - } - j += sprintf(p + j, "\n"); - } - if (strlen(p)) - eicon_putstatus(ccard, p); - kfree(p); -} - -void -idi_handle_ind(eicon_card *ccard, struct sk_buff *skb) -{ - int tmp; - char tnum[64]; - int dlev; - int free_buff; - eicon_IND *ind = (eicon_IND *)skb->data; - eicon_chan *chan; - idi_ind_message message; - isdn_ctrl cmd; - - if (!ccard) { - eicon_log(ccard, 1, "idi_err: Ch??: null card in handle_ind\n"); - dev_kfree_skb(skb); - return; - } - - if ((chan = ccard->IdTable[ind->IndId]) == NULL) { - eicon_log(ccard, 1, "idi_err: Ch??: null chan in handle_ind\n"); - dev_kfree_skb(skb); - return; - } - - if ((ind->Ind != 8) && (ind->Ind != 0xc)) - dlev = 144; - else - dlev = 128; - - eicon_log(ccard, dlev, "idi_hdl: Ch%d: Ind=%x Id=%x Ch=%x MInd=%x MLen=%x Len=%x\n", chan->No, - ind->Ind,ind->IndId,ind->IndCh,ind->MInd,ind->MLength,ind->RBuffer.length); - - free_buff = 1; - /* Signal Layer */ - if (chan->e.D3Id == ind->IndId) { - idi_IndParse(ccard, chan, &message, ind->RBuffer.P, ind->RBuffer.length); - switch(ind->Ind) { - case HANGUP: - eicon_log(ccard, 8, "idi_ind: Ch%d: Hangup\n", chan->No); - skb_queue_purge(&chan->e.X); - chan->queued = 0; - chan->pqueued = 0; - chan->waitq = 0; - chan->waitpq = 0; - if (message.e_cau[0] & 0x7f) { - cmd.driver = ccard->myid; - cmd.arg = chan->No; - sprintf(cmd.parm.num,"E%02x%02x", - chan->cause[0]&0x7f, message.e_cau[0]&0x7f); - cmd.command = ISDN_STAT_CAUSE; - ccard->interface.statcallb(&cmd); - } - chan->cause[0] = 0; - if ((chan->fsm_state == EICON_STATE_ACTIVE) || - ((chan->l2prot == ISDN_PROTO_L2_FAX) && - (chan->fsm_state == EICON_STATE_OBWAIT))) { - chan->fsm_state = EICON_STATE_NULL; - } else { - if (chan->e.B2Id) - idi_do_req(ccard, chan, REMOVE, 1); - chan->statectrl &= ~WAITING_FOR_HANGUP; - chan->statectrl &= ~IN_HOLD; - if (chan->statectrl & HAVE_CONN_REQ) { - eicon_log(ccard, 32, "idi_req: Ch%d: queueing delayed conn_req\n", chan->No); - chan->statectrl &= ~HAVE_CONN_REQ; - if ((chan->tskb1) && (chan->tskb2)) { - skb_queue_tail(&chan->e.X, chan->tskb1); - skb_queue_tail(&ccard->sndq, chan->tskb2); - } - chan->tskb1 = NULL; - chan->tskb2 = NULL; - } else { - chan->fsm_state = EICON_STATE_NULL; - cmd.driver = ccard->myid; - cmd.arg = chan->No; - cmd.command = ISDN_STAT_DHUP; - ccard->interface.statcallb(&cmd); - eicon_idi_listen_req(ccard, chan); -#ifdef CONFIG_ISDN_TTY_FAX - chan->fax = 0; -#endif - } - } - break; - case INDICATE_IND: - eicon_log(ccard, 8, "idi_ind: Ch%d: Indicate_Ind\n", chan->No); - if (chan->fsm_state != EICON_STATE_LISTEN) { - eicon_log(ccard, 1, "idi_err: Ch%d: Incoming call on wrong state (%d).\n", - chan->No, chan->fsm_state); - idi_do_req(ccard, chan, HANGUP, 0); - break; - } - chan->fsm_state = EICON_STATE_ICALL; - idi_bc2si(message.bc, message.hlc, message.sin, &chan->si1, &chan->si2); - strcpy(chan->cpn, message.cpn + 1); - strcpy(chan->oad, message.oad); - strcpy(chan->dsa, message.dsa); - strcpy(chan->osa, message.osa); - chan->plan = message.plan; - chan->screen = message.screen; - try_stat_icall_again: - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_ICALL; - cmd.arg = chan->No; - cmd.parm.setup.si1 = chan->si1; - cmd.parm.setup.si2 = chan->si2; - strcpy(tnum, chan->cpn); - if (strlen(chan->dsa)) { - strcat(tnum, "."); - strcat(tnum, chan->dsa); - } - tnum[ISDN_MSNLEN - 1] = 0; - strcpy(cmd.parm.setup.eazmsn, tnum); - strcpy(tnum, chan->oad); - if (strlen(chan->osa)) { - strcat(tnum, "."); - strcat(tnum, chan->osa); - } - tnum[ISDN_MSNLEN - 1] = 0; - strcpy(cmd.parm.setup.phone, tnum); - cmd.parm.setup.plan = chan->plan; - cmd.parm.setup.screen = chan->screen; - tmp = ccard->interface.statcallb(&cmd); - switch(tmp) { - case 0: /* no user responding */ - idi_do_req(ccard, chan, HANGUP, 0); - chan->fsm_state = EICON_STATE_NULL; - break; - case 1: /* alert */ - eicon_log(ccard, 8, "idi_req: Ch%d: Call Alert\n", chan->No); - if ((chan->fsm_state == EICON_STATE_ICALL) || (chan->fsm_state == EICON_STATE_ICALLW)) { - chan->fsm_state = EICON_STATE_ICALL; - idi_do_req(ccard, chan, CALL_ALERT, 0); - } - break; - case 2: /* reject */ - eicon_log(ccard, 8, "idi_req: Ch%d: Call Reject\n", chan->No); - idi_do_req(ccard, chan, REJECT, 0); - break; - case 3: /* incomplete number */ - eicon_log(ccard, 8, "idi_req: Ch%d: Incomplete Number\n", chan->No); - chan->fsm_state = EICON_STATE_ICALLW; - break; - } - break; - case INFO_IND: - eicon_log(ccard, 8, "idi_ind: Ch%d: Info_Ind\n", chan->No); - if ((chan->fsm_state == EICON_STATE_ICALLW) && - (message.cpn[0])) { - strcat(chan->cpn, message.cpn + 1); - goto try_stat_icall_again; - } - break; - case CALL_IND: - eicon_log(ccard, 8, "idi_ind: Ch%d: Call_Ind\n", chan->No); - if ((chan->fsm_state == EICON_STATE_ICALL) || - (chan->fsm_state == EICON_STATE_WMCONN) || - (chan->fsm_state == EICON_STATE_IWAIT)) { - chan->fsm_state = EICON_STATE_IBWAIT; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_DCONN; - cmd.arg = chan->No; - ccard->interface.statcallb(&cmd); - switch(chan->l2prot) { - case ISDN_PROTO_L2_FAX: -#ifdef CONFIG_ISDN_TTY_FAX - if (chan->fax) - chan->fax->phase = ISDN_FAX_PHASE_A; -#endif - break; - case ISDN_PROTO_L2_MODEM: - /* do nothing, wait for connect */ - break; - case ISDN_PROTO_L2_V11096: - case ISDN_PROTO_L2_V11019: - case ISDN_PROTO_L2_V11038: - case ISDN_PROTO_L2_TRANS: - idi_do_req(ccard, chan, N_CONNECT, 1); - break; - default: - /* On most incoming calls we use automatic connect */ - /* idi_do_req(ccard, chan, N_CONNECT, 1); */ - break; - } - } else { - if (chan->fsm_state != EICON_STATE_ACTIVE) - idi_hangup(ccard, chan); - } - break; - case CALL_CON: - eicon_log(ccard, 8, "idi_ind: Ch%d: Call_Con\n", chan->No); - if (chan->fsm_state == EICON_STATE_OCALL) { - /* check if old NetID has been removed */ - if (chan->e.B2Id) { - eicon_log(ccard, 1, "idi_ind: Ch%d: old net_id %x still exist, removing.\n", - chan->No, chan->e.B2Id); - idi_do_req(ccard, chan, REMOVE, 1); - } -#ifdef CONFIG_ISDN_TTY_FAX - if (chan->l2prot == ISDN_PROTO_L2_FAX) { - if (chan->fax) { - chan->fax->phase = ISDN_FAX_PHASE_A; - } else { - eicon_log(ccard, 1, "idi_ind: Call_Con with NULL fax struct, ERROR\n"); - idi_hangup(ccard, chan); - break; - } - } -#endif - chan->fsm_state = EICON_STATE_OBWAIT; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_DCONN; - cmd.arg = chan->No; - ccard->interface.statcallb(&cmd); - - idi_do_req(ccard, chan, ASSIGN, 1); - idi_do_req(ccard, chan, N_CONNECT, 1); - } else - idi_hangup(ccard, chan); - break; - case AOC_IND: - eicon_log(ccard, 8, "idi_ind: Ch%d: Advice of Charge\n", chan->No); - break; - case CALL_HOLD_ACK: - chan->statectrl |= IN_HOLD; - eicon_log(ccard, 8, "idi_ind: Ch%d: Call Hold Ack\n", chan->No); - break; - case SUSPEND_REJ: - eicon_log(ccard, 8, "idi_ind: Ch%d: Suspend Rejected\n", chan->No); - break; - case SUSPEND: - eicon_log(ccard, 8, "idi_ind: Ch%d: Suspend Ack\n", chan->No); - break; - case RESUME: - eicon_log(ccard, 8, "idi_ind: Ch%d: Resume Ack\n", chan->No); - break; - default: - eicon_log(ccard, 8, "idi_ind: Ch%d: UNHANDLED SigIndication 0x%02x\n", chan->No, ind->Ind); - } - } - /* Network Layer */ - else if (chan->e.B2Id == ind->IndId) { - - if (chan->No == ccard->nchannels) { - /* Management Indication */ - if (ind->Ind == 0x04) { /* Trace_Ind */ - eicon_parse_trace(ccard, ind->RBuffer.P, ind->RBuffer.length); - } else { - idi_IndParse(ccard, chan, &message, ind->RBuffer.P, ind->RBuffer.length); - chan->fsm_state = 1; - } - } - else - switch(ind->Ind) { - case N_CONNECT_ACK: - eicon_log(ccard, 16, "idi_ind: Ch%d: N_Connect_Ack\n", chan->No); - if (chan->l2prot == ISDN_PROTO_L2_MODEM) { - chan->fsm_state = EICON_STATE_WMCONN; - break; - } - if (chan->l2prot == ISDN_PROTO_L2_FAX) { -#ifdef CONFIG_ISDN_TTY_FAX - chan->fsm_state = EICON_STATE_ACTIVE; - idi_parse_edata(ccard, chan, ind->RBuffer.P, ind->RBuffer.length); - if (chan->fax) { - if (chan->fax->phase == ISDN_FAX_PHASE_B) { - idi_fax_send_header(ccard, chan, 2); - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_DCS; - ccard->interface.statcallb(&cmd); - } - } - else { - eicon_log(ccard, 1, "idi_ind: N_Connect_Ack with NULL fax struct, ERROR\n"); - } -#endif - break; - } - chan->fsm_state = EICON_STATE_ACTIVE; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_BCONN; - cmd.arg = chan->No; - strcpy(cmd.parm.num, "64000"); - ccard->interface.statcallb(&cmd); - break; - case N_CONNECT: - eicon_log(ccard, 16,"idi_ind: Ch%d: N_Connect\n", chan->No); - chan->e.IndCh = ind->IndCh; - if (chan->e.B2Id) idi_do_req(ccard, chan, N_CONNECT_ACK, 1); - if (chan->l2prot == ISDN_PROTO_L2_FAX) { - break; - } - if (chan->l2prot == ISDN_PROTO_L2_MODEM) { - chan->fsm_state = EICON_STATE_WMCONN; - break; - } - chan->fsm_state = EICON_STATE_ACTIVE; - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_BCONN; - cmd.arg = chan->No; - strcpy(cmd.parm.num, "64000"); - ccard->interface.statcallb(&cmd); - break; - case N_DISC: - eicon_log(ccard, 16, "idi_ind: Ch%d: N_Disc\n", chan->No); - if (chan->e.B2Id) { - skb_queue_purge(&chan->e.X); - idi_do_req(ccard, chan, N_DISC_ACK, 1); - idi_do_req(ccard, chan, REMOVE, 1); - } -#ifdef CONFIG_ISDN_TTY_FAX - if ((chan->l2prot == ISDN_PROTO_L2_FAX) && (chan->fax)){ - idi_parse_edata(ccard, chan, ind->RBuffer.P, ind->RBuffer.length); - idi_fax_hangup(ccard, chan); - } -#endif - chan->e.IndCh = 0; - chan->queued = 0; - chan->pqueued = 0; - chan->waitq = 0; - chan->waitpq = 0; - if (!(chan->statectrl & IN_HOLD)) { - idi_do_req(ccard, chan, HANGUP, 0); - } - if (chan->fsm_state == EICON_STATE_ACTIVE) { - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_BHUP; - cmd.arg = chan->No; - ccard->interface.statcallb(&cmd); - chan->fsm_state = EICON_STATE_NULL; - if (!(chan->statectrl & IN_HOLD)) { - chan->statectrl |= WAITING_FOR_HANGUP; - } - } -#ifdef CONFIG_ISDN_TTY_FAX - chan->fax = 0; -#endif - break; - case N_DISC_ACK: - eicon_log(ccard, 16, "idi_ind: Ch%d: N_Disc_Ack\n", chan->No); -#ifdef CONFIG_ISDN_TTY_FAX - if (chan->l2prot == ISDN_PROTO_L2_FAX) { - idi_parse_edata(ccard, chan, ind->RBuffer.P, ind->RBuffer.length); - idi_fax_hangup(ccard, chan); - } -#endif - break; - case N_DATA_ACK: - eicon_log(ccard, 128, "idi_ind: Ch%d: N_Data_Ack\n", chan->No); - break; - case N_DATA: - skb_pull(skb, sizeof(eicon_IND) - 1); - eicon_log(ccard, 128, "idi_rcv: Ch%d: %d bytes\n", chan->No, skb->len); - if (chan->l2prot == ISDN_PROTO_L2_FAX) { -#ifdef CONFIG_ISDN_TTY_FAX - idi_faxdata_rcv(ccard, chan, skb); -#endif - } else { - ccard->interface.rcvcallb_skb(ccard->myid, chan->No, skb); - free_buff = 0; - } - break; - case N_UDATA: - idi_parse_udata(ccard, chan, ind->RBuffer.P, ind->RBuffer.length); - break; -#ifdef CONFIG_ISDN_TTY_FAX - case N_EDATA: - idi_edata_action(ccard, chan, ind->RBuffer.P, ind->RBuffer.length); - break; -#endif - default: - eicon_log(ccard, 8, "idi_ind: Ch%d: UNHANDLED NetIndication 0x%02x\n", chan->No, ind->Ind); - } - } - else { - eicon_log(ccard, 1, "idi_ind: Ch%d: Ind is neither SIG nor NET !\n", chan->No); - } - if (free_buff) - dev_kfree_skb(skb); -} - -static int -idi_handle_ack_ok(eicon_card *ccard, eicon_chan *chan, eicon_RC *ack) -{ - isdn_ctrl cmd; - int tqueued = 0; - int twaitpq = 0; - - if (ack->RcId != ((chan->e.ReqCh) ? chan->e.B2Id : chan->e.D3Id)) { - /* I don't know why this happens, should not ! */ - /* just ignoring this RC */ - eicon_log(ccard, 16, "idi_ack: Ch%d: RcId %d not equal to last %d\n", chan->No, - ack->RcId, (chan->e.ReqCh) ? chan->e.B2Id : chan->e.D3Id); - return 1; - } - - /* Management Interface */ - if (chan->No == ccard->nchannels) { - /* Managementinterface: changing state */ - if (chan->e.Req != 0x02) - chan->fsm_state = 1; - } - - /* Remove an Id */ - if (chan->e.Req == REMOVE) { - if (ack->Reference != chan->e.ref) { - /* This should not happen anymore */ - eicon_log(ccard, 16, "idi_ack: Ch%d: Rc-Ref %d not equal to stored %d\n", chan->No, - ack->Reference, chan->e.ref); - } - ccard->IdTable[ack->RcId] = NULL; - if (!chan->e.ReqCh) - chan->e.D3Id = 0; - else - chan->e.B2Id = 0; - eicon_log(ccard, 16, "idi_ack: Ch%d: Removed : Id=%x Ch=%d (%s)\n", chan->No, - ack->RcId, ack->RcCh, (chan->e.ReqCh)? "Net":"Sig"); - return 1; - } - - /* Signal layer */ - if (!chan->e.ReqCh) { - eicon_log(ccard, 16, "idi_ack: Ch%d: RC OK Id=%x Ch=%d (ref:%d)\n", chan->No, - ack->RcId, ack->RcCh, ack->Reference); - } else { - /* Network layer */ - switch(chan->e.Req & 0x0f) { - case N_CONNECT: - chan->e.IndCh = ack->RcCh; - eicon_log(ccard, 16, "idi_ack: Ch%d: RC OK Id=%x Ch=%d (ref:%d)\n", chan->No, - ack->RcId, ack->RcCh, ack->Reference); - break; - case N_MDATA: - case N_DATA: - tqueued = chan->queued; - twaitpq = chan->waitpq; - if ((chan->e.Req & 0x0f) == N_DATA) { - chan->waitpq = 0; - if(chan->pqueued) - chan->pqueued--; -#ifdef CONFIG_ISDN_TTY_FAX - if (chan->l2prot == ISDN_PROTO_L2_FAX) { - if (((chan->queued - chan->waitq) < 1) && - (chan->fax2.Eop)) { - chan->fax2.Eop = 0; - if (chan->fax) { - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_FAXIND; - cmd.arg = chan->No; - chan->fax->r_code = ISDN_TTY_FAX_SENT; - ccard->interface.statcallb(&cmd); - } - else { - eicon_log(ccard, 1, "idi_ack: Sent with NULL fax struct, ERROR\n"); - } - } - } -#endif - } - chan->queued -= chan->waitq; - if (chan->queued < 0) chan->queued = 0; - if (((chan->e.Req & 0x0f) == N_DATA) && (tqueued)) { - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_BSENT; - cmd.arg = chan->No; - cmd.parm.length = twaitpq; - ccard->interface.statcallb(&cmd); - } - break; - default: - eicon_log(ccard, 16, "idi_ack: Ch%d: RC OK Id=%x Ch=%d (ref:%d)\n", chan->No, - ack->RcId, ack->RcCh, ack->Reference); - } - } - return 1; -} - -void -idi_handle_ack(eicon_card *ccard, struct sk_buff *skb) -{ - int j; - eicon_RC *ack = (eicon_RC *)skb->data; - eicon_chan *chan; - isdn_ctrl cmd; - int dCh = -1; - - if (!ccard) { - eicon_log(ccard, 1, "idi_err: Ch??: null card in handle_ack\n"); - dev_kfree_skb(skb); - return; - } - - if ((chan = ccard->IdTable[ack->RcId]) != NULL) - dCh = chan->No; - - switch (ack->Rc) { - case OK_FC: - case N_FLOW_CONTROL: - case ASSIGN_RC: - eicon_log(ccard, 1, "idi_ack: Ch%d: unhandled RC 0x%x\n", - dCh, ack->Rc); - break; - case READY_INT: - case TIMER_INT: - /* we do nothing here */ - break; - - case OK: - if (!chan) { - eicon_log(ccard, 1, "idi_ack: Ch%d: OK on chan without Id\n", dCh); - break; - } - if (!idi_handle_ack_ok(ccard, chan, ack)) - chan = NULL; - break; - - case ASSIGN_OK: - if (chan) { - eicon_log(ccard, 1, "idi_ack: Ch%d: ASSIGN-OK on chan already assigned (%x,%x)\n", - chan->No, chan->e.D3Id, chan->e.B2Id); - } - for(j = 0; j < ccard->nchannels + 1; j++) { - if ((ccard->bch[j].e.ref == ack->Reference) && - (ccard->bch[j].e.Req == ASSIGN)) { - if (!ccard->bch[j].e.ReqCh) - ccard->bch[j].e.D3Id = ack->RcId; - else - ccard->bch[j].e.B2Id = ack->RcId; - ccard->IdTable[ack->RcId] = &ccard->bch[j]; - chan = &ccard->bch[j]; - break; - } - } - eicon_log(ccard, 16, "idi_ack: Ch%d: Id %x assigned (%s)\n", j, - ack->RcId, (ccard->bch[j].e.ReqCh)? "Net":"Sig"); - if (j > ccard->nchannels) { - eicon_log(ccard, 24, "idi_ack: Ch??: ref %d not found for Id %d\n", - ack->Reference, ack->RcId); - } - break; - - case OUT_OF_RESOURCES: - case UNKNOWN_COMMAND: - case WRONG_COMMAND: - case WRONG_ID: - case 0x08: /* ADAPTER_DEAD */ - case WRONG_CH: - case UNKNOWN_IE: - case WRONG_IE: - default: - if (!chan) { - eicon_log(ccard, 1, "idi_ack: Ch%d: Not OK !! on chan without Id\n", dCh); - break; - } else - switch (chan->e.Req) { - case 12: /* Alert */ - eicon_log(ccard, 2, "idi_err: Ch%d: Alert Not OK : Rc=%d Id=%x Ch=%d\n", - dCh, ack->Rc, ack->RcId, ack->RcCh); - break; - default: - if (dCh != ccard->nchannels) - eicon_log(ccard, 1, "idi_err: Ch%d: Ack Not OK !!: Rc=%d Id=%x Ch=%d Req=%d\n", - dCh, ack->Rc, ack->RcId, ack->RcCh, chan->e.Req); - } - if (dCh == ccard->nchannels) { /* Management */ - chan->fsm_state = 2; - eicon_log(ccard, 8, "idi_err: Ch%d: Ack Not OK !!: Rc=%d Id=%x Ch=%d Req=%d\n", - dCh, ack->Rc, ack->RcId, ack->RcCh, chan->e.Req); - } else if (dCh >= 0) { - /* any other channel */ - /* card reports error: we hangup */ - idi_hangup(ccard, chan); - cmd.driver = ccard->myid; - cmd.command = ISDN_STAT_DHUP; - cmd.arg = chan->No; - ccard->interface.statcallb(&cmd); - } - } - if (chan) { - chan->e.ref = 0; - chan->e.busy = 0; - } - dev_kfree_skb(skb); -} - -int -idi_send_data(eicon_card *card, eicon_chan *chan, int ack, struct sk_buff *skb, int que, int chk) -{ - struct sk_buff *xmit_skb; - struct sk_buff *skb2; - eicon_REQ *reqbuf; - eicon_chan_ptr *chan2; - int len, plen = 0, offset = 0; - - if ((!card) || (!chan)) { - eicon_log(card, 1, "idi_err: Ch??: null card/chan in send_data\n"); - return -1; - } - - if (chan->fsm_state != EICON_STATE_ACTIVE) { - eicon_log(card, 1, "idi_snd: Ch%d: send bytes on state %d !\n", chan->No, chan->fsm_state); - return -ENODEV; - } - - len = skb->len; - if (len > EICON_MAX_QUEUE) /* too much for the shared memory */ - return -1; - if (!len) - return 0; - - if ((chk) && (chan->pqueued > 1)) - return 0; - - eicon_log(card, 128, "idi_snd: Ch%d: %d bytes (Pqueue=%d)\n", - chan->No, len, chan->pqueued); - while(offset < len) { - - plen = ((len - offset) > 270) ? 270 : len - offset; - - xmit_skb = alloc_skb(plen + sizeof(eicon_REQ), GFP_ATOMIC); - skb2 = alloc_skb(sizeof(eicon_chan_ptr), GFP_ATOMIC); - - if ((!xmit_skb) || (!skb2)) { - eicon_log(card, 1, "idi_err: Ch%d: alloc_skb failed in send_data()\n", chan->No); - if (xmit_skb) - dev_kfree_skb(skb); - if (skb2) - dev_kfree_skb(skb2); - return -ENOMEM; - } - - chan2 = (eicon_chan_ptr *)skb_put(skb2, sizeof(eicon_chan_ptr)); - chan2->ptr = chan; - - reqbuf = (eicon_REQ *)skb_put(xmit_skb, plen + sizeof(eicon_REQ)); - if ((len - offset) > 270) { - reqbuf->Req = N_MDATA; - } else { - reqbuf->Req = N_DATA; - /* if (ack) reqbuf->Req |= N_D_BIT; */ - } - reqbuf->ReqCh = chan->e.IndCh; - reqbuf->ReqId = 1; - memcpy(&reqbuf->XBuffer.P, skb->data + offset, plen); - reqbuf->XBuffer.length = plen; - reqbuf->Reference = 1; /* Net Entity */ - - skb_queue_tail(&chan->e.X, xmit_skb); - skb_queue_tail(&card->sndq, skb2); - - offset += plen; - } - if (que) { - chan->queued += len; - chan->pqueued++; - } - eicon_tx_request(card); - dev_kfree_skb(skb); - return len; -} - - -static int -eicon_idi_manage_assign(eicon_card *card) -{ - struct sk_buff *skb; - struct sk_buff *skb2; - eicon_REQ *reqbuf; - eicon_chan *chan; - eicon_chan_ptr *chan2; - - chan = &(card->bch[card->nchannels]); - - skb = alloc_skb(270 + sizeof(eicon_REQ), GFP_ATOMIC); - skb2 = alloc_skb(sizeof(eicon_chan_ptr), GFP_ATOMIC); - - if ((!skb) || (!skb2)) { - eicon_log(card, 1, "idi_err: alloc_skb failed in manage_assign()\n"); - if (skb) - dev_kfree_skb(skb); - if (skb2) - dev_kfree_skb(skb2); - return -ENOMEM; - } - - chan2 = (eicon_chan_ptr *)skb_put(skb2, sizeof(eicon_chan_ptr)); - chan2->ptr = chan; - - reqbuf = (eicon_REQ *)skb_put(skb, 270 + sizeof(eicon_REQ)); - - reqbuf->XBuffer.P[0] = 0; - reqbuf->Req = ASSIGN; - reqbuf->ReqCh = 0; - reqbuf->ReqId = MAN_ID; - reqbuf->XBuffer.length = 1; - reqbuf->Reference = 2; /* Man Entity */ - - skb_queue_tail(&chan->e.X, skb); - skb_queue_tail(&card->sndq, skb2); - eicon_tx_request(card); - return(0); -} - -int -eicon_idi_manage(eicon_card *card, eicon_manifbuf *mb) -{ - int l = 0; - int ret = 0; - int timeout; - int i; - struct sk_buff *skb; - struct sk_buff *skb2; - eicon_REQ *reqbuf; - eicon_chan *chan; - eicon_chan_ptr *chan2; - - chan = &(card->bch[card->nchannels]); - - if (!(chan->e.D3Id)) { - chan->e.D3Id = 1; - skb_queue_purge(&chan->e.X); - chan->e.busy = 0; - - if ((ret = eicon_idi_manage_assign(card))) { - chan->e.D3Id = 0; - return(ret); - } - - timeout = jiffies + 50; - while (time_before(jiffies, timeout)) { - if (chan->e.B2Id) break; - SLEEP(10); - } - if (!chan->e.B2Id) { - chan->e.D3Id = 0; - return -EIO; - } - } - - chan->fsm_state = 0; - - if (!(manbuf = kmalloc(sizeof(eicon_manifbuf), GFP_KERNEL))) { - eicon_log(card, 1, "idi_err: alloc_manifbuf failed\n"); - return -ENOMEM; - } - if (copy_from_user(manbuf, mb, sizeof(eicon_manifbuf))) { - kfree(manbuf); - return -EFAULT; - } - - skb = alloc_skb(270 + sizeof(eicon_REQ), GFP_ATOMIC); - skb2 = alloc_skb(sizeof(eicon_chan_ptr), GFP_ATOMIC); - - if ((!skb) || (!skb2)) { - eicon_log(card, 1, "idi_err_manif: alloc_skb failed in manage()\n"); - if (skb) - dev_kfree_skb(skb); - if (skb2) - dev_kfree_skb(skb2); - kfree(manbuf); - return -ENOMEM; - } - - chan2 = (eicon_chan_ptr *)skb_put(skb2, sizeof(eicon_chan_ptr)); - chan2->ptr = chan; - - reqbuf = (eicon_REQ *)skb_put(skb, 270 + sizeof(eicon_REQ)); - - reqbuf->XBuffer.P[l++] = ESC; - reqbuf->XBuffer.P[l++] = 6; - reqbuf->XBuffer.P[l++] = 0x80; - for (i = 0; i < manbuf->length[0]; i++) - reqbuf->XBuffer.P[l++] = manbuf->data[i]; - reqbuf->XBuffer.P[1] = manbuf->length[0] + 1; - - reqbuf->XBuffer.P[l++] = 0; - reqbuf->Req = (manbuf->count) ? manbuf->count : MAN_READ; - reqbuf->ReqCh = 0; - reqbuf->ReqId = 1; - reqbuf->XBuffer.length = l; - reqbuf->Reference = 2; /* Man Entity */ - - skb_queue_tail(&chan->e.X, skb); - skb_queue_tail(&card->sndq, skb2); - - manbuf->count = 0; - manbuf->pos = 0; - - eicon_tx_request(card); - - timeout = jiffies + 50; - while (time_before(jiffies, timeout)) { - if (chan->fsm_state) break; - SLEEP(10); - } - if ((!chan->fsm_state) || (chan->fsm_state == 2)) { - kfree(manbuf); - return -EIO; - } - if (copy_to_user(mb, manbuf, sizeof(eicon_manifbuf))) { - kfree(manbuf); - return -EFAULT; - } - - kfree(manbuf); - return(0); -} diff -Nru a/drivers/isdn/hardware/eicon/i4l_idi.h b/drivers/isdn/hardware/eicon/i4l_idi.h --- a/drivers/isdn/hardware/eicon/i4l_idi.h Sun Mar 28 13:12:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,381 +0,0 @@ -/* $Id: i4l_idi.h,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $ - * - * ISDN interface module for Eicon active cards. - * I4L - IDI Interface - * - * Copyright 1998-2000 by Armin Schindler (mac@melware.de) - * Copyright 1999-2002 Cytronics & Melware (info@melware.de) - * - * This software may be used and distributed according to the terms - * of the GNU General Public License, incorporated herein by reference. - */ - -#ifndef E_IDI_H -#define E_IDI_H - -#include - -#undef N_DATA -#undef ID_MASK - -#include "pc.h" - -#define AOC_IND 26 /* Advice of Charge */ -#define PI 0x1e /* Progress Indicator */ -#define NI 0x27 /* Notification Indicator */ - -/* defines for statectrl */ -#define WAITING_FOR_HANGUP 0x01 -#define HAVE_CONN_REQ 0x02 -#define IN_HOLD 0x04 - -typedef struct { - char cpn[32]; - char oad[32]; - char dsa[32]; - char osa[32]; - __u8 plan; - __u8 screen; - __u8 sin[4]; - __u8 chi[4]; - __u8 e_chi[4]; - __u8 bc[12]; - __u8 e_bc[12]; - __u8 llc[18]; - __u8 hlc[5]; - __u8 cau[4]; - __u8 e_cau[2]; - __u8 e_mt; - __u8 dt[6]; - char display[83]; - char keypad[35]; - char rdn[32]; -} idi_ind_message; - -typedef struct { - __u16 next __attribute__ ((packed)); - __u8 Req __attribute__ ((packed)); - __u8 ReqId __attribute__ ((packed)); - __u8 ReqCh __attribute__ ((packed)); - __u8 Reserved1 __attribute__ ((packed)); - __u16 Reference __attribute__ ((packed)); - __u8 Reserved[8] __attribute__ ((packed)); - eicon_PBUFFER XBuffer; -} eicon_REQ; - -typedef struct { - __u16 next __attribute__ ((packed)); - __u8 Rc __attribute__ ((packed)); - __u8 RcId __attribute__ ((packed)); - __u8 RcCh __attribute__ ((packed)); - __u8 Reserved1 __attribute__ ((packed)); - __u16 Reference __attribute__ ((packed)); - __u8 Reserved2[8] __attribute__ ((packed)); -} eicon_RC; - -typedef struct { - __u16 next __attribute__ ((packed)); - __u8 Ind __attribute__ ((packed)); - __u8 IndId __attribute__ ((packed)); - __u8 IndCh __attribute__ ((packed)); - __u8 MInd __attribute__ ((packed)); - __u16 MLength __attribute__ ((packed)); - __u16 Reference __attribute__ ((packed)); - __u8 RNR __attribute__ ((packed)); - __u8 Reserved __attribute__ ((packed)); - __u32 Ack __attribute__ ((packed)); - eicon_PBUFFER RBuffer; -} eicon_IND; - -typedef struct { - __u8 *Data; - unsigned int Size; - unsigned int Len; - __u8 *Next; -} eicon_OBJBUFFER; - -extern int idi_do_req(eicon_card *card, eicon_chan *chan, int cmd, int layer); -extern int idi_hangup(eicon_card *card, eicon_chan *chan); -extern int idi_connect_res(eicon_card *card, eicon_chan *chan); -extern int eicon_idi_listen_req(eicon_card *card, eicon_chan *chan); -extern int idi_connect_req(eicon_card *card, eicon_chan *chan, char *phone, - char *eazmsn, int si1, int si2); - -extern void idi_handle_ack(eicon_card *card, struct sk_buff *skb); -extern void idi_handle_ind(eicon_card *card, struct sk_buff *skb); -extern int eicon_idi_manage(eicon_card *card, eicon_manifbuf *mb); -extern int idi_send_data(eicon_card *card, eicon_chan *chan, int ack, struct sk_buff *skb, int que, int chk); -extern void idi_audio_cmd(eicon_card *ccard, eicon_chan *chan, int cmd, u_char *value); -extern int capipmsg(eicon_card *card, eicon_chan *chan, capi_msg *cm); -#ifdef CONFIG_ISDN_TTY_FAX -extern void idi_fax_cmd(eicon_card *card, eicon_chan *chan); -extern int idi_faxdata_send(eicon_card *ccard, eicon_chan *chan, struct sk_buff *skb); -#endif - -#include "dsp_defs.h" - -#define DSP_UDATA_REQUEST_SWITCH_FRAMER 1 -/* -parameters: - transmit framer type - receive framer type -*/ - -#define DSP_REQUEST_SWITCH_FRAMER_HDLC 0 -#define DSP_REQUEST_SWITCH_FRAMER_TRANSPARENT 1 -#define DSP_REQUEST_SWITCH_FRAMER_ASYNC 2 - - -#define DSP_UDATA_REQUEST_CLEARDOWN 2 -/* -parameters: - - none - -*/ - - -#define DSP_UDATA_REQUEST_TX_CONFIRMATION_ON 3 -/* -parameters: - - none - -*/ - - -#define DSP_UDATA_REQUEST_TX_CONFIRMATION_OFF 4 -/* -parameters: - - none - -*/ - -typedef struct eicon_dsp_ind { - __u16 time __attribute__ ((packed)); - __u8 norm __attribute__ ((packed)); - __u16 options __attribute__ ((packed)); - __u32 speed __attribute__ ((packed)); - __u16 delay __attribute__ ((packed)); - __u32 txspeed __attribute__ ((packed)); - __u32 rxspeed __attribute__ ((packed)); -} eicon_dsp_ind; - -#define DSP_CONNECTED_OPTION_V42_TRANS 0x0002 -#define DSP_CONNECTED_OPTION_V42_LAPM 0x0004 -#define DSP_CONNECTED_OPTION_SHORT_TRAIN 0x0008 -#define DSP_CONNECTED_OPTION_TALKER_ECHO_PROTECT 0x0010 - -#define DSP_UDATA_INDICATION_DISCONNECT 5 -/* -returns: - cause -*/ - -#define DSP_DISCONNECT_CAUSE_NONE 0x00 -#define DSP_DISCONNECT_CAUSE_BUSY_TONE 0x01 -#define DSP_DISCONNECT_CAUSE_CONGESTION_TONE 0x02 -#define DSP_DISCONNECT_CAUSE_INCOMPATIBILITY 0x03 -#define DSP_DISCONNECT_CAUSE_CLEARDOWN 0x04 -#define DSP_DISCONNECT_CAUSE_TRAINING_TIMEOUT 0x05 - -#define DSP_UDATA_INDICATION_TX_CONFIRMATION 6 -/* -returns: - confirmation number -*/ - - -#define DSP_UDATA_REQUEST_SEND_DTMF_DIGITS 16 -/* -parameters: - tone duration (ms) - gap duration (ms) - digit 0 tone code - ... - digit n tone code -*/ - -#define DSP_SEND_DTMF_DIGITS_HEADER_LENGTH 5 - -#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_697_HZ 0x00 -#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_770_HZ 0x01 -#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_852_HZ 0x02 -#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_941_HZ 0x03 -#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_MASK 0x03 -#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1209_HZ 0x00 -#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1336_HZ 0x04 -#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1477_HZ 0x08 -#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1633_HZ 0x0c -#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_MASK 0x0c - -#define DSP_DTMF_DIGIT_TONE_CODE_0 0x07 -#define DSP_DTMF_DIGIT_TONE_CODE_1 0x00 -#define DSP_DTMF_DIGIT_TONE_CODE_2 0x04 -#define DSP_DTMF_DIGIT_TONE_CODE_3 0x08 -#define DSP_DTMF_DIGIT_TONE_CODE_4 0x01 -#define DSP_DTMF_DIGIT_TONE_CODE_5 0x05 -#define DSP_DTMF_DIGIT_TONE_CODE_6 0x09 -#define DSP_DTMF_DIGIT_TONE_CODE_7 0x02 -#define DSP_DTMF_DIGIT_TONE_CODE_8 0x06 -#define DSP_DTMF_DIGIT_TONE_CODE_9 0x0a -#define DSP_DTMF_DIGIT_TONE_CODE_STAR 0x03 -#define DSP_DTMF_DIGIT_TONE_CODE_HASHMARK 0x0b -#define DSP_DTMF_DIGIT_TONE_CODE_A 0x0c -#define DSP_DTMF_DIGIT_TONE_CODE_B 0x0d -#define DSP_DTMF_DIGIT_TONE_CODE_C 0x0e -#define DSP_DTMF_DIGIT_TONE_CODE_D 0x0f - - -#define DSP_UDATA_INDICATION_DTMF_DIGITS_SENT 16 -/* -returns: - - none - - One indication will be sent for every request. -*/ - - -#define DSP_UDATA_REQUEST_ENABLE_DTMF_RECEIVER 17 -/* -parameters: - tone duration (ms) - gap duration (ms) -*/ -typedef struct enable_dtmf_s { - __u16 tone; - __u16 gap; -} enable_dtmf_s; - -#define DSP_UDATA_REQUEST_DISABLE_DTMF_RECEIVER 18 -/* -parameters: - - none - -*/ - -#define DSP_UDATA_INDICATION_DTMF_DIGITS_RECEIVED 17 -/* -returns: - digit 0 tone code - ... - digit n tone code -*/ - -#define DSP_DTMF_DIGITS_RECEIVED_HEADER_LENGTH 1 - - -#define DSP_UDATA_INDICATION_MODEM_CALLING_TONE 18 -/* -returns: - - none - -*/ - -#define DSP_UDATA_INDICATION_FAX_CALLING_TONE 19 -/* -returns: - - none - -*/ - -#define DSP_UDATA_INDICATION_ANSWER_TONE 20 -/* -returns: - - none - -*/ - -/* ============= FAX ================ */ - -#define EICON_FAXID_LEN 20 - -typedef struct eicon_t30_s { - __u8 code; - __u8 rate; - __u8 resolution; - __u8 format; - __u8 pages_low; - __u8 pages_high; - __u8 atf; - __u8 control_bits_low; - __u8 control_bits_high; - __u8 feature_bits_low; - __u8 feature_bits_high; - __u8 universal_5; - __u8 universal_6; - __u8 universal_7; - __u8 station_id_len; - __u8 head_line_len; - __u8 station_id[EICON_FAXID_LEN]; -/* __u8 head_line[]; */ -} eicon_t30_s; - - /* EDATA transmit messages */ -#define EDATA_T30_DIS 0x01 -#define EDATA_T30_FTT 0x02 -#define EDATA_T30_MCF 0x03 - - /* EDATA receive messages */ -#define EDATA_T30_DCS 0x81 -#define EDATA_T30_TRAIN_OK 0x82 -#define EDATA_T30_EOP 0x83 -#define EDATA_T30_MPS 0x84 -#define EDATA_T30_EOM 0x85 -#define EDATA_T30_DTC 0x86 - -#define T30_FORMAT_SFF 0 -#define T30_FORMAT_ASCII 1 -#define T30_FORMAT_COUNT 2 - -#define T30_CONTROL_BIT_DISABLE_FINE 0x0001 -#define T30_CONTROL_BIT_ENABLE_ECM 0x0002 -#define T30_CONTROL_BIT_ECM_64_BYTES 0x0004 -#define T30_CONTROL_BIT_ENABLE_2D_CODING 0x0008 -#define T30_CONTROL_BIT_ENABLE_T6_CODING 0x0010 -#define T30_CONTROL_BIT_ENABLE_UNCOMPR 0x0020 -#define T30_CONTROL_BIT_ACCEPT_POLLING 0x0040 -#define T30_CONTROL_BIT_REQUEST_POLLING 0x0080 -#define T30_CONTROL_BIT_MORE_DOCUMENTS 0x0100 - -#define T30_CONTROL_BIT_ALL_FEATURES\ - (T30_CONTROL_BIT_ENABLE_ECM | T30_CONTROL_BIT_ENABLE_2D_CODING |\ - T30_CONTROL_BIT_ENABLE_T6_CODING | T30_CONTROL_BIT_ENABLE_UNCOMPR) - -#define T30_FEATURE_BIT_FINE 0x0001 -#define T30_FEATURE_BIT_ECM 0x0002 -#define T30_FEATURE_BIT_ECM_64_BYTES 0x0004 -#define T30_FEATURE_BIT_2D_CODING 0x0008 -#define T30_FEATURE_BIT_T6_CODING 0x0010 -#define T30_FEATURE_BIT_UNCOMPR_ENABLED 0x0020 -#define T30_FEATURE_BIT_POLLING 0x0040 - -#define FAX_OBJECT_DOCU 1 -#define FAX_OBJECT_PAGE 2 -#define FAX_OBJECT_LINE 3 - -#define T4_EOL 0x800 -#define T4_EOL_BITSIZE 12 -#define T4_EOL_DWORD (T4_EOL << (32 - T4_EOL_BITSIZE)) -#define T4_EOL_MASK_DWORD ((__u32) -1 << (32 - T4_EOL_BITSIZE)) - -#define SFF_LEN_FLD_SIZE 3 - -#define _DLE_ 0x10 -#define _ETX_ 0x03 - -typedef struct eicon_sff_dochead { - __u32 id __attribute__ ((packed)); - __u8 version __attribute__ ((packed)); - __u8 reserved1 __attribute__ ((packed)); - __u16 userinfo __attribute__ ((packed)); - __u16 pagecount __attribute__ ((packed)); - __u16 off1pagehead __attribute__ ((packed)); - __u32 offnpagehead __attribute__ ((packed)); - __u32 offdocend __attribute__ ((packed)); -} eicon_sff_dochead; - -typedef struct eicon_sff_pagehead { - __u8 pageheadid __attribute__ ((packed)); - __u8 pageheadlen __attribute__ ((packed)); - __u8 resvert __attribute__ ((packed)); - __u8 reshoriz __attribute__ ((packed)); - __u8 coding __attribute__ ((packed)); - __u8 reserved2 __attribute__ ((packed)); - __u16 linelength __attribute__ ((packed)); - __u16 pagelength __attribute__ ((packed)); - __u32 offprevpage __attribute__ ((packed)); - __u32 offnextpage __attribute__ ((packed)); -} eicon_sff_pagehead; - -#endif /* E_IDI_H */ diff -Nru a/drivers/isdn/hardware/eicon/i4lididrv.c b/drivers/isdn/hardware/eicon/i4lididrv.c --- a/drivers/isdn/hardware/eicon/i4lididrv.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,1418 +0,0 @@ -/* $Id: i4lididrv.c,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $ - * - * ISDN interface module for Eicon active cards. - * I4L - IDI Interface - * - * Copyright 1998-2000 by Armin Schindler (mac@melware.de) - * Copyright 1999-2002 Cytronics & Melware (info@melware.de) - * - * Thanks to Deutsche Mailbox Saar-Lor-Lux GmbH - * for sponsoring and testing fax - * capabilities with Diva Server cards. - * (dor@deutschemailbox.de) - * - * This software may be used and distributed according to the terms - * of the GNU General Public License, incorporated herein by reference. - */ - -#include -#include -#include -#include -#include - -#include "i4lididrv.h" -#include -#include "divasync.h" - -#include "../avmb1/capicmd.h" /* this should be moved in a common place */ - -#define INCLUDE_INLINE_FUNCS - -static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains - start of card-list */ - -static char *DRIVERNAME = "Eicon Diva - native I4L Interface driver (http://www.melware.net)"; -static char *DRIVERLNAME = "diva2i4l"; -static char *DRIVERRELEASE = "2.0"; -static char *eicon_revision = "$Revision: 1.1.2.2 $"; -extern char *eicon_idi_revision; - -#define EICON_CTRL_VERSION 2 - -ulong DebugVar; - -static spinlock_t status_lock; -static spinlock_t ll_lock; - -#define MAX_DESCRIPTORS 32 -extern void DIVA_DIDD_Read(DESCRIPTOR *, int); - -static dword notify_handle; -static DESCRIPTOR DAdapter; -static DESCRIPTOR MAdapter; - -/* Parameter to be set by insmod */ -static char *id = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -static int debug = 1; - -MODULE_DESCRIPTION( "ISDN4Linux Interface for Eicon active card driver"); -MODULE_AUTHOR( "Armin Schindler"); -MODULE_SUPPORTED_DEVICE( "ISDN subsystem and Eicon active card driver"); -MODULE_PARM_DESC(id, "ID-String for ISDN4Linux"); -MODULE_PARM(id, "s"); -MODULE_PARM_DESC(debug, "Initial debug value"); -MODULE_PARM(debug, "i"); -MODULE_LICENSE("GPL"); - -void no_printf (unsigned char * x ,...) -{ - /* dummy debug function */ -} -DIVA_DI_PRINTF dprintf = no_printf; - -#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR) -#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG) -#include "debuglib.c" - -static char * -eicon_getrev(const char *revision) -{ - char *rev; - char *p; - if ((p = strchr(revision, ':'))) { - rev = p + 2; - p = strchr(rev, '$'); - *--p = 0; - } else rev = "1.0"; - return rev; - -} - -static void -stop_dbg(void) -{ - DbgDeregister(); - memset(&MAdapter, 0, sizeof(MAdapter)); - dprintf = no_printf; -} - -static eicon_chan * -find_channel(eicon_card *card, int channel) -{ - if ((channel >= 0) && (channel < card->nchannels)) - return &(card->bch[channel]); - eicon_log(card, 1, "%s: Invalid channel %d\n", DRIVERLNAME, channel); - return NULL; -} - -static void -eicon_rx_request(struct eicon_card *card) -{ - struct sk_buff *skb, *skb2, *skb_new; - eicon_IND *ind, *ind2, *ind_new; - eicon_chan *chan; - - if (!card) { - eicon_log(card, 1, "%s: NULL card in rcv_dispatch !\n", DRIVERLNAME); - return; - } - - while((skb = skb_dequeue(&card->rcvq))) { - ind = (eicon_IND *)skb->data; - - if ((chan = card->IdTable[ind->IndId]) == NULL) { - if (DebugVar & 1) { - switch(ind->Ind) { - case N_DISC_ACK: - /* doesn't matter if this happens */ - break; - default: - eicon_log(card, 1, "idi: Indication for unknown channel Ind=%d Id=%x\n", ind->Ind, ind->IndId); - eicon_log(card, 1, "idi_hdl: Ch??: Ind=%d Id=%x Ch=%d MInd=%d MLen=%d Len=%d\n", - ind->Ind,ind->IndId,ind->IndCh,ind->MInd,ind->MLength,ind->RBuffer.length); - } - } - dev_kfree_skb(skb); - continue; - } - - if (chan->e.complete) { /* check for rec-buffer chaining */ - if (ind->MLength == ind->RBuffer.length) { - chan->e.complete = 1; - idi_handle_ind(card, skb); - continue; - } - else { - chan->e.complete = 0; - ind->Ind = ind->MInd; - skb_queue_tail(&chan->e.R, skb); - continue; - } - } - else { - if (!(skb2 = skb_dequeue(&chan->e.R))) { - chan->e.complete = 1; - eicon_log(card, 1, "%s: buffer incomplete, but 0 in queue\n", DRIVERLNAME); - dev_kfree_skb(skb); - continue; - } - ind2 = (eicon_IND *)skb2->data; - skb_new = alloc_skb(((sizeof(eicon_IND)-1)+ind->RBuffer.length+ind2->RBuffer.length), - GFP_ATOMIC); - if (!skb_new) { - eicon_log(card, 1, "%s: skb_alloc failed in rcv_dispatch()\n", DRIVERLNAME); - dev_kfree_skb(skb); - dev_kfree_skb(skb2); - continue; - } - ind_new = (eicon_IND *)skb_put(skb_new, - ((sizeof(eicon_IND)-1)+ind->RBuffer.length+ind2->RBuffer.length)); - ind_new->Ind = ind2->Ind; - ind_new->IndId = ind2->IndId; - ind_new->IndCh = ind2->IndCh; - ind_new->MInd = ind2->MInd; - ind_new->MLength = ind2->MLength; - ind_new->RBuffer.length = ind2->RBuffer.length + ind->RBuffer.length; - memcpy(&ind_new->RBuffer.P, &ind2->RBuffer.P, ind2->RBuffer.length); - memcpy((&ind_new->RBuffer.P)+ind2->RBuffer.length, &ind->RBuffer.P, ind->RBuffer.length); - dev_kfree_skb(skb); - dev_kfree_skb(skb2); - if (ind->MLength == ind->RBuffer.length) { - chan->e.complete = 2; - idi_handle_ind(card, skb_new); - continue; - } - else { - chan->e.complete = 0; - skb_queue_tail(&chan->e.R, skb_new); - continue; - } - } - } -} - -static void -eicon_ack_request(struct eicon_card *card) -{ - struct sk_buff *skb; - - if (!card) { - eicon_log(card, 1, "%s: NULL card in ack_dispatch!\n", DRIVERLNAME); - return; - } - while((skb = skb_dequeue(&card->rackq))) { - idi_handle_ack(card, skb); - } -} - -/* - * IDI-Callback function - */ -static void -eicon_idi_callback(ENTITY *de) -{ - eicon_card *ccard = (eicon_card *)de->R; - struct sk_buff *skb; - eicon_RC *ack; - eicon_IND *ind; - int len = 0; - - if (de->complete == 255) { - /* Return Code */ - skb = alloc_skb(sizeof(eicon_RC), GFP_ATOMIC); - if (!skb) { - eicon_log(ccard, 1, "%s: skb_alloc failed in _idi_callback()\n", DRIVERLNAME); - } else { - ack = (eicon_RC *)skb_put(skb, sizeof(eicon_RC)); - ack->Rc = de->Rc; - if (de->Rc == ASSIGN_OK) { - ack->RcId = de->Id; - de->user[1] = de->Id; - } else { - ack->RcId = de->user[1]; - } - ack->RcCh = de->RcCh; - ack->Reference = de->user[0]; - skb_queue_tail(&ccard->rackq, skb); - eicon_ack_request(ccard); - eicon_log(ccard, 128, "idi_cbk: Ch%d: Rc=%x Id=%x RLen=%x compl=%x\n", - de->user[0], de->Rc, ack->RcId, de->RLength, de->complete); - DBG_TRC(("idi_cbk: Ch%d: Rc=%x Id=%x RLen=%x compl=%x", - de->user[0], de->Rc, ack->RcId, de->RLength, de->complete)) - de->Rc = 0; - } - } else { - /* Indication */ - if (de->complete) { - len = de->RLength; - } else { - len = 270; - if (de->RLength <= 270) - eicon_log(ccard, 1, "idi_cbk: ind not complete but <= 270\n"); - } - skb = alloc_skb((sizeof(eicon_IND) + len - 1), GFP_ATOMIC); - if (!skb) { - eicon_log(ccard, 1, "%s: skb_alloc failed in _idi_callback()\n", DRIVERLNAME); - } else { - ind = (eicon_IND *)skb_put(skb, (sizeof(eicon_IND) + len - 1)); - ind->Ind = de->Ind; - ind->IndId = de->user[1]; - ind->IndCh = de->IndCh; - ind->MInd = de->Ind; - ind->RBuffer.length = len; - ind->MLength = de->RLength; - memcpy(&ind->RBuffer.P, &de->RBuffer->P, len); - skb_queue_tail(&ccard->rcvq, skb); - eicon_rx_request(ccard); - eicon_log(ccard, 128, "idi_cbk: Ch%d: Ind=%x Id=%x RLen=%x compl=%x\n", - de->user[0], de->Ind, ind->IndId, de->RLength, de->complete); - DBG_TRC(("idi_cbk: Ch%d: Ind=%x Id=%x RLen=%x compl=%x", - de->user[0], de->Ind, ind->IndId, de->RLength, de->complete)) - de->Ind = 0; - } - } - de->RNum = 0; - de->RNR = 0; - eicon_tx_request(ccard); -} - -/* -** Kernel thread to prevent in_interrupt -*/ -static DECLARE_TASK_QUEUE(tq_divad); -static struct semaphore diva_thread_sem; -static struct semaphore diva_thread_end; -static int divad_pid = -1; -static int divad_thread(void * data); -static void diva_tx(void *data); -static atomic_t thread_running; - -static void __init -diva_init_thread(void) -{ - int pid = 0; - - pid = kernel_thread(divad_thread, NULL, CLONE_KERNEL); - if (pid >= 0) { - divad_pid = pid; - } -} - -static int -divad_thread(void * data) -{ - atomic_inc(&thread_running); - if (atomic_read(&thread_running) > 1) { - printk(KERN_WARNING"%s: thread already running\n", DRIVERLNAME); - return(0); - } - - printk(KERN_INFO "%s: thread started with pid %d\n", DRIVERLNAME, current->pid); - exit_mm(current); - exit_files(current); - exit_fs(current); - - /* Set to RealTime */ - current->policy = SCHED_FIFO; - current->rt_priority = 33; - - strcpy(current->comm, "kdiva2i4ld"); - - for(;;) { - down_interruptible(&diva_thread_sem); - if(!(atomic_read(&thread_running))) - break; - if(signal_pending(current)) { - flush_signals(current); - } else { - run_task_queue(&tq_divad); - } - } - up(&diva_thread_end); - divad_pid = -1; - return 0; -} - -static void -stop_diva_thread(void) -{ - if (divad_pid >= 0) { - atomic_set(&thread_running, 0); - up(&diva_thread_sem); - down_interruptible(&diva_thread_end); - } -} - -void -eicon_tx_request(struct eicon_card *card) -{ - card->tq.routine = diva_tx; - card->tq.data = (void *)card; - queue_task(&card->tq, &tq_divad); - up(&diva_thread_sem); -} - -static void -diva_tx(void *data) -{ - struct eicon_card *card = (eicon_card *) data; - struct sk_buff *skb; - struct sk_buff *skb2; - eicon_chan *chan; - eicon_chan_ptr *chan2; - eicon_REQ *reqbuf = 0; - int ReqCount = 0; - int tmpid = 0; - int quloop = 1; - int dlev = 0; - ENTITY *ep = 0; - - if (!card) { - eicon_log(card, 1, "%s: NULL card in transmit !\n", DRIVERLNAME); - return; - } - - ReqCount = 0; - if (!(skb2 = skb_dequeue(&card->sndq))) - quloop = 0; - while(quloop) { - chan2 = (eicon_chan_ptr *)skb2->data; - chan = chan2->ptr; - if (!chan->e.busy) { - if((skb = skb_dequeue(&chan->e.X))) { - - reqbuf = (eicon_REQ *)skb->data; - if ((reqbuf->Reference) && (chan->e.B2Id == 0) && (reqbuf->ReqId & 0x1f)) { - eicon_log(card, 16, "%s: transmit: error Id=0 on %d (Net)\n", DRIVERLNAME, chan->No); - } else { - dlev = 160; - if (reqbuf->ReqId & 0x1f) { /* if this is no ASSIGN */ - - if (!reqbuf->Reference) { /* Signal Layer */ - ep = &chan->de; - tmpid = chan->e.D3Id; - chan->e.ReqCh = 0; - } - else { /* Net Layer */ - ep = &chan->be; - tmpid = chan->e.B2Id; - chan->e.ReqCh = 1; - if (((reqbuf->Req & 0x0f) == 0x08) || - ((reqbuf->Req & 0x0f) == 0x01)) { /* Send Data */ - chan->waitq = reqbuf->XBuffer.length; - chan->waitpq += reqbuf->XBuffer.length; - dlev = 128; - } - } - - } else { /* It is an ASSIGN */ - if (!reqbuf->Reference) - ep = &chan->de; - else - ep = &chan->be; - ep->Id = reqbuf->ReqId; - tmpid = reqbuf->ReqId; - - if (!reqbuf->Reference) - chan->e.ReqCh = 0; - else - chan->e.ReqCh = 1; - } - - chan->e.ref = chan->No; - chan->e.Req = reqbuf->Req; - ReqCount++; - if (ep) { - ep->callback = eicon_idi_callback; - ep->R = (BUFFERS *)card; - ep->user[0] = (word)chan->No; - ep->user[1] = (word)tmpid; - ep->XNum = 1; - ep->RNum = 0; - ep->RNR = 0; - ep->Rc = 0; - ep->Ind = 0; - ep->X->PLength = reqbuf->XBuffer.length; - memcpy(ep->X->P, &reqbuf->XBuffer.P, reqbuf->XBuffer.length); - ep->ReqCh = reqbuf->ReqCh; - ep->Req = reqbuf->Req; - } - chan->e.busy = 1; - eicon_log(card, dlev, "idi: Req=%d Id=%x Ch=%d Len=%d Ref=%d\n", - reqbuf->Req, tmpid, - reqbuf->ReqCh, reqbuf->XBuffer.length, - chan->e.ref); - if (ep) { - card->d.request(ep); - if (ep->Rc) - eicon_idi_callback(ep); - } - } - dev_kfree_skb(skb); - } - dev_kfree_skb(skb2); - } - else { - skb_queue_tail(&card->sackq, skb2); - eicon_log(card, 128, "%s: transmit: busy chan %d\n", DRIVERLNAME, chan->No); - } - if (!(skb2 = skb_dequeue(&card->sndq))) - quloop = 0; - } - while((skb = skb_dequeue(&card->sackq))) { - skb_queue_tail(&card->sndq, skb); - } -} - -static int -eicon_command(eicon_card * card, isdn_ctrl * c) -{ - ulong a; - eicon_chan *chan; - isdn_ctrl cmd; - int ret = 0; - - eicon_log(card, 16, "%s_cmd 0x%x with arg 0x%lx (0x%lx)\n", DRIVERLNAME, - c->command, c->arg, (ulong) *c->parm.num); - - switch (c->command) { - case ISDN_CMD_IOCTL: - memcpy(&a, c->parm.num, sizeof(ulong)); - switch (c->arg) { - case EICON_IOCTL_GETVER: - return(EICON_CTRL_VERSION); - case EICON_IOCTL_MANIF: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!card->d.features & DI_MANAGE) - return -ENODEV; - ret = eicon_idi_manage( - card, - (eicon_manifbuf *)a); - return ret; - - case EICON_IOCTL_GETXLOG: - return -ENODEV; - case EICON_IOCTL_DEBUGVAR: - DebugVar = a; - eicon_log(card, 1, "%s: Debug Value set to %ld\n", DRIVERLNAME, DebugVar); - return 0; - case EICON_IOCTL_LOADPCI: - eicon_log(card, 1, "%s: Wrong version of load-utility,\n", DRIVERLNAME); - eicon_log(card, 1, "%s: re-compile eiconctrl !\n", DRIVERLNAME); - eicon_log(card, 1, "%s: Maybe update of utility is necessary !\n", DRIVERLNAME); - return -EINVAL; - default: - return -EINVAL; - } - break; - case ISDN_CMD_DIAL: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - if ((chan->fsm_state != EICON_STATE_NULL) && (chan->fsm_state != EICON_STATE_LISTEN)) { - eicon_log(card, 1, "%s: Dial on channel %d with state %d\n", DRIVERLNAME, - chan->No, chan->fsm_state); - return -EBUSY; - } - chan->fsm_state = EICON_STATE_OCALL; - - ret = idi_connect_req(card, chan, c->parm.setup.phone, - c->parm.setup.eazmsn, - c->parm.setup.si1, - c->parm.setup.si2); - if (ret) { - cmd.driver = card->myid; - cmd.command = ISDN_STAT_DHUP; - cmd.arg &= 0x1f; - card->interface.statcallb(&cmd); - } - return ret; - case ISDN_CMD_ACCEPTD: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - if (chan->fsm_state == EICON_STATE_ICALL) { - idi_connect_res(card, chan); - } - return 0; - case ISDN_CMD_ACCEPTB: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - return 0; - case ISDN_CMD_HANGUP: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - idi_hangup(card, chan); - return 0; - case ISDN_CMD_SETEAZ: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - chan->eazmask = 0x3ff; - eicon_idi_listen_req(card, chan); - return 0; - case ISDN_CMD_CLREAZ: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - chan->eazmask = 0; - eicon_idi_listen_req(card, chan); - return 0; - case ISDN_CMD_SETL2: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - chan->l2prot = (c->arg >> 8); - memcpy(chan->a_para, c->parm.aux.para, sizeof(chan->a_para)); - return 0; - case ISDN_CMD_SETL3: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - chan->l3prot = (c->arg >> 8); -#ifdef CONFIG_ISDN_TTY_FAX - if (chan->l3prot == ISDN_PROTO_L3_FCLASS2) { - chan->fax = c->parm.fax; - eicon_log(card, 128, "idi_cmd: Ch%d: SETL3 struct fax=0x%x\n",chan->No, chan->fax); - } -#endif - return 0; -#ifdef CONFIG_ISDN_TTY_FAX - case ISDN_CMD_FAXCMD: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - if (!chan->fax) - break; - idi_fax_cmd(card, chan); - return 0; -#endif - case ISDN_CMD_AUDIO: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - idi_audio_cmd(card, chan, c->arg >> 8, c->parm.num); - return 0; - case CAPI_PUT_MESSAGE: - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, c->arg & 0x1f))) - break; - if (c->parm.cmsg.Length < 8) - break; - switch(c->parm.cmsg.Command) { - case CAPI_FACILITY: - if (c->parm.cmsg.Subcommand == CAPI_REQ) - return(capipmsg(card, chan, &c->parm.cmsg)); - break; - case CAPI_MANUFACTURER: - default: - break; - } - return 0; - } - - return -EINVAL; -} - -static int -find_free_number(void) -{ - int num = 0; - char cid[40]; - eicon_card *p; - ulong flags; - - spin_lock_irqsave(&ll_lock, flags); - while(num < 100) { - sprintf(cid, "%s%d", id, num); - num++; - p = cards; - while (p) { - if (!strcmp(p->regname, cid)) - break; - p = p->next; - } - if (p) - { - spin_unlock_irqrestore(&ll_lock, flags); - return(num - 1); - } - } - spin_unlock_irqrestore(&ll_lock, flags); - return(999); -} - -/* - * Find card with given driverId - */ -static inline eicon_card * -eicon_findcard(int driverid) -{ - eicon_card *p; - ulong flags; - - spin_lock_irqsave(&ll_lock, flags); - p = cards; - while (p) { - if (p->myid == driverid) { - spin_unlock_irqrestore(&ll_lock, flags); - return p; - } - p = p->next; - } - spin_unlock_irqrestore(&ll_lock, flags); - return (eicon_card *) 0; -} - -/* - * Wrapper functions for interface to linklevel - */ -static int -if_command(isdn_ctrl * c) -{ - eicon_card *card = eicon_findcard(c->driver); - - if (card) - return (eicon_command(card, c)); - printk(KERN_ERR - "%s: if_command %d called with invalid driverId %d!\n", DRIVERLNAME, - c->command, c->driver); - return -ENODEV; -} - -static int -if_writecmd(const u_char * buf, int len, int user, int id, int channel) -{ - /* Not used */ - return (len); -} - -static int -if_readstatus(u_char * buf, int len, int user, int id, int channel) -{ - int count = 0; - int cnt = 0; - u_char *p = buf; - struct sk_buff *skb; - ulong flags; - - eicon_card *card = eicon_findcard(id); - - if (card) { - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - - spin_lock_irqsave(&status_lock, flags); - while((skb = skb_dequeue(&card->statq))) { - - if ((skb->len + count) > len) - cnt = len - count; - else - cnt = skb->len; - - if (user) - copy_to_user(p, skb->data, cnt); - else - memcpy(p, skb->data, cnt); - - count += cnt; - p += cnt; - - if (cnt == skb->len) { - dev_kfree_skb(skb); - if (card->statq_entries > 0) - card->statq_entries--; - } else { - skb_pull(skb, cnt); - skb_queue_head(&card->statq, skb); - spin_unlock_irqrestore(&status_lock, flags); - return count; - } - } - card->statq_entries = 0; - spin_unlock_irqrestore(&status_lock, flags); - return count; - } - printk(KERN_ERR - "%s: if_readstatus called with invalid driverId!\n", DRIVERLNAME); - return 0; -} - -static int -if_sendbuf(int id, int channel, int ack, struct sk_buff *skb) -{ - eicon_card *card = eicon_findcard(id); - eicon_chan *chan; - int ret = 0; - int len; - - len = skb->len; - - if (card) { - if (!card->flags & EICON_FLAGS_RUNNING) - return -ENODEV; - if (!(chan = find_channel(card, channel))) - return -ENODEV; - - if (chan->fsm_state == EICON_STATE_ACTIVE) { -#ifdef CONFIG_ISDN_TTY_FAX - if (chan->l2prot == ISDN_PROTO_L2_FAX) { - if ((ret = idi_faxdata_send(card, chan, skb)) > 0) - ret = len; - } - else -#endif - ret = idi_send_data(card, chan, ack, skb, 1, 1); - return (ret); - } else { - return -ENODEV; - } - } - printk(KERN_ERR - "%s: if_sendbuf called with invalid driverId!\n", DRIVERLNAME); - return -ENODEV; -} - -/* jiftime() copied from HiSax */ -static inline int jiftime(char *s, long mark) -{ - s += 8; - - *s-- = '\0'; - *s-- = mark % 10 + '0'; - mark /= 10; - *s-- = mark % 10 + '0'; - mark /= 10; - *s-- = '.'; - *s-- = mark % 10 + '0'; - mark /= 10; - *s-- = mark % 6 + '0'; - mark /= 6; - *s-- = ':'; - *s-- = mark % 10 + '0'; - mark /= 10; - *s-- = mark % 10 + '0'; - return(8); -} - -void -eicon_putstatus(eicon_card * card, char * buf) -{ - int count; - isdn_ctrl cmd; - u_char *p; - struct sk_buff *skb; - ulong flags; - - if (!card) { - if (!(card = cards)) - return; - } - - spin_lock_irqsave(&status_lock, flags); - count = strlen(buf); - skb = alloc_skb(count, GFP_ATOMIC); - if (!skb) { - spin_unlock_irqrestore(&status_lock, flags); - printk(KERN_ERR "%s: could not alloc skb in putstatus\n", DRIVERLNAME); - return; - } - p = skb_put(skb, count); - memcpy(p, buf, count); - - skb_queue_tail(&card->statq, skb); - - if (card->statq_entries >= MAX_STATUS_BUFFER) { - if ((skb = skb_dequeue(&card->statq))) { - count -= skb->len; - dev_kfree_skb(skb); - } else - count = 0; - } else - card->statq_entries++; - - spin_unlock_irqrestore(&status_lock, flags); - if (count) { - cmd.command = ISDN_STAT_STAVAIL; - cmd.driver = card->myid; - cmd.arg = count; - card->interface.statcallb(&cmd); - } -} - -/* - * Debug and Log - */ -void -eicon_log(eicon_card * card, int level, const char *fmt, ...) -{ - va_list args; - char Line[160]; - u_char *p; - - - if ((DebugVar & level) || (DebugVar & 256)) { - va_start(args, fmt); - - if (DebugVar & level) { - if (DebugVar & 256) { - /* log-buffer */ - p = Line; - p += jiftime(p, jiffies); - *p++ = 32; - p += vsprintf(p, fmt, args); - *p = 0; - eicon_putstatus(card, Line); - } else { - /* printk, syslogd */ - vsprintf(Line, fmt, args); - printk(KERN_DEBUG "%s", Line); - } - } - - va_end(args); - } -} - - -/* - * Allocate a new card-struct, initialize it - * link it into cards-list. - */ -static void -eicon_alloccard(DESCRIPTOR *d) -{ - int j; - char cid[40]; - eicon_card *card; - ulong flags; - - sprintf(cid, "%s%d", id, find_free_number()); - if (!(card = (eicon_card *) kmalloc(sizeof(eicon_card), GFP_KERNEL))) { - eicon_log(card, 1, - "%s: (%s) Could not allocate card-struct.\n", DRIVERLNAME, cid); - return; - } - memset((char *) card, 0, sizeof(eicon_card)); - skb_queue_head_init(&card->sndq); - skb_queue_head_init(&card->rcvq); - skb_queue_head_init(&card->rackq); - skb_queue_head_init(&card->sackq); - skb_queue_head_init(&card->statq); - card->statq_entries = 0; - card->interface.owner = THIS_MODULE; - card->interface.maxbufsize = 4000; - card->interface.command = if_command; - card->interface.writebuf_skb = if_sendbuf; - card->interface.writecmd = if_writecmd; - card->interface.readstat = if_readstatus; - card->interface.features = - ISDN_FEATURE_L2_X75I | - ISDN_FEATURE_L2_HDLC | - ISDN_FEATURE_L2_TRANS | - ISDN_FEATURE_L3_TRANS | - ISDN_FEATURE_L3_TRANSDSP | - ISDN_FEATURE_P_UNKNOWN; - card->interface.hl_hdrlen = 20; - card->ptype = ISDN_PTYPE_UNKNOWN; - strcpy(card->interface.id, cid); - card->myid = -1; - card->type = d->type; - - if (d->features & (DI_FAX3 | DI_EXTD_FAX)) - card->interface.features |= (ISDN_FEATURE_L2_FAX | ISDN_FEATURE_L3_FCLASS2); - if (d->features & DI_MODEM) - card->interface.features |= ISDN_FEATURE_L2_MODEM; - if (d->features & DI_V110) - card->interface.features |= (ISDN_FEATURE_L2_V11096|ISDN_FEATURE_L2_V11019|ISDN_FEATURE_L2_V11038); - - card->flags = 0; - card->nchannels = d->channels; - card->interface.channels = d->channels; - if (!(card->bch = (eicon_chan *) vmalloc(sizeof(eicon_chan) * (card->nchannels + 1)))) { - eicon_log(card, 1, - "%s: (%s) Could not allocate bch-struct.\n", DRIVERLNAME, cid); - kfree(card); - return; - } - for (j=0; j< (card->nchannels + 1); j++) { - memset((char *)&card->bch[j], 0, sizeof(eicon_chan)); - card->bch[j].statectrl = 0; - card->bch[j].l2prot = ISDN_PROTO_L2_X75I; - card->bch[j].l3prot = ISDN_PROTO_L3_TRANS; - card->bch[j].e.D3Id = 0; - card->bch[j].e.B2Id = 0; - card->bch[j].e.Req = 0; - card->bch[j].No = j; - card->bch[j].tskb1 = NULL; - card->bch[j].tskb2 = NULL; - skb_queue_head_init(&card->bch[j].e.X); - skb_queue_head_init(&card->bch[j].e.R); - } - - if (!(card->dbuf = (DBUFFER *) kmalloc((sizeof(DBUFFER) * (card->nchannels + 1))*2 - , GFP_KERNEL))) { - eicon_log(card, 1, - "%s: (%s) Could not allocate DBUFFER-struct.\n", DRIVERLNAME, cid); - kfree(card); - vfree(card->bch); - return; - } - if (!(card->sbuf = (BUFFERS *) kmalloc((sizeof(BUFFERS) * (card->nchannels + 1)) * 2, GFP_KERNEL))) { - eicon_log(card, 1, - "%s: (%s) Could not allocate BUFFERS-struct.\n", DRIVERLNAME, cid); - kfree(card); - vfree(card->bch); - kfree(card->dbuf); - return; - } - if (!(card->sbufp = (char *) kmalloc((270 * (card->nchannels + 1)) * 2, GFP_KERNEL))) { - eicon_log(card, 1, - "%s: (%s) Could not allocate BUFFERSP-struct.\n", DRIVERLNAME, cid); - kfree(card); - vfree(card->bch); - kfree(card->dbuf); - kfree(card->sbuf); - return; - } - for (j=0; j< (card->nchannels + 1); j++) { - memset((char *)&card->dbuf[j], 0, sizeof(DBUFFER)); - card->bch[j].de.RBuffer = (DBUFFER *)&card->dbuf[j]; - memset((char *)&card->dbuf[j+(card->nchannels+1)], 0, sizeof(BUFFERS)); - card->bch[j].be.RBuffer = (DBUFFER *)&card->dbuf[j+(card->nchannels+1)]; - - memset((char *)&card->sbuf[j], 0, sizeof(BUFFERS)); - card->bch[j].de.X = (BUFFERS *)&card->sbuf[j]; - memset((char *)&card->sbuf[j+(card->nchannels+1)], 0, sizeof(BUFFERS)); - card->bch[j].be.X = (BUFFERS *)&card->sbuf[j+(card->nchannels+1)]; - - memset((char *)&card->sbufp[j], 0, 270); - card->bch[j].de.X->P = (char *)&card->sbufp[j * 270]; - memset((char *)&card->sbufp[j+(card->nchannels+1)], 0, 270); - card->bch[j].be.X->P = (char *)&card->sbufp[(j+(card->nchannels+1)) * 270]; - } - memcpy(&card->d, d, sizeof(*d)); /* DESCRIPTOR entries */ - - /* initializing some variables */ - card->lock = SPIN_LOCK_UNLOCKED; - card->ReadyInt = 0; - - for(j = 0; j < 256; j++) - card->IdTable[j] = NULL; - - for(j = 0; j < (card->d.channels + 1); j++) { - card->bch[j].e.busy = 0; - card->bch[j].e.D3Id = 0; - card->bch[j].e.B2Id = 0; - card->bch[j].e.ref = 0; - card->bch[j].e.Req = 0; - card->bch[j].e.complete = 1; - card->bch[j].fsm_state = EICON_STATE_NULL; - } - printk(KERN_INFO "%s: registered card '%s' with %d channels\n", - DRIVERLNAME, cid, d->channels); - - spin_lock_irqsave(&ll_lock, flags); - card->next = cards; - cards = card; - spin_unlock_irqrestore(&ll_lock, flags); -} - -/* - * register card at linklevel - */ -static int -eicon_registercard(eicon_card * card) -{ - isdn_ctrl cmd; - - if (!register_isdn(&card->interface)) { - printk(KERN_WARNING - "%s: Unable to register %s\n", DRIVERLNAME, - card->interface.id); - return -1; - } - card->myid = card->interface.channels; - sprintf(card->regname, "%s", card->interface.id); - - /* after register we start it */ - card->flags |= EICON_FLAGS_LOADED; - card->flags |= EICON_FLAGS_RUNNING; - cmd.command = ISDN_STAT_RUN; - cmd.driver = card->myid; - cmd.arg = 0; - card->interface.statcallb(&cmd); - - return 0; -} - -static void -unregister_card(eicon_card * card, int rme) -{ - int count; - int channel; - isdn_ctrl cmd; - eicon_chan *chan; - - if(rme) { - /* before unload we need to remove the signal entity */ - for(channel = 0; channel < card->nchannels; channel++) - { - chan = &(card->bch[channel]); - if (chan->e.D3Id) { - idi_do_req(card, chan, REMOVE, 0); - count = 100; - while(count--) { - if (!chan->e.D3Id) - break; - SLEEP(2); - } - if (!count) - printk(KERN_WARNING"%s: ch:%d unlink to diva module not successful !\n", - DRIVERLNAME, chan->No); - } - } - } - - cmd.command = ISDN_STAT_UNLOAD; - cmd.driver = card->myid; - card->interface.statcallb(&cmd); - DBG_TRC(("channel entities freed")); -} - -static void -eicon_freecard(eicon_card *card) { - int i; - - for(i = 0; i < (card->nchannels + 1); i++) { - skb_queue_purge(&card->bch[i].e.X); - skb_queue_purge(&card->bch[i].e.R); - } - skb_queue_purge(&card->sndq); - skb_queue_purge(&card->rcvq); - skb_queue_purge(&card->rackq); - skb_queue_purge(&card->sackq); - skb_queue_purge(&card->statq); - - kfree(card->sbufp); - kfree(card->sbuf); - kfree(card->dbuf); - vfree(card->bch); - kfree(card); - DBG_TRC(("card structures freed")); -} - -static int -eicon_addcard(DESCRIPTOR *d) -{ - eicon_card *p; - eicon_card *q = NULL; - int registered; - int added = 0; - int failed = 0; - ulong flags; - - eicon_alloccard(d); - p = cards; - while (p) { - registered = 0; - if (!p->interface.statcallb) { - /* Not yet registered. - * Try to register and activate it. - */ - added++; - if (!eicon_registercard(p)) - registered = 1; - } else { - /* Card already registered */ - registered = 1; - } - - if (registered) { - /* Init OK, next card ... */ - spin_lock_irqsave(&ll_lock, flags); - q = p; - p = p->next; - spin_unlock_irqrestore(&ll_lock, flags); - } else { - /* registering failed, remove card from list, free memory */ - printk(KERN_ERR - "%s: Initialization of %s failed\n", DRIVERLNAME, - p->interface.id); - spin_lock_irqsave(&ll_lock, flags); - if (q) { - q->next = p->next; - eicon_freecard(p); - p = q->next; - } else { - cards = p->next; - eicon_freecard(p); - p = cards; - } - spin_unlock_irqrestore(&ll_lock, flags); - failed++; - } - } - return (added - failed); -} - -static void * -didd_callback(void *context, DESCRIPTOR* adapter, int removal) -{ - eicon_card *cp = NULL, *lastcp = NULL; - ulong flags; - - if (adapter->type == IDI_DADAPTER) - { - printk(KERN_ERR "%s: Change in DAdapter ? Oops ?.\n", DRIVERLNAME); - DBG_ERR(("Notification about IDI_DADAPTER change ! Oops.")); - return(NULL); - } - else if (adapter->type == IDI_DIMAINT) - { - if (removal) - { - stop_dbg(); - } - else - { - memcpy(&MAdapter, adapter, sizeof(MAdapter)); - dprintf = (DIVA_DI_PRINTF)MAdapter.request; - DbgRegister("I4L", DRIVERRELEASE, DBG_DEFAULT); - } - } - else if ((adapter->type > 0) && - (adapter->type < 16)) - { /* IDI Adapter */ - if (removal) - { - spin_lock_irqsave(&ll_lock, flags); - lastcp = cp = cards; - while (cp) { - if (cp->d.request == adapter->request) - { - spin_unlock_irqrestore(&ll_lock, flags); - DBG_LOG(("remove adapter from list")); - unregister_card(cp, 0); - spin_lock_irqsave(&ll_lock, flags); - if (cp == lastcp) - cards = cp->next; - else - lastcp->next = cp->next; - eicon_freecard(cp); - break; - } - lastcp = cp; - cp = cp->next; - } - spin_unlock_irqrestore(&ll_lock, flags); - } - else - { - if (adapter->channels) { - DBG_LOG(("add adapter to list")); - eicon_addcard(adapter); - } - } - } - return(NULL); -} - -static int __init -connect_didd(void) -{ - int x = 0; - int dadapter = 0; - IDI_SYNC_REQ req; - DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS]; - - DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table)); - - for (x = 0; x < MAX_DESCRIPTORS; x++) - { - if (DIDD_Table[x].type == IDI_DADAPTER) - { /* DADAPTER found */ - dadapter = 1; - memcpy(&DAdapter, &DIDD_Table[x], sizeof(DAdapter)); - req.didd_notify.e.Req = 0; - req.didd_notify.e.Rc = IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY; - req.didd_notify.info.callback = didd_callback; - req.didd_notify.info.context = 0; - DAdapter.request((ENTITY *)&req); - if (req.didd_notify.e.Rc != 0xff) - { - stop_dbg(); - return(0); - } - notify_handle = req.didd_notify.info.handle; - } - else if (DIDD_Table[x].type == IDI_DIMAINT) - { /* MAINT found */ - memcpy(&MAdapter, &DIDD_Table[x], sizeof(DAdapter)); - dprintf = (DIVA_DI_PRINTF)MAdapter.request; - DbgRegister("I4L", DRIVERRELEASE, DBG_DEFAULT); - } - else if ((DIDD_Table[x].type > 0) && - (DIDD_Table[x].type < 16)) - { /* IDI Adapter found */ - if (DIDD_Table[x].channels) { - eicon_addcard(&DIDD_Table[x]); - } - } - } - - if (!dadapter) { - stop_dbg(); - } - - return(dadapter); -} - -static void __exit -disconnect_didd(void) -{ - IDI_SYNC_REQ req; - - stop_dbg(); - - req.didd_notify.e.Req = 0; - req.didd_notify.e.Rc = IDI_SYNC_REQ_DIDD_REMOVE_ADAPTER_NOTIFY; - req.didd_notify.info.handle = notify_handle; - DAdapter.request((ENTITY *)&req); -} - -/* -** proc entry -*/ -extern struct proc_dir_entry *proc_net_isdn_eicon; -static struct proc_dir_entry *i4lidi_proc_entry = NULL; - -static int -i4lidi_proc_read(char *page, char **start, off_t off, int count, int *eof, void *data) -{ - int len = 0; - char tmprev[32]; - - len += sprintf(page+len, "%s\n", DRIVERNAME); - len += sprintf(page+len, "name : %s\n", DRIVERLNAME); - len += sprintf(page+len, "release : %s\n", DRIVERRELEASE); - strcpy(tmprev, eicon_revision); - len += sprintf(page+len, "revision : %s/", eicon_getrev(tmprev)); - strcpy(tmprev, eicon_idi_revision); - len += sprintf(page+len, "%s\n", eicon_getrev(tmprev)); - - if (off + count >= len) - *eof = 1; - if (len < off) - return 0; - *start = page + off; - return((count < len-off) ? count : len-off); -} - -static void __init -create_proc(void) -{ - if(!(i4lidi_proc_entry = create_proc_entry(DRIVERLNAME, - S_IFREG | S_IRUGO | S_IWUSR, proc_net_isdn_eicon))) - { - printk(KERN_WARNING "%s: failed to create proc entry.\n", DRIVERLNAME); - return; - } - i4lidi_proc_entry->read_proc = i4lidi_proc_read; - i4lidi_proc_entry->owner = THIS_MODULE; -} - -static void __exit -remove_proc(void) -{ - if(i4lidi_proc_entry) - remove_proc_entry(DRIVERLNAME, proc_net_isdn_eicon); -} - -/* -** load / unload -*/ -static int __init -i4l_idi_init(void) -{ - int ret = 0; - char tmprev[50]; - - status_lock = SPIN_LOCK_UNLOCKED; - ll_lock = SPIN_LOCK_UNLOCKED; - - if (strlen(id) < 1) - strcpy(id, "diva"); - - DebugVar = debug; - - init_MUTEX_LOCKED(&diva_thread_sem); - init_MUTEX_LOCKED(&diva_thread_end); - - printk(KERN_INFO "%s\n", DRIVERNAME); - printk(KERN_INFO "%s: Rel:%s Rev:",DRIVERLNAME , DRIVERRELEASE); - strcpy(tmprev, eicon_revision); - printk("%s/", eicon_getrev(tmprev)); - strcpy(tmprev, eicon_idi_revision); - printk("%s\n", eicon_getrev(tmprev)); - - diva_init_thread(); - - if(!connect_didd()) { - printk(KERN_ERR "%s: failed to connect to DIDD.\n", DRIVERLNAME); - stop_diva_thread(); - ret = -EIO; - goto out; - } - create_proc(); - -out: - return(ret); -} - -static void __exit -i4l_idi_exit(void) -{ - eicon_card *card, *last, *cc; - ulong flags; - - spin_lock_irqsave(&ll_lock, flags); - cc = cards; - card = cc; - cards = NULL; - spin_unlock_irqrestore(&ll_lock, flags); - - remove_proc(); - - while (card) { - unregister_card(card, 1); - card = card->next; - } - - stop_diva_thread(); - disconnect_didd(); - - card = cc; - while (card) { - last = card; - card = card->next; - eicon_freecard(last); - } - printk(KERN_INFO "%s: module unloaded.\n", DRIVERLNAME); -} - -module_init(i4l_idi_init); -module_exit(i4l_idi_exit); diff -Nru a/drivers/isdn/hardware/eicon/i4lididrv.h b/drivers/isdn/hardware/eicon/i4lididrv.h --- a/drivers/isdn/hardware/eicon/i4lididrv.h Sun Mar 28 13:12:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,272 +0,0 @@ -/* $Id: i4lididrv.h,v 1.1.2.2 2002/10/02 14:38:37 armin Exp $ - * - * ISDN interface module for Eicon active cards. - * I4L - IDI Interface - * - * Copyright 1998-2000 by Armin Schindler (mac@melware.de) - * Copyright 1999-2002 Cytronics & Melware (info@melware.de) - * - * This software may be used and distributed according to the terms - * of the GNU General Public License, incorporated herein by reference. - */ - - -#ifndef i4lididrv_h -#define i4lididrv_h - -#include -#include - -#include "platform.h" -#include "di_defs.h" - -#define EICON_IOCTL_GETTYPE 6 -#define EICON_IOCTL_LOADPCI 7 -#define EICON_IOCTL_GETVER 9 -#define EICON_IOCTL_GETXLOG 10 - -#define EICON_IOCTL_MANIF 90 - -#define EICON_IOCTL_FREEIT 97 -#define EICON_IOCTL_TEST 98 -#define EICON_IOCTL_DEBUGVAR 99 - -/* Constants for describing Card-Type */ -#define EICON_CTYPE_S 0 -#define EICON_CTYPE_SX 1 -#define EICON_CTYPE_SCOM 2 -#define EICON_CTYPE_QUADRO 3 -#define EICON_CTYPE_S2M 4 -#define EICON_CTYPE_MAESTRA 5 -#define EICON_CTYPE_MAESTRAQ 6 -#define EICON_CTYPE_MAESTRAQ_U 7 -#define EICON_CTYPE_MAESTRAP 8 -#define EICON_CTYPE_ISABRI 0x10 -#define EICON_CTYPE_ISAPRI 0x20 -#define EICON_CTYPE_MASK 0x0f -#define EICON_CTYPE_QUADRO_NR(n) (n<<4) - -#define MAX_HEADER_LEN 10 - -#define MAX_STATUS_BUFFER 150 - -/* Data for Management interface */ -typedef struct { - int count; - int pos; - int length[50]; - unsigned char data[700]; -} eicon_manifbuf; - -#define TRACE_OK (1) - -#ifdef __KERNEL__ - -/* Macro for delay via schedule() */ -#define SLEEP(j) { \ - set_current_state(TASK_INTERRUPTIBLE); \ - schedule_timeout(j); \ -} - -/* Kernel includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef struct { - __u16 length __attribute__ ((packed)); /* length of data/parameter field */ - __u8 P[1]; /* data/parameter field */ -} eicon_PBUFFER; - -typedef struct { - __u16 NextReq __attribute__ ((packed)); /* pointer to next Req Buffer */ - __u16 NextRc __attribute__ ((packed)); /* pointer to next Rc Buffer */ - __u16 NextInd __attribute__ ((packed)); /* pointer to next Ind Buffer */ - __u8 ReqInput __attribute__ ((packed)); /* number of Req Buffers sent */ - __u8 ReqOutput __attribute__ ((packed)); /* number of Req Buffers returned */ - __u8 ReqReserved __attribute__ ((packed));/*number of Req Buffers reserved */ - __u8 Int __attribute__ ((packed)); /* ISDN-P interrupt */ - __u8 XLock __attribute__ ((packed)); /* Lock field for arbitration */ - __u8 RcOutput __attribute__ ((packed)); /* number of Rc buffers received */ - __u8 IndOutput __attribute__ ((packed)); /* number of Ind buffers received */ - __u8 IMask __attribute__ ((packed)); /* Interrupt Mask Flag */ - __u8 Reserved1[2] __attribute__ ((packed)); /* reserved field, do not use */ - __u8 ReadyInt __attribute__ ((packed)); /* request field for ready int */ - __u8 Reserved2[12] __attribute__ ((packed)); /* reserved field, do not use */ - __u8 InterfaceType __attribute__ ((packed)); /* interface type 1=16K */ - __u16 Signature __attribute__ ((packed)); /* ISDN-P initialized ind */ - __u8 B[1]; /* buffer space for Req,Ind and Rc */ -} eicon_pr_ram; - -typedef struct { - __u8 Req; /* pending request */ - __u8 Rc; /* return code received */ - __u8 Ind; /* indication received */ - __u8 ReqCh; /* channel of current Req */ - __u8 RcCh; /* channel of current Rc */ - __u8 IndCh; /* channel of current Ind */ - __u8 D3Id; /* ID used by this entity */ - __u8 B2Id; /* ID used by this entity */ - __u8 GlobalId; /* reserved field */ - __u8 XNum; /* number of X-buffers */ - __u8 RNum; /* number of R-buffers */ - struct sk_buff_head X; /* X-buffer queue */ - struct sk_buff_head R; /* R-buffer queue */ - __u8 RNR; /* receive not ready flag */ - __u8 complete; /* receive complete status */ - __u8 busy; /* busy flag */ - __u16 ref; /* saved reference */ -} entity; - -#define FAX_MAX_SCANLINE 2500 - -typedef struct { - __u8 PrevObject; - __u8 NextObject; - __u8 abLine[FAX_MAX_SCANLINE]; - __u8 abFrame[FAX_MAX_SCANLINE]; - unsigned int LineLen; - unsigned int LineDataLen; - __u32 LineData; - unsigned int NullBytesPos; - __u8 NullByteExist; - int PageCount; - __u8 Dle; - __u8 Eop; -} eicon_ch_fax_buf; - -typedef struct { - int No; /* Channel Number */ - unsigned short fsm_state; /* Current D-Channel state */ - unsigned short statectrl; /* State controling bits */ - unsigned short eazmask; /* EAZ-Mask for this Channel */ - int queued; /* User-Data Bytes in TX queue */ - int pqueued; /* User-Data Packets in TX queue */ - int waitq; /* User-Data Bytes in wait queue */ - int waitpq; /* User-Data Bytes in packet queue */ - struct sk_buff *tskb1; /* temp skb 1 */ - struct sk_buff *tskb2; /* temp skb 2 */ - unsigned char l2prot; /* Layer 2 protocol */ - unsigned char l3prot; /* Layer 3 protocol */ -#ifdef CONFIG_ISDN_TTY_FAX - T30_s *fax; /* pointer to fax data in LL */ - eicon_ch_fax_buf fax2; /* fax related struct */ -#endif - entity e; /* Native Entity */ - ENTITY de; /* Divas D Entity */ - ENTITY be; /* Divas B Entity */ - char cpn[32]; /* remember cpn */ - char oad[32]; /* remember oad */ - char dsa[32]; /* remember dsa */ - char osa[32]; /* remember osa */ - unsigned char cause[2]; /* Last Cause */ - unsigned char si1; - unsigned char si2; - unsigned char plan; - unsigned char screen; - unsigned char a_para[8]; /* Additional parameter */ -} eicon_chan; - -typedef struct { - eicon_chan *ptr; -} eicon_chan_ptr; - - -#define EICON_FLAGS_RUNNING 1 /* Cards driver activated */ -#define EICON_FLAGS_LOADED 8 /* Firmware loaded */ - -/* D-Channel states */ -#define EICON_STATE_NULL 0 -#define EICON_STATE_ICALL 1 -#define EICON_STATE_OCALL 2 -#define EICON_STATE_IWAIT 3 -#define EICON_STATE_OWAIT 4 -#define EICON_STATE_IBWAIT 5 -#define EICON_STATE_OBWAIT 6 -#define EICON_STATE_BWAIT 7 -#define EICON_STATE_BHWAIT 8 -#define EICON_STATE_BHWAIT2 9 -#define EICON_STATE_DHWAIT 10 -#define EICON_STATE_DHWAIT2 11 -#define EICON_STATE_BSETUP 12 -#define EICON_STATE_ACTIVE 13 -#define EICON_STATE_ICALLW 14 -#define EICON_STATE_LISTEN 15 -#define EICON_STATE_WMCONN 16 - -#define EICON_MAX_QUEUE 2138 - -typedef struct { - __u8 ret; - __u8 id; - __u8 ch; -} eicon_ack; - -typedef struct { - __u8 code; - __u8 id; - __u8 ch; -} eicon_req; - -typedef struct { - __u8 ret; - __u8 id; - __u8 ch; - __u8 more; -} eicon_indhdr; - -/* - * Per card driver data - */ -typedef struct eicon_card { - DESCRIPTOR d; /* IDI Descriptor */ - u_char ptype; /* Protocol type (1TR6 or Euro) */ - u_char type; /* Cardtype (EICON_CTYPE_...) */ - struct eicon_card *qnext; /* Pointer to next quadro adapter */ - int Feature; /* Protocol Feature Value */ - struct eicon_card *next; /* Pointer to next device struct */ - int myid; /* Driver-Nr. assigned by linklevel */ - unsigned long flags; /* Statusflags */ - struct sk_buff_head rcvq; /* Receive-Message queue */ - struct sk_buff_head sndq; /* Send-Message queue */ - struct sk_buff_head rackq; /* Req-Ack-Message queue */ - struct sk_buff_head sackq; /* Data-Ack-Message queue */ - struct sk_buff_head statq; /* Status-Message queue */ - int statq_entries; - eicon_chan* IdTable[256]; /* Table to find entity */ - __u16 ref_in; - __u16 ref_out; - int nchannels; /* Number of B-Channels */ - int ReadyInt; /* Ready Interrupt */ - eicon_chan *bch; /* B-Channel status/control */ - DBUFFER *dbuf; /* Dbuffer for Diva Server */ - BUFFERS *sbuf; /* Buffer for Diva Server */ - char *sbufp; /* Data Buffer for Diva Server */ - isdn_if interface; /* Interface to upper layer */ - char regname[35]; /* Drivers card name */ - spinlock_t lock; /* spin lock per card */ - struct tq_struct tq; /* task queue for thread */ -} eicon_card; - -#include "i4l_idi.h" - -extern eicon_card *cards; -extern char *eicon_ctype_name[]; - -extern ulong DebugVar; -extern void eicon_log(eicon_card * card, int level, const char *fmt, ...); -extern void eicon_putstatus(eicon_card * card, char * buf); - -extern void eicon_tx_request(struct eicon_card *); - -extern spinlock_t eicon_lock; - -#endif /* __KERNEL__ */ - -#endif /* i4lididrv_h */ diff -Nru a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c --- a/drivers/isdn/hardware/eicon/idifunc.c Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/idifunc.c Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: idifunc.c,v 1.13 2003/08/25 14:49:53 schindler Exp $ +/* $Id: idifunc.c,v 1.14 2004/03/21 18:13:43 armin Exp $ * * Driver for Eicon DIVA Server ISDN cards. * User Mode IDI Interface @@ -49,76 +49,37 @@ } typedef struct _udiva_card { - struct _udiva_card *next; + struct list_head list; int Id; DESCRIPTOR d; } udiva_card; -static udiva_card *cards; +static LIST_HEAD(cards); static diva_os_spin_lock_t ll_lock; /* - * add card to list - */ -static void add_card_to_list(udiva_card * c) -{ - diva_os_spin_lock_magic_t old_irql; - - diva_os_enter_spin_lock(&ll_lock, &old_irql, "add card"); - c->next = cards; - cards = c; - diva_os_leave_spin_lock(&ll_lock, &old_irql, "add card"); -} - -/* * find card in list */ static udiva_card *find_card_in_list(DESCRIPTOR * d) { udiva_card *card; + struct list_head *tmp; diva_os_spin_lock_magic_t old_irql; diva_os_enter_spin_lock(&ll_lock, &old_irql, "find card"); - card = cards; - while (card) { + list_for_each(tmp, &cards) { + card = list_entry(tmp, udiva_card, list); if (card->d.request == d->request) { diva_os_leave_spin_lock(&ll_lock, &old_irql, "find card"); return (card); } - card = card->next; } diva_os_leave_spin_lock(&ll_lock, &old_irql, "find card"); return ((udiva_card *) NULL); } /* - * remove card from list - */ -static void remove_card_from_list(udiva_card * c) -{ - udiva_card *list = NULL, *last; - diva_os_spin_lock_magic_t old_irql; - - diva_os_enter_spin_lock(&ll_lock, &old_irql, "remove card"); - list = cards; - last = list; - while (list) { - if (list == c) { - if (cards == c) { - cards = c->next; - } else { - last->next = c->next; - } - break; - } - last = list; - list = list->next; - } - diva_os_leave_spin_lock(&ll_lock, &old_irql, "remove card"); -} - -/* * new card */ static void um_new_card(DESCRIPTOR * d) @@ -126,6 +87,7 @@ int adapter_nr = 0; udiva_card *card = NULL; IDI_SYNC_REQ sync_req; + diva_os_spin_lock_magic_t old_irql; if (!(card = diva_os_malloc(0, sizeof(udiva_card)))) { DBG_ERR(("cannot get buffer for card")); @@ -140,7 +102,9 @@ sync_req.xdi_logical_adapter_number.info.logical_adapter_number; card->Id = adapter_nr; if (!(diva_user_mode_idi_create_adapter(d, adapter_nr))) { - add_card_to_list(card); + diva_os_enter_spin_lock(&ll_lock, &old_irql, "add card"); + list_add_tail(&card->list, &cards); + diva_os_leave_spin_lock(&ll_lock, &old_irql, "add card"); } else { DBG_ERR(("could not create user mode idi card %d", adapter_nr)); @@ -152,6 +116,7 @@ */ static void um_remove_card(DESCRIPTOR * d) { + diva_os_spin_lock_magic_t old_irql; udiva_card *card = NULL; if (!(card = find_card_in_list(d))) { @@ -159,7 +124,9 @@ return; } diva_user_mode_idi_remove_adapter(card->Id); - remove_card_from_list(card); + diva_os_enter_spin_lock(&ll_lock, &old_irql, "remove card"); + list_del(&card->list); + diva_os_leave_spin_lock(&ll_lock, &old_irql, "remove card"); DBG_LOG(("idi proc entry removed for card %d", card->Id)); diva_os_free(0, card); } @@ -169,20 +136,20 @@ */ static void DIVA_EXIT_FUNCTION remove_all_idi_proc(void) { - udiva_card *card, *last; + udiva_card *card; + struct list_head *tmp; diva_os_spin_lock_magic_t old_irql; +rescan: diva_os_enter_spin_lock(&ll_lock, &old_irql, "remove all"); - card = cards; - cards = NULL; + list_for_each(tmp, &cards) { + card = list_entry(tmp, udiva_card, list); diva_os_leave_spin_lock(&ll_lock, &old_irql, "remove all"); - - while (card) { diva_user_mode_idi_remove_adapter(card->Id); - last = card; - card = card->next; - diva_os_free(0, last); + diva_os_free(0, card); + goto rescan; } + diva_os_leave_spin_lock(&ll_lock, &old_irql, "remove all"); } /* diff -Nru a/drivers/isdn/hardware/eicon/os_4bri.c b/drivers/isdn/hardware/eicon/os_4bri.c --- a/drivers/isdn/hardware/eicon/os_4bri.c Sun Mar 28 13:12:07 2004 +++ b/drivers/isdn/hardware/eicon/os_4bri.c Sun Mar 28 13:12:07 2004 @@ -1,9 +1,8 @@ -/* $Id: os_4bri.c,v 1.25 2003/06/21 17:08:44 schindler Exp $ */ +/* $Id: os_4bri.c,v 1.28 2004/03/21 17:26:01 armin Exp $ */ #include "platform.h" #include "debuglib.h" #include "cardtype.h" -#include "dlist.h" #include "pc.h" #include "pr_pc.h" #include "di_defs.h" diff -Nru a/drivers/isdn/hardware/eicon/os_bri.c b/drivers/isdn/hardware/eicon/os_bri.c --- a/drivers/isdn/hardware/eicon/os_bri.c Sun Mar 28 13:12:07 2004 +++ b/drivers/isdn/hardware/eicon/os_bri.c Sun Mar 28 13:12:07 2004 @@ -1,9 +1,8 @@ -/* $Id: os_bri.c,v 1.18 2003/06/21 17:10:29 schindler Exp $ */ +/* $Id: os_bri.c,v 1.21 2004/03/21 17:26:01 armin Exp $ */ #include "platform.h" #include "debuglib.h" #include "cardtype.h" -#include "dlist.h" #include "pc.h" #include "pr_pc.h" #include "di_defs.h" diff -Nru a/drivers/isdn/hardware/eicon/os_pri.c b/drivers/isdn/hardware/eicon/os_pri.c --- a/drivers/isdn/hardware/eicon/os_pri.c Sun Mar 28 13:12:07 2004 +++ b/drivers/isdn/hardware/eicon/os_pri.c Sun Mar 28 13:12:07 2004 @@ -1,9 +1,8 @@ -/* $Id: os_pri.c,v 1.29 2003/08/25 13:41:27 schindler Exp $ */ +/* $Id: os_pri.c,v 1.32 2004/03/21 17:26:01 armin Exp $ */ #include "platform.h" #include "debuglib.h" #include "cardtype.h" -#include "dlist.h" #include "pc.h" #include "pr_pc.h" #include "di_defs.h" diff -Nru a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h --- a/drivers/isdn/hardware/eicon/platform.h Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/platform.h Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: platform.h,v 1.35 2003/12/05 18:45:05 armin Exp $ +/* $Id: platform.h,v 1.37 2004/03/20 17:44:29 armin Exp $ * * platform.h * @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -332,7 +333,6 @@ */ #define NO_CORNETN #define IMPLEMENT_DTMF 1 -#define IMPLEMENT_LINE_INTERCONNECT2 1 #define IMPLEMENT_ECHO_CANCELLER 1 #define IMPLEMENT_RTP 1 #define IMPLEMENT_T38 1 @@ -346,7 +346,6 @@ #define IMPLEMENT_FAX_NONSTANDARD 1 #define VSWITCH_SUPPORT 1 -#define IMPLEMENT_LINE_INTERCONNECT 0 #define IMPLEMENT_MARKED_OK_AFTER_FC 1 #define DIVA_IDI_RX_DMA 1 diff -Nru a/drivers/isdn/hardware/eicon/um_idi.c b/drivers/isdn/hardware/eicon/um_idi.c --- a/drivers/isdn/hardware/eicon/um_idi.c Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/um_idi.c Sun Mar 28 13:12:08 2004 @@ -1,9 +1,8 @@ -/* $Id: um_idi.c,v 1.12 2004/01/12 18:00:09 armin Exp $ */ +/* $Id: um_idi.c,v 1.14 2004/03/21 17:54:37 armin Exp $ */ #include "platform.h" #include "di_defs.h" #include "pc.h" -#include "dlist.h" #include "dqueue.h" #include "adapter.h" #include "entity.h" @@ -22,7 +21,7 @@ /* -------------------------------------------------------------------------- LOCALS -------------------------------------------------------------------------- */ -static diva_entity_queue_t adapter_q; +static LIST_HEAD(adapter_q); static diva_os_spin_lock_t adapter_lock; static diva_um_idi_adapter_t *diva_um_idi_find_adapter(dword nr); @@ -37,17 +36,11 @@ static int process_idi_ind(divas_um_idi_entity_t * e, byte ind); static int write_return_code(divas_um_idi_entity_t * e, byte rc); -/* - * include queue functions - */ -#include "dlist.c" - /* -------------------------------------------------------------------------- MAIN -------------------------------------------------------------------------- */ int diva_user_mode_idi_init(void) { - diva_q_init(&adapter_q); diva_os_initialize_spin_lock(&adapter_lock, "adapter"); return (0); } @@ -89,18 +82,18 @@ -------------------------------------------------------------------------- */ void diva_user_mode_idi_remove_adapter(int adapter_nr) { - diva_um_idi_adapter_t *a = - (diva_um_idi_adapter_t *) diva_q_get_head(&adapter_q); + struct list_head *tmp; + diva_um_idi_adapter_t *a; - while (a) { + list_for_each(tmp, &adapter_q) { + a = list_entry(tmp, diva_um_idi_adapter_t, link); if (a->adapter_nr == adapter_nr) { - diva_q_remove(&adapter_q, &a->link); + list_del(tmp); cleanup_adapter(a); DBG_LOG(("DIDD: del adapter(%d)", a->adapter_nr)); diva_os_free(0, a); break; } - a = (diva_um_idi_adapter_t *) diva_q_get_next(&a->link); } } @@ -109,15 +102,15 @@ -------------------------------------------------------------------------- */ void diva_user_mode_idi_finit(void) { - diva_um_idi_adapter_t *a = - (diva_um_idi_adapter_t *) diva_q_get_head(&adapter_q); + struct list_head *tmp, *safe; + diva_um_idi_adapter_t *a; - while (a) { - diva_q_remove(&adapter_q, &a->link); + list_for_each_safe(tmp, safe, &adapter_q) { + a = list_entry(tmp, diva_um_idi_adapter_t, link); + list_del(tmp); cleanup_adapter(a); DBG_LOG(("DIDD: del adapter(%d)", a->adapter_nr)); diva_os_free(0, a); - a = (diva_um_idi_adapter_t *) diva_q_get_head(&adapter_q); } diva_os_destroy_spin_lock(&adapter_lock, "adapter"); } @@ -137,6 +130,7 @@ return (-1); } memset(a, 0x00, sizeof(*a)); + INIT_LIST_HEAD(&a->entity_q); a->d = *d; a->adapter_nr = adapter_nr; @@ -145,46 +139,27 @@ adapter_nr, a->d.type, a->d.features, a->d.channels)); diva_os_enter_spin_lock(&adapter_lock, &old_irql, "create_adapter"); - diva_q_add_tail(&adapter_q, &a->link); + list_add_tail(&a->link, &adapter_q); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "create_adapter"); return (0); } -static int cmp_adapter_nr(const void *what, const diva_entity_link_t * p) -{ - diva_um_idi_adapter_t *a = (diva_um_idi_adapter_t *) p; - dword nr = (dword) (unsigned long) what; - - DBG_TRC(("find_adapter: (%d)-(%d)", nr, a->adapter_nr)); - - return (nr != a->adapter_nr); -} - /* ------------------------------------------------------------------------ Find adapter by Adapter number ------------------------------------------------------------------------ */ static diva_um_idi_adapter_t *diva_um_idi_find_adapter(dword nr) { - return (diva_um_idi_adapter_t *) diva_q_find(&adapter_q, - (void *) (unsigned - long) nr, - cmp_adapter_nr); -} + diva_um_idi_adapter_t *a = NULL; + struct list_head *tmp; -/* ------------------------------------------------------------------------ - Return number of adapters in system - ------------------------------------------------------------------------ */ -int diva_um_idi_nr_of_adapters(void) -{ - int i = 0; - const diva_entity_queue_t * q = &adapter_q; - const diva_entity_link_t *diva_current = q->head; - - while (diva_current) { - i++; - diva_current = diva_current->next; + list_for_each(tmp, &adapter_q) { + a = list_entry(tmp, diva_um_idi_adapter_t, link); + DBG_TRC(("find_adapter: (%d)-(%d)", nr, a->adapter_nr)); + if (a->adapter_nr == (int)nr) + break; + a = NULL; } - return(i); + return(a); } /* ------------------------------------------------------------------------ @@ -193,17 +168,17 @@ ------------------------------------------------------------------------ */ static void cleanup_adapter(diva_um_idi_adapter_t * a) { - divas_um_idi_entity_t *e = - (divas_um_idi_entity_t *) diva_q_get_head(&a->entity_q); + struct list_head *tmp, *safe; + divas_um_idi_entity_t *e; - while (e) { - diva_q_remove(&a->entity_q, &e->link); + list_for_each_safe(tmp, safe, &a->entity_q) { + e = list_entry(tmp, divas_um_idi_entity_t, link); + list_del(tmp); cleanup_entity(e); if (e->os_context) { diva_os_wakeup_read(e->os_context); diva_os_wakeup_close(e->os_context); } - e = (divas_um_idi_entity_t *) diva_q_get_head(&a->entity_q); } memset(&a->d, 0x00, sizeof(DESCRIPTOR)); } @@ -281,7 +256,7 @@ e->os_ref = file; /* link to os handle */ e->adapter = a; /* link to adapter */ - diva_q_add_tail(&a->entity_q, &e->link); /* link from adapter */ + list_add_tail(&e->link, &a->entity_q); /* link from adapter */ diva_os_leave_spin_lock(&adapter_lock, &old_irql, "create_entity"); @@ -305,7 +280,7 @@ diva_os_enter_spin_lock(&adapter_lock, &old_irql, "delete_entity"); if ((a = e->adapter)) { - diva_q_remove(&a->entity_q, &e->link); + list_del(&e->link); } diva_os_leave_spin_lock(&adapter_lock, &old_irql, "delete_entity"); diff -Nru a/drivers/isdn/hardware/eicon/um_idi.h b/drivers/isdn/hardware/eicon/um_idi.h --- a/drivers/isdn/hardware/eicon/um_idi.h Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/um_idi.h Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: um_idi.h,v 1.1.2.2 2002/10/02 14:38:38 armin Exp $ */ +/* $Id: um_idi.h,v 1.6 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVA_USER_MODE_IDI_CORE_H__ #define __DIVA_USER_MODE_IDI_CORE_H__ @@ -9,7 +9,6 @@ */ int diva_user_mode_idi_init(void); void diva_user_mode_idi_finit(void); -int diva_um_idi_nr_of_adapters(void); void *divas_um_idi_create_entity(dword adapter_nr, void *file); int divas_um_idi_delete_entity(int adapter_nr, void *entity); diff -Nru a/drivers/isdn/hardware/eicon/xdi_adapter.h b/drivers/isdn/hardware/eicon/xdi_adapter.h --- a/drivers/isdn/hardware/eicon/xdi_adapter.h Sun Mar 28 13:12:08 2004 +++ b/drivers/isdn/hardware/eicon/xdi_adapter.h Sun Mar 28 13:12:08 2004 @@ -1,4 +1,4 @@ -/* $Id: xdi_adapter.h,v 1.6 2003/12/05 18:45:05 armin Exp $ */ +/* $Id: xdi_adapter.h,v 1.7 2004/03/21 17:26:01 armin Exp $ */ #ifndef __DIVA_OS_XDI_ADAPTER_H__ #define __DIVA_OS_XDI_ADAPTER_H__ @@ -47,7 +47,7 @@ } diva_os_idi_adapter_interface_t; typedef struct _diva_os_xdi_adapter { - diva_entity_link_t link; + struct list_head link; int CardIndex; int CardOrdinal; int controller; /* number of this controller */ diff -Nru a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig --- a/drivers/macintosh/Kconfig Sun Mar 28 13:12:07 2004 +++ b/drivers/macintosh/Kconfig Sun Mar 28 13:12:07 2004 @@ -175,8 +175,8 @@ This driver provides some thermostat and fan control for the desktop G4 "Windtunnel" -config THERM_ADT7467 - tristate "Support for thermal mgmnt on laptops with ADT 7467 chipset" +config THERM_ADT746X + tristate "Support for thermal mgmnt on laptops with ADT 746x chipset" depends on I2C && I2C_KEYWEST && PPC_PMAC && !PPC_PMAC64 help This driver provides some thermostat and fan control for the diff -Nru a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile --- a/drivers/macintosh/Makefile Sun Mar 28 13:12:08 2004 +++ b/drivers/macintosh/Makefile Sun Mar 28 13:12:08 2004 @@ -25,4 +25,4 @@ obj-$(CONFIG_THERM_PM72) += therm_pm72.o obj-$(CONFIG_THERM_WINDTUNNEL) += therm_windtunnel.o -obj-$(CONFIG_THERM_ADT7467) += therm_adt7467.o +obj-$(CONFIG_THERM_ADT746X) += therm_adt746x.o diff -Nru a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c --- a/drivers/macintosh/adbhid.c Sun Mar 28 13:12:08 2004 +++ b/drivers/macintosh/adbhid.c Sun Mar 28 13:12:08 2004 @@ -107,7 +107,6 @@ static void adbhid_probe(void); static void adbhid_input_keycode(int, int, int, struct pt_regs *); -static void leds_done(struct adb_request *); static void init_trackpad(int id); static void init_trackball(int id); @@ -446,24 +445,54 @@ static struct adb_request led_request; static int leds_pending[16]; +static int leds_req_pending; static int pending_devs[16]; static int pending_led_start=0; static int pending_led_end=0; +static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED; + +static void leds_done(struct adb_request *req) +{ + int leds, device; + unsigned long flags; + + spin_lock_irqsave(&leds_lock, flags); + + if (pending_led_start != pending_led_end) { + device = pending_devs[pending_led_start]; + leds = leds_pending[device] & 0xff; + leds_pending[device] = 0; + pending_led_start++; + pending_led_start = (pending_led_start < 16) ? pending_led_start : 0; + } else + leds_req_pending = 0; + + spin_unlock_irqrestore(&leds_lock, flags); + if (leds_req_pending) + adb_request(&led_request, leds_done, 0, 3, + ADB_WRITEREG(device, KEYB_LEDREG), 0xff, ~leds); +} static void real_leds(unsigned char leds, int device) { - if (led_request.complete) { - adb_request(&led_request, leds_done, 0, 3, - ADB_WRITEREG(device, KEYB_LEDREG), 0xff, - ~leds); - } else { - if (!(leds_pending[device] & 0x100)) { - pending_devs[pending_led_end] = device; - pending_led_end++; - pending_led_end = (pending_led_end < 16) ? pending_led_end : 0; + unsigned long flags; + + spin_lock_irqsave(&leds_lock, flags); + if (!leds_req_pending) { + leds_req_pending = 1; + spin_unlock_irqrestore(&leds_lock, flags); + adb_request(&led_request, leds_done, 0, 3, + ADB_WRITEREG(device, KEYB_LEDREG), 0xff, ~leds); + return; + } else { + if (!(leds_pending[device] & 0x100)) { + pending_devs[pending_led_end] = device; + pending_led_end++; + pending_led_end = (pending_led_end < 16) ? pending_led_end : 0; + } + leds_pending[device] = leds | 0x100; } - leds_pending[device] = leds | 0x100; - } + spin_unlock_irqrestore(&leds_lock, flags); } /* @@ -487,21 +516,6 @@ return -1; } -static void leds_done(struct adb_request *req) -{ - int leds,device; - - if (pending_led_start != pending_led_end) { - device = pending_devs[pending_led_start]; - leds = leds_pending[device] & 0xff; - leds_pending[device] = 0; - pending_led_start++; - pending_led_start = (pending_led_start < 16) ? pending_led_start : 0; - real_leds(leds,device); - } - -} - static int adb_message_handler(struct notifier_block *this, unsigned long code, void *x) { @@ -518,7 +532,7 @@ } /* Stop pending led requests */ - while(!led_request.complete) + while(leds_req_pending) adb_poll(); break; diff -Nru a/drivers/macintosh/therm_adt7467.c b/drivers/macintosh/therm_adt7467.c --- a/drivers/macintosh/therm_adt7467.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,562 +0,0 @@ -/* - * Device driver for the i2c thermostat found on the iBook G4, Albook G4 - * - * Copyright (C) 2003, 2004 Colin Leroy, Rasmus Rohde, Benjamin Herrenschmidt - * - * Documentation from - * http://www.analog.com/UploadedFiles/Data_Sheets/115254175ADT7467_pra.pdf - * http://www.analog.com/UploadedFiles/Data_Sheets/3686221171167ADT7460_b.pdf - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef DEBUG - -#define CONFIG_REG 0x40 -#define MANUAL_MASK 0xe0 -#define AUTO_MASK 0x20 - -static u8 TEMP_REG[3] = {0x26, 0x25, 0x27}; /* local, cpu, gpu */ -static u8 LIMIT_REG[3] = {0x6b, 0x6a, 0x6c}; /* local, cpu, gpu */ -static u8 MANUAL_MODE[2] = {0x5c, 0x5d}; -static u8 REM_CONTROL[2] = {0x00, 0x40}; -static u8 FAN_SPEED[2] = {0x28, 0x2a}; -static u8 FAN_SPD_SET[2] = {0x30, 0x31}; - -static u8 default_limits_local[3] = {70, 50, 70}; /* local, cpu, gpu */ -static u8 default_limits_chip[3] = {80, 65, 80}; /* local, cpu, gpu */ - -static int limit_adjust = 0; -static int fan_speed = -1; - -MODULE_AUTHOR("Colin Leroy "); -MODULE_DESCRIPTION("Driver for ADT7467 thermostat in iBook G4"); -MODULE_LICENSE("GPL"); - -MODULE_PARM(limit_adjust,"i"); -MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50°C cpu, 70°C gpu) by N °C."); -MODULE_PARM(fan_speed,"i"); -MODULE_PARM_DESC(fan_speed,"Specify fan speed (0-255) when lim < temp < lim+8 (default 128)"); - -struct thermostat { - struct i2c_client clt; - u8 cached_temp[3]; - u8 initial_limits[3]; - u8 limits[3]; - int last_speed[2]; - int overriding[2]; -}; - -static enum {ADT7460, ADT7467} therm_type; -static int therm_bus, therm_address; -static struct of_device * of_dev; -static struct thermostat* thermostat; -static pid_t monitor_thread_id; -static int monitor_running; -static struct completion monitor_task_compl; - -static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno); -static void write_both_fan_speed(struct thermostat *th, int speed); -static void write_fan_speed(struct thermostat *th, int speed, int fan); - -static int -write_reg(struct thermostat* th, int reg, u8 data) -{ - u8 tmp[2]; - int rc; - - tmp[0] = reg; - tmp[1] = data; - rc = i2c_master_send(&th->clt, (const char *)tmp, 2); - if (rc < 0) - return rc; - if (rc != 2) - return -ENODEV; - return 0; -} - -static int -read_reg(struct thermostat* th, int reg) -{ - u8 reg_addr, data; - int rc; - - reg_addr = (u8)reg; - rc = i2c_master_send(&th->clt, ®_addr, 1); - if (rc < 0) - return rc; - if (rc != 1) - return -ENODEV; - rc = i2c_master_recv(&th->clt, (char *)&data, 1); - if (rc < 0) - return rc; - return data; -} - -static int -attach_thermostat(struct i2c_adapter *adapter) -{ - unsigned long bus_no; - - if (strncmp(adapter->name, "uni-n", 5)) - return -ENODEV; - bus_no = simple_strtoul(adapter->name + 6, NULL, 10); - if (bus_no != therm_bus) - return -ENODEV; - return attach_one_thermostat(adapter, therm_address, bus_no); -} - -static int -detach_thermostat(struct i2c_adapter *adapter) -{ - struct thermostat* th; - int i; - - if (thermostat == NULL) - return 0; - - th = thermostat; - - if (monitor_running) { - monitor_running = 0; - wait_for_completion(&monitor_task_compl); - } - - printk(KERN_INFO "adt746x: Putting max temperatures back from %d, %d, %d," - " to %d, %d, %d, (°C)\n", - th->limits[0], th->limits[1], th->limits[2], - th->initial_limits[0], th->initial_limits[1], th->initial_limits[2]); - - for (i = 0; i < 3; i++) - write_reg(th, LIMIT_REG[i], th->initial_limits[i]); - - write_both_fan_speed(th, -1); - - i2c_detach_client(&th->clt); - - thermostat = NULL; - - kfree(th); - - return 0; -} - -static struct i2c_driver thermostat_driver = { - .name ="Apple Thermostat ADT7467", - .id =0xDEAD7467, - .flags =I2C_DF_NOTIFY, - .attach_adapter =&attach_thermostat, - .detach_adapter =&detach_thermostat, -}; - -static int read_fan_speed(struct thermostat *th, u8 addr) -{ - u8 tmp[2]; - u16 res; - - /* should start with low byte */ - tmp[1] = read_reg(th, addr); - tmp[0] = read_reg(th, addr + 1); - - res = tmp[1] + (tmp[0] << 8); - return (90000*60)/res; -} - -static void write_both_fan_speed(struct thermostat *th, int speed) -{ - write_fan_speed(th, speed, 0); - if (therm_type == ADT7460) - write_fan_speed(th, speed, 1); -} - -static void write_fan_speed(struct thermostat *th, int speed, int fan) -{ - u8 manual; - - if (speed > 0xff) - speed = 0xff; - else if (speed < -1) - speed = 0; - - if (therm_type == ADT7467 && fan == 1) - return; - - if (th->last_speed[fan] != speed) { - if (speed == -1) - printk(KERN_INFO "adt746x: Setting speed to: automatic for %s fan.\n", - fan?"GPU":"CPU"); - else - printk(KERN_INFO "adt746x: Setting speed to: %d for %s fan.\n", - speed, fan?"GPU":"CPU"); - } else - return; - - if (speed >= 0) { - manual = read_reg(th, MANUAL_MODE[fan]); - write_reg(th, MANUAL_MODE[fan], manual|MANUAL_MASK); - write_reg(th, FAN_SPD_SET[fan], speed); - } else { - /* back to automatic */ - if(therm_type == ADT7460) { - manual = read_reg(th, MANUAL_MODE[fan]) & (~MANUAL_MASK); - write_reg(th, MANUAL_MODE[fan], manual|REM_CONTROL[fan]); - } else { - manual = read_reg(th, MANUAL_MODE[fan]); - write_reg(th, MANUAL_MODE[fan], manual&(~AUTO_MASK)); - } - } - - th->last_speed[fan] = speed; -} - -static int monitor_task(void *arg) -{ - struct thermostat* th = arg; - u8 temps[3]; - u8 lims[3]; - int i; -#ifdef DEBUG - int mfan_speed; -#endif - - lock_kernel(); - daemonize("kfand"); - unlock_kernel(); - strcpy(current->comm, "thermostat"); - monitor_running = 1; - - while(monitor_running) - { - set_task_state(current, TASK_UNINTERRUPTIBLE); - schedule_timeout(2*HZ); - - /* Check status */ - /* local : chip */ - /* remote 1: CPU ?*/ - /* remote 2: GPU ?*/ -#ifndef DEBUG - if (fan_speed != -1) { -#endif - for (i = 0; i < 3; i++) { - temps[i] = read_reg(th, TEMP_REG[i]); - lims[i] = th->limits[i]; - } -#ifndef DEBUG - } -#endif - if (fan_speed != -1) { - int lastvar = 0; /* for iBook */ - for (i = 1; i < 3; i++) { /* we don't care about local sensor */ - int started = 0; - int fan_number = (therm_type == ADT7460 && i == 2); - int var = temps[i] - lims[i]; - if (var > 8) { - if (th->overriding[fan_number] == 0) - printk(KERN_INFO "adt746x: Limit exceeded by %d°C, overriding specified fan speed for %s.\n", - var, fan_number?"GPU":"CPU"); - th->overriding[fan_number] = 1; - write_fan_speed(th, 255, fan_number); - started = 1; - } else if ((!th->overriding[fan_number] || var < 6) && var > 0) { - if (th->overriding[fan_number] == 1) - printk(KERN_INFO "adt746x: Limit exceeded by %d°C, setting speed to specified for %s.\n", - var, fan_number?"GPU":"CPU"); - th->overriding[fan_number] = 0; - write_fan_speed(th, fan_speed, fan_number); - started = 1; - } else if (var < -1) { - /* don't stop iBook fan if GPU is cold and CPU is not - * so cold (lastvar >= -1) */ - if (therm_type == ADT7460 || lastvar < -1 || i == 1) { - if (th->last_speed[fan_number] != 0) - printk(KERN_INFO "adt746x: Stopping %s fan.\n", - fan_number?"GPU":"CPU"); - write_fan_speed(th, 0, fan_number); - } - } - - lastvar = var; - - if (started && therm_type == ADT7467) - break; /* we don't want to re-stop the fan - * if CPU is heating and GPU is not */ - } - } -#ifdef DEBUG - mfan_speed = read_fan_speed(th, FAN_SPEED[0]); - /* only one fan in the iBook G4 */ - - if (temps[0] != th->cached_temp[0] - || temps[1] != th->cached_temp[1] - || temps[2] != th->cached_temp[2]) { - printk(KERN_INFO "adt746x: Temperature infos:" - " thermostats: %d,%d,%d °C;" - " limits: %d,%d,%d °C;" - " fan speed: %d RPM\n", - temps[0], temps[1], temps[2], - lims[0], lims[1], lims[2], - mfan_speed); - } - th->cached_temp[0] = temps[0]; - th->cached_temp[1] = temps[1]; - th->cached_temp[2] = temps[2]; -#endif - } - - complete_and_exit(&monitor_task_compl, 0); - return 0; -} - -static void -set_limit(struct thermostat *th, int i) -{ - /* Set CPU limit higher to avoid powerdowns */ - th->limits[i] = default_limits_chip[i] + limit_adjust; - write_reg(th, LIMIT_REG[i], th->limits[i]); - - /* set our limits to normal */ - th->limits[i] = default_limits_local[i] + limit_adjust; -} - -static int -attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno) -{ - struct thermostat* th; - int rc; - int i; - - if (thermostat) - return 0; - th = (struct thermostat *)kmalloc(sizeof(struct thermostat), GFP_KERNEL); - if (!th) - return -ENOMEM; - memset(th, 0, sizeof(*th)); - th->clt.addr = addr; - th->clt.adapter = adapter; - th->clt.driver = &thermostat_driver; - th->clt.id = 0xDEAD7467; - strcpy(th->clt.name, "thermostat"); - - rc = read_reg(th, 0); - if (rc < 0) { - printk(KERN_ERR "adt746x: Thermostat failed to read config from bus %d !\n", - busno); - kfree(th); - return -ENODEV; - } - /* force manual control to start the fan quieter */ - - if (fan_speed == -1) - fan_speed=128; - - if(therm_type == ADT7460) { - printk(KERN_INFO "adt746x: ADT7460 initializing\n"); - /* The 7460 needs to be started explicitly */ - write_reg(th, CONFIG_REG, 1); - } else - printk(KERN_INFO "adt746x: ADT7467 initializing\n"); - - for (i = 0; i < 3; i++) { - th->initial_limits[i] = read_reg(th, LIMIT_REG[i]); - set_limit(th, i); - } - - printk(KERN_INFO "adt746x: Lowering max temperatures from %d, %d, %d" - " to %d, %d, %d (°C)\n", - th->initial_limits[0], th->initial_limits[1], th->initial_limits[2], - th->limits[0], th->limits[1], th->limits[2]); - - thermostat = th; - - if (i2c_attach_client(&th->clt)) { - printk("adt746x: Thermostat failed to attach client !\n"); - thermostat = NULL; - kfree(th); - return -ENODEV; - } - - /* be sure to really write fan speed the first time */ - th->last_speed[0] = -2; - th->last_speed[1] = -2; - - if (fan_speed != -1) { - write_both_fan_speed(th, 0); - } else { - write_both_fan_speed(th, -1); - } - - init_completion(&monitor_task_compl); - - monitor_thread_id = kernel_thread(monitor_task, th, - SIGCHLD | CLONE_KERNEL); - - return 0; -} - -/* - * Now, unfortunately, sysfs doesn't give us a nice void * we could - * pass around to the attribute functions, so we don't really have - * choice but implement a bunch of them... - * - */ -#define BUILD_SHOW_FUNC_DEG(name, data) \ -static ssize_t show_##name(struct device *dev, char *buf) \ -{ \ - return sprintf(buf, "%d°C\n", data); \ -} -#define BUILD_SHOW_FUNC_INT(name, data) \ -static ssize_t show_##name(struct device *dev, char *buf) \ -{ \ - return sprintf(buf, "%d\n", data); \ -} - -#define BUILD_STORE_FUNC_DEG(name, data) \ -static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \ -{ \ - int val; \ - int i; \ - val = simple_strtol(buf, NULL, 10); \ - printk(KERN_INFO "Adjusting limits by %d°C\n", val); \ - limit_adjust = val; \ - for (i=0; i < 3; i++) \ - set_limit(thermostat, i); \ - return n; \ -} - -#define BUILD_STORE_FUNC_INT(name, data) \ -static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \ -{ \ - u32 val; \ - val = simple_strtoul(buf, NULL, 10); \ - if (val < 0 || val > 255) \ - return -EINVAL; \ - printk(KERN_INFO "Setting fan speed to %d\n", val); \ - data = val; \ - return n; \ -} - -BUILD_SHOW_FUNC_DEG(cpu_temperature, (read_reg(thermostat, TEMP_REG[1]))) -BUILD_SHOW_FUNC_DEG(gpu_temperature, (read_reg(thermostat, TEMP_REG[2]))) -BUILD_SHOW_FUNC_DEG(cpu_limit, thermostat->limits[1]) -BUILD_SHOW_FUNC_DEG(gpu_limit, thermostat->limits[2]) - -BUILD_SHOW_FUNC_INT(specified_fan_speed, fan_speed) -BUILD_SHOW_FUNC_INT(cpu_fan_speed, (read_fan_speed(thermostat, FAN_SPEED[0]))) -BUILD_SHOW_FUNC_INT(gpu_fan_speed, (read_fan_speed(thermostat, FAN_SPEED[1]))) - -BUILD_STORE_FUNC_INT(specified_fan_speed,fan_speed) -BUILD_SHOW_FUNC_INT(limit_adjust, limit_adjust) -BUILD_STORE_FUNC_DEG(limit_adjust, thermostat) - -static DEVICE_ATTR(cpu_temperature, S_IRUGO, - show_cpu_temperature,NULL); -static DEVICE_ATTR(gpu_temperature, S_IRUGO, - show_gpu_temperature,NULL); -static DEVICE_ATTR(cpu_limit, S_IRUGO, - show_cpu_limit, NULL); -static DEVICE_ATTR(gpu_limit, S_IRUGO, - show_gpu_limit, NULL); - -static DEVICE_ATTR(specified_fan_speed, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH, - show_specified_fan_speed,store_specified_fan_speed); - -static DEVICE_ATTR(cpu_fan_speed, S_IRUGO, - show_cpu_fan_speed, NULL); -static DEVICE_ATTR(gpu_fan_speed, S_IRUGO, - show_gpu_fan_speed, NULL); - -static DEVICE_ATTR(limit_adjust, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH, - show_limit_adjust, store_limit_adjust); - - -static int __init -thermostat_init(void) -{ - struct device_node* np; - u32 *prop; - - /* Currently, we only deal with the iBook G4, we will support - * all "2003" powerbooks later on - */ - np = of_find_node_by_name(NULL, "fan"); - if (!np) - return -ENODEV; - if (device_is_compatible(np, "adt7460")) - therm_type = ADT7460; - else if (device_is_compatible(np, "adt7467")) - therm_type = ADT7467; - else - return -ENODEV; - - prop = (u32 *)get_property(np, "reg", NULL); - if (!prop) - return -ENODEV; - therm_bus = ((*prop) >> 8) & 0x0f; - therm_address = ((*prop) & 0xff) >> 1; - - printk(KERN_INFO "adt746x: Thermostat bus: %d, address: 0x%02x, limit_adjust: %d, fan_speed: %d\n", - therm_bus, therm_address, limit_adjust, fan_speed); - - of_dev = of_platform_device_create(np, "temperatures"); - - if (of_dev == NULL) { - printk(KERN_ERR "Can't register temperatures device !\n"); - return -ENODEV; - } - - device_create_file(&of_dev->dev, &dev_attr_cpu_temperature); - device_create_file(&of_dev->dev, &dev_attr_gpu_temperature); - device_create_file(&of_dev->dev, &dev_attr_cpu_limit); - device_create_file(&of_dev->dev, &dev_attr_gpu_limit); - device_create_file(&of_dev->dev, &dev_attr_limit_adjust); - device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed); - device_create_file(&of_dev->dev, &dev_attr_cpu_fan_speed); - if(therm_type == ADT7460) - device_create_file(&of_dev->dev, &dev_attr_gpu_fan_speed); - -#ifndef CONFIG_I2C_KEYWEST - request_module("i2c-keywest"); -#endif - - return i2c_add_driver(&thermostat_driver); -} - -static void __exit -thermostat_exit(void) -{ - if (of_dev) { - device_remove_file(&of_dev->dev, &dev_attr_cpu_temperature); - device_remove_file(&of_dev->dev, &dev_attr_gpu_temperature); - device_remove_file(&of_dev->dev, &dev_attr_cpu_limit); - device_remove_file(&of_dev->dev, &dev_attr_gpu_limit); - device_remove_file(&of_dev->dev, &dev_attr_limit_adjust); - device_remove_file(&of_dev->dev, &dev_attr_specified_fan_speed); - device_remove_file(&of_dev->dev, &dev_attr_cpu_fan_speed); - if(therm_type == ADT7460) - device_remove_file(&of_dev->dev, &dev_attr_gpu_fan_speed); - of_device_unregister(of_dev); - } - i2c_del_driver(&thermostat_driver); -} - -module_init(thermostat_init); -module_exit(thermostat_exit); diff -Nru a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/macintosh/therm_adt746x.c Sun Mar 28 13:12:08 2004 @@ -0,0 +1,559 @@ +/* + * Device driver for the i2c thermostat found on the iBook G4, Albook G4 + * + * Copyright (C) 2003, 2004 Colin Leroy, Rasmus Rohde, Benjamin Herrenschmidt + * + * Documentation from + * http://www.analog.com/UploadedFiles/Data_Sheets/115254175ADT7467_pra.pdf + * http://www.analog.com/UploadedFiles/Data_Sheets/3686221171167ADT7460_b.pdf + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef DEBUG + +#define CONFIG_REG 0x40 +#define MANUAL_MASK 0xe0 +#define AUTO_MASK 0x20 + +static u8 TEMP_REG[3] = {0x26, 0x25, 0x27}; /* local, cpu, gpu */ +static u8 LIMIT_REG[3] = {0x6b, 0x6a, 0x6c}; /* local, cpu, gpu */ +static u8 MANUAL_MODE[2] = {0x5c, 0x5d}; +static u8 REM_CONTROL[2] = {0x00, 0x40}; +static u8 FAN_SPEED[2] = {0x28, 0x2a}; +static u8 FAN_SPD_SET[2] = {0x30, 0x31}; + +static u8 default_limits_local[3] = {70, 50, 70}; /* local, cpu, gpu */ +static u8 default_limits_chip[3] = {80, 65, 80}; /* local, cpu, gpu */ + +static int limit_adjust = 0; +static int fan_speed = -1; + +MODULE_AUTHOR("Colin Leroy "); +MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and Powerbook G4 Alu"); +MODULE_LICENSE("GPL"); + +MODULE_PARM(limit_adjust,"i"); +MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50°C cpu, 70°C gpu) by N °C."); +MODULE_PARM(fan_speed,"i"); +MODULE_PARM_DESC(fan_speed,"Specify fan speed (0-255) when lim < temp < lim+8 (default 128)"); + +struct thermostat { + struct i2c_client clt; + u8 cached_temp[3]; + u8 initial_limits[3]; + u8 limits[3]; + int last_speed[2]; + int overriding[2]; +}; + +static enum {ADT7460, ADT7467} therm_type; +static int therm_bus, therm_address; +static struct of_device * of_dev; +static struct thermostat* thermostat; +static pid_t monitor_thread_id; +static int monitor_running; +static struct completion monitor_task_compl; + +static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno); +static void write_both_fan_speed(struct thermostat *th, int speed); +static void write_fan_speed(struct thermostat *th, int speed, int fan); + +static int +write_reg(struct thermostat* th, int reg, u8 data) +{ + u8 tmp[2]; + int rc; + + tmp[0] = reg; + tmp[1] = data; + rc = i2c_master_send(&th->clt, (const char *)tmp, 2); + if (rc < 0) + return rc; + if (rc != 2) + return -ENODEV; + return 0; +} + +static int +read_reg(struct thermostat* th, int reg) +{ + u8 reg_addr, data; + int rc; + + reg_addr = (u8)reg; + rc = i2c_master_send(&th->clt, ®_addr, 1); + if (rc < 0) + return rc; + if (rc != 1) + return -ENODEV; + rc = i2c_master_recv(&th->clt, (char *)&data, 1); + if (rc < 0) + return rc; + return data; +} + +static int +attach_thermostat(struct i2c_adapter *adapter) +{ + unsigned long bus_no; + + if (strncmp(adapter->name, "uni-n", 5)) + return -ENODEV; + bus_no = simple_strtoul(adapter->name + 6, NULL, 10); + if (bus_no != therm_bus) + return -ENODEV; + return attach_one_thermostat(adapter, therm_address, bus_no); +} + +static int +detach_thermostat(struct i2c_adapter *adapter) +{ + struct thermostat* th; + int i; + + if (thermostat == NULL) + return 0; + + th = thermostat; + + if (monitor_running) { + monitor_running = 0; + wait_for_completion(&monitor_task_compl); + } + + printk(KERN_INFO "adt746x: Putting max temperatures back from %d, %d, %d," + " to %d, %d, %d, (°C)\n", + th->limits[0], th->limits[1], th->limits[2], + th->initial_limits[0], th->initial_limits[1], th->initial_limits[2]); + + for (i = 0; i < 3; i++) + write_reg(th, LIMIT_REG[i], th->initial_limits[i]); + + write_both_fan_speed(th, -1); + + i2c_detach_client(&th->clt); + + thermostat = NULL; + + kfree(th); + + return 0; +} + +static struct i2c_driver thermostat_driver = { + .name ="Apple Thermostat ADT746x", + .id =0xDEAD7467, + .flags =I2C_DF_NOTIFY, + .attach_adapter =&attach_thermostat, + .detach_adapter =&detach_thermostat, +}; + +static int read_fan_speed(struct thermostat *th, u8 addr) +{ + u8 tmp[2]; + u16 res; + + /* should start with low byte */ + tmp[1] = read_reg(th, addr); + tmp[0] = read_reg(th, addr + 1); + + res = tmp[1] + (tmp[0] << 8); + return (90000*60)/res; +} + +static void write_both_fan_speed(struct thermostat *th, int speed) +{ + write_fan_speed(th, speed, 0); + if (therm_type == ADT7460) + write_fan_speed(th, speed, 1); +} + +static void write_fan_speed(struct thermostat *th, int speed, int fan) +{ + u8 manual; + + if (speed > 0xff) + speed = 0xff; + else if (speed < -1) + speed = 0; + + if (therm_type == ADT7467 && fan == 1) + return; + + if (th->last_speed[fan] != speed) { + if (speed == -1) + printk(KERN_INFO "adt746x: Setting speed to: automatic for %s fan.\n", + fan?"GPU":"CPU"); + else + printk(KERN_INFO "adt746x: Setting speed to: %d for %s fan.\n", + speed, fan?"GPU":"CPU"); + } else + return; + + if (speed >= 0) { + manual = read_reg(th, MANUAL_MODE[fan]); + write_reg(th, MANUAL_MODE[fan], manual|MANUAL_MASK); + write_reg(th, FAN_SPD_SET[fan], speed); + } else { + /* back to automatic */ + if(therm_type == ADT7460) { + manual = read_reg(th, MANUAL_MODE[fan]) & (~MANUAL_MASK); + write_reg(th, MANUAL_MODE[fan], manual|REM_CONTROL[fan]); + } else { + manual = read_reg(th, MANUAL_MODE[fan]); + write_reg(th, MANUAL_MODE[fan], manual&(~AUTO_MASK)); + } + } + + th->last_speed[fan] = speed; +} + +static int monitor_task(void *arg) +{ + struct thermostat* th = arg; + u8 temps[3]; + u8 lims[3]; + int i; +#ifdef DEBUG + int mfan_speed; +#endif + + lock_kernel(); + daemonize("kfand"); + unlock_kernel(); + strcpy(current->comm, "thermostat"); + monitor_running = 1; + + while(monitor_running) + { + set_task_state(current, TASK_UNINTERRUPTIBLE); + schedule_timeout(2*HZ); + + /* Check status */ + /* local : chip */ + /* remote 1: CPU ?*/ + /* remote 2: GPU ?*/ +#ifndef DEBUG + if (fan_speed != -1) { +#endif + for (i = 0; i < 3; i++) { + temps[i] = read_reg(th, TEMP_REG[i]); + lims[i] = th->limits[i]; + } +#ifndef DEBUG + } +#endif + if (fan_speed != -1) { + int lastvar = 0; /* for iBook */ + for (i = 1; i < 3; i++) { /* we don't care about local sensor */ + int started = 0; + int fan_number = (therm_type == ADT7460 && i == 2); + int var = temps[i] - lims[i]; + if (var > 8) { + if (th->overriding[fan_number] == 0) + printk(KERN_INFO "adt746x: Limit exceeded by %d°C, overriding specified fan speed for %s.\n", + var, fan_number?"GPU":"CPU"); + th->overriding[fan_number] = 1; + write_fan_speed(th, 255, fan_number); + started = 1; + } else if ((!th->overriding[fan_number] || var < 6) && var > 0) { + if (th->overriding[fan_number] == 1) + printk(KERN_INFO "adt746x: Limit exceeded by %d°C, setting speed to specified for %s.\n", + var, fan_number?"GPU":"CPU"); + th->overriding[fan_number] = 0; + write_fan_speed(th, fan_speed, fan_number); + started = 1; + } else if (var < -1) { + /* don't stop iBook fan if GPU is cold and CPU is not + * so cold (lastvar >= -1) */ + if (therm_type == ADT7460 || lastvar < -1 || i == 1) { + if (th->last_speed[fan_number] != 0) + printk(KERN_INFO "adt746x: Stopping %s fan.\n", + fan_number?"GPU":"CPU"); + write_fan_speed(th, 0, fan_number); + } + } + + lastvar = var; + + if (started && therm_type == ADT7467) + break; /* we don't want to re-stop the fan + * if CPU is heating and GPU is not */ + } + } +#ifdef DEBUG + mfan_speed = read_fan_speed(th, FAN_SPEED[0]); + /* only one fan in the iBook G4 */ + + if (temps[0] != th->cached_temp[0] + || temps[1] != th->cached_temp[1] + || temps[2] != th->cached_temp[2]) { + printk(KERN_INFO "adt746x: Temperature infos:" + " thermostats: %d,%d,%d °C;" + " limits: %d,%d,%d °C;" + " fan speed: %d RPM\n", + temps[0], temps[1], temps[2], + lims[0], lims[1], lims[2], + mfan_speed); + } + th->cached_temp[0] = temps[0]; + th->cached_temp[1] = temps[1]; + th->cached_temp[2] = temps[2]; +#endif + } + + complete_and_exit(&monitor_task_compl, 0); + return 0; +} + +static void +set_limit(struct thermostat *th, int i) +{ + /* Set CPU limit higher to avoid powerdowns */ + th->limits[i] = default_limits_chip[i] + limit_adjust; + write_reg(th, LIMIT_REG[i], th->limits[i]); + + /* set our limits to normal */ + th->limits[i] = default_limits_local[i] + limit_adjust; +} + +static int +attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno) +{ + struct thermostat* th; + int rc; + int i; + + if (thermostat) + return 0; + th = (struct thermostat *)kmalloc(sizeof(struct thermostat), GFP_KERNEL); + if (!th) + return -ENOMEM; + memset(th, 0, sizeof(*th)); + th->clt.addr = addr; + th->clt.adapter = adapter; + th->clt.driver = &thermostat_driver; + th->clt.id = 0xDEAD7467; + strcpy(th->clt.name, "thermostat"); + + rc = read_reg(th, 0); + if (rc < 0) { + printk(KERN_ERR "adt746x: Thermostat failed to read config from bus %d !\n", + busno); + kfree(th); + return -ENODEV; + } + /* force manual control to start the fan quieter */ + + if (fan_speed == -1) + fan_speed=128; + + if(therm_type == ADT7460) { + printk(KERN_INFO "adt746x: ADT7460 initializing\n"); + /* The 7460 needs to be started explicitly */ + write_reg(th, CONFIG_REG, 1); + } else + printk(KERN_INFO "adt746x: ADT7467 initializing\n"); + + for (i = 0; i < 3; i++) { + th->initial_limits[i] = read_reg(th, LIMIT_REG[i]); + set_limit(th, i); + } + + printk(KERN_INFO "adt746x: Lowering max temperatures from %d, %d, %d" + " to %d, %d, %d (°C)\n", + th->initial_limits[0], th->initial_limits[1], th->initial_limits[2], + th->limits[0], th->limits[1], th->limits[2]); + + thermostat = th; + + if (i2c_attach_client(&th->clt)) { + printk("adt746x: Thermostat failed to attach client !\n"); + thermostat = NULL; + kfree(th); + return -ENODEV; + } + + /* be sure to really write fan speed the first time */ + th->last_speed[0] = -2; + th->last_speed[1] = -2; + + if (fan_speed != -1) { + write_both_fan_speed(th, 0); + } else { + write_both_fan_speed(th, -1); + } + + init_completion(&monitor_task_compl); + + monitor_thread_id = kernel_thread(monitor_task, th, + SIGCHLD | CLONE_KERNEL); + + return 0; +} + +/* + * Now, unfortunately, sysfs doesn't give us a nice void * we could + * pass around to the attribute functions, so we don't really have + * choice but implement a bunch of them... + * + */ +#define BUILD_SHOW_FUNC_DEG(name, data) \ +static ssize_t show_##name(struct device *dev, char *buf) \ +{ \ + return sprintf(buf, "%d°C\n", data); \ +} +#define BUILD_SHOW_FUNC_INT(name, data) \ +static ssize_t show_##name(struct device *dev, char *buf) \ +{ \ + return sprintf(buf, "%d\n", data); \ +} + +#define BUILD_STORE_FUNC_DEG(name, data) \ +static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \ +{ \ + int val; \ + int i; \ + val = simple_strtol(buf, NULL, 10); \ + printk(KERN_INFO "Adjusting limits by %d°C\n", val); \ + limit_adjust = val; \ + for (i=0; i < 3; i++) \ + set_limit(thermostat, i); \ + return n; \ +} + +#define BUILD_STORE_FUNC_INT(name, data) \ +static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \ +{ \ + u32 val; \ + val = simple_strtoul(buf, NULL, 10); \ + if (val < 0 || val > 255) \ + return -EINVAL; \ + printk(KERN_INFO "Setting fan speed to %d\n", val); \ + data = val; \ + return n; \ +} + +BUILD_SHOW_FUNC_DEG(cpu_temperature, (read_reg(thermostat, TEMP_REG[1]))) +BUILD_SHOW_FUNC_DEG(gpu_temperature, (read_reg(thermostat, TEMP_REG[2]))) +BUILD_SHOW_FUNC_DEG(cpu_limit, thermostat->limits[1]) +BUILD_SHOW_FUNC_DEG(gpu_limit, thermostat->limits[2]) + +BUILD_SHOW_FUNC_INT(specified_fan_speed, fan_speed) +BUILD_SHOW_FUNC_INT(cpu_fan_speed, (read_fan_speed(thermostat, FAN_SPEED[0]))) +BUILD_SHOW_FUNC_INT(gpu_fan_speed, (read_fan_speed(thermostat, FAN_SPEED[1]))) + +BUILD_STORE_FUNC_INT(specified_fan_speed,fan_speed) +BUILD_SHOW_FUNC_INT(limit_adjust, limit_adjust) +BUILD_STORE_FUNC_DEG(limit_adjust, thermostat) + +static DEVICE_ATTR(cpu_temperature, S_IRUGO, + show_cpu_temperature,NULL); +static DEVICE_ATTR(gpu_temperature, S_IRUGO, + show_gpu_temperature,NULL); +static DEVICE_ATTR(cpu_limit, S_IRUGO, + show_cpu_limit, NULL); +static DEVICE_ATTR(gpu_limit, S_IRUGO, + show_gpu_limit, NULL); + +static DEVICE_ATTR(specified_fan_speed, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH, + show_specified_fan_speed,store_specified_fan_speed); + +static DEVICE_ATTR(cpu_fan_speed, S_IRUGO, + show_cpu_fan_speed, NULL); +static DEVICE_ATTR(gpu_fan_speed, S_IRUGO, + show_gpu_fan_speed, NULL); + +static DEVICE_ATTR(limit_adjust, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH, + show_limit_adjust, store_limit_adjust); + + +static int __init +thermostat_init(void) +{ + struct device_node* np; + u32 *prop; + + np = of_find_node_by_name(NULL, "fan"); + if (!np) + return -ENODEV; + if (device_is_compatible(np, "adt7460")) + therm_type = ADT7460; + else if (device_is_compatible(np, "adt7467")) + therm_type = ADT7467; + else + return -ENODEV; + + prop = (u32 *)get_property(np, "reg", NULL); + if (!prop) + return -ENODEV; + therm_bus = ((*prop) >> 8) & 0x0f; + therm_address = ((*prop) & 0xff) >> 1; + + printk(KERN_INFO "adt746x: Thermostat bus: %d, address: 0x%02x, limit_adjust: %d, fan_speed: %d\n", + therm_bus, therm_address, limit_adjust, fan_speed); + + of_dev = of_platform_device_create(np, "temperatures"); + + if (of_dev == NULL) { + printk(KERN_ERR "Can't register temperatures device !\n"); + return -ENODEV; + } + + device_create_file(&of_dev->dev, &dev_attr_cpu_temperature); + device_create_file(&of_dev->dev, &dev_attr_gpu_temperature); + device_create_file(&of_dev->dev, &dev_attr_cpu_limit); + device_create_file(&of_dev->dev, &dev_attr_gpu_limit); + device_create_file(&of_dev->dev, &dev_attr_limit_adjust); + device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed); + device_create_file(&of_dev->dev, &dev_attr_cpu_fan_speed); + if(therm_type == ADT7460) + device_create_file(&of_dev->dev, &dev_attr_gpu_fan_speed); + +#ifndef CONFIG_I2C_KEYWEST + request_module("i2c-keywest"); +#endif + + return i2c_add_driver(&thermostat_driver); +} + +static void __exit +thermostat_exit(void) +{ + if (of_dev) { + device_remove_file(&of_dev->dev, &dev_attr_cpu_temperature); + device_remove_file(&of_dev->dev, &dev_attr_gpu_temperature); + device_remove_file(&of_dev->dev, &dev_attr_cpu_limit); + device_remove_file(&of_dev->dev, &dev_attr_gpu_limit); + device_remove_file(&of_dev->dev, &dev_attr_limit_adjust); + device_remove_file(&of_dev->dev, &dev_attr_specified_fan_speed); + device_remove_file(&of_dev->dev, &dev_attr_cpu_fan_speed); + if(therm_type == ADT7460) + device_remove_file(&of_dev->dev, &dev_attr_gpu_fan_speed); + of_device_unregister(of_dev); + } + i2c_del_driver(&thermostat_driver); +} + +module_init(thermostat_init); +module_exit(thermostat_exit); diff -Nru a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c --- a/drivers/macintosh/therm_windtunnel.c Sun Mar 28 13:12:08 2004 +++ b/drivers/macintosh/therm_windtunnel.c Sun Mar 28 13:12:08 2004 @@ -1,24 +1,23 @@ /* * Creation Date: <2003/03/14 20:54:13 samuel> - * Time-stamp: <2003/03/15 18:55:53 samuel> + * Time-stamp: <2004/03/20 14:20:59 samuel> * * * - * The G4 "windtunnel" has a single fan controlled by a - * DS1775 fan controller and an ADM1030 thermostat. + * The G4 "windtunnel" has a single fan controlled by an + * ADM1030 fan controller and a DS1775 thermostat. * * The fan controller is equipped with a temperature sensor - * which measures the case temperature. The ADM censor + * which measures the case temperature. The DS1775 sensor * measures the CPU temperature. This driver tunes the * behavior of the fan. It is based upon empirical observations - * of the 'AppleFan' driver under OSX. + * of the 'AppleFan' driver under Mac OS X. * * WARNING: This driver has only been testen on Apple's - * 1.25 MHz Dual G4 (March 03). Other machines might have - * a different thermal design. It is tuned for a CPU + * 1.25 MHz Dual G4 (March 03). It is tuned for a CPU * temperatur around 57 C. * - * Copyright (C) 2003 Samuel Rydh (samuel@ibrium.se) + * Copyright (C) 2003, 2004 Samuel Rydh (samuel@ibrium.se) * * Loosely based upon 'thermostat.c' written by Benjamin Herrenschmidt * @@ -38,50 +37,37 @@ #include #include #include -#include #include #include #include #include #include - -MODULE_AUTHOR("Samuel Rydh "); -MODULE_DESCRIPTION("Apple G4 (windtunnel) fan driver"); -MODULE_LICENSE("GPL"); +#include #define LOG_TEMP 0 /* continously log temperature */ -/* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */ -static unsigned short normal_i2c[] = { 0x49, 0x2c, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { 0x48, 0x4f, 0x2c, 0x2f, I2C_CLIENT_END }; -static struct work_struct poll_work; - -I2C_CLIENT_INSMOD; - #define I2C_DRIVERID_G4FAN 0x9001 /* fixme */ - #define THERMOSTAT_CLIENT_ID 1 #define FAN_CLIENT_ID 2 -struct temp_range { - u8 high; /* start the fan */ - u8 low; /* stop the fan */ -}; -struct apple_thermal_info { - u8 id; /* implementation ID */ - u8 fan_count; /* number of fans */ - u8 thermostat_count; /* number of thermostats */ - u8 unused[5]; - struct temp_range ranges[4]; /* temperature ranges (may be [])*/ -}; +static int do_probe( struct i2c_adapter *adapter, int addr, int kind); -static int do_detect( struct i2c_adapter *adapter, int addr, int kind); +/* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */ +static unsigned short normal_i2c[] = { 0x49, 0x2c, I2C_CLIENT_END }; +static unsigned short normal_i2c_range[] = { 0x48, 0x4f, 0x2c, 0x2f, I2C_CLIENT_END }; + +I2C_CLIENT_INSMOD; static struct { + volatile int running; + struct completion completion; + pid_t poll_task; + + struct semaphore lock; + struct of_device *of_dev; + struct i2c_client *thermostat; struct i2c_client *fan; - int error; - struct timer_list timer; int overheat_temp; /* 100% fan at this temp */ int overheat_hyst; @@ -95,37 +81,54 @@ int r0, r1, r20, r23, r25; /* saved register */ } x; +#define T(x,y) (((x)<<8) | (y)*0x100/10 ) + static struct { + int fan_down_setting; int temp; - int fan_setting; -} fan_up_table[] = { - { 0x0000, 11 }, /* min fan */ - { 0x3900, 8 }, /* 57.0 C */ - { 0x3a4a, 7 }, /* 58.3 C */ - { 0x3ad3, 6 }, /* 58.8 C */ - { 0x3b3c, 5 }, /* 59.2 C */ - { 0x3b94, 4 }, /* 59.6 C */ - { 0x3be3, 3 }, /* 58.9 C */ - { 0x3c29, 2 }, /* 59.2 C */ - { 0xffff, 1 } /* on fire */ -}; -static struct { - int temp; - int fan_setting; -} fan_down_table[] = { - { 0x3700, 11 }, /* 55.0 C */ - { 0x374a, 6 }, - { 0x3800, 7 }, /* 56.0 C */ - { 0x3900, 8 }, /* 57.0 C */ - { 0x3a4a, 7 }, /* 58.3 C */ - { 0x3ad3, 6 }, /* 58.8 C */ - { 0x3b3c, 5 }, /* 59.2 C */ - { 0x3b94, 4 }, /* 58.9 C */ - { 0x3be3, 3 }, /* 58.9 C */ - { 0x3c29, 2 }, /* 59.2 C */ - { 0xffff, 1 } + int fan_up_setting; +} fan_table[] = { + { 11, T(0,0), 11 }, /* min fan */ + { 11, T(55,0), 11 }, + { 6, T(55,3), 11 }, + { 7, T(56,0), 11 }, + { 8, T(57,0), 8 }, + { 7, T(58,3), 7 }, + { 6, T(58,8), 6 }, + { 5, T(59,2), 5 }, + { 4, T(59,6), 4 }, + { 3, T(59,9), 3 }, + { 2, T(60,1), 2 }, + { 1, 0xfffff, 1 } /* on fire */ }; +static void +print_temp( const char *s, int temp ) +{ + printk("%s%d.%d C", s ? s : "", temp>>8, (temp & 255)*10/256 ); +} + +static ssize_t +show_cpu_temperature( struct device *dev, char *buf ) +{ + return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 ); +} + +static ssize_t +show_case_temperature( struct device *dev, char *buf ) +{ + return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 ); +} + +static DEVICE_ATTR(cpu_temperature, S_IRUGO, show_cpu_temperature, NULL ); +static DEVICE_ATTR(case_temperature, S_IRUGO, show_case_temperature, NULL ); + + + +/************************************************************************/ +/* controller thread */ +/************************************************************************/ + static int write_reg( struct i2c_client *cl, int reg, int data, int len ) { @@ -159,37 +162,32 @@ return (len == 2)? ((unsigned int)buf[0] << 8) | buf[1] : buf[0]; } - -static void -print_temp( const char *s, int temp ) -{ - printk("%s%d.%d C", s ? s : "", temp>>8, (temp & 255)*10/256 ); -} - static void tune_fan( int fan_setting ) { int val = (fan_setting << 3) | 7; - x.fan_level = fan_setting; - - //write_reg( x.fan, 0x24, val, 1 ); + + /* write_reg( x.fan, 0x24, val, 1 ); */ write_reg( x.fan, 0x25, val, 1 ); write_reg( x.fan, 0x20, 0, 1 ); print_temp("CPU-temp: ", x.temp ); if( x.casetemp ) print_temp(", Case: ", x.casetemp ); - printk(" Tuning fan: %d (%02x)\n", fan_setting, val ); + printk(", Fan: %d (tuned %+d)\n", 11-fan_setting, x.fan_level-fan_setting ); + + x.fan_level = fan_setting; } static void -poll_temp( void *param ) +poll_temp( void ) { - int temp = read_reg( x.thermostat, 0, 2 ); - int i, level, casetemp; + int temp, i, level, casetemp; + + temp = read_reg( x.thermostat, 0, 2 ); /* this actually occurs when the computer is loaded */ if( temp < 0 ) - goto out; + return; casetemp = read_reg(x.fan, 0x0b, 1) << 8; casetemp |= (read_reg(x.fan, 0x06, 1) & 0x7) << 5; @@ -197,37 +195,117 @@ if( LOG_TEMP && x.temp != temp ) { print_temp("CPU-temp: ", temp ); print_temp(", Case: ", casetemp ); - printk(", Fan: %d\n", x.fan_level ); + printk(", Fan: %d\n", 11-x.fan_level ); } x.temp = temp; x.casetemp = casetemp; level = -1; - for( i=0; (temp & 0xffff) > fan_down_table[i].temp ; i++ ) + for( i=0; (temp & 0xffff) > fan_table[i].temp ; i++ ) ; if( i < x.downind ) - level = fan_down_table[i].fan_setting; + level = fan_table[i].fan_down_setting; x.downind = i; - for( i=0; (temp & 0xfffe) >= fan_up_table[i+1].temp ; i++ ) + for( i=0; (temp & 0xffff) >= fan_table[i+1].temp ; i++ ) ; if( x.upind < i ) - level = fan_up_table[i].fan_setting; + level = fan_table[i].fan_up_setting; x.upind = i; if( level >= 0 ) tune_fan( level ); - out: - x.timer.expires = jiffies + 8*HZ; - add_timer( &x.timer ); +} + + +static void +setup_hardware( void ) +{ + int val; + + /* save registers (if we unload the module) */ + x.r0 = read_reg( x.fan, 0x00, 1 ); + x.r1 = read_reg( x.fan, 0x01, 1 ); + x.r20 = read_reg( x.fan, 0x20, 1 ); + x.r23 = read_reg( x.fan, 0x23, 1 ); + x.r25 = read_reg( x.fan, 0x25, 1 ); + + /* improve measurement resolution (convergence time 1.5s) */ + if( (val=read_reg(x.thermostat, 1, 1)) >= 0 ) { + val |= 0x60; + if( write_reg( x.thermostat, 1, val, 1 ) ) + printk("Failed writing config register\n"); + } + /* disable interrupts and TAC input */ + write_reg( x.fan, 0x01, 0x01, 1 ); + /* enable filter */ + write_reg( x.fan, 0x23, 0x91, 1 ); + /* remote temp. controls fan */ + write_reg( x.fan, 0x00, 0x95, 1 ); + + /* The thermostat (which besides measureing temperature controls + * has a THERM output which puts the fan on 100%) is usually + * set to kick in at 80 C (chip default). We reduce this a bit + * to be on the safe side (OSX doesn't)... + */ + if( x.overheat_temp == (80 << 8) ) { + x.overheat_temp = 65 << 8; + x.overheat_hyst = 60 << 8; + write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); + write_reg( x.thermostat, 3, x.overheat_temp, 2 ); + + print_temp("Reducing overheating limit to ", x.overheat_temp ); + print_temp(" (Hyst: ", x.overheat_hyst ); + printk(")\n"); + } + + /* set an initial fan setting */ + x.downind = 0xffff; + x.upind = -1; + /* tune_fan( fan_up_table[x.upind].fan_setting ); */ + + device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature ); + device_create_file( &x.of_dev->dev, &dev_attr_case_temperature ); } static void -schedule_poll( unsigned long t ) +restore_regs( void ) { - schedule_work(&poll_work); + device_remove_file( &x.of_dev->dev, &dev_attr_cpu_temperature ); + device_remove_file( &x.of_dev->dev, &dev_attr_case_temperature ); + + write_reg( x.fan, 0x01, x.r1, 1 ); + write_reg( x.fan, 0x20, x.r20, 1 ); + write_reg( x.fan, 0x23, x.r23, 1 ); + write_reg( x.fan, 0x25, x.r25, 1 ); + write_reg( x.fan, 0x00, x.r0, 1 ); } +static int +control_loop( void *dummy ) +{ + daemonize("g4fand"); + + down( &x.lock ); + setup_hardware(); + + while( x.running ) { + up( &x.lock ); + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout( 8*HZ ); + + down( &x.lock ); + poll_temp(); + } + + restore_regs(); + up( &x.lock ); + + complete_and_exit( &x.completion, 0 ); +} + + /************************************************************************/ /* i2c probing and setup */ /************************************************************************/ @@ -235,7 +313,20 @@ static int do_attach( struct i2c_adapter *adapter ) { - return i2c_probe( adapter, &addr_data, &do_detect ); + int ret = 0; + + if( strncmp(adapter->name, "uni-n", 5) ) + return 0; + + if( !x.running ) { + ret = i2c_probe( adapter, &addr_data, &do_probe ); + if( x.thermostat && x.fan ) { + x.running = 1; + init_completion( &x.completion ); + x.poll_task = kernel_thread( control_loop, NULL, SIGCHLD | CLONE_KERNEL ); + } + } + return ret; } static int @@ -243,13 +334,23 @@ { int err; - printk("do_detach: id %d\n", client->id ); - if( (err=i2c_detach_client(client)) ) { - printk("failed to detach thermostat client\n"); - return err; + if( (err=i2c_detach_client(client)) ) + printk(KERN_ERR "failed to detach thermostat client\n"); + else { + if( x.running ) { + x.running = 0; + wait_for_completion( &x.completion ); + } + if( client == x.thermostat ) + x.thermostat = NULL; + else if( client == x.fan ) + x.fan = NULL; + else { + printk(KERN_ERR "g4fan: bad client\n"); + } + kfree( client ); } - kfree( client ); - return 0; + return err; } static struct i2c_driver g4fan_driver = { @@ -262,24 +363,21 @@ }; static int -detect_fan( struct i2c_client *cl ) +attach_fan( struct i2c_client *cl ) { + if( x.fan ) + goto out; + /* check that this is an ADM1030 */ if( read_reg(cl, 0x3d, 1) != 0x30 || read_reg(cl, 0x3e, 1) != 0x41 ) goto out; - printk("ADM1030 fan controller detected at %02x\n", cl->addr ); + printk("ADM1030 fan controller [@%02x]\n", cl->addr ); - if( x.fan ) { - x.error |= 2; - goto out; - } - x.fan = cl; cl->id = FAN_CLIENT_ID; - strncpy( cl->name, "ADM1030 fan controller", sizeof(cl->name) ); + strlcpy( cl->name, "ADM1030 fan controller", sizeof(cl->name) ); - if( i2c_attach_client( cl ) ) - goto out; - return 0; + if( !i2c_attach_client(cl) ) + x.fan = cl; out: if( cl != x.fan ) kfree( cl ); @@ -287,10 +385,13 @@ } static int -detect_thermostat( struct i2c_client *cl ) +attach_thermostat( struct i2c_client *cl ) { int hyst_temp, os_temp, temp; + if( x.thermostat ) + goto out; + if( (temp=read_reg(cl, 0, 2)) < 0 ) goto out; @@ -302,44 +403,37 @@ if( hyst_temp < 0 || os_temp < 0 ) goto out; - printk("DS1775 digital thermometer detected at %02x\n", cl->addr ); + printk("DS1775 digital thermometer [@%02x]\n", cl->addr ); print_temp("Temp: ", temp ); print_temp(" Hyst: ", hyst_temp ); print_temp(" OS: ", os_temp ); printk("\n"); - if( x.thermostat ) { - x.error |= 1; - goto out; - } x.temp = temp; - x.thermostat = cl; x.overheat_temp = os_temp; x.overheat_hyst = hyst_temp; cl->id = THERMOSTAT_CLIENT_ID; - strncpy( cl->name, "DS1775 thermostat", sizeof(cl->name) ); + strlcpy( cl->name, "DS1775 thermostat", sizeof(cl->name) ); - if( i2c_attach_client( cl ) ) - goto out; - return 0; + if( !i2c_attach_client(cl) ) + x.thermostat = cl; out: - kfree( cl ); + if( cl != x.thermostat ) + kfree( cl ); return 0; } static int -do_detect( struct i2c_adapter *adapter, int addr, int kind ) +do_probe( struct i2c_adapter *adapter, int addr, int kind ) { struct i2c_client *cl; - if( strncmp(adapter->name, "uni-n", 5) ) - return 0; if( !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_WRITE_BYTE) ) return 0; - if( !(cl=kmalloc( sizeof(struct i2c_client), GFP_KERNEL )) ) + if( !(cl=kmalloc(sizeof(*cl), GFP_KERNEL)) ) return -ENOMEM; memset( cl, 0, sizeof(struct i2c_client) ); @@ -349,108 +443,94 @@ cl->flags = 0; if( addr < 0x48 ) - return detect_fan( cl ); - return detect_thermostat( cl ); + return attach_fan( cl ); + return attach_thermostat( cl ); +} + + +/************************************************************************/ +/* initialization / cleanup */ +/************************************************************************/ + +static int +therm_of_probe( struct of_device *dev, const struct of_match *match ) +{ + return i2c_add_driver( &g4fan_driver ); } -#define PRINT_REG( r ) printk("reg %02x = %02x\n", r, read_reg(x.fan, r, 1) ) +static int +therm_of_remove( struct of_device *dev ) +{ + return i2c_del_driver( &g4fan_driver ); +} + +static struct of_match therm_of_match[] = {{ + .name = "fan", + .type = OF_ANY_MATCH, + .compatible = "adm1030" + }, {} +}; + +static struct of_platform_driver therm_of_driver = { + .name = "temperature", + .match_table = therm_of_match, + .probe = therm_of_probe, + .remove = therm_of_remove, +}; + +struct apple_thermal_info { + u8 id; /* implementation ID */ + u8 fan_count; /* number of fans */ + u8 thermostat_count; /* number of thermostats */ + u8 unused; +}; static int __init g4fan_init( void ) { struct apple_thermal_info *info; struct device_node *np; - int ret, val; - - np = of_find_node_by_name(NULL, "power-mgt"); - if (np == NULL) + + init_MUTEX( &x.lock ); + + if( !(np=of_find_node_by_name(NULL, "power-mgt")) ) return -ENODEV; info = (struct apple_thermal_info*)get_property(np, "thermal-info", NULL); of_node_put(np); - if (info == NULL) - return -ENODEV; - - /* check for G4 "Windtunnel" SMP */ - if( machine_is_compatible("PowerMac3,6") ) { - if( info->id != 3 ) { - printk(KERN_ERR "g4fan: design id %d unknown\n", info->id); - return -ENODEV; - } - } else { - printk(KERN_ERR "g4fan: unsupported machine type\n"); - return -ENODEV; - } - if( (ret=i2c_add_driver(&g4fan_driver)) ) - return ret; - if( !x.thermostat || !x.fan ) { - i2c_del_driver(&g4fan_driver ); + if( !info || !machine_is_compatible("PowerMac3,6") ) return -ENODEV; - } - - /* save registers (if we unload the module) */ - x.r0 = read_reg( x.fan, 0x00, 1 ); - x.r1 = read_reg( x.fan, 0x01, 1 ); - x.r20 = read_reg( x.fan, 0x20, 1 ); - x.r23 = read_reg( x.fan, 0x23, 1 ); - x.r25 = read_reg( x.fan, 0x25, 1 ); - /* improve measurement resolution (convergence time 1.5s) */ - if( (val=read_reg( x.thermostat, 1, 1 )) >= 0 ) { - val |= 0x60; - if( write_reg( x.thermostat, 1, val, 1 ) ) - printk("Failed writing config register\n"); + if( info->id != 3 ) { + printk(KERN_ERR "therm_windtunnel: unsupported thermal design %d\n", info->id ); + return -ENODEV; } - /* disable interrupts and TAC input */ - write_reg( x.fan, 0x01, 0x01, 1 ); - /* enable filter */ - write_reg( x.fan, 0x23, 0x91, 1 ); - /* remote temp. controls fan */ - write_reg( x.fan, 0x00, 0x95, 1 ); - - /* The thermostat (which besides measureing temperature controls - * has a THERM output which puts the fan on 100%) is usually - * set to kick in at 80 C (chip default). We reduce this a bit - * to be on the safe side (OSX doesn't)... - */ - if( x.overheat_temp == (80 << 8) ) { - x.overheat_temp = 65 << 8; - x.overheat_hyst = 60 << 8; - write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); - write_reg( x.thermostat, 3, x.overheat_temp, 2 ); + if( !(np=of_find_node_by_name(NULL, "fan")) ) + return -ENODEV; + x.of_dev = of_platform_device_create( np, "temperature" ); + of_node_put( np ); - print_temp("Reducing overheating limit to ", x.overheat_temp ); - print_temp(" (Hyst: ", x.overheat_hyst ); - printk(")\n"); + if( !x.of_dev ) { + printk(KERN_ERR "Can't register fan controller!\n"); + return -ENODEV; } - /* set an initial fan setting */ - x.upind = x.downind = 1; - tune_fan( fan_up_table[x.upind].fan_setting ); - - INIT_WORK(&poll_work, poll_temp, NULL); - - init_timer( &x.timer ); - x.timer.expires = jiffies + 8*HZ; - x.timer.function = schedule_poll; - add_timer( &x.timer ); + of_register_driver( &therm_of_driver ); return 0; } static void __exit g4fan_exit( void ) { - del_timer( &x.timer ); + of_unregister_driver( &therm_of_driver ); - write_reg( x.fan, 0x01, x.r1, 1 ); - write_reg( x.fan, 0x20, x.r20, 1 ); - write_reg( x.fan, 0x23, x.r23, 1 ); - write_reg( x.fan, 0x25, x.r25, 1 ); - write_reg( x.fan, 0x00, x.r0, 1 ); - - i2c_del_driver( &g4fan_driver ); + if( x.of_dev ) + of_device_unregister( x.of_dev ); } module_init(g4fan_init); module_exit(g4fan_exit); +MODULE_AUTHOR("Samuel Rydh "); +MODULE_DESCRIPTION("Apple G4 (windtunnel) fan controller"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c --- a/drivers/macintosh/via-pmu.c Sun Mar 28 13:12:08 2004 +++ b/drivers/macintosh/via-pmu.c Sun Mar 28 13:12:08 2004 @@ -137,7 +137,8 @@ static int data_len; static volatile int adb_int_pending; static volatile int disable_poll; -static struct adb_request bright_req_1, bright_req_2, bright_req_3; +static struct adb_request bright_req_1, bright_req_2; +static unsigned long async_req_locks; static struct device_node *vias; static int pmu_kind = PMU_UNKNOWN; static int pmu_fully_inited = 0; @@ -404,7 +405,6 @@ bright_req_1.complete = 1; bright_req_2.complete = 1; - bright_req_3.complete = 1; #ifdef CONFIG_PMAC_PBOOK batt_req.complete = 1; if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) @@ -710,6 +710,8 @@ pmu_batteries[pmu_cur_battery].amperage = amperage; pmu_batteries[pmu_cur_battery].voltage = voltage; pmu_batteries[pmu_cur_battery].time_remaining = time; + + clear_bit(0, &async_req_locks); } static void __pmac @@ -785,12 +787,14 @@ pmu_batteries[pmu_cur_battery].time_remaining = 0; pmu_cur_battery = (pmu_cur_battery + 1) % pmu_battery_count; + + clear_bit(0, &async_req_locks); } static void __pmac query_battery_state(void) { - if (!batt_req.complete) + if (test_and_set_bit(0, &async_req_locks)) return; if (pmu_kind == PMU_OHARE_BASED) pmu_request(&batt_req, done_battery_state_ohare, @@ -1690,20 +1694,30 @@ return 0; } +static void __openfirmware +pmu_bright_complete(struct adb_request *req) +{ + if (req == &bright_req_1) + clear_bit(1, &async_req_locks); + if (req == &bright_req_2) + clear_bit(2, &async_req_locks); +} + static int __openfirmware pmu_set_backlight_level(int level, void* data) { if (vias == NULL) return -ENODEV; - if (!bright_req_1.complete) + if (test_and_set_bit(1, &async_req_locks)) return -EAGAIN; - pmu_request(&bright_req_1, NULL, 2, PMU_BACKLIGHT_BRIGHT, + pmu_request(&bright_req_1, pmu_bright_complete, 2, PMU_BACKLIGHT_BRIGHT, backlight_to_bright[level]); - if (!bright_req_2.complete) + if (test_and_set_bit(2, &async_req_locks)) return -EAGAIN; - pmu_request(&bright_req_2, NULL, 2, PMU_POWER_CTRL, PMU_POW_BACKLIGHT - | (level > BACKLIGHT_OFF ? PMU_POW_ON : PMU_POW_OFF)); + pmu_request(&bright_req_2, pmu_bright_complete, 2, PMU_POWER_CTRL, + PMU_POW_BACKLIGHT | (level > BACKLIGHT_OFF ? + PMU_POW_ON : PMU_POW_OFF)); return 0; } @@ -2330,6 +2344,8 @@ return -EBUSY; } + preempt_disable(); + /* Make sure the decrementer won't interrupt us */ asm volatile("mtdec %0" : : "r" (0x7fffffff)); /* Make sure any pending DEC interrupt occurring while we did @@ -2352,6 +2368,7 @@ if (ret) { wakeup_decrementer(); local_irq_enable(); + preempt_enable(); device_resume(); broadcast_wake(); printk(KERN_ERR "Driver powerdown failed\n"); @@ -2360,7 +2377,8 @@ /* Wait for completion of async backlight requests */ while (!bright_req_1.complete || !bright_req_2.complete || - !bright_req_3.complete || !batt_req.complete) + + !batt_req.complete) pmu_poll(); /* Giveup the lazy FPU & vec so we don't have to back them @@ -2398,6 +2416,8 @@ pmu_blink(1); + preempt_enable(); + /* Resume devices */ device_resume(); @@ -2673,9 +2693,9 @@ mb(); pmac_wakeup_devices(); - pbook_free_pci_save(); iounmap(mem_ctrl); + return 0; } diff -Nru a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c --- a/drivers/message/fusion/mptbase.c Sun Mar 28 13:12:07 2004 +++ b/drivers/message/fusion/mptbase.c Sun Mar 28 13:12:07 2004 @@ -1280,12 +1280,17 @@ return r; } +#if 0 + /* broken because some code assumes that multiple calls + to pci_alloc_consistent return data in the same 4GB segment. + This cannot work on machines with enough memory. */ if (!pci_set_consistent_dma_mask(pdev, mask)) dprintk((KERN_INFO MYNAM ": Using 64 bit consistent mask\n")); else dprintk((KERN_INFO MYNAM ": Not using 64 bit consistent mask\n")); +#endif ioc = kmalloc(sizeof(MPT_ADAPTER), GFP_ATOMIC); if (ioc == NULL) { diff -Nru a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c --- a/drivers/mtd/cmdlinepart.c Sun Mar 28 13:12:08 2004 +++ b/drivers/mtd/cmdlinepart.c Sun Mar 28 13:12:08 2004 @@ -28,7 +28,6 @@ #include #include -#include #include /* error message prefix */ diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c --- a/drivers/net/b44.c Sun Mar 28 13:12:07 2004 +++ b/drivers/net/b44.c Sun Mar 28 13:12:07 2004 @@ -1892,6 +1892,8 @@ if (!netif_running(dev)) return 0; + pci_restore_state(pdev, bp->pci_cfg_state); + spin_lock_irq(&bp->lock); b44_init_rings(bp); diff -Nru a/drivers/net/bmac.c b/drivers/net/bmac.c --- a/drivers/net/bmac.c Sun Mar 28 13:12:07 2004 +++ b/drivers/net/bmac.c Sun Mar 28 13:12:07 2004 @@ -1312,10 +1312,8 @@ bmwrite(dev, INTDISABLE, DisableAll); rev = addr[0] == 0 && addr[1] == 0xA0; - for (j = 0; j < 6; ++j) { + for (j = 0; j < 6; ++j) dev->dev_addr[j] = rev? bitrev(addr[j]): addr[j]; - printk("%c%.2x", (j? ':': ' '), dev->dev_addr[j]); - } /* Enable chip without interrupts for now */ bmac_enable_and_reset_chip(dev); @@ -1380,6 +1378,8 @@ } printk(KERN_INFO "%s: BMAC%s at", dev->name, (is_bmac_plus? "+": "")); + for (j = 0; j < 6; ++j) + printk("%c%.2x", (j? ':': ' '), dev->dev_addr[j]); XXDEBUG((", base_addr=%#0lx", dev->base_addr)); printk("\n"); diff -Nru a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c --- a/drivers/net/ibmveth.c Sun Mar 28 13:12:07 2004 +++ b/drivers/net/ibmveth.c Sun Mar 28 13:12:07 2004 @@ -60,6 +60,9 @@ #include "ibmveth.h" +#warning remove NO_TCE usage from ibmveth.c +#define NO_TCE PCI_DMA_ERROR_CODE + #define DEBUG 1 #define ibmveth_printk(fmt, args...) \ diff -Nru a/drivers/net/stnic.c b/drivers/net/stnic.c --- a/drivers/net/stnic.c Sun Mar 28 13:12:08 2004 +++ b/drivers/net/stnic.c Sun Mar 28 13:12:08 2004 @@ -20,7 +20,7 @@ #include #include -#include +#include #include #ifdef CONFIG_SH_STANDARD_BIOS #include diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c --- a/drivers/parport/parport_pc.c Sun Mar 28 13:12:08 2004 +++ b/drivers/parport/parport_pc.c Sun Mar 28 13:12:08 2004 @@ -13,6 +13,7 @@ * Many ECP bugs fixed. Fred Barnes & Jamie Lokier, 1999 * More PCI support now conditional on CONFIG_PCI, 03/2001, Paul G. * Various hacks, Fred Barnes, 04/2001 + * Updated probing logic - Adam Belay */ /* This driver should work with any hardware that is broadly compatible @@ -98,7 +99,8 @@ (defined(CONFIG_PARPORT_1284) && defined(CONFIG_PARPORT_PC_FIFO)) static int verbose_probing; #endif -static int registered_parport; +static int pci_registered_parport; +static int pnp_registered_parport; /* frob_control, but for ECR */ static void frob_econtrol (struct parport *pb, unsigned char m, @@ -2771,10 +2773,11 @@ }; MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl); -static int __devinit parport_pc_pci_probe (struct pci_dev *dev, +static int parport_pc_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) { int err, count, n, i = id->driver_data; + if (i < last_sio) /* This is an onboard Super-IO and has already been probed */ return 0; @@ -2847,23 +2850,72 @@ static int __init parport_pc_init_superio(int autoirq, int autodma) {return 0;} #endif /* CONFIG_PCI */ -#ifdef CONFIG_PNP -static const struct pnp_device_id pnp_dev_table[] = { + +static const struct pnp_device_id parport_pc_pnp_tbl[] = { /* Standard LPT Printer Port */ {.id = "PNP0400", .driver_data = 0}, /* ECP Printer Port */ {.id = "PNP0401", .driver_data = 0}, - {.id = ""} + { } }; +MODULE_DEVICE_TABLE(pnp,parport_pc_pnp_tbl); + +static int parport_pc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id) +{ + struct parport *pdata; + unsigned long io_lo, io_hi; + int dma, irq; + + if (pnp_port_valid(dev,0) && + !(pnp_port_flags(dev,0) & IORESOURCE_DISABLED)) { + io_lo = pnp_port_start(dev,0); + } else + return -EINVAL; + + if (pnp_port_valid(dev,1) && + !(pnp_port_flags(dev,1) & IORESOURCE_DISABLED)) { + io_hi = pnp_port_start(dev,1); + } else + io_hi = 0; + + if (pnp_irq_valid(dev,0) && + !(pnp_irq_flags(dev,0) & IORESOURCE_DISABLED)) { + irq = pnp_irq(dev,0); + } else + irq = PARPORT_IRQ_NONE; + + if (pnp_dma_valid(dev,0) && + !(pnp_dma_flags(dev,0) & IORESOURCE_DISABLED)) { + dma = pnp_dma(dev,0); + } else + dma = PARPORT_DMA_NONE; + + printk(KERN_INFO "parport: PnPBIOS parport detected.\n"); + if (!(pdata = parport_pc_probe_port (io_lo, io_hi, irq, dma, NULL))) + return -ENODEV; + + pnp_set_drvdata(dev,pdata); + return 0; +} + +static void parport_pc_pnp_remove(struct pnp_dev *dev) +{ + struct parport *pdata = (struct parport *)pnp_get_drvdata(dev); + if (!pdata) + return; + + parport_pc_unregister_port(pdata); +} + /* we only need the pnp layer to activate the device, at least for now */ static struct pnp_driver parport_pc_pnp_driver = { .name = "parport_pc", - .id_table = pnp_dev_table, + .id_table = parport_pc_pnp_tbl, + .probe = parport_pc_pnp_probe, + .remove = parport_pc_pnp_remove, }; -#else -static struct pnp_driver parport_pc_pnp_driver; -#endif + /* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */ static int __init __attribute__((unused)) @@ -2903,12 +2955,18 @@ /* Onboard SuperIO chipsets that show themselves on the PCI bus. */ count += parport_pc_init_superio (autoirq, autodma); + r = pnp_register_driver (&parport_pc_pnp_driver); + if (r >= 0) { + pnp_registered_parport = 1; + count += r; + } + /* ISA ports and whatever (see asm/parport.h). */ count += parport_pc_find_nonpci_ports (autoirq, autodma); r = pci_register_driver (&parport_pc_pci_driver); if (r >= 0) { - registered_parport = 1; + pci_registered_parport = 1; count += r; } @@ -3104,9 +3162,6 @@ if (parse_parport_params()) return -EINVAL; - /* try to activate any PnP parports first */ - pnp_register_driver(&parport_pc_pnp_driver); - if (io[0]) { int i; /* Only probe the ports we were given. */ @@ -3120,24 +3175,18 @@ irqval[i], dmaval[i], NULL)) count++; } - } else { + } else count += parport_pc_find_ports (irqval[0], dmaval[0]); - if (!count && registered_parport) - pci_unregister_driver (&parport_pc_pci_driver); - } - - if (!count) { - pnp_unregister_driver (&parport_pc_pnp_driver); - return -ENODEV; - } return 0; } static void __exit parport_pc_exit(void) { - if (registered_parport) + if (pci_registered_parport) pci_unregister_driver (&parport_pc_pci_driver); + if (pnp_registered_parport) + pnp_unregister_driver (&parport_pc_pnp_driver); spin_lock(&ports_lock); while (!list_empty(&ports_list)) { @@ -3151,13 +3200,8 @@ spin_lock(&ports_lock); } spin_unlock(&ports_lock); - pnp_unregister_driver (&parport_pc_pnp_driver); } - -MODULE_AUTHOR("Phil Blundell, Tim Waugh, others"); -MODULE_DESCRIPTION("PC-style parallel port driver"); -MODULE_LICENSE("GPL"); MODULE_AUTHOR("Phil Blundell, Tim Waugh, others"); MODULE_DESCRIPTION("PC-style parallel port driver"); MODULE_LICENSE("GPL"); diff -Nru a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c --- a/drivers/pci/hotplug/rpaphp_pci.c Sun Mar 28 13:12:07 2004 +++ b/drivers/pci/hotplug/rpaphp_pci.c Sun Mar 28 13:12:07 2004 @@ -257,6 +257,7 @@ } dev = rpaphp_pci_config_dn(slot->dn, pci_bus); + eeh_add_device(dev); } else { /* slot is not enabled */ err("slot doesn't have pci_dev structure\n"); @@ -281,6 +282,7 @@ goto exit; } /* remove the device from the pci core */ + eeh_remove_device(slot->dev.pci_dev); pci_remove_bus_device(slot->dev.pci_dev); slot->state = NOT_CONFIGURED; diff -Nru a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c --- a/drivers/pcmcia/yenta_socket.c Sun Mar 28 13:12:08 2004 +++ b/drivers/pcmcia/yenta_socket.c Sun Mar 28 13:12:08 2004 @@ -1017,6 +1017,11 @@ CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1250, TI1250), CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1410, TI1250), + CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1211, TI12XX), + CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1225, TI12XX), + CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1410, TI1250), + CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1420, TI12XX), + CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C465, RICOH), CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C466, RICOH), CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C475, RICOH), diff -Nru a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig --- a/drivers/pnp/isapnp/Kconfig Sun Mar 28 13:12:07 2004 +++ b/drivers/pnp/isapnp/Kconfig Sun Mar 28 13:12:07 2004 @@ -2,8 +2,8 @@ # ISA Plug and Play configuration # config ISAPNP - bool "ISA Plug and Play support (EXPERIMENTAL)" - depends on PNP && EXPERIMENTAL + bool "ISA Plug and Play support" + depends on PNP help Say Y here if you would like support for ISA Plug and Play devices. Some information is in . diff -Nru a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c --- a/drivers/pnp/isapnp/core.c Sun Mar 28 13:12:08 2004 +++ b/drivers/pnp/isapnp/core.c Sun Mar 28 13:12:08 2004 @@ -99,6 +99,7 @@ static unsigned char isapnp_checksum_value; static DECLARE_MUTEX(isapnp_cfg_mutex); static int isapnp_detected; +static int isapnp_csn_count; /* some prototypes */ @@ -371,11 +372,14 @@ break; } __next: + if (csn == 255) + break; checksum = 0x6a; chksum = 0x00; bit = 0x00; } isapnp_wait(); + isapnp_csn_count = csn; return csn; } @@ -880,7 +884,7 @@ isapnp_wait(); isapnp_key(); - for (csn = 1; csn <= 10; csn++) { + for (csn = 1; csn <= isapnp_csn_count; csn++) { isapnp_wake(csn); isapnp_peek(header, 9); checksum = isapnp_checksum(header); @@ -890,12 +894,6 @@ header[4], header[5], header[6], header[7], header[8]); printk(KERN_DEBUG "checksum = 0x%x\n", checksum); #endif - /* Don't be strict on the checksum, here ! - e.g. 'SCM SwapBox Plug and Play' has header[8]==0 (should be: b7)*/ - if (header[8] == 0) - ; - else if (checksum == 0x00 || checksum != header[8]) /* not valid CSN */ - continue; if ((card = isapnp_alloc(sizeof(struct pnp_card))) == NULL) continue; @@ -932,9 +930,8 @@ int isapnp_cfg_begin(int csn, int logdev) { - if (csn < 1 || csn > 10 || logdev > 10) + if (csn < 1 || csn > isapnp_csn_count || logdev > 10) return -EINVAL; - MOD_INC_USE_COUNT; down(&isapnp_cfg_mutex); isapnp_wait(); isapnp_key(); @@ -962,7 +959,6 @@ { isapnp_wait(); up(&isapnp_cfg_mutex); - MOD_DEC_USE_COUNT; return 0; } @@ -1050,7 +1046,7 @@ for (tmp = 0; tmp < PNP_MAX_DMA && (res->dma_resource[tmp].flags & (IORESOURCE_DMA | IORESOURCE_UNSET)) == IORESOURCE_DMA; tmp++) isapnp_write_byte(ISAPNP_CFG_DMA+tmp, res->dma_resource[tmp].start); for (tmp = 0; tmp < PNP_MAX_MEM && (res->mem_resource[tmp].flags & (IORESOURCE_MEM | IORESOURCE_UNSET)) == IORESOURCE_MEM; tmp++) - isapnp_write_word(ISAPNP_CFG_MEM+(tmp<<2), (res->mem_resource[tmp].start >> 8) & 0xffff); + isapnp_write_word(ISAPNP_CFG_MEM+(tmp<<3), (res->mem_resource[tmp].start >> 8) & 0xffff); /* FIXME: We aren't handling 32bit mems properly here */ isapnp_activate(dev->number); isapnp_cfg_end(); diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c --- a/drivers/pnp/resource.c Sun Mar 28 13:12:08 2004 +++ b/drivers/pnp/resource.c Sun Mar 28 13:12:08 2004 @@ -231,15 +231,9 @@ #define length(start, end) (*(end) - *(start) + 1) -/* ranged_conflict - used to determine if two resource ranges conflict - * condition 1: check if the start of a is within b - * condition 2: check if the end of a is within b - * condition 3: check if b is engulfed by a */ - +/* Two ranges conflict if one doesn't end before the other starts */ #define ranged_conflict(starta, enda, startb, endb) \ -((*(starta) >= *(startb) && *(starta) <= *(endb)) || \ - (*(enda) >= *(startb) && *(enda) <= *(endb)) || \ - (*(starta) < *(startb) && *(enda) > *(endb))) + !((*(enda) < *(startb)) || (*(endb) < *(starta))) #define cannot_compare(flags) \ ((flags) & (IORESOURCE_UNSET | IORESOURCE_DISABLED)) diff -Nru a/drivers/pnp/system.c b/drivers/pnp/system.c --- a/drivers/pnp/system.c Sun Mar 28 13:12:08 2004 +++ b/drivers/pnp/system.c Sun Mar 28 13:12:08 2004 @@ -21,7 +21,7 @@ { "", 0 } }; -static void __init reserve_ioport_range(char *pnpid, int start, int end) +static void reserve_ioport_range(char *pnpid, int start, int end) { struct resource *res; char *regionid; @@ -49,7 +49,7 @@ return; } -static void __init reserve_resources_of_dev( struct pnp_dev *dev ) +static void reserve_resources_of_dev( struct pnp_dev *dev ) { int i; diff -Nru a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c --- a/drivers/s390/block/dasd.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/block/dasd.c Sun Mar 28 13:12:07 2004 @@ -7,7 +7,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * - * $Revision: 1.133 $ + * $Revision: 1.136 $ */ #include @@ -224,7 +224,8 @@ return rc; dasd_setup_queue(device); device->state = DASD_STATE_READY; - dasd_scan_partitions(device); + if (dasd_scan_partitions(device) != 0) + device->state = DASD_STATE_BASIC; return 0; } @@ -687,7 +688,10 @@ rc = ccw_device_clear(device->cdev, (long) cqr); switch (rc) { case 0: /* termination successful */ - cqr->status = DASD_CQR_FAILED; + if (cqr->retries > 0) + cqr->status = DASD_CQR_QUEUED; + else + cqr->status = DASD_CQR_FAILED; cqr->stopclk = get_clock(); break; case -ENODEV: @@ -779,7 +783,7 @@ device = (struct dasd_device *) ptr; spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); - /* re-activate first request in queue */ + /* re-activate request queue */ device->stopped &= ~DASD_STOPPED_PENDING; spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); dasd_schedule_bh(device); @@ -827,12 +831,25 @@ struct dasd_device *device; } *p; struct dasd_device *device; + struct dasd_ccw_req *cqr; + struct list_head *l, *n; + unsigned long flags; p = data; device = p->device; DBF_EVENT(DBF_NOTICE, "State change Interrupt for bus_id %s", device->cdev->dev.bus_id); device->stopped &= ~DASD_STOPPED_PENDING; + + /* restart all 'running' IO on queue */ + spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); + list_for_each_safe(l, n, &device->ccw_queue) { + cqr = list_entry(l, struct dasd_ccw_req, list); + if (cqr->status == DASD_CQR_IN_IO) + cqr->status = DASD_CQR_QUEUED; + } + spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); + dasd_set_timer (device, 0); dasd_schedule_bh(device); dasd_put_device(device); kfree(p); @@ -847,7 +864,8 @@ cqr = (struct dasd_ccw_req *) intparm; if (cqr->status != DASD_CQR_IN_IO) { MESSAGE(KERN_DEBUG, - "invalid status: bus_id %s, status %02x", + "invalid status in handle_killed_request: " + "bus_id %s, status %02x", cdev->dev.bus_id, cqr->status); return; } @@ -1142,7 +1160,8 @@ elv_next_request(queue) && nr_queued < DASD_CHANQ_MAX_SIZE) { req = elv_next_request(queue); - if (device->ro_flag && rq_data_dir(req) == WRITE) { + if (test_bit(DASD_FLAG_RO, &device->flags) && + rq_data_dir(req) == WRITE) { DBF_EVENT(DBF_ERR, "(%s) Rejecting write request %p", device->cdev->dev.bus_id, @@ -1186,13 +1205,11 @@ __dasd_check_expire(struct dasd_device * device) { struct dasd_ccw_req *cqr; - unsigned long long now; if (list_empty(&device->ccw_queue)) return; cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list); if (cqr->status == DASD_CQR_IN_IO && cqr->expires != 0) { - now = get_clock(); if (time_after_eq(jiffies, cqr->expires + cqr->starttime)) { if (device->discipline->term_IO(cqr) != 0) /* Hmpf, try again in 1/100 sec */ @@ -1517,7 +1534,8 @@ * terminated if it is currently in i/o. * Returns 1 if the request has been terminated. */ -int dasd_cancel_req(struct dasd_ccw_req *cqr) +int +dasd_cancel_req(struct dasd_ccw_req *cqr) { struct dasd_device *device = cqr->device; unsigned long flags; @@ -1655,18 +1673,13 @@ { struct gendisk *disk = inp->i_bdev->bd_disk; struct dasd_device *device = disk->private_data; - int old_count, rc; + int rc; - /* - * We use a negative value in open_count to indicate that - * the device must not be used. - */ - do { - old_count = atomic_read(&device->open_count); - if (old_count < 0) - return -ENODEV; - } while (atomic_compare_and_swap(old_count, old_count + 1, - &device->open_count)); + atomic_inc(&device->open_count); + if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) { + rc = -ENODEV; + goto unlock; + } if (!try_module_get(device->discipline->owner)) { rc = -EINVAL; @@ -1681,7 +1694,6 @@ goto out; } - rc = -ENODEV; if (device->state < DASD_STATE_BASIC) { DBF_DEV_EVENT(DBF_ERR, device, " %s", " Cannot open unrecognized device"); @@ -1704,12 +1716,6 @@ struct gendisk *disk = inp->i_bdev->bd_disk; struct dasd_device *device = disk->private_data; - if (device->state < DASD_STATE_BASIC) { - DBF_DEV_EVENT(DBF_ERR, device, " %s", - " Cannot release unrecognized device"); - return -EINVAL; - } - atomic_dec(&device->open_count); module_put(device->discipline->owner); return 0; @@ -1773,17 +1779,21 @@ dasd_remove_sysfs_files(cdev); device = dasd_device_from_cdev(cdev); - if (!IS_ERR(device)) { - /* - * This device is removed unconditionally. Set open_count - * to -1 to prevent dasd_open from opening it while it is - * no quite down yet. - */ - atomic_set(&device->open_count,-1); - dasd_set_target_state(device, DASD_STATE_NEW); - /* dasd_delete_device destroys the device reference. */ - dasd_delete_device(device); + if (IS_ERR(device)) + return; + if (test_and_set_bit(DASD_FLAG_OFFLINE, &device->flags)) { + /* Already doing offline processing */ + dasd_put_device(device); + return; } + /* + * This device is removed unconditionally. Set offline + * flag to prevent dasd_open from opening it while it is + * no quite down yet. + */ + dasd_set_target_state(device, DASD_STATE_NEW); + /* dasd_delete_device destroys the device reference. */ + dasd_delete_device(device); } /* activate a device. This is called from dasd_{eckd,fba}_probe() when either @@ -1801,7 +1811,7 @@ if (IS_ERR(device)) return PTR_ERR(device); - if (device->use_diag_flag) { + if (test_bit(DASD_FLAG_USE_DIAG, &device->flags)) { if (!dasd_diag_discipline_pointer) { printk (KERN_WARNING "dasd_generic couldn't online device %s " @@ -1849,18 +1859,28 @@ dasd_generic_set_offline (struct ccw_device *cdev) { struct dasd_device *device; + int max_count; device = dasd_device_from_cdev(cdev); + if (IS_ERR(device)) + return PTR_ERR(device); + if (test_and_set_bit(DASD_FLAG_OFFLINE, &device->flags)) { + /* Already doing offline processing */ + dasd_put_device(device); + return 0; + } /* - * We must make sure that this device is currently not in use - * (current open_count == 0 ). We set open_count to -1 to indicate - * that from now on set_offline is in progress and the device must - * not be used otherwise. + * We must make sure that this device is currently not in use. + * The open_count is increased for every opener, that includes + * the blkdev_get in dasd_scan_partitions. We are only interested + * in the other openers. */ - if (atomic_compare_and_swap(0, -1, &device->open_count)) { + max_count = device->bdev ? 1 : 0; + if (atomic_read(&device->open_count) > max_count) { printk (KERN_WARNING "Can't offline dasd device with open" " count = %i.\n", atomic_read(&device->open_count)); + clear_bit(DASD_FLAG_OFFLINE, &device->flags); dasd_put_device(device); return -EBUSY; } @@ -1890,7 +1910,7 @@ if (device->state < DASD_STATE_BASIC) break; /* Device is active. We want to keep it. */ - if (device->disconnect_error_flag) { + if (test_bit(DASD_FLAG_DSC_ERROR, &device->flags)) { list_for_each_entry(cqr, &device->ccw_queue, list) if (cqr->status == DASD_CQR_IN_IO) cqr->status = DASD_CQR_FAILED; diff -Nru a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c --- a/drivers/s390/block/dasd_3990_erp.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/block/dasd_3990_erp.c Sun Mar 28 13:12:08 2004 @@ -5,7 +5,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000, 2001 * - * $Revision: 1.27 $ + * $Revision: 1.28 $ */ #include @@ -229,7 +229,7 @@ struct dasd_device *device = erp->device; DEV_MESSAGE(KERN_INFO, device, - "blocking request queue for %is", expires); + "blocking request queue for %is", expires/HZ); device->stopped |= DASD_STOPPED_PENDING; erp->status = DASD_CQR_QUEUED; @@ -2623,7 +2623,7 @@ #ifdef ERP_DEBUG /* print current erp_chain */ - DEV_MESSAGE(KERN_DEBUG, device, "%s", + DEV_MESSAGE(KERN_ERR, device, "%s", "ERP chain at BEGINNING of ERP-ACTION"); { struct dasd_ccw_req *temp_erp = NULL; @@ -2631,9 +2631,10 @@ for (temp_erp = cqr; temp_erp != NULL; temp_erp = temp_erp->refers) { - DEV_MESSAGE(KERN_DEBUG, device, - " erp %p refers to %p", - temp_erp, temp_erp->refers); + DEV_MESSAGE(KERN_ERR, device, + " erp %p (%02x) refers to %p", + temp_erp, temp_erp->status, + temp_erp->refers); } } #endif /* ERP_DEBUG */ @@ -2675,15 +2676,16 @@ #ifdef ERP_DEBUG /* print current erp_chain */ - DEV_MESSAGE(KERN_DEBUG, device, "%s", "ERP chain at END of ERP-ACTION"); + DEV_MESSAGE(KERN_ERR, device, "%s", "ERP chain at END of ERP-ACTION"); { struct dasd_ccw_req *temp_erp = NULL; for (temp_erp = erp; temp_erp != NULL; temp_erp = temp_erp->refers) { - DEV_MESSAGE(KERN_DEBUG, device, - " erp %p refers to %p", - temp_erp, temp_erp->refers); + DEV_MESSAGE(KERN_ERR, device, + " erp %p (%02x) refers to %p", + temp_erp, temp_erp->status, + temp_erp->refers); } } #endif /* ERP_DEBUG */ diff -Nru a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c --- a/drivers/s390/block/dasd_devmap.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/block/dasd_devmap.c Sun Mar 28 13:12:08 2004 @@ -11,7 +11,7 @@ * functions may not be called from interrupt context. In particular * dasd_get_device is a no-no from interrupt context. * - * $Revision: 1.26 $ + * $Revision: 1.27 $ */ #include @@ -466,10 +466,14 @@ if (!devmap->device) { devmap->device = device; device->devindex = devmap->devindex; - device->ro_flag = - (devmap->features & DASD_FEATURE_READONLY) != 0; - device->use_diag_flag = - (devmap->features & DASD_FEATURE_USEDIAG) != 0; + if (devmap->features & DASD_FEATURE_READONLY) + set_bit(DASD_FLAG_RO, &device->flags); + else + clear_bit(DASD_FLAG_RO, &device->flags); + if (devmap->features & DASD_FEATURE_USEDIAG) + set_bit(DASD_FLAG_USE_DIAG, &device->flags); + else + clear_bit(DASD_FLAG_USE_DIAG, &device->flags); get_device(&cdev->dev); device->cdev = cdev; rc = 0; @@ -596,7 +600,10 @@ if (devmap->device) { if (devmap->device->gdp) set_disk_ro(devmap->device->gdp, ro_flag); - devmap->device->ro_flag = ro_flag; + if (ro_flag) + set_bit(DASD_FLAG_RO, &devmap->device->flags); + else + clear_bit(DASD_FLAG_RO, &devmap->device->flags); } spin_unlock(&dasd_devmap_lock); return count; diff -Nru a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c --- a/drivers/s390/block/dasd_eckd.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/block/dasd_eckd.c Sun Mar 28 13:12:07 2004 @@ -7,7 +7,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.51 $ + * $Revision: 1.53 $ */ #include @@ -1131,7 +1131,7 @@ cqr->cpaddr->cda = (__u32)(addr_t) cqr->data; cqr->device = device; cqr->retries = 0; - cqr->expires = 10 * HZ; + cqr->expires = 2 * HZ; cqr->buildclk = get_clock(); cqr->status = DASD_CQR_FILLED; @@ -1174,7 +1174,7 @@ cqr->cpaddr->cda = (__u32)(addr_t) cqr->data; cqr->device = device; cqr->retries = 0; - cqr->expires = 10 * HZ; + cqr->expires = 2 * HZ; cqr->buildclk = get_clock(); cqr->status = DASD_CQR_FILLED; @@ -1216,7 +1216,7 @@ cqr->cpaddr->cda = (__u32)(addr_t) cqr->data; cqr->device = device; cqr->retries = 0; - cqr->expires = 10 * HZ; + cqr->expires = 2 * HZ; cqr->buildclk = get_clock(); cqr->status = DASD_CQR_FILLED; @@ -1274,6 +1274,7 @@ stats = (struct dasd_rssd_perf_stats_t *) (prssdp + 1); memset(stats, 0, sizeof (struct dasd_rssd_perf_stats_t)); + ccw++; ccw->cmd_code = DASD_ECKD_CCW_RSSD; ccw->count = sizeof (struct dasd_rssd_perf_stats_t); ccw->cda = (__u32)(addr_t) stats; diff -Nru a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c --- a/drivers/s390/block/dasd_genhd.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/block/dasd_genhd.c Sun Mar 28 13:12:08 2004 @@ -9,7 +9,7 @@ * * gendisk related functions for the dasd driver. * - * $Revision: 1.44 $ + * $Revision: 1.46 $ */ #include @@ -71,7 +71,7 @@ sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id); - if (device->ro_flag) + if (test_bit(DASD_FLAG_RO, &device->flags)) set_disk_ro(gdp, 1); gdp->private_data = device; gdp->queue = device->request_queue; @@ -96,22 +96,33 @@ /* * Trigger a partition detection. */ -void +int dasd_scan_partitions(struct dasd_device * device) { struct block_device *bdev; /* Make the disk known. */ set_capacity(device->gdp, device->blocks << device->s2b_shift); - /* See fs/partition/check.c:register_disk,rescan_partitions */ bdev = bdget_disk(device->gdp, 0); - if (bdev) { - if (blkdev_get(bdev, FMODE_READ, 1) >= 0) { - /* Can't call rescan_partitions directly. Use ioctl. */ - ioctl_by_bdev(bdev, BLKRRPART, 0); - blkdev_put(bdev); - } - } + if (!bdev || blkdev_get(bdev, FMODE_READ, 1) < 0) + return -ENODEV; + /* + * See fs/partition/check.c:register_disk,rescan_partitions + * Can't call rescan_partitions directly. Use ioctl. + */ + ioctl_by_bdev(bdev, BLKRRPART, 0); + /* + * Since the matching blkdev_put call to the blkdev_get in + * this function is not called before dasd_destroy_partitions + * the offline open_count limit needs to be increased from + * 0 to 1. This is done by setting device->bdev (see + * dasd_generic_set_offline). As long as the partition + * detection is running no offline should be allowed. That + * is why the assignment to device->bdev is done AFTER + * the BLKRRPART ioctl. + */ + device->bdev = bdev; + return 0; } /* @@ -121,13 +132,32 @@ void dasd_destroy_partitions(struct dasd_device * device) { - int p; + /* The two structs have 168/176 byte on 31/64 bit. */ + struct blkpg_partition bpart; + struct blkpg_ioctl_arg barg; + struct block_device *bdev; + + /* + * Get the bdev pointer from the device structure and clear + * device->bdev to lower the offline open_count limit again. + */ + bdev = device->bdev; + device->bdev = 0; + + /* + * See fs/partition/check.c:delete_partition + * Can't call delete_partitions directly. Use ioctl. + * The ioctl also does locking and invalidation. + */ + memset(&bpart, sizeof(struct blkpg_partition), 0); + memset(&barg, sizeof(struct blkpg_ioctl_arg), 0); + barg.data = &bpart; + for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) + ioctl_by_bdev(bdev, BLKPG_DEL_PARTITION, (unsigned long) &barg); - for (p = device->gdp->minors - 1; p > 0; p--) { - invalidate_partition(device->gdp, p); - delete_partition(device->gdp, p); - } invalidate_partition(device->gdp, 0); + /* Matching blkdev_put to the blkdev_get in dasd_scan_partitions. */ + blkdev_put(bdev); set_capacity(device->gdp, 0); } diff -Nru a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h --- a/drivers/s390/block/dasd_int.h Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/block/dasd_int.h Sun Mar 28 13:12:08 2004 @@ -6,7 +6,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.55 $ + * $Revision: 1.56 $ */ #ifndef DASD_INT_H @@ -268,14 +268,12 @@ struct gendisk *gdp; request_queue_t *request_queue; spinlock_t request_queue_lock; + struct block_device *bdev; unsigned int devindex; unsigned long blocks; /* size of volume in blocks */ unsigned int bp_block; /* bytes per block */ unsigned int s2b_shift; /* log2 (bp_block/512) */ - int ro_flag; /* read-only flag */ - int use_diag_flag; /* diag allowed flag */ - int disconnect_error_flag; /* return -EIO when disconnected */ - + unsigned long flags; /* per device flags */ /* Device discipline stuff. */ struct dasd_discipline *discipline; @@ -318,6 +316,11 @@ #define DASD_STOPPED_DC_WAIT 8 /* disconnected, wait */ #define DASD_STOPPED_DC_EIO 16 /* disconnected, return -EIO */ +/* per device flags */ +#define DASD_FLAG_RO 0 /* device is read-only */ +#define DASD_FLAG_USE_DIAG 1 /* use diag disciplnie */ +#define DASD_FLAG_DSC_ERROR 2 /* return -EIO when disconnected */ +#define DASD_FLAG_OFFLINE 3 /* device is in offline processing */ void dasd_put_device_wake(struct dasd_device *); @@ -498,7 +501,7 @@ void dasd_gendisk_exit(void); int dasd_gendisk_alloc(struct dasd_device *); void dasd_gendisk_free(struct dasd_device *); -void dasd_scan_partitions(struct dasd_device *); +int dasd_scan_partitions(struct dasd_device *); void dasd_destroy_partitions(struct dasd_device *); /* externals in dasd_ioctl.c */ diff -Nru a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c --- a/drivers/s390/block/dasd_ioctl.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/block/dasd_ioctl.c Sun Mar 28 13:12:08 2004 @@ -303,7 +303,7 @@ if (device == NULL) return -ENODEV; - if (device->ro_flag) + if (test_bit(DASD_FLAG_RO, &device->flags)) return -EROFS; if (copy_from_user(&fdata, (void *) args, sizeof (struct format_data_t))) @@ -415,8 +415,8 @@ (dasd_check_blocksize(device->bp_block))) dasd_info->format = DASD_FORMAT_NONE; - dasd_info->features |= device->ro_flag ? DASD_FEATURE_READONLY - : DASD_FEATURE_DEFAULT; + dasd_info->features |= test_bit(DASD_FLAG_RO, &device->flags) ? + DASD_FEATURE_READONLY : DASD_FEATURE_DEFAULT; if (device->discipline) memcpy(dasd_info->type, device->discipline->name, 4); @@ -472,7 +472,10 @@ if (device == NULL) return -ENODEV; set_disk_ro(bdev->bd_disk, intval); - device->ro_flag = intval; + if (intval) + set_bit(DASD_FLAG_RO, &device->flags); + else + clear_bit(DASD_FLAG_RO, &device->flags); return 0; } diff -Nru a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c --- a/drivers/s390/block/dasd_proc.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/block/dasd_proc.c Sun Mar 28 13:12:07 2004 @@ -9,7 +9,7 @@ * * /proc interface for the dasd driver. * - * $Revision: 1.26 $ + * $Revision: 1.27 $ */ #include @@ -77,7 +77,7 @@ else seq_printf(m, " is ????????"); /* Print devices features. */ - substr = device->ro_flag ? "(ro)" : " "; + substr = test_bit(DASD_FLAG_RO, &device->flags) ? "(ro)" : " "; seq_printf(m, "%4s: ", substr); /* Print device status information. */ switch ((device != NULL) ? device->state : -1) { diff -Nru a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h --- a/drivers/s390/char/tape.h Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/char/tape.h Sun Mar 28 13:12:08 2004 @@ -198,6 +198,7 @@ /* entry in tape_device_list */ struct list_head node; + int cdev_id; struct ccw_device * cdev; struct tape_class_device * nt; struct tape_class_device * rt; @@ -263,8 +264,8 @@ extern int tape_mtop(struct tape_device *, int, int); extern void tape_state_set(struct tape_device *, enum tape_state); -extern int tape_enable_device(struct tape_device *, struct tape_discipline *); -extern void tape_disable_device(struct tape_device *device); +extern int tape_generic_online(struct tape_device *, struct tape_discipline *); +extern int tape_generic_offline(struct tape_device *device); /* Externals from tape_devmap.c */ extern int tape_generic_probe(struct ccw_device *); diff -Nru a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c --- a/drivers/s390/char/tape_34xx.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/char/tape_34xx.c Sun Mar 28 13:12:07 2004 @@ -202,8 +202,7 @@ tape_34xx_delete_sbid_from(device, 0); tape_34xx_schedule_work(device, TO_MSEN); } else { - DBF_EVENT(3, "unsol.irq! dev end: %s\n", - device->cdev->dev.bus_id); + DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id); PRINT_WARN("Unsolicited IRQ (Device End) caught.\n"); tape_dump_sense(device, NULL, irb); } @@ -1314,17 +1313,18 @@ }; static int -tape_34xx_enable(struct ccw_device *cdev) +tape_34xx_online(struct ccw_device *cdev) { - return tape_enable_device(cdev->dev.driver_data, - &tape_discipline_34xx); + return tape_generic_online( + cdev->dev.driver_data, + &tape_discipline_34xx + ); } static int -tape_34xx_disable(struct ccw_device *cdev) +tape_34xx_offline(struct ccw_device *cdev) { - tape_disable_device(cdev->dev.driver_data); - return 0; + return tape_generic_offline(cdev->dev.driver_data); } static struct ccw_driver tape_34xx_driver = { @@ -1333,8 +1333,8 @@ .ids = tape_34xx_ids, .probe = tape_generic_probe, .remove = tape_generic_remove, - .set_online = tape_34xx_enable, - .set_offline = tape_34xx_disable, + .set_online = tape_34xx_online, + .set_offline = tape_34xx_offline, }; static int @@ -1342,7 +1342,7 @@ { int rc; - DBF_EVENT(3, "34xx init: $Revision: 1.18 $\n"); + DBF_EVENT(3, "34xx init: $Revision: 1.19 $\n"); /* Register driver for 3480/3490 tapes. */ rc = ccw_driver_register(&tape_34xx_driver); if (rc) @@ -1361,7 +1361,7 @@ MODULE_DEVICE_TABLE(ccw, tape_34xx_ids); MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH"); MODULE_DESCRIPTION("Linux on zSeries channel attached 3480 tape " - "device driver ($Revision: 1.18 $)"); + "device driver ($Revision: 1.19 $)"); MODULE_LICENSE("GPL"); module_init(tape_34xx_init); diff -Nru a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c --- a/drivers/s390/char/tape_block.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/char/tape_block.c Sun Mar 28 13:12:08 2004 @@ -274,12 +274,19 @@ flush_scheduled_work(); device->blk_data.requeue_task.data = tape_put_device(device); + if (!device->blk_data.disk) { + PRINT_ERR("(%s): No gendisk to clean up!\n", + device->cdev->dev.bus_id); + goto cleanup_queue; + } + del_gendisk(device->blk_data.disk); device->blk_data.disk->private_data = tape_put_device(device->blk_data.disk->private_data); put_disk(device->blk_data.disk); device->blk_data.disk = NULL; +cleanup_queue: device->blk_data.request_queue->queuedata = tape_put_device(device); blk_cleanup_queue(device->blk_data.request_queue); diff -Nru a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c --- a/drivers/s390/char/tape_core.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/char/tape_core.c Sun Mar 28 13:12:07 2004 @@ -69,6 +69,34 @@ [TO_UNASSIGN] = "UAS" }; +static inline int +busid_to_int(char *bus_id) +{ + int dec; + int d; + char * s; + + for(s = bus_id, d = 0; *s != '\0' && *s != '.'; s++) + d = (d * 10) + (*s - '0'); + dec = d; + for(s++, d = 0; *s != '\0' && *s != '.'; s++) + d = (d * 10) + (*s - '0'); + dec = (dec << 8) + d; + + for(s++; *s != '\0'; s++) { + if (*s >= '0' && *s <= '9') { + d = *s - '0'; + } else if (*s >= 'a' && *s <= 'f') { + d = *s - 'a' + 10; + } else { + d = *s - 'A' + 10; + } + dec = (dec << 4) + d; + } + + return dec; +} + /* * Some channel attached tape specific attributes. * @@ -296,10 +324,15 @@ } /* - * Enable tape device + * Set a device online. + * + * This function is called by the common I/O layer to move a device from the + * detected but offline into the online state. + * If we return an error (RC < 0) the device remains in the offline state. This + * can happen if the device is assigned somewhere else, for example. */ int -tape_enable_device(struct tape_device *device, +tape_generic_online(struct tape_device *device, struct tape_discipline *discipline) { int rc; @@ -328,6 +361,9 @@ goto out_char; tape_state_set(device, TS_UNUSED); + + DBF_LH(3, "(%08x): Drive set online\n", device->cdev_id); + return 0; out_char: @@ -342,37 +378,49 @@ } /* - * Disable tape device. Check if there is a running request and - * terminate it. Post all queued requests with -EIO. + * Set device offline. + * + * Called by the common I/O layer if the drive should set offline on user + * request. We may prevent this by returning an error. + * Manual offline is only allowed while the drive is not in use. */ -void -tape_disable_device(struct tape_device *device) +int +tape_generic_offline(struct tape_device *device) { - struct list_head *l, *n; - struct tape_request *request; + if (!device) { + PRINT_ERR("tape_generic_offline: no such device\n"); + return -ENODEV; + } + + DBF_LH(3, "(%08x): tape_generic_offline(%p)\n", + device->cdev_id, device); spin_lock_irq(get_ccwdev_lock(device->cdev)); - /* Post remaining requests with -EIO */ - list_for_each_safe(l, n, &device->req_queue) { - request = list_entry(l, struct tape_request, list); - if (request->status == TAPE_REQUEST_IN_IO) - __tape_halt_io(device, request); - list_del(&request->list); - /* Decrease ref_count for removed request. */ - request->device = tape_put_device(device); - request->rc = -EIO; - if (request->callback != NULL) - request->callback(request, request->callback_data); + switch (device->tape_state) { + case TS_INIT: + case TS_NOT_OPER: + break; + case TS_UNUSED: + tapeblock_cleanup_device(device); + tapechar_cleanup_device(device); + device->discipline->cleanup_device(device); + tape_remove_minor(device); + default: + DBF_EVENT(3, "(%08x): Set offline failed " + "- drive in use.\n", + device->cdev_id); + PRINT_WARN("(%s): Set offline failed " + "- drive in use.\n", + device->cdev->dev.bus_id); + spin_unlock_irq(get_ccwdev_lock(device->cdev)); + return -EBUSY; } spin_unlock_irq(get_ccwdev_lock(device->cdev)); - tapeblock_cleanup_device(device); - tapechar_cleanup_device(device); - device->discipline->cleanup_device(device); - tape_remove_minor(device); - tape_med_state_set(device, MS_UNKNOWN); - device->tape_state = TS_INIT; + + DBF_LH(3, "(%08x): Drive set offline.\n", device->cdev_id); + return 0; } /* @@ -479,14 +527,14 @@ tape_generic_probe(struct ccw_device *cdev) { struct tape_device *device; - char *bus_id = cdev->dev.bus_id; device = tape_alloc_device(); if (IS_ERR(device)) return -ENODEV; - PRINT_INFO("tape device %s found\n", bus_id); + PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); cdev->dev.driver_data = device; device->cdev = cdev; + device->cdev_id = busid_to_int(cdev->dev.bus_id); cdev->handler = __tape_do_irq; ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); @@ -497,15 +545,58 @@ /* * Driverfs tape remove function. + * + * This function is called whenever the common I/O layer detects the device + * gone. This can happen at any time and we cannot refuse. */ void tape_generic_remove(struct ccw_device *cdev) { - ccw_device_set_offline(cdev); + struct tape_device * device; + struct tape_request * request; + struct list_head * l, *n; + + device = cdev->dev.driver_data; + DBF_LH(3, "(%08x): tape_generic_remove(%p)\n", device->cdev_id, cdev); + + /* + * No more requests may be processed. So just post them as i/o errors. + */ + spin_lock_irq(get_ccwdev_lock(device->cdev)); + list_for_each_safe(l, n, &device->req_queue) { + request = list_entry(l, struct tape_request, list); + if (request->status == TAPE_REQUEST_IN_IO) + request->status = TAPE_REQUEST_DONE; + list_del(&request->list); + + /* Decrease ref_count for removed request. */ + request->device = tape_put_device(device); + request->rc = -EIO; + if (request->callback != NULL) + request->callback(request, request->callback_data); + } + + if (device->tape_state != TS_UNUSED && device->tape_state != TS_INIT) { + DBF_EVENT(3, "(%08x): Drive in use vanished!\n", + device->cdev_id); + PRINT_WARN("(%s): Drive in use vanished - expect trouble!\n", + device->cdev->dev.bus_id); + PRINT_WARN("State was %i\n", device->tape_state); + device->tape_state = TS_NOT_OPER; + tapeblock_cleanup_device(device); + tapechar_cleanup_device(device); + device->discipline->cleanup_device(device); + tape_remove_minor(device); + } + device->tape_state = TS_NOT_OPER; + tape_med_state_set(device, MS_UNKNOWN); + spin_unlock_irq(get_ccwdev_lock(device->cdev)); + if (cdev->dev.driver_data != NULL) { sysfs_remove_group(&cdev->dev.kobj, &tape_attr_group); cdev->dev.driver_data = tape_put_device(cdev->dev.driver_data); } + } /* @@ -665,7 +756,7 @@ op = "---"; DBF_EVENT(3, "DSTAT : %02x CSTAT: %02x\n", irb->scsw.dstat,irb->scsw.cstat); - DBF_EVENT(3, "DEVICE: %s OP\t: %s\n", device->cdev->dev.bus_id,op); + DBF_EVENT(3, "DEVICE: %08x OP\t: %s\n", device->cdev_id, op); sptr = (unsigned int *) irb->ecw; DBF_EVENT(3, "%08x %08x\n", sptr[0], sptr[1]); DBF_EVENT(3, "%08x %08x\n", sptr[2], sptr[3]); @@ -815,7 +906,7 @@ spin_lock_irq(get_ccwdev_lock(device->cdev)); rc = __tape_halt_io(device, request); if (rc == 0) { - DBF_EVENT(3, "IO stopped on %s\n", device->cdev->dev.bus_id); + DBF_EVENT(3, "IO stopped on %08x\n", device->cdev_id); rc = -ERESTARTSYS; } spin_unlock_irq(get_ccwdev_lock(device->cdev)); @@ -823,6 +914,24 @@ } /* + * Handle requests that return an i/o error in the irb. + */ +static inline void +tape_handle_killed_request( + struct tape_device *device, + struct tape_request *request) +{ + if(request != NULL) { + /* Set ending status. FIXME: Should the request be retried? */ + request->rc = -EIO; + request->status = TAPE_REQUEST_DONE; + __tape_remove_request(device, request); + } else { + __tape_do_io_list(device); + } +} + +/* * Tape interrupt routine, called from the ccw_device layer */ static void @@ -835,7 +944,7 @@ device = (struct tape_device *) cdev->dev.driver_data; if (device == NULL) { - PRINT_ERR("could not get device structure for bus_id %s " + PRINT_ERR("could not get device structure for %s " "in interrupt\n", cdev->dev.bus_id); return; } @@ -843,6 +952,23 @@ DBF_LH(6, "__tape_do_irq(device=%p, request=%p)\n", device, request); + /* On special conditions irb is an error pointer */ + if (IS_ERR(irb)) { + switch (PTR_ERR(irb)) { + case -ETIMEDOUT: + PRINT_WARN("(%s): Request timed out\n", + cdev->dev.bus_id); + case -EIO: + tape_handle_killed_request(device, request); + break; + default: + PRINT_ERR("(%s): Unexpected i/o error %li\n", + cdev->dev.bus_id, + PTR_ERR(irb)); + } + return; + } + /* May be an unsolicited irq */ if(request != NULL) request->rescnt = irb->scsw.count; @@ -1023,7 +1149,7 @@ #ifdef DBF_LIKE_HELL debug_set_level(tape_dbf_area, 6); #endif - DBF_EVENT(3, "tape init: ($Revision: 1.44 $)\n"); + DBF_EVENT(3, "tape init: ($Revision: 1.48 $)\n"); tape_proc_init(); tapechar_init (); tapeblock_init (); @@ -1048,7 +1174,7 @@ MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and " "Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)"); MODULE_DESCRIPTION("Linux on zSeries channel attached " - "tape device driver ($Revision: 1.44 $)"); + "tape device driver ($Revision: 1.48 $)"); MODULE_LICENSE("GPL"); module_init(tape_init); @@ -1056,9 +1182,9 @@ EXPORT_SYMBOL(tape_dbf_area); EXPORT_SYMBOL(tape_generic_remove); -EXPORT_SYMBOL(tape_disable_device); EXPORT_SYMBOL(tape_generic_probe); -EXPORT_SYMBOL(tape_enable_device); +EXPORT_SYMBOL(tape_generic_online); +EXPORT_SYMBOL(tape_generic_offline); EXPORT_SYMBOL(tape_put_device); EXPORT_SYMBOL(tape_get_device_reference); EXPORT_SYMBOL(tape_state_verbose); diff -Nru a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c --- a/drivers/s390/char/tape_std.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/char/tape_std.c Sun Mar 28 13:12:07 2004 @@ -42,8 +42,8 @@ spin_lock_irq(get_ccwdev_lock(device->cdev)); if (request->callback != NULL) { - DBF_EVENT(3, "%s: Assignment timeout. Device busy.\n", - device->cdev->dev.bus_id); + DBF_EVENT(3, "%08x: Assignment timeout. Device busy.\n", + device->cdev_id); PRINT_ERR("%s: Assignment timeout. Device busy.\n", device->cdev->dev.bus_id); ccw_device_clear(device->cdev, (long) request); @@ -84,10 +84,10 @@ if (rc != 0) { PRINT_WARN("%s: assign failed - device might be busy\n", device->cdev->dev.bus_id); - DBF_EVENT(3, "%s: assign failed - device might be busy\n", - device->cdev->dev.bus_id); + DBF_EVENT(3, "%08x: assign failed - device might be busy\n", + device->cdev_id); } else { - DBF_EVENT(3, "%s: Tape assigned\n", device->cdev->dev.bus_id); + DBF_EVENT(3, "%08x: Tape assigned\n", device->cdev_id); } tape_free_request(request); return rc; @@ -102,6 +102,14 @@ int rc; struct tape_request *request; + if (device->tape_state == TS_NOT_OPER) { + DBF_EVENT(3, "(%08x): Can't unassign device\n", + device->cdev_id); + PRINT_WARN("(%s): Can't unassign device - device gone\n", + device->cdev->dev.bus_id); + return -EIO; + } + request = tape_alloc_request(2, 11); if (IS_ERR(request)) return PTR_ERR(request); @@ -111,10 +119,10 @@ tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); if ((rc = tape_do_io(device, request)) != 0) { - DBF_EVENT(3, "%s: Unassign failed\n", device->cdev->dev.bus_id); + DBF_EVENT(3, "%08x: Unassign failed\n", device->cdev_id); PRINT_WARN("%s: Unassign failed\n", device->cdev->dev.bus_id); } else { - DBF_EVENT(3, "%s: Tape unassigned\n", device->cdev->dev.bus_id); + DBF_EVENT(3, "%08x: Tape unassigned\n", device->cdev_id); } tape_free_request(request); return rc; diff -Nru a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c --- a/drivers/s390/cio/ccwgroup.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/cio/ccwgroup.c Sun Mar 28 13:12:08 2004 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/ccwgroup.c * bus driver for ccwgroup - * $Revision: 1.24 $ + * $Revision: 1.25 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -102,8 +102,10 @@ gdev = to_ccwgroupdev(dev); - for (i = 0; i < gdev->count; i++) + for (i = 0; i < gdev->count; i++) { + gdev->cdev[i]->dev.driver_data = NULL; put_device(&gdev->cdev[i]->dev); + } kfree(gdev); } @@ -155,6 +157,7 @@ struct ccwgroup_device *gdev; int i; int rc; + int del_drvdata; if (argc > 256) /* disallow dumb users */ return -EINVAL; @@ -166,6 +169,7 @@ memset(gdev, 0, sizeof(*gdev) + argc*sizeof(gdev->cdev[0])); atomic_set(&gdev->onoff, 0); + del_drvdata = 0; for (i = 0; i < argc; i++) { gdev->cdev[i] = get_ccwdev_by_busid(cdrv, argv[i]); @@ -177,7 +181,15 @@ rc = -EINVAL; goto error; } + /* Don't allow a device to belong to more than one group. */ + if (gdev->cdev[i]->dev.driver_data) { + rc = -EINVAL; + goto error; + } } + for (i = 0; i < argc; i++) + gdev->cdev[i]->dev.driver_data = gdev; + del_drvdata = 1; *gdev = (struct ccwgroup_device) { .creator_id = creator_id, @@ -212,9 +224,11 @@ device_unregister(&gdev->dev); error: for (i = 0; i < argc; i++) - if (gdev->cdev[i]) + if (gdev->cdev[i]) { put_device(&gdev->cdev[i]->dev); - + if (del_drvdata) + gdev->cdev[i]->dev.driver_data = NULL; + } kfree(gdev); return rc; @@ -399,40 +413,14 @@ __ccwgroup_get_gdev_by_cdev(struct ccw_device *cdev) { struct ccwgroup_device *gdev; - struct list_head *entry; - struct device *dev; - int i, found; - - /* - * Find groupdevice cdev belongs to. - * Unfortunately, we can't use bus_for_each_dev() because of the - * semaphore (and return value of fn() is int). - */ - if (!get_bus(&ccwgroup_bus_type)) - return NULL; - - gdev = NULL; - down_read(&ccwgroup_bus_type.subsys.rwsem); - list_for_each(entry, &ccwgroup_bus_type.devices.list) { - dev = get_device(container_of(entry, struct device, bus_list)); - found = 0; - if (!dev) - continue; - gdev = to_ccwgroupdev(dev); - for (i = 0; i < gdev->count && (!found); i++) { - if (gdev->cdev[i] == cdev) - found = 1; - } - if (found) - break; - put_device(dev); - gdev = NULL; + if (cdev->dev.driver_data) { + gdev = (struct ccwgroup_device *)cdev->dev.driver_data; + if (get_device(&gdev->dev)) + return gdev; + return NULL; } - up_read(&ccwgroup_bus_type.subsys.rwsem); - put_bus(&ccwgroup_bus_type); - - return gdev; + return NULL; } void diff -Nru a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c --- a/drivers/s390/cio/device_fsm.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/cio/device_fsm.c Sun Mar 28 13:12:08 2004 @@ -731,6 +731,9 @@ (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { if (cdev->handler) cdev->handler (cdev, 0, irb); + if (irb->scsw.cc == 1) + /* Basic sense hasn't started. Try again. */ + ccw_device_do_sense(cdev, irb); return; } /* Add basic sense info to irb. */ @@ -828,6 +831,8 @@ (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { if (cdev->handler) cdev->handler (cdev, 0, irb); + if (irb->scsw.cc == 1) + goto call_handler; return; } /* @@ -841,6 +846,7 @@ } return; } +call_handler: /* Iff device is idle, reset timeout. */ sch = to_subchannel(cdev->dev.parent); if (!stsch(sch->irq, &sch->schib)) @@ -908,6 +914,8 @@ /* Check for unsolicited interrupt. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) + /* FIXME: we should restart stlck here, but this + * is extremely unlikely ... */ goto out_wakeup; ccw_device_accumulate_irb(cdev, irb); diff -Nru a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c --- a/drivers/s390/net/ctcmain.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/net/ctcmain.c Sun Mar 28 13:12:07 2004 @@ -1,5 +1,5 @@ /* - * $Id: ctcmain.c,v 1.57 2004/03/02 15:34:01 mschwide Exp $ + * $Id: ctcmain.c,v 1.58 2004/03/24 10:51:56 ptiedem Exp $ * * CTC / ESCON network driver * @@ -36,7 +36,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.57 $ + * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.58 $ * */ @@ -319,7 +319,7 @@ print_banner(void) { static int printed = 0; - char vbuf[] = "$Revision: 1.57 $"; + char vbuf[] = "$Revision: 1.58 $"; char *version = vbuf; if (printed) @@ -2067,7 +2067,8 @@ return; } - priv = cdev->dev.driver_data; + priv = ((struct ccwgroup_device *)cdev->dev.driver_data) + ->dev.driver_data; /* Try to extract channel from driver data. */ if (priv->channel[READ]->cdev == cdev) @@ -2963,8 +2964,6 @@ cgdev->cdev[0]->handler = ctc_irq_handler; cgdev->cdev[1]->handler = ctc_irq_handler; cgdev->dev.driver_data = priv; - cgdev->cdev[0]->dev.driver_data = priv; - cgdev->cdev[1]->dev.driver_data = priv; return 0; } diff -Nru a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c --- a/drivers/s390/net/iucv.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/net/iucv.c Sun Mar 28 13:12:07 2004 @@ -1,5 +1,5 @@ /* - * $Id: iucv.c,v 1.26 2004/03/10 11:55:31 braunu Exp $ + * $Id: iucv.c,v 1.27 2004/03/22 07:43:43 braunu Exp $ * * IUCV network driver * @@ -29,7 +29,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: IUCV lowlevel driver $Revision: 1.26 $ + * RELEASE-TAG: IUCV lowlevel driver $Revision: 1.27 $ * */ @@ -351,7 +351,7 @@ static void iucv_banner(void) { - char vbuf[] = "$Revision: 1.26 $"; + char vbuf[] = "$Revision: 1.27 $"; char *version = vbuf; if ((version = strchr(version, ':'))) { @@ -374,14 +374,14 @@ { int ret; + if (iucv_external_int_buffer) + return 0; + if (!MACHINE_IS_VM) { printk(KERN_ERR "IUCV: IUCV connection needs VM as base\n"); return -EPROTONOSUPPORT; } - if (iucv_external_int_buffer) - return 0; - ret = bus_register(&iucv_bus); if (ret != 0) { printk(KERN_ERR "IUCV: failed to register bus.\n"); @@ -830,7 +830,7 @@ memset (new_handler->id.mask, 0xFF, sizeof (new_handler->id.mask)); } - memset (new_handler->id.mask, 0x00, + memset (new_handler->id.userid, 0x00, sizeof (new_handler->id.userid)); } /* fill in the rest of handler */ diff -Nru a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c --- a/drivers/s390/net/lcs.c Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/net/lcs.c Sun Mar 28 13:12:07 2004 @@ -11,7 +11,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Martin Schwidefsky * - * $Revision: 1.68 $ $Date: 2004/03/02 15:34:01 $ + * $Revision: 1.72 $ $Date: 2004/03/22 09:34:27 $ * * 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 @@ -58,9 +58,10 @@ /** * initialization string for output */ -#define VERSION_LCS_C "$Revision: 1.68 $" +#define VERSION_LCS_C "$Revision: 1.72 $" static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")"; +static char debug_buffer[255]; /** * Some prototypes. @@ -112,7 +113,7 @@ { int cnt; - LCS_DBF_TEXT(3, setup, "ichalloc"); + LCS_DBF_TEXT(2, setup, "ichalloc"); for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) { /* alloc memory fo iobuffer */ channel->iob[cnt].data = (void *) @@ -124,7 +125,7 @@ } if (cnt < LCS_NUM_BUFFS) { /* Not all io buffers could be allocated. */ - LCS_DBF_TEXT(3, setup, "echalloc"); + LCS_DBF_TEXT(2, setup, "echalloc"); while (cnt-- > 0) kfree(channel->iob[cnt].data); return -ENOMEM; @@ -140,7 +141,7 @@ { int cnt; - LCS_DBF_TEXT(3, setup, "ichfree"); + LCS_DBF_TEXT(2, setup, "ichfree"); for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) { if (channel->iob[cnt].data != NULL) kfree(channel->iob[cnt].data); @@ -148,6 +149,30 @@ } } +/* + * Cleanup channel. + */ +static void +lcs_cleanup_channel(struct lcs_channel *channel) +{ + LCS_DBF_TEXT(3, setup, "cleanch"); + /* Kill write channel tasklets. */ + tasklet_kill(&channel->irq_tasklet); + /* Free channel buffers. */ + lcs_free_channel(channel); +} + +/** + * LCS free memory for card and channels. + */ +static void +lcs_free_card(struct lcs_card *card) +{ + LCS_DBF_TEXT(2, setup, "remcard"); + LCS_DBF_HEX(2, setup, &card, sizeof(void*)); + kfree(card); +} + /** * LCS alloc memory for card and channels */ @@ -155,25 +180,34 @@ lcs_alloc_card(void) { struct lcs_card *card; + int rc; + + LCS_DBF_TEXT(2, setup, "alloclcs"); - LCS_DBF_TEXT(3, setup, "alloclcs"); card = kmalloc(sizeof(struct lcs_card), GFP_KERNEL | GFP_DMA); if (card == NULL) return NULL; memset(card, 0, sizeof(struct lcs_card)); card->lan_type = LCS_FRAME_TYPE_AUTO; card->lancmd_timeout = LCS_LANCMD_TIMEOUT_DEFAULT; - return card; -} + /* Allocate io buffers for the read channel. */ + rc = lcs_alloc_channel(&card->read); + if (rc){ + LCS_DBF_TEXT(2, setup, "iccwerr"); + lcs_free_card(card); + return NULL; + } + /* Allocate io buffers for the write channel. */ + rc = lcs_alloc_channel(&card->write); + if (rc) { + LCS_DBF_TEXT(2, setup, "iccwerr"); + lcs_cleanup_channel(&card->read); + lcs_free_card(card); + return NULL; + } -/** - * LCS free memory for card and channels. - */ -static void -lcs_free_card(struct lcs_card *card) -{ - LCS_DBF_TEXT(2, setup, "remcard"); - kfree(card); + LCS_DBF_HEX(2, setup, &card, sizeof(void*)); + return card; } /* @@ -218,25 +252,17 @@ card->read.buf_idx = 0; } -static int +static void lcs_setup_read(struct lcs_card *card) { - int rc; + LCS_DBF_TEXT(3, setup, "initread"); - LCS_DBF_TEXT(3, setup, "readirq"); - /* Allocate io buffers for the read channel. */ - rc = lcs_alloc_channel(&card->read); - if (rc){ - LCS_DBF_TEXT(3, setup, "iccwerr"); - return rc; - } lcs_setup_read_ccws(card); /* Initialize read channel tasklet. */ card->read.irq_tasklet.data = (unsigned long) &card->read; card->read.irq_tasklet.func = lcs_tasklet; /* Initialize waitqueue. */ init_waitqueue_head(&card->read.wait_q); - return 0; } /* @@ -247,7 +273,7 @@ { int cnt; - LCS_DBF_TEXT(2, setup, "iwritccw"); + LCS_DBF_TEXT(3, setup, "iwritccw"); /* Setup write ccws. */ memset(card->write.ccws, 0, sizeof(struct ccw1) * LCS_NUM_BUFFS + 1); for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) { @@ -273,61 +299,32 @@ card->write.buf_idx = 0; } -static int +static void lcs_setup_write(struct lcs_card *card) { - int rc; + LCS_DBF_TEXT(3, setup, "initwrit"); - LCS_DBF_TEXT(3, setup, "writeirq"); - /* Allocate io buffers for the write channel. */ - rc = lcs_alloc_channel(&card->write); - if (rc) { - LCS_DBF_TEXT(3, setup, "iccwerr"); - return rc; - } lcs_setup_write_ccws(card); /* Initialize write channel tasklet. */ card->write.irq_tasklet.data = (unsigned long) &card->write; card->write.irq_tasklet.func = lcs_tasklet; /* Initialize waitqueue. */ init_waitqueue_head(&card->write.wait_q); - return 0; } -/* - * Cleanup channel. - */ -static void -lcs_cleanup_channel(struct lcs_channel *channel) -{ - LCS_DBF_TEXT(3, setup, "cleanch"); - /* Kill write channel tasklets. */ - tasklet_kill(&channel->irq_tasklet); - /* Free channel buffers. */ - lcs_free_channel(channel); -} + /** * Initialize channels,card and state machines. */ -static int +static void lcs_setup_card(struct lcs_card *card) { - int rc; - - LCS_DBF_TEXT(3, setup, "initcard"); + LCS_DBF_TEXT(2, setup, "initcard"); + LCS_DBF_HEX(2, setup, &card, sizeof(void*)); - rc = lcs_setup_read(card); - if (rc) { - PRINT_ERR("Could not initialize read channel\n"); - return rc; - } - rc = lcs_setup_write(card); - if (rc) { - PRINT_ERR("Could not initialize write channel\n"); - lcs_cleanup_channel(&card->read); - return rc; - } + lcs_setup_read(card); + lcs_setup_write(card); /* Set cards initial state. */ card->state = DEV_STATE_DOWN; card->tx_buffer = NULL; @@ -342,7 +339,6 @@ INIT_LIST_HEAD(&card->ipm_list); #endif INIT_LIST_HEAD(&card->lancmd_waiters); - return 0; } /** @@ -355,6 +351,7 @@ struct lcs_ipm_list *ipm_list; LCS_DBF_TEXT(3, setup, "cleancrd"); + LCS_DBF_HEX(2,setup,&card,sizeof(void*)); #ifdef CONFIG_IP_MULTICAST /* Free multicast list. */ list_for_each_safe(l, n, &card->ipm_list) { @@ -376,12 +373,10 @@ static int lcs_start_channel(struct lcs_channel *channel) { - char dbf_text[15]; unsigned long flags; int rc; - sprintf(dbf_text,"ssch%s", channel->ccwdev->dev.bus_id); - LCS_DBF_TEXT(4, trace, dbf_text); + LCS_DBF_TEXT_(4,trace,"ssch%s", channel->ccwdev->dev.bus_id); spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); rc = ccw_device_start(channel->ccwdev, channel->ccws + channel->io_idx, 0, 0, @@ -390,37 +385,56 @@ channel->state = CH_STATE_RUNNING; spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); if (rc) { - sprintf(dbf_text,"essc%s", channel->ccwdev->dev.bus_id); - LCS_DBF_TEXT(4, trace, dbf_text); + LCS_DBF_TEXT_(4,trace,"essh%s", channel->ccwdev->dev.bus_id); PRINT_ERR("Error in starting channel, rc=%d!\n", rc); } return rc; } +static int +lcs_clear_channel(struct lcs_channel *channel) +{ + unsigned long flags; + int rc; + + LCS_DBF_TEXT(4,trace,"clearch"); + LCS_DBF_TEXT_(4,trace,"%s", channel->ccwdev->dev.bus_id); + spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); + rc = ccw_device_clear(channel->ccwdev, (addr_t) channel); + spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); + if (rc) { + LCS_DBF_TEXT_(4,trace,"ecsc%s", channel->ccwdev->dev.bus_id); + return rc; + } + wait_event(channel->wait_q, (channel->state == CH_STATE_CLEARED)); + channel->state = CH_STATE_STOPPED; + return rc; +} + + /** * Stop channel. */ static int lcs_stop_channel(struct lcs_channel *channel) { - char dbf_text[15]; unsigned long flags; int rc; if (channel->state == CH_STATE_STOPPED) return 0; - sprintf(dbf_text,"hsch%s", channel->ccwdev->dev.bus_id); - LCS_DBF_TEXT(4, trace, dbf_text); + LCS_DBF_TEXT(4,trace,"haltsch"); + LCS_DBF_TEXT_(4,trace,"%s", channel->ccwdev->dev.bus_id); spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); rc = ccw_device_halt(channel->ccwdev, (addr_t) channel); spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); if (rc) { - sprintf(dbf_text,"ehsc%s", channel->ccwdev->dev.bus_id); - LCS_DBF_TEXT(4, trace, dbf_text); + LCS_DBF_TEXT_(4,trace,"ehsc%s", channel->ccwdev->dev.bus_id); return rc; } /* Asynchronous halt initialted. Wait for its completion. */ wait_event(channel->wait_q, (channel->state == CH_STATE_HALTED)); + lcs_clear_channel(channel); return 0; } @@ -464,6 +478,7 @@ { int index; + LCS_DBF_TEXT(5, trace, "_getbuff"); index = channel->io_idx; do { if (channel->iob[index].state == BUF_STATE_EMPTY) { @@ -481,6 +496,7 @@ struct lcs_buffer *buffer; unsigned long flags; + LCS_DBF_TEXT(5, trace, "getbuff"); spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); buffer = __lcs_get_buffer(channel); spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); @@ -493,19 +509,16 @@ static int __lcs_resume_channel(struct lcs_channel *channel) { - char dbf_text[15]; int rc; if (channel->state != CH_STATE_SUSPENDED) return 0; if (channel->ccws[channel->io_idx].flags & CCW_FLAG_SUSPEND) return 0; - sprintf(dbf_text,"rsch%s", channel->ccwdev->dev.bus_id); - LCS_DBF_TEXT(4, trace, dbf_text); + LCS_DBF_TEXT_(5, trace, "rsch%s", channel->ccwdev->dev.bus_id); rc = ccw_device_resume(channel->ccwdev); if (rc) { - sprintf(dbf_text,"ersc%s", channel->ccwdev->dev.bus_id); - LCS_DBF_TEXT(4, trace, dbf_text); + LCS_DBF_TEXT_(4, trace, "ersc%s", channel->ccwdev->dev.bus_id); PRINT_ERR("Error in lcs_resume_channel: rc=%d\n",rc); } else channel->state = CH_STATE_RUNNING; @@ -521,6 +534,7 @@ { int prev, next; + LCS_DBF_TEXT(5, trace, "rdybits"); prev = (index - 1) & (LCS_NUM_BUFFS - 1); next = (index + 1) & (LCS_NUM_BUFFS - 1); /* Check if we may clear the suspend bit of this buffer. */ @@ -540,6 +554,7 @@ unsigned long flags; int index, rc; + LCS_DBF_TEXT(5, trace, "rdybuff"); if (buffer->state != BUF_STATE_LOCKED && buffer->state != BUF_STATE_PROCESSED) BUG(); @@ -565,6 +580,7 @@ { int index, prev, next; + LCS_DBF_TEXT(5, trace, "prcsbuff"); if (buffer->state != BUF_STATE_READY) BUG(); buffer->state = BUF_STATE_PROCESSED; @@ -597,6 +613,7 @@ { unsigned long flags; + LCS_DBF_TEXT(5, trace, "relbuff"); if (buffer->state != BUF_STATE_LOCKED && buffer->state != BUF_STATE_PROCESSED) BUG(); @@ -614,6 +631,7 @@ struct lcs_buffer *buffer; struct lcs_cmd *cmd; + LCS_DBF_TEXT(4, trace, "getlncmd"); /* Get buffer and wait if none is available. */ wait_event(card->write.wait_q, ((buffer = lcs_get_buffer(&card->write)) != NULL)); @@ -637,6 +655,7 @@ struct list_head *l, *n; struct lcs_reply *reply; + LCS_DBF_TEXT(4, trace, "notiwait"); spin_lock(&card->lock); list_for_each_safe(l, n, &card->lancmd_waiters) { reply = list_entry(l, struct lcs_reply, list); @@ -661,6 +680,7 @@ { struct lcs_reply *reply; + LCS_DBF_TEXT(4, trace, "timeout"); reply = (struct lcs_reply *) data; list_del(&reply->list); reply->received = 1; @@ -676,8 +696,8 @@ struct lcs_cmd *cmd; struct timer_list timer; int rc; - char buf[16]; + LCS_DBF_TEXT(4, trace, "sendcmd"); cmd = (struct lcs_cmd *) buffer->data; cmd->sequence_no = ++card->sequence_no; cmd->return_code = 0; @@ -700,9 +720,7 @@ add_timer(&timer); wait_event(reply.wait_q, reply.received); del_timer(&timer); - LCS_DBF_TEXT(5, trace, "sendcmd"); - sprintf(buf, "rc:%d", reply.rc); - LCS_DBF_TEXT(5, trace, buf); + LCS_DBF_TEXT_(4, trace, "rc:%d",reply.rc); return reply.rc ? -EIO : 0; } @@ -747,6 +765,7 @@ static void __lcs_lanstat_cb(struct lcs_card *card, struct lcs_cmd *cmd) { + LCS_DBF_TEXT(2, trace, "statcb"); memcpy(card->mac, cmd->cmd.lcs_lanstat_cmd.mac_addr, LCS_MAC_LENGTH); } @@ -756,7 +775,7 @@ struct lcs_buffer *buffer; struct lcs_cmd *cmd; - LCS_DBF_TEXT(2, trace, "cmdstat"); + LCS_DBF_TEXT(2,trace, "cmdstat"); buffer = lcs_get_lancmd(card, LCS_STD_CMD_SIZE); cmd = (struct lcs_cmd *) buffer->data; /* Setup lanstat command. */ @@ -792,6 +811,7 @@ static void __lcs_send_startlan_cb(struct lcs_card *card, struct lcs_cmd *cmd) { + LCS_DBF_TEXT(2, trace, "srtlancb"); card->lan_type = cmd->cmd.lcs_std_cmd.lan_type; card->portno = cmd->cmd.lcs_std_cmd.portno; } @@ -833,6 +853,7 @@ cmd->cmd.lcs_qipassist.num_ip_pairs = 1; memcpy(cmd->cmd.lcs_qipassist.lcs_ipass_ctlmsg.ip_mac_pair, &ipm_list->ipm, sizeof (struct lcs_ip_mac_pair)); + LCS_DBF_TEXT_(2, trace, "%x",ipm_list->ipm.ip_addr); return lcs_send_lancmd(card, buffer, NULL); } @@ -856,6 +877,7 @@ cmd->cmd.lcs_qipassist.num_ip_pairs = 1; memcpy(cmd->cmd.lcs_qipassist.lcs_ipass_ctlmsg.ip_mac_pair, &ipm_list->ipm, sizeof (struct lcs_ip_mac_pair)); + LCS_DBF_TEXT_(2, trace, "%x",ipm_list->ipm.ip_addr); return lcs_send_lancmd(card, buffer, NULL); } @@ -865,6 +887,7 @@ static void __lcs_check_multicast_cb(struct lcs_card *card, struct lcs_cmd *cmd) { + LCS_DBF_TEXT(2, trace, "chkmccb"); card->ip_assists_supported = cmd->cmd.lcs_qipassist.ip_assists_supported; card->ip_assists_enabled = @@ -919,7 +942,7 @@ card = (struct lcs_card *) data; daemonize("fixipm"); - LCS_DBF_TEXT(5, trace, "fixipm"); + LCS_DBF_TEXT(4,trace, "fixipm"); spin_lock(&card->lock); list_for_each_safe(l, n, &card->ipm_list) { ipm = list_entry(l, struct lcs_ipm_list, list); @@ -952,6 +975,7 @@ static void lcs_get_mac_for_ipm(__u32 ipm, char *mac, struct net_device *dev) { + LCS_DBF_TEXT(4,trace, "getmac"); if (dev->type == ARPHRD_IEEE802_TR) ip_tr_mc_map(ipm, mac); else @@ -971,7 +995,7 @@ struct lcs_ipm_list *ipm, *tmp; struct lcs_card *card; - LCS_DBF_TEXT(5, trace, "setmulti"); + LCS_DBF_TEXT(4, trace, "setmulti"); in4_dev = in_dev_get(dev); if (in4_dev == NULL) return; @@ -1033,21 +1057,18 @@ static void lcs_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) { - char dbf_text[15]; struct lcs_card *card; struct lcs_channel *channel; int index; - card = (struct lcs_card *)cdev->dev.driver_data; + card = CARD_FROM_DEV(cdev); if (card->read.ccwdev == cdev) channel = &card->read; else channel = &card->write; - sprintf(dbf_text, "Rint%s", cdev->dev.bus_id); - LCS_DBF_TEXT(5, trace, dbf_text); - sprintf(dbf_text, "%4x%4x", irb->scsw.cstat, irb->scsw.dstat); - LCS_DBF_TEXT(5, trace, dbf_text); + LCS_DBF_TEXT_(5, trace, "Rint%s",cdev->dev.bus_id); + LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.cstat, irb->scsw.dstat); /* How far in the ccw chain have we processed? */ if ((channel->state != CH_STATE_INIT) && @@ -1084,6 +1105,9 @@ channel->state = CH_STATE_HALTED; } + if (irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) { + channel->state = CH_STATE_CLEARED; + } /* Do the rest in the tasklet. */ tasklet_schedule(&channel->irq_tasklet); } @@ -1094,7 +1118,6 @@ static void lcs_tasklet(unsigned long data) { - char dbf_text[15]; unsigned long flags; struct lcs_channel *channel; struct lcs_buffer *iob; @@ -1102,8 +1125,7 @@ int rc; channel = (struct lcs_channel *) data; - sprintf(dbf_text, "tlet%s", channel->ccwdev->dev.bus_id); - LCS_DBF_TEXT(5, trace, dbf_text); + LCS_DBF_TEXT_(5, trace, "tlet%s",channel->ccwdev->dev.bus_id); /* Check for processed buffers. */ iob = channel->iob; @@ -1137,6 +1159,7 @@ static void __lcs_emit_txbuffer(struct lcs_card *card) { + LCS_DBF_TEXT(5, trace, "emittx"); *(__u16 *)(card->tx_buffer->data + card->tx_buffer->count) = 0; card->tx_buffer->count += 2; lcs_ready_buffer(&card->write, card->tx_buffer); @@ -1152,6 +1175,7 @@ { struct lcs_card *card; + LCS_DBF_TEXT(5, trace, "txbuffcb"); /* Put buffer back to pool. */ lcs_release_buffer(channel, buffer); card = (struct lcs_card *) @@ -1176,6 +1200,7 @@ { struct lcs_header *header; + LCS_DBF_TEXT(5, trace, "hardxmit"); if (skb == NULL) { card->stats.tx_dropped++; card->stats.tx_errors++; @@ -1201,7 +1226,6 @@ /* Get new tx buffer */ card->tx_buffer = lcs_get_buffer(&card->write); if (card->tx_buffer == NULL) { - netif_stop_queue(dev); card->stats.tx_dropped++; return -EBUSY; } @@ -1246,6 +1270,7 @@ { int rc; + LCS_DBF_TEXT(2, trace, "strtauto"); #ifdef CONFIG_NET_ETHERNET card->lan_type = LCS_FRAME_TYPE_ENET; rc = lcs_send_startlan(card, LCS_INITIATOR_TCPIP); @@ -1307,7 +1332,7 @@ { int rc = 0; - LCS_DBF_TEXT(3, setup," lcsdetct"); + LCS_DBF_TEXT(2, setup, "lcsdetct"); /* start/reset card */ if (card->dev) netif_stop_queue(card->dev); @@ -1340,7 +1365,7 @@ { int retries; - LCS_DBF_TEXT(4, trace, "rescard"); + LCS_DBF_TEXT(2, trace, "rescard"); for (retries = 0; retries < 10; retries++) { if (lcs_detect(card) == 0) { netif_wake_queue(card->dev); @@ -1364,13 +1389,16 @@ int rc; LCS_DBF_TEXT(3, setup, "stopcard"); + if (card->read.state != CH_STATE_STOPPED && card->write.state != CH_STATE_STOPPED && - card->state == DEV_STATE_UP) + card->state == DEV_STATE_UP) { rc = lcs_send_stoplan(card,LCS_INITIATOR_TCPIP); - rc = lcs_send_shutdown(card); + rc = lcs_send_shutdown(card); + } rc = lcs_stop_channels(card); card->state = DEV_STATE_DOWN; + return rc; } @@ -1492,6 +1520,7 @@ static void lcs_get_control(struct lcs_card *card, struct lcs_cmd *cmd) { + LCS_DBF_TEXT(5, trace, "getctrl"); if (cmd->initiator == LCS_INITIATOR_LGW) { switch(cmd->cmd_code) { case LCS_CMD_STARTUP: @@ -1522,6 +1551,7 @@ { struct sk_buff *skb; + LCS_DBF_TEXT(5, trace, "getskb"); if (card->dev == NULL || card->state != DEV_STATE_UP) /* The card isn't up. Ignore the packet. */ @@ -1619,6 +1649,7 @@ LCS_DBF_TEXT(2, trace, "stopdev"); card = (struct lcs_card *) dev->priv; netif_stop_queue(dev); + dev->flags &= ~IFF_UP; rc = lcs_stopcard(card); if (rc) PRINT_ERR("Try it again!\n "); @@ -1643,6 +1674,7 @@ PRINT_ERR("LCS:Error in opening device!\n"); } else { + dev->flags |= IFF_UP; netif_wake_queue(dev); card->state = DEV_STATE_UP; } @@ -1757,7 +1789,7 @@ if (!get_device(&ccwgdev->dev)) return -ENODEV; - LCS_DBF_TEXT(3, setup, "add_dev"); + LCS_DBF_TEXT(2, setup, "add_dev"); card = lcs_alloc_card(); if (!card) { PRINT_ERR("Allocation of lcs card failed\n"); @@ -1772,46 +1804,62 @@ return ret; } ccwgdev->dev.driver_data = card; - ccwgdev->cdev[0]->dev.driver_data = card; ccwgdev->cdev[0]->handler = lcs_irq; - ccwgdev->cdev[1]->dev.driver_data = card; ccwgdev->cdev[1]->handler = lcs_irq; return 0; } +static int +lcs_register_netdev(struct ccwgroup_device *ccwgdev) +{ + struct lcs_card *card; + + LCS_DBF_TEXT(2, setup, "regnetdv"); + card = (struct lcs_card *)ccwgdev->dev.driver_data; + if (card->dev->reg_state != NETREG_UNINITIALIZED) + return 0; + SET_NETDEV_DEV(card->dev, &ccwgdev->dev); + return register_netdev(card->dev); +} + /** * lcs_new_device will be called by setting the group device online. */ + static int lcs_new_device(struct ccwgroup_device *ccwgdev) { struct lcs_card *card; - struct net_device *dev; + struct net_device *dev=NULL; + enum lcs_dev_states recover_state; int rc; card = (struct lcs_card *)ccwgdev->dev.driver_data; if (!card) return -ENODEV; + LCS_DBF_TEXT(2, setup, "newdev"); + LCS_DBF_HEX(3, setup, &card, sizeof(void*)); card->read.ccwdev = ccwgdev->cdev[0]; card->write.ccwdev = ccwgdev->cdev[1]; + recover_state = card->state; ccw_device_set_online(card->read.ccwdev); ccw_device_set_online(card->write.ccwdev); LCS_DBF_TEXT(3, setup, "lcsnewdv"); - rc = lcs_setup_card(card); - if (rc) { - LCS_DBF_TEXT(3, setup, "errinit"); - PRINT_ERR("LCS card Initialization failed\n"); - return rc; - } + lcs_setup_card(card); rc = lcs_detect(card); if (rc) { lcs_stopcard(card); lcs_cleanup_card(card); - return -ENODEV; + goto out; + } + if (card->dev) { + LCS_DBF_TEXT(2, setup, "samedev"); + LCS_DBF_HEX(3, setup, &card, sizeof(void*)); + goto netdev_out; } switch (card->lan_type) { #ifdef CONFIG_NET_ETHERNET @@ -1840,27 +1888,34 @@ } if (!dev) goto out; - memcpy(dev->dev_addr, card->mac, LCS_MAC_LENGTH); card->dev = dev; - dev->priv = card; - dev->open = lcs_open_device; - dev->stop = lcs_stop_device; - dev->hard_start_xmit = lcs_start_xmit; +netdev_out: + card->dev->priv = card; + card->dev->open = lcs_open_device; + card->dev->stop = lcs_stop_device; + card->dev->hard_start_xmit = lcs_start_xmit; + card->dev->get_stats = lcs_getstats; + SET_MODULE_OWNER(dev); + if (lcs_register_netdev(ccwgdev) != 0) + goto out; + memcpy(card->dev->dev_addr, card->mac, LCS_MAC_LENGTH); #ifdef CONFIG_IP_MULTICAST if (lcs_check_multicast_support(card)) - dev->set_multicast_list = lcs_set_multicast_list; + card->dev->set_multicast_list = lcs_set_multicast_list; #endif - dev->get_stats = lcs_getstats; - SET_MODULE_OWNER(dev); - if (register_netdev(dev) != 0) - goto out; - /* Create symlinks. */ - SET_NETDEV_DEV(dev, &ccwgdev->dev); + netif_stop_queue(card->dev); + if (recover_state == DEV_STATE_RECOVER) { + card->dev->flags |= IFF_UP; + netif_wake_queue(card->dev); + card->state = DEV_STATE_UP; + } else + lcs_stopcard(card); - netif_stop_queue(dev); - lcs_stopcard(card); return 0; out: + + ccw_device_set_offline(card->read.ccwdev); + ccw_device_set_offline(card->write.ccwdev); lcs_cleanup_card(card); return -ENODEV; } @@ -1872,6 +1927,7 @@ lcs_shutdown_device(struct ccwgroup_device *ccwgdev) { struct lcs_card *card; + enum lcs_dev_states recover_state; int ret; LCS_DBF_TEXT(3, setup, "shtdndev"); @@ -1879,10 +1935,17 @@ if (!card) return -ENODEV; + LCS_DBF_HEX(3, setup, &card, sizeof(void*)); + recover_state = card->state; + ret = lcs_stop_device(card->dev); + ret = ccw_device_set_offline(card->read.ccwdev); + ret = ccw_device_set_offline(card->write.ccwdev); + if (recover_state == DEV_STATE_UP) { + card->state = DEV_STATE_RECOVER; + } if (ret) return ret; - unregister_netdev(card->dev); return 0; } @@ -1894,14 +1957,17 @@ { struct lcs_card *card; - LCS_DBF_TEXT(3, setup, "remdev"); card = (struct lcs_card *)ccwgdev->dev.driver_data; if (!card) return; + + PRINT_INFO("Removing lcs group device ....\n"); + LCS_DBF_TEXT(3, setup, "remdev"); + LCS_DBF_HEX(3, setup, &card, sizeof(void*)); if (ccwgdev->state == CCWGROUP_ONLINE) { - lcs_stop_device(card->dev); /* Ignore rc. */ - unregister_netdev(card->dev); + lcs_shutdown_device(ccwgdev); } + unregister_netdev(card->dev); sysfs_remove_group(&ccwgdev->dev.kobj, &lcs_attr_group); lcs_cleanup_card(card); lcs_free_card(card); diff -Nru a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h --- a/drivers/s390/net/lcs.h Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/net/lcs.h Sun Mar 28 13:12:08 2004 @@ -6,19 +6,36 @@ #include #include -#define VERSION_LCS_H "$Revision: 1.13 $" +#define VERSION_LCS_H "$Revision: 1.15 $" #define LCS_DBF_TEXT(level, name, text) \ do { \ debug_text_event(lcs_dbf_##name, level, text); \ } while (0) +#define LCS_DBF_HEX(level,name,addr,len) \ +do { \ + debug_event(lcs_dbf_##name,level,(void*)(addr),len); \ +} while (0) + +#define LCS_DBF_TEXT_(level,name,text...) \ +do { \ + sprintf(debug_buffer, text); \ + debug_text_event(lcs_dbf_##name,level, debug_buffer);\ +} while (0) + /** * some more definitions for debug or output stuff */ #define PRINTK_HEADER " lcs: " /** + * sysfs related stuff + */ +#define CARD_FROM_DEV(cdev) \ + (struct lcs_card *) \ + ((struct ccwgroup_device *)cdev->dev.driver_data)->dev.driver_data; +/** * CCW commands used in this driver */ #define LCS_CCW_WRITE 0x01 @@ -123,6 +140,7 @@ CH_STATE_STOPPED, CH_STATE_RUNNING, CH_STATE_SUSPENDED, + CH_STATE_CLEARED, }; /** @@ -131,6 +149,7 @@ enum lcs_dev_states { DEV_STATE_DOWN, DEV_STATE_UP, + DEV_STATE_RECOVER, }; /** diff -Nru a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c --- a/drivers/s390/net/netiucv.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/net/netiucv.c Sun Mar 28 13:12:08 2004 @@ -1,5 +1,5 @@ /* - * $Id: netiucv.c,v 1.45 2004/03/15 08:48:48 braunu Exp $ + * $Id: netiucv.c,v 1.47 2004/03/22 07:41:42 braunu Exp $ * * IUCV network driver * @@ -30,7 +30,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: IUCV network driver $Revision: 1.45 $ + * RELEASE-TAG: IUCV network driver $Revision: 1.47 $ * */ @@ -764,7 +764,7 @@ { struct iucv_event *ev = (struct iucv_event *)arg; struct iucv_connection *conn = ev->conn; - + __u16 msglimit; int rc; pr_debug("%s() called\n", __FUNCTION__); @@ -793,10 +793,11 @@ fsm_newstate(fi, CONN_STATE_SETUPWAIT); rc = iucv_connect(&(conn->pathid), NETIUCV_QUEUELEN_DEFAULT, iucvMagic, - conn->userid, iucv_host, 0, NULL, NULL, conn->handle, + conn->userid, iucv_host, 0, NULL, &msglimit, conn->handle, conn); switch (rc) { case 0: + conn->netdev->tx_queue_len = msglimit; return; case 11: printk(KERN_NOTICE @@ -1911,7 +1912,7 @@ static void netiucv_banner(void) { - char vbuf[] = "$Revision: 1.45 $"; + char vbuf[] = "$Revision: 1.47 $"; char *version = vbuf; if ((version = strchr(version, ':'))) { diff -Nru a/drivers/s390/net/qeth.c b/drivers/s390/net/qeth.c --- a/drivers/s390/net/qeth.c Sun Mar 28 13:12:08 2004 +++ b/drivers/s390/net/qeth.c Sun Mar 28 13:12:08 2004 @@ -755,7 +755,7 @@ int problem = 0; struct qeth_card *card; - card = cdev->dev.driver_data; + card = CARD_FROM_CDEV(cdev); if (atomic_read(&card->shutdown_phase)) return 0; @@ -6105,7 +6105,7 @@ sprintf(dbf_text, "%4x", rqparam); QETH_DBF_TEXT4(0, trace, dbf_text); - card = cdev->dev.driver_data; + card = CARD_FROM_CDEV(cdev); if (!card) return; @@ -6231,7 +6231,7 @@ sprintf(dbf_text, "%4x", rqparam); QETH_DBF_TEXT4(0, trace, dbf_text); - card = cdev->dev.driver_data; + card = CARD_FROM_CDEV(cdev); if (!card) return; @@ -6343,7 +6343,7 @@ sprintf(dbf_text, "%4x", rqparam); QETH_DBF_TEXT4(0, trace, dbf_text); - card = cdev->dev.driver_data; + card = CARD_FROM_CDEV(cdev); if (!card) return; @@ -10620,13 +10620,10 @@ card->gdev = gdev; gdev->cdev[0]->handler = qeth_interrupt_handler_read; - gdev->cdev[0]->dev.driver_data = card; gdev->cdev[1]->handler = qeth_interrupt_handler_write; - gdev->cdev[1]->dev.driver_data = card; gdev->cdev[2]->handler = qeth_interrupt_handler_qdio; - gdev->cdev[2]->dev.driver_data = card; ret = __qeth_create_attributes(&gdev->dev); if (ret != 0) diff -Nru a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h --- a/drivers/s390/net/qeth.h Sun Mar 28 13:12:07 2004 +++ b/drivers/s390/net/qeth.h Sun Mar 28 13:12:07 2004 @@ -696,6 +696,8 @@ #define CARD_RDEV_ID(card) card->gdev->cdev[0]->dev.bus_id #define CARD_WDEV_ID(card) card->gdev->cdev[1]->dev.bus_id #define CARD_DDEV_ID(card) card->gdev->cdev[2]->dev.bus_id +#define CARD_FROM_CDEV(cdev) (struct qeth_card *) \ + ((struct ccwgroup_device *) cdev->dev.driver_data)->dev.driver_data #define SENSE_COMMAND_REJECT_BYTE 0 #define SENSE_COMMAND_REJECT_FLAG 0x80 diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig Sun Mar 28 13:12:08 2004 +++ b/drivers/scsi/Kconfig Sun Mar 28 13:12:08 2004 @@ -443,7 +443,7 @@ config SCSI_SATA_SIL tristate "Silicon Image SATA support" - depends on SCSI_SATA && PCI && BROKEN + depends on SCSI_SATA && PCI && EXPERIMENTAL help This option enables support for Silicon Image Serial ATA. diff -Nru a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c --- a/drivers/scsi/sata_via.c Sun Mar 28 13:12:07 2004 +++ b/drivers/scsi/sata_via.c Sun Mar 28 13:12:07 2004 @@ -205,7 +205,7 @@ INIT_LIST_HEAD(&probe_ent->node); probe_ent->pdev = pdev; probe_ent->sht = &svia_sht; - probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET | + probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | ATA_FLAG_NO_LEGACY; probe_ent->port_ops = &svia_sata_ops; probe_ent->n_ports = 2; diff -Nru a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c --- a/drivers/scsi/scsi_transport_spi.c Sun Mar 28 13:12:07 2004 +++ b/drivers/scsi/scsi_transport_spi.c Sun Mar 28 13:12:08 2004 @@ -33,7 +33,7 @@ #include #include -#define SPI_PRINTK(x, l, f, a...) printk(l "scsi(%d:%d:%d:%d): " f, (x)->host->host_no, (x)->channel, (x)->id, (x)->lun, ##a) +#define SPI_PRINTK(x, l, f, a...) printk(l "scsi(%d:%d:%d:%d): " f, (x)->host->host_no, (x)->channel, (x)->id, (x)->lun , ##a) static void transport_class_release(struct class_device *class_dev); diff -Nru a/drivers/scsi/sg.c b/drivers/scsi/sg.c --- a/drivers/scsi/sg.c Sun Mar 28 13:12:07 2004 +++ b/drivers/scsi/sg.c Sun Mar 28 13:12:07 2004 @@ -1256,7 +1256,6 @@ SRpnt->sr_request->rq_disk = NULL; /* "sg" _disowns_ request blk */ srp->my_cmdp = NULL; - srp->done = 1; SCSI_LOG_TIMEOUT(4, printk("sg_cmd_done: %s, pack_id=%d, res=0x%x\n", sdp->disk->disk_name, srp->header.pack_id, (int) SRpnt->sr_result)); @@ -1312,8 +1311,9 @@ } if (sfp && srp) { /* Now wake up any sg_read() that is waiting for this packet. */ - wake_up_interruptible(&sfp->read_wait); kill_fasync(&sfp->async_qp, SIGPOLL, POLL_IN); + srp->done = 1; + wake_up_interruptible(&sfp->read_wait); } } diff -Nru a/drivers/scsi/sr.c b/drivers/scsi/sr.c --- a/drivers/scsi/sr.c Sun Mar 28 13:12:07 2004 +++ b/drivers/scsi/sr.c Sun Mar 28 13:12:07 2004 @@ -575,6 +575,7 @@ goto fail_put; dev_set_drvdata(dev, cd); + disk->flags |= GENHD_FL_REMOVABLE; add_disk(disk); printk(KERN_DEBUG diff -Nru a/drivers/scsi/st.c b/drivers/scsi/st.c --- a/drivers/scsi/st.c Sun Mar 28 13:12:08 2004 +++ b/drivers/scsi/st.c Sun Mar 28 13:12:08 2004 @@ -17,7 +17,7 @@ Last modified: 18-JAN-1998 Richard Gooch Devfs support */ -static char *verstr = "20040226"; +static char *verstr = "20040318"; #include @@ -4193,20 +4193,25 @@ static void do_create_class_files(Scsi_Tape *STp, int dev_num, int mode) { - int rew, error; + int i, rew, error; + char name[10]; struct class_device *st_class_member; if (!st_sysfs_class) return; for (rew=0; rew < 2; rew++) { + /* Make sure that the minor numbers corresponding to the four + first modes always get the same names */ + i = mode << (4 - ST_NBR_MODE_BITS); + snprintf(name, 10, "%s%s%s", rew ? "n" : "", + STp->disk->disk_name, st_formats[i]); st_class_member = class_simple_device_add(st_sysfs_class, MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, rew)), - &STp->device->sdev_gendev, "%s", - STp->modes[mode].cdevs[rew]->kobj.name); - if (!st_class_member) { + &STp->device->sdev_gendev, "%s", name); + if (IS_ERR(st_class_member)) { printk(KERN_WARNING "st%d: class_simple_device_add failed\n", dev_num); goto out; diff -Nru a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c --- a/drivers/serial/8250_pnp.c Sun Mar 28 13:12:07 2004 +++ b/drivers/serial/8250_pnp.c Sun Mar 28 13:12:07 2004 @@ -266,6 +266,8 @@ { "RSS00A0", 0 }, /* Viking 56K FAX INT */ { "RSS0262", 0 }, + /* K56 par,VV,Voice,Speakphone,AudioSpan,PnP */ + { "RSS0250", 0 }, /* SupraExpress 28.8 Data/Fax PnP modem */ { "SUP1310", 0 }, /* SupraExpress 33.6 Data/Fax PnP modem */ @@ -283,6 +285,8 @@ /* 3Com Corp. */ /* Gateway Telepath IIvi 33.6 */ { "USR0000", 0 }, + /* U.S. Robotics Sporster 33.6K Fax INT PnP */ + { "USR0002", 0 }, /* Sportster Vi 14.4 PnP FAX Voicemail */ { "USR0004", 0 }, /* U.S. Robotics 33.6K Voice INT PnP */ @@ -315,6 +319,8 @@ { "USR9180", 0 }, /* U.S. Robotics 56K Voice INT PnP*/ { "USR9190", 0 }, + /* Rockwell's (PORALiNK) 33600 INT PNP */ + { "WCI0003", 0 }, /* Unkown PnP modems */ { "PNPCXXX", UNKNOWN_DEV }, /* More unkown PnP modems */ diff -Nru a/drivers/serial/Kconfig b/drivers/serial/Kconfig --- a/drivers/serial/Kconfig Sun Mar 28 13:12:08 2004 +++ b/drivers/serial/Kconfig Sun Mar 28 13:12:08 2004 @@ -1,7 +1,7 @@ # # Serial device configuration # -# $Id: Config.in,v 1.15 2002/07/06 17:16:24 rmk Exp $ +# $Id: Kconfig,v 1.11 2004/03/11 18:08:04 lethal Exp $ # menu "Serial drivers" @@ -174,32 +174,6 @@ system, say Y to this option. The driver can handle 1, 2, or 3 port cards. If unsure, say N. -config SERIAL_ANAKIN - bool "Anakin serial port support" - depends on ARM && ARCH_ANAKIN - select SERIAL_CORE - help - ::: To be written ::: - -config SERIAL_ANAKIN_CONSOLE - bool "Console on Anakin serial port" - depends on SERIAL_ANAKIN - select SERIAL_CORE_CONSOLE - help - Even if you say Y here, the currently visible virtual console - (/dev/tty0) will still be used as the system console by default, but - you can alter that using a kernel command line option such as - "console=ttyAN0". (Try "man bootparam" or see the documentation of - your boot loader (lilo or loadlin) about how to pass options to the - kernel at boot time.) - -config ANAKIN_DEFAULT_BAUDRATE - int "Default Anakin serial baudrate" - depends on SERIAL_ANAKIN - default "9600" - help - ::: To be written ::: - config SERIAL_AMBA tristate "ARM AMBA serial port support" depends on ARM_AMBA @@ -501,6 +475,16 @@ config SERIAL98_CONSOLE bool "Support for console on PC-9800 standard serial port" depends on SERIAL98=y + select SERIAL_CORE_CONSOLE + +config SERIAL_SH_SCI + tristate "SH SCI(F) serial port support" + depends on SUPERH + select SERIAL_CORE + +config SERIAL_SH_SCI_CONSOLE + bool "Support for console on SH SCI(F)" + depends on SERIAL_SH_SCI=y select SERIAL_CORE_CONSOLE config SERIAL_AU1X00 diff -Nru a/drivers/serial/Makefile b/drivers/serial/Makefile --- a/drivers/serial/Makefile Sun Mar 28 13:12:08 2004 +++ b/drivers/serial/Makefile Sun Mar 28 13:12:08 2004 @@ -16,7 +16,6 @@ obj-$(CONFIG_SERIAL_8250) += 8250.o $(serial-8250-y) obj-$(CONFIG_SERIAL_8250_CS) += serial_cs.o obj-$(CONFIG_SERIAL_8250_ACORN) += 8250_acorn.o -obj-$(CONFIG_SERIAL_ANAKIN) += anakin.o obj-$(CONFIG_SERIAL_AMBA) += amba.o obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o obj-$(CONFIG_SERIAL_PXA) += pxa.o @@ -36,3 +35,4 @@ obj-$(CONFIG_SERIAL_PMACZILOG) += pmac_zilog.o obj-$(CONFIG_SERIAL_AU1X00) += au1x00_uart.o obj-$(CONFIG_SERIAL_DZ) += dz.o +obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o diff -Nru a/drivers/serial/anakin.c b/drivers/serial/anakin.c --- a/drivers/serial/anakin.c Sun Mar 28 13:12:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,545 +0,0 @@ -/* - * linux/drivers/char/anakin.c - * - * Based on driver for AMBA serial ports, by ARM Limited, - * Deep Blue Solutions Ltd., Linus Torvalds and Theodore Ts'o. - * - * Copyright (C) 2001 Aleph One Ltd. for Acunia N.V. - * - * Copyright (C) 2001 Blue Mug, Inc. for Acunia N.V. - * - * 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. - * - * Changelog: - * 20-Apr-2001 TTC Created - * 05-May-2001 W/TTC Updated for serial_core.c - * 27-Jun-2001 jonm Minor changes; add mctrl support, switch to - * SA_INTERRUPT. Works reliably now. No longer requires - * changes to the serial_core API. - * - * $Id: anakin.c,v 1.32 2002/07/28 10:03:27 rmk Exp $ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include - -#define UART_NR 5 - -#define SERIAL_ANAKIN_NAME "ttyAN" -#define SERIAL_ANAKIN_MAJOR 204 -#define SERIAL_ANAKIN_MINOR 32 - -static unsigned int txenable[NR_IRQS]; /* Software interrupt register */ - -static inline unsigned int -anakin_in(struct uart_port *port, unsigned int offset) -{ - return __raw_readl(port->base + offset); -} - -static inline void -anakin_out(struct uart_port *port, unsigned int offset, unsigned int value) -{ - __raw_writel(value, port->base + offset); -} - -static void -anakin_stop_tx(struct uart_port *port, unsigned int tty_stop) -{ - txenable[port->irq] = 0; -} - -static inline void -anakin_transmit_buffer(struct uart_port *port) -{ - struct circ_buf *xmit = &port->info->xmit; - - while (!(anakin_in(port, 0x10) & TXEMPTY)) - barrier(); - anakin_out(port, 0x14, xmit->buf[xmit->tail]); - anakin_out(port, 0x18, anakin_in(port, 0x18) | SENDREQUEST); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE-1); - port->icount.tx++; - - if (uart_circ_empty(xmit)) - anakin_stop_tx(port, 0); -} - -static inline void -anakin_transmit_x_char(struct uart_port *port) -{ - anakin_out(port, 0x14, port->x_char); - anakin_out(port, 0x18, anakin_in(port, 0x18) | SENDREQUEST); - port->icount.tx++; - port->x_char = 0; -} - -static void -anakin_start_tx(struct uart_port *port, unsigned int tty_start) -{ - // is it this... or below - if (!txenable[port->irq]) { - txenable[port->irq] = TXENABLE; - - if ((anakin_in(port, 0x10) & TXEMPTY)) { - anakin_transmit_buffer(port); - } - } -} - -static void -anakin_stop_rx(struct uart_port *port) -{ - while (anakin_in(port, 0x10) & RXRELEASE) - anakin_in(port, 0x14); - anakin_out(port, 0x18, anakin_in(port, 0x18) | BLOCKRX); -} - -static void -anakin_enable_ms(struct uart_port *port) -{ -} - -static inline void -anakin_rx_chars(struct uart_port *port) -{ - unsigned int ch; - struct tty_struct *tty = port->info->tty; - - if (!(anakin_in(port, 0x10) & RXRELEASE)) - return; - - ch = anakin_in(port, 0x14) & 0xff; - - if (tty->flip.count < TTY_FLIPBUF_SIZE) { - *tty->flip.char_buf_ptr++ = ch; - *tty->flip.flag_buf_ptr++ = TTY_NORMAL; - port->icount.rx++; - tty->flip.count++; - } - tty_flip_buffer_push(tty); -} - -static inline void -anakin_overrun_chars(struct uart_port *port) -{ - unsigned int ch; - - ch = anakin_in(port, 0x14); - port->icount.overrun++; -} - -static inline void -anakin_tx_chars(struct uart_port *port) -{ - struct circ_buf *xmit = &port->info->xmit; - - if (port->x_char) { - anakin_transmit_x_char(port); - return; - } - - if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - anakin_stop_tx(port, 0); - return; - } - - anakin_transmit_buffer(port); - - if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) - uart_write_wakeup(port); -} - -static void -anakin_int(int irq, void *dev_id, struct pt_regs *regs) -{ - unsigned int status; - struct uart_port *port = dev_id; - - status = anakin_in(port, 0x1c); - - if (status & RX) - anakin_rx_chars(port); - - if (status & OVERRUN) - anakin_overrun_chars(port); - - if (txenable[port->irq] && (status & TX)) - anakin_tx_chars(port); -} - -static unsigned int -anakin_tx_empty(struct uart_port *port) -{ - return anakin_in(port, 0x10) & TXEMPTY ? TIOCSER_TEMT : 0; -} - -static unsigned int -anakin_get_mctrl(struct uart_port *port) -{ - unsigned int status = 0; - - status |= (anakin_in(port, 0x10) & CTS ? TIOCM_CTS : 0); - status |= (anakin_in(port, 0x18) & DCD ? TIOCM_CAR : 0); - status |= (anakin_in(port, 0x18) & DTR ? TIOCM_DTR : 0); - status |= (anakin_in(port, 0x18) & RTS ? TIOCM_RTS : 0); - - return status; -} - -static void -anakin_set_mctrl(struct uart_port *port, unsigned int mctrl) -{ - unsigned int status; - - status = anakin_in(port, 0x18); - - if (mctrl & TIOCM_RTS) - status |= RTS; - else - status &= ~RTS; - - if (mctrl & TIOCM_CAR) - status |= DCD; - else - status &= ~DCD; - - anakin_out(port, 0x18, status); -} - -static void -anakin_break_ctl(struct uart_port *port, int break_state) -{ - unsigned long flags; - unsigned int status; - - spin_lock_irqsave(&port->lock, flags); - status = anakin_in(port, 0x20); - - if (break_state == -1) - status |= SETBREAK; - else - status &= ~SETBREAK; - - anakin_out(port, 0x20, status); - spin_unlock_irqrestore(&port->lock, flags); -} - -static int anakin_startup(struct uart_port *port) -{ - int retval; - unsigned int read,write; - - /* - * Allocate the IRQ - */ - retval = request_irq(port->irq, anakin_int, SA_INTERRUPT, - "serial_anakin", port); - if (retval) - return retval; - - /* - * initialise the old status of the modem signals - */ - port->old_status = 0; - - /* - * Finally, disable IRQ and softIRQs for first byte) - */ - txenable[port->irq] = 0; - read = anakin_in(port, 0x18); - write = (read & ~(RTS | DTR | BLOCKRX)) | IRQENABLE; - anakin_out(port, 0x18, write); - - return 0; -} - -static void anakin_shutdown(struct uart_port *port) -{ - /* - * Free the interrupt - */ - free_irq(port->irq, port); - - /* - * disable all interrupts, disable the port - */ - anakin_out(port, 0x18, anakin_in(port, 0x18) & ~IRQENABLE); -} - -static void -anakin_set_termios(struct uart_port *port, struct termios *termios, - struct termios *old) -{ - unsigned long flags; - unsigned int baud, quot; - - /* - * We don't support parity, stop bits, or anything other - * than 8 bits, so clear these termios flags. - */ - termios->c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD | CREAD); - termios->c_cflag |= CS8; - - /* - * We don't appear to support any error conditions either. - */ - termios->c_iflag &= ~(INPCK | IGNPAR | IGNBRK | BRKINT); - - /* - * Ask the core to calculate the divisor for us. - */ - baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); - quot = uart_get_divisor(port, baud); - - spin_lock_irqsave(&port->lock, flags); - - uart_update_timeout(port, termios->c_cflag, baud); - - while (!(anakin_in(port, 0x10) & TXEMPTY)) - barrier(); - - anakin_out(port, 0x10, (anakin_in(port, 0x10) & ~PRESCALER) - | (quot << 3)); - - //parity always set to none - anakin_out(port, 0x18, anakin_in(port, 0x18) & ~PARITY); - spin_unlock_irqrestore(&port->lock, flags); -} - -static const char *anakin_type(struct port *port) -{ - return port->type == PORT_ANAKIN ? "ANAKIN" : NULL; -} - -static struct uart_ops anakin_pops = { - .tx_empty = anakin_tx_empty, - .set_mctrl = anakin_set_mctrl, - .get_mctrl = anakin_get_mctrl, - .stop_tx = anakin_stop_tx, - .start_tx = anakin_start_tx, - .stop_rx = anakin_stop_rx, - .enable_ms = anakin_enable_ms, - .break_ctl = anakin_break_ctl, - .startup = anakin_startup, - .shutdown = anakin_shutdown, - .set_termios = anakin_set_termios, - .type = anakin_type, -}; - -static struct uart_port anakin_ports[UART_NR] = { - { - .base = IO_BASE + UART0, - .irq = IRQ_UART0, - .uartclk = 3686400, - .fifosize = 0, - .ops = &anakin_pops, - .flags = ASYNC_BOOT_AUTOCONF, - .line = 0, - }, - { - .base = IO_BASE + UART1, - .irq = IRQ_UART1, - .uartclk = 3686400, - .fifosize = 0, - .ops = &anakin_pops, - .flags = ASYNC_BOOT_AUTOCONF, - .line = 1, - }, - { - .base = IO_BASE + UART2, - .irq = IRQ_UART2, - .uartclk = 3686400, - .fifosize = 0, - .ops = &anakin_pops, - .flags = ASYNC_BOOT_AUTOCONF, - .line = 2, - }, - { - .base = IO_BASE + UART3, - .irq = IRQ_UART3, - .uartclk = 3686400, - .fifosize = 0, - .ops = &anakin_pops, - .flags = ASYNC_BOOT_AUTOCONF, - .line = 3, - }, - { - .base = IO_BASE + UART4, - .irq = IRQ_UART4, - .uartclk = 3686400, - .fifosize = 0, - .ops = &anakin_pops, - .flags = ASYNC_BOOT_AUTOCONF, - .line = 4, - }, -}; - - -#ifdef CONFIG_SERIAL_ANAKIN_CONSOLE - -static void -anakin_console_write(struct console *co, const char *s, unsigned int count) -{ - struct uart_port *port = &anakin_ports[co->index]; - unsigned int flags, status, i; - - /* - * First save the status then disable the interrupts - */ - local_irq_save(flags); - status = anakin_in(port, 0x18); - anakin_out(port, 0x18, status & ~IRQENABLE); - local_irq_restore(flags); - - /* - * Now, do each character - */ - for (i = 0; i < count; i++, s++) { - while (!(anakin_in(port, 0x10) & TXEMPTY)) - barrier(); - - /* - * Send the character out. - * If a LF, also do CR... - */ - anakin_out(port, 0x14, *s); - anakin_out(port, 0x18, anakin_in(port, 0x18) | SENDREQUEST); - - if (*s == 10) { - while (!(anakin_in(port, 0x10) & TXEMPTY)) - barrier(); - anakin_out(port, 0x14, 13); - anakin_out(port, 0x18, anakin_in(port, 0x18) - | SENDREQUEST); - } - } - - /* - * Finally, wait for transmitter to become empty - * and restore the interrupts - */ - while (!(anakin_in(port, 0x10) & TXEMPTY)) - barrier(); - - if (status & IRQENABLE) { - local_irq_save(flags); - anakin_out(port, 0x18, anakin_in(port, 0x18) | IRQENABLE); - local_irq_restore(flags); - } -} - -/* - * Read the current UART setup. - */ -static void __init -anakin_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits) -{ - int paritycode; - - *baud = GETBAUD (anakin_in(port, 0x10) & PRESCALER); - paritycode = GETPARITY(anakin_in(port, 0x18) & PARITY); - switch (paritycode) { - case NONEPARITY: *parity = 'n'; break; - case ODDPARITY: *parity = 'o'; break; - case EVENPARITY: *parity = 'e'; break; - } - *bits = 8; -} - -static int __init -anakin_console_setup(struct console *co, char *options) -{ - struct uart_port *port; - int baud = CONFIG_ANAKIN_DEFAULT_BAUDRATE; - int bits = 8; - int parity = 'n'; - - /* - * Check whether an invalid uart number has been specified, and - * if so, search for the first available port that does have - * console support. - */ - if (co->index >= UART_NR) - co->index = 0; - port = &anakin_ports[co->index]; - - if (options) - uart_parse_options(options, &baud, &parity, &bits); - else - anakin_console_get_options(port, &baud, &parity, &bits); - - return uart_set_options(port, co, baud, parity, bits); -} - -extern struct uart_driver anakin_reg; -static struct console anakin_console = { - .name = SERIAL_ANAKIN_NAME, - .write = anakin_console_write, - .device = uart_console_device, - .setup = anakin_console_setup, - .flags = CON_PRINTBUFFER, - .index = -1, -}; - -static int __init anakin_console_init(void) -{ - register_console(&anakin_console); - return 0; -} -console_initcall(anakin_console_init); - -#define ANAKIN_CONSOLE &anakin_console -#else -#define ANAKIN_CONSOLE NULL -#endif - -static struct uart_driver anakin_reg = { - .driver_name = SERIAL_ANAKIN_NAME, - .dev_name = SERIAL_ANAKIN_NAME, - .major = SERIAL_ANAKIN_MAJOR, - .minor = SERIAL_ANAKIN_MINOR, - .nr = UART_NR, - .cons = ANAKIN_CONSOLE, -}; - -static int __init -anakin_init(void) -{ - int ret; - - printk(KERN_INFO "Serial: Anakin driver $Revision: 1.32 $\n"); - - ret = uart_register_driver(&anakin_reg); - if (ret == 0) { - int i; - - for (i = 0; i < UART_NR; i++) - uart_add_one_port(&anakin_reg, &anakin_ports[i]); - } - return ret; -} - -__initcall(anakin_init); - -MODULE_DESCRIPTION("Anakin serial driver"); -MODULE_AUTHOR("Tak-Shing Chan "); -MODULE_SUPPORTED_DEVICE("ttyAN"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_CHARDEV(SERIAL_ANAKIN_MAJOR, SERIAL_ANAKIN_MINOR); diff -Nru a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c --- a/drivers/serial/pmac_zilog.c Sun Mar 28 13:12:07 2004 +++ b/drivers/serial/pmac_zilog.c Sun Mar 28 13:12:07 2004 @@ -1563,15 +1563,21 @@ static int pmz_suspend(struct macio_dev *mdev, u32 pm_state) { struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev); - struct uart_state *state = pmz_uart_reg.state + uap->port.line; + struct uart_state *state; unsigned long flags; - if (uap == NULL) + if (uap == NULL) { + printk("HRM... pmz_suspend with NULL uap\n"); return 0; + } if (pm_state == mdev->ofdev.dev.power_state || pm_state < 2) return 0; + pmz_debug("suspend, switching to state %d\n", pm_state); + + state = pmz_uart_reg.state + uap->port.line; + down(&pmz_irq_sem); down(&state->sem); @@ -1607,6 +1613,8 @@ up(&state->sem); up(&pmz_irq_sem); + pmz_debug("suspend, switching complete\n"); + mdev->ofdev.dev.power_state = pm_state; return 0; @@ -1616,9 +1624,9 @@ static int pmz_resume(struct macio_dev *mdev) { struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev); - struct uart_state *state = pmz_uart_reg.state + uap->port.line; + struct uart_state *state; unsigned long flags; - int pwr_delay; + int pwr_delay = 0; if (uap == NULL) return 0; @@ -1626,6 +1634,10 @@ if (mdev->ofdev.dev.power_state == 0) return 0; + pmz_debug("resume, switching to state 0\n"); + + state = pmz_uart_reg.state + uap->port.line; + down(&pmz_irq_sem); down(&state->sem); @@ -1658,6 +1670,7 @@ enable_irq(uap->port.irq); } + bail: up(&state->sem); up(&pmz_irq_sem); @@ -1670,7 +1683,8 @@ schedule_timeout((pwr_delay * HZ)/1000); } - bail: + pmz_debug("resume, switching complete\n"); + mdev->ofdev.dev.power_state = 0; return 0; diff -Nru a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/serial/sh-sci.c Sun Mar 28 13:12:08 2004 @@ -0,0 +1,1503 @@ +/* + * drivers/serial/sh-sci.c + * + * SuperH on-chip serial module support. (SCI with no FIFO / with FIFO) + * + * Copyright (C) 2002, 2003 Paul Mundt + * + * based off of the old drivers/char/sh-sci.c by: + * + * Copyright (C) 1999, 2000 Niibe Yutaka + * Copyright (C) 2000 Sugioka Toshinobu + * Modified to support multiple serial ports. Stuart Menefy (May 2000). + * Modified to support SecureEdge. David McCullough (2002) + * Modified to support SH7300 SCIF. Takashi Kusuda (Jun 2003). + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#define DEBUG +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_CPU_FREQ +#include +#include +#endif + +#include +#include +#include +#include +#include + +#include + +#ifdef CONFIG_SH_STANDARD_BIOS +#include +#endif + +#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#define SUPPORT_SYSRQ +#endif + +#include "sh-sci.h" + +#ifdef CONFIG_SH_KGDB +#include + +static int kgdb_get_char(struct sci_port *port); +static void kgdb_put_char(struct sci_port *port, char c); +static void kgdb_handle_error(struct sci_port *port); +static struct sci_port *kgdb_sci_port; +#endif /* CONFIG_SH_KGDB */ + +#ifdef CONFIG_SERIAL_SH_SCI_CONSOLE +static struct sci_port *serial_console_port = 0; +#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ + +/* Function prototypes */ +static void sci_stop_tx(struct uart_port *port, unsigned int tty_stop); +static void sci_start_tx(struct uart_port *port, unsigned int tty_start); +static void sci_start_rx(struct uart_port *port, unsigned int tty_start); +static void sci_stop_rx(struct uart_port *port); +static int sci_request_irq(struct sci_port *port); +static void sci_free_irq(struct sci_port *port); + +static struct sci_port sci_ports[SCI_NPORTS]; +static struct uart_driver sci_uart_driver; + +#if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) + +static void handle_error(struct sci_port *port) +{ /* Clear error flags */ + sci_out(port, SCxSR, SCxSR_ERROR_CLEAR(port)); +} + +static int get_char(struct sci_port *port) +{ + unsigned long flags; + unsigned short status; + int c; + + local_irq_save(flags); + do { + status = sci_in(port, SCxSR); + if (status & SCxSR_ERRORS(port)) { + handle_error(port); + continue; + } + } while (!(status & SCxSR_RDxF(port))); + c = sci_in(port, SCxRDR); + sci_in(port, SCxSR); /* Dummy read */ + sci_out(port, SCxSR, SCxSR_RDxF_CLEAR(port)); + local_irq_restore(flags); + + return c; +} + +/* Taken from sh-stub.c of GDB 4.18 */ +static const char hexchars[] = "0123456789abcdef"; + +static __inline__ char highhex(int x) +{ + return hexchars[(x >> 4) & 0xf]; +} + +static __inline__ char lowhex(int x) +{ + return hexchars[x & 0xf]; +} + +#endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ + +/* + * Send the packet in buffer. The host gets one chance to read it. + * This routine does not wait for a positive acknowledge. + */ + +#ifdef CONFIG_SERIAL_SH_SCI_CONSOLE +static void put_char(struct uart_port *port, char c) +{ + unsigned long flags; + unsigned short status; + + local_irq_save(flags); + + do { + status = sci_in(port, SCxSR); + } while (!(status & SCxSR_TDxE(port))); + + sci_out(port, SCxTDR, c); + sci_in(port, SCxSR); /* Dummy read */ + sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); + + local_irq_restore(flags); +} + +static void put_string(struct sci_port *sci_port, const char *buffer, int count) +{ + struct uart_port *port = &sci_port->port; + const unsigned char *p = buffer; + int i; + +#if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) + int checksum; + int usegdb=0; + +#ifdef CONFIG_SH_STANDARD_BIOS + /* This call only does a trap the first time it is + * called, and so is safe to do here unconditionally + */ + usegdb |= sh_bios_in_gdb_mode(); +#endif +#ifdef CONFIG_SH_KGDB + usegdb |= (kgdb_in_gdb_mode && (port == kgdb_sci_port)); +#endif + + if (usegdb) { + /* $#. */ + do { + unsigned char c; + put_char(port, '$'); + put_char(port, 'O'); /* 'O'utput to console */ + checksum = 'O'; + + for (i=0; ibase - SMR0) >> 3; + unsigned char mask = 1 << (ch+1); + + if (ctrl == sci_disable) { + *mstpcrl |= mask; + } else { + *mstpcrl &= ~mask; + } +} +#endif + +#if defined(SCI_ONLY) || defined(SCI_AND_SCIF) +#if defined(__H8300H__) || defined(__H8300S__) +static void sci_init_pins_sci(struct sci_port* port, unsigned int cflag) +{ + int ch = (port->base - SMR0) >> 3; + + /* set DDR regs */ + H8300_GPIO_DDR(h8300_sci_pins[ch].port,h8300_sci_pins[ch].rx,H8300_GPIO_INPUT); + H8300_GPIO_DDR(h8300_sci_pins[ch].port,h8300_sci_pins[ch].tx,H8300_GPIO_OUTPUT); + /* tx mark output*/ + H8300_SCI_DR(ch) |= h8300_sci_pins[ch].tx; +} +#else +static void sci_init_pins_sci(struct uart_port *port, unsigned int cflag) +{ +} +#endif +#endif + +#if defined(SCIF_ONLY) || defined(SCI_AND_SCIF) +#if defined(CONFIG_CPU_SH3) +/* For SH7707, SH7709, SH7709A, SH7729 */ +static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) +{ + unsigned int fcr_val = 0; + + { + unsigned short data; + + /* We need to set SCPCR to enable RTS/CTS */ + data = ctrl_inw(SCPCR); + /* Clear out SCP7MD1,0, SCP6MD1,0, SCP4MD1,0*/ + ctrl_outw(data&0x0fcf, SCPCR); + } + if (cflag & CRTSCTS) + fcr_val |= SCFCR_MCE; + else { + unsigned short data; + + /* We need to set SCPCR to enable RTS/CTS */ + data = ctrl_inw(SCPCR); + /* Clear out SCP7MD1,0, SCP4MD1,0, + Set SCP6MD1,0 = {01} (output) */ + ctrl_outw((data&0x0fcf)|0x1000, SCPCR); + + data = ctrl_inb(SCPDR); + /* Set /RTS2 (bit6) = 0 */ + ctrl_outb(data&0xbf, SCPDR); + } + sci_out(port, SCFCR, fcr_val); +} + +static void sci_init_pins_irda(struct uart_port *port, unsigned int cflag) +{ + unsigned int fcr_val = 0; + + if (cflag & CRTSCTS) + fcr_val |= SCFCR_MCE; + + sci_out(port, SCFCR, fcr_val); +} + +#else + +/* For SH7750 */ +static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) +{ + unsigned int fcr_val = 0; + + if (cflag & CRTSCTS) { + fcr_val |= SCFCR_MCE; + } else { + ctrl_outw(0x0080, SCSPTR2); /* Set RTS = 1 */ + } + sci_out(port, SCFCR, fcr_val); +} + +#endif +#endif /* SCIF_ONLY || SCI_AND_SCIF */ + +/* ********************************************************************** * + * the interrupt related routines * + * ********************************************************************** */ + +static void sci_transmit_chars(struct uart_port *port) +{ + struct circ_buf *xmit = &port->info->xmit; + unsigned int stopped = uart_tx_stopped(port); + unsigned long flags; + unsigned short status; + unsigned short ctrl; + int count, txroom; + + status = sci_in(port, SCxSR); + if (!(status & SCxSR_TDxE(port))) { + local_irq_save(flags); + ctrl = sci_in(port, SCSCR); + if (uart_circ_empty(xmit)) { + ctrl &= ~SCI_CTRL_FLAGS_TIE; + } else { + ctrl |= SCI_CTRL_FLAGS_TIE; + } + sci_out(port, SCSCR, ctrl); + local_irq_restore(flags); + return; + } + + if (port->type == PORT_SCIF) { + txroom = 16 - (sci_in(port, SCFDR)>>8); + } else { + txroom = (sci_in(port, SCxSR) & SCI_TDRE)?1:0; + } + + count = txroom; + + do { + unsigned char c; + + if (port->x_char) { + c = port->x_char; + port->x_char = 0; + } else if (!uart_circ_empty(xmit) && !stopped) { + c = xmit->buf[xmit->tail]; + xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + } else { + break; + } + + sci_out(port, SCxTDR, c); + + port->icount.tx++; + } while (--count > 0); + + sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); + + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) + uart_write_wakeup(port); + if (uart_circ_empty(xmit)) { + sci_stop_tx(port, 0); + } else { + local_irq_save(flags); + ctrl = sci_in(port, SCSCR); + + if (port->type == PORT_SCIF) { + sci_in(port, SCxSR); /* Dummy read */ + sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); + } + + ctrl |= SCI_CTRL_FLAGS_TIE; + sci_out(port, SCSCR, ctrl); + local_irq_restore(flags); + } +} + +/* On SH3, SCIF may read end-of-break as a space->mark char */ +#define STEPFN(c) ({int __c=(c); (((__c-1)|(__c)) == -1); }) + +static inline void sci_receive_chars(struct uart_port *port, + struct pt_regs *regs) +{ + struct tty_struct *tty = port->info->tty; + int i, count, copied = 0; + unsigned short status; + + status = sci_in(port, SCxSR); + if (!(status & SCxSR_RDxF(port))) + return; + + while (1) { + if (port->type == PORT_SCIF) { + count = sci_in(port, SCFDR)&0x001f; + } else { + count = (sci_in(port, SCxSR)&SCxSR_RDxF(port))?1:0; + } + + /* Don't copy more bytes than there is room for in the buffer */ + if (tty->flip.count + count > TTY_FLIPBUF_SIZE) + count = TTY_FLIPBUF_SIZE - tty->flip.count; + + /* If for any reason we can't copy more data, we're done! */ + if (count == 0) + break; + + if (port->type == PORT_SCI) { + char c = sci_in(port, SCxRDR); + if(((struct sci_port *)port)->break_flag + || uart_handle_sysrq_char(port, c, regs)) { + count = 0; + } else { + tty->flip.char_buf_ptr[0] = c; + tty->flip.flag_buf_ptr[0] = TTY_NORMAL; + } + } else { + for (i=0; ibreak_flag) { + if ((c == 0) && + (status & SCxSR_FER(port))) { + count--; i--; + continue; + } + /* Nonzero => end-of-break */ + pr_debug("scif: debounce<%02x>\n", c); + ((struct sci_port *)port)->break_flag = 0; + if (STEPFN(c)) { + count--; i--; + continue; + } + } +#endif /* CONFIG_CPU_SH3 */ + if (uart_handle_sysrq_char(port, c, regs)) { + count--; i--; + continue; + } + + /* Store data and status */ + tty->flip.char_buf_ptr[i] = c; + if (status&SCxSR_FER(port)) { + tty->flip.flag_buf_ptr[i] = TTY_FRAME; + pr_debug("sci: frame error\n"); + } else if (status&SCxSR_PER(port)) { + tty->flip.flag_buf_ptr[i] = TTY_PARITY; + pr_debug("sci: parity error\n"); + } else { + tty->flip.flag_buf_ptr[i] = TTY_NORMAL; + } + } + } + + sci_in(port, SCxSR); /* dummy read */ + sci_out(port, SCxSR, SCxSR_RDxF_CLEAR(port)); + + /* Update the kernel buffer end */ + tty->flip.count += count; + tty->flip.char_buf_ptr += count; + tty->flip.flag_buf_ptr += count; + copied += count; + port->icount.rx += count; + } + + if (copied) { + /* Tell the rest of the system the news. New characters! */ + tty_flip_buffer_push(tty); + } else { + sci_in(port, SCxSR); /* dummy read */ + sci_out(port, SCxSR, SCxSR_RDxF_CLEAR(port)); + } +} + +#define SCI_BREAK_JIFFIES (HZ/20) +/* The sci generates interrupts during the break, + * 1 per millisecond or so during the break period, for 9600 baud. + * So dont bother disabling interrupts. + * But dont want more than 1 break event. + * Use a kernel timer to periodically poll the rx line until + * the break is finished. + */ +static void sci_schedule_break_timer(struct sci_port *port) +{ + port->break_timer.expires = jiffies + SCI_BREAK_JIFFIES; + add_timer(&port->break_timer); +} +/* Ensure that two consecutive samples find the break over. */ +static void sci_break_timer(unsigned long data) +{ + struct sci_port * port = (struct sci_port *)data; + if(sci_rxd_in(&port->port) == 0) { + port->break_flag = 1; + sci_schedule_break_timer(port); + } else if(port->break_flag == 1){ + /* break is over. */ + port->break_flag = 2; + sci_schedule_break_timer(port); + } else port->break_flag = 0; +} + +static inline int sci_handle_errors(struct uart_port *port) +{ + int copied = 0; + unsigned short status = sci_in(port, SCxSR); + struct tty_struct *tty = port->info->tty; + + if (status&SCxSR_ORER(port) && tty->flip.countflip.flag_buf_ptr++ = TTY_OVERRUN; + pr_debug("sci: overrun error\n"); + } + + if (status&SCxSR_FER(port) && tty->flip.countbreak_flag) { + sci_port->break_flag = 1; + sci_schedule_break_timer((struct sci_port *)port); + /* Do sysrq handling. */ + if(uart_handle_break(port)) { + return 0; + } + pr_debug("sci: BREAK detected\n"); + copied++; + *tty->flip.flag_buf_ptr++ = TTY_BREAK; + } + } + else { + /* frame error */ + copied++; + *tty->flip.flag_buf_ptr++ = TTY_FRAME; + pr_debug("sci: frame error\n"); + } + } + + if (status&SCxSR_PER(port) && tty->flip.countflip.flag_buf_ptr++ = TTY_PARITY; + pr_debug("sci: parity error\n"); + } + + if (copied) { + tty->flip.count += copied; + tty_flip_buffer_push(tty); + } + + return copied; +} + +static inline int sci_handle_breaks(struct uart_port *port) +{ + int copied = 0; + unsigned short status = sci_in(port, SCxSR); + struct tty_struct *tty = port->info->tty; + struct sci_port *s = &sci_ports[port->line]; + + if (!s->break_flag && status & SCxSR_BRK(port) && + tty->flip.count < TTY_FLIPBUF_SIZE) { +#if defined(CONFIG_CPU_SH3) + /* Debounce break */ + s->break_flag = 1; +#endif + /* Notify of BREAK */ + copied++; + *tty->flip.flag_buf_ptr++ = TTY_BREAK; + pr_debug("sci: BREAK detected\n"); + } + +#if defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_ST40STB1) || \ + defined(CONFIG_CPU_SUBTYPE_SH7760) + /* XXX: Handle SCIF overrun error */ + if (port->type == PORT_SCIF && (sci_in(port, SCLSR) & SCIF_ORER) != 0) { + sci_out(port, SCLSR, 0); + if(tty->flip.countflip.flag_buf_ptr++ = TTY_OVERRUN; + pr_debug("sci: overrun error\n"); + } + } +#endif + + if (copied) { + tty->flip.count += copied; + tty_flip_buffer_push(tty); + } + + return copied; +} + +static irqreturn_t sci_rx_interrupt(int irq, void *ptr, struct pt_regs *regs) +{ + struct uart_port *port = ptr; + + /* I think sci_receive_chars has to be called irrespective + * of whether the I_IXOFF is set, otherwise, how is the interrupt + * to be disabled? + */ + sci_receive_chars(port, regs); + + return IRQ_HANDLED; +} + +static irqreturn_t sci_tx_interrupt(int irq, void *ptr, struct pt_regs *regs) +{ + struct uart_port *port = ptr; + + sci_transmit_chars(port); + + return IRQ_HANDLED; +} + +static irqreturn_t sci_er_interrupt(int irq, void *ptr, struct pt_regs *regs) +{ + struct uart_port *port = ptr; + + /* Handle errors */ + if (port->type == PORT_SCI) { + if (sci_handle_errors(port)) { + /* discard character in rx buffer */ + sci_in(port, SCxSR); + sci_out(port, SCxSR, SCxSR_RDxF_CLEAR(port)); + } + } else { + sci_rx_interrupt(irq, ptr, regs); + } + + sci_out(port, SCxSR, SCxSR_ERROR_CLEAR(port)); + + /* Kick the transmission */ + sci_tx_interrupt(irq, ptr, regs); + + return IRQ_HANDLED; +} + +static irqreturn_t sci_br_interrupt(int irq, void *ptr, struct pt_regs *regs) +{ + struct uart_port *port = ptr; + + /* Handle BREAKs */ + sci_handle_breaks(port); + sci_out(port, SCxSR, SCxSR_BREAK_CLEAR(port)); + + return IRQ_HANDLED; +} + +#ifdef CONFIG_CPU_FREQ +/* + * Here we define a transistion notifier so that we can update all of our + * ports' baud rate when the peripheral clock changes. + */ +static int sci_notifier(struct notifier_block *self, unsigned long phase, void *p) +{ + struct cpufreq_freqs *freqs = p; + int i; + + if (phase == CPUFREQ_POSTCHANGE) { + for (i = 0; i < SCI_NPORTS; i++) { + struct uart_port *port = &sci_ports[i]; + + /* + * Update the uartclk per-port if frequency has + * changed, since it will no longer necessarily be + * consistent with the old frequency. + * + * Really we want to be able to do something like + * uart_change_speed() or something along those lines + * here to implicitly reset the per-port baud rate.. + * + * Clean this up later.. + */ + port->uartclk = current_cpu_data.module_clock * 16; + } + + printk("%s: got a postchange notification for cpu %d (old %d, new %d)\n", + __FUNCTION__, freqs->cpu, freqs->old, freqs->new); + } + + return NOTIFY_OK; +} + +static struct notifier_block sci_nb = { &sci_notifier, NULL, 0 }; +#endif /* CONFIG_CPU_FREQ */ + +static int sci_request_irq(struct sci_port *port) +{ + int i; + irqreturn_t (*handlers[4])(int irq, void *ptr, struct pt_regs *regs) = { + sci_er_interrupt, sci_rx_interrupt, sci_tx_interrupt, + sci_br_interrupt, + }; + const char *desc[] = { "SCI Receive Error", "SCI Receive Data Full", + "SCI Transmit Data Empty", "SCI Break" }; + + for (i = 0; i < ARRAY_SIZE(handlers); i++) { + if (!port->irqs[i]) + continue; + if (request_irq(port->irqs[i], handlers[i], SA_INTERRUPT, + desc[i], port)) { + printk(KERN_ERR "sci: Cannot allocate irq.\n"); + return -ENODEV; + } + } + + return 0; +} + +static void sci_free_irq(struct sci_port *port) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(port->irqs); i++) { + if (!port->irqs[i]) + continue; + + free_irq(port->irqs[i], port); + } +} + +static unsigned int sci_tx_empty(struct uart_port *port) +{ + /* Can't detect */ + return TIOCSER_TEMT; +} + +static void sci_set_mctrl(struct uart_port *port, unsigned int mctrl) +{ + /* This routine is used for seting signals of: DTR, DCD, CTS/RTS */ + /* We use SCIF's hardware for CTS/RTS, so don't need any for that. */ + /* If you have signals for DTR and DCD, please implement here. */ +} + +static unsigned int sci_get_mctrl(struct uart_port *port) +{ + /* This routine is used for geting signals of: DTR, DCD, DSR, RI, + and CTS/RTS */ + + return TIOCM_DTR | TIOCM_RTS | TIOCM_DSR; +} + +static void sci_start_tx(struct uart_port *port, unsigned int tty_start) +{ + struct sci_port *s = &sci_ports[port->line]; + + disable_irq(s->irqs[SCIx_TXI_IRQ]); + sci_transmit_chars(port); + enable_irq(s->irqs[SCIx_TXI_IRQ]); +} + +static void sci_stop_tx(struct uart_port *port, unsigned int tty_stop) +{ + unsigned long flags; + unsigned short ctrl; + + /* Clear TIE (Transmit Interrupt Enable) bit in SCSCR */ + local_irq_save(flags); + ctrl = sci_in(port, SCSCR); + ctrl &= ~SCI_CTRL_FLAGS_TIE; + sci_out(port, SCSCR, ctrl); + local_irq_restore(flags); +} + +static void sci_start_rx(struct uart_port *port, unsigned int tty_start) +{ + unsigned long flags; + unsigned short ctrl; + + /* Set RIE (Receive Interrupt Enable) bit in SCSCR */ + local_irq_save(flags); + ctrl = sci_in(port, SCSCR); + ctrl |= SCI_CTRL_FLAGS_RIE; + sci_out(port, SCSCR, ctrl); + local_irq_restore(flags); +} + +static void sci_stop_rx(struct uart_port *port) +{ + unsigned long flags; + unsigned short ctrl; + + /* Clear RIE (Receive Interrupt Enable) bit in SCSCR */ + local_irq_save(flags); + ctrl = sci_in(port, SCSCR); + ctrl &= ~SCI_CTRL_FLAGS_RIE; + sci_out(port, SCSCR, ctrl); + local_irq_restore(flags); +} + +static void sci_enable_ms(struct uart_port *port) +{ + /* Nothing here yet .. */ +} + +static void sci_break_ctl(struct uart_port *port, int break_state) +{ + /* Nothing here yet .. */ +} + +static int sci_startup(struct uart_port *port) +{ + struct sci_port *s = &sci_ports[port->line]; + + sci_request_irq(s); + sci_start_tx(port, 1); + sci_start_rx(port, 1); + +#if defined(__H8300S__) + h8300_sci_enable(port, sci_enable); +#endif + + return 0; +} + +static void sci_shutdown(struct uart_port *port) +{ + struct sci_port *s = &sci_ports[port->line]; + + sci_stop_rx(port); + sci_stop_tx(port, 1); + sci_free_irq(s); + +#if defined(__H8300S__) + h8300_sci_enable(port, sci_disable); +#endif +} + +static void sci_set_termios(struct uart_port *port, struct termios *termios, + struct termios *old) +{ + struct sci_port *s = &sci_ports[port->line]; + unsigned int status, baud, smr_val; + unsigned long flags; + int t; + + baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); + + spin_lock_irqsave(&port->lock, flags); + + do { + status = sci_in(port, SCxSR); + } while (!(status & SCxSR_TEND(port))); + + sci_out(port, SCSCR, 0x00); /* TE=0, RE=0, CKE1=0 */ + + if (port->type == PORT_SCIF) { + sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST); + } + + smr_val = sci_in(port, SCSMR) & 3; + if ((termios->c_cflag & CSIZE) == CS7) + smr_val |= 0x40; + if (termios->c_cflag & PARENB) + smr_val |= 0x20; + if (termios->c_cflag & PARODD) + smr_val |= 0x30; + if (termios->c_cflag & CSTOPB) + smr_val |= 0x08; + + uart_update_timeout(port, termios->c_cflag, baud); + + sci_out(port, SCSMR, smr_val); + + switch (baud) { + case 0: t = -1; break; + case 2400: t = BPS_2400; break; + case 4800: t = BPS_4800; break; + case 9600: t = BPS_9600; break; + case 19200: t = BPS_19200; break; + case 38400: t = BPS_38400; break; + case 57600: t = BPS_57600; break; + case 115200: t = BPS_115200; break; + default: t = BPS_115200; break; + } + + if (t > 0) { + if(t >= 256) { + sci_out(port, SCSMR, (sci_in(port, SCSMR) & ~3) | 1); + t >>= 2; + } else { + sci_out(port, SCSMR, sci_in(port, SCSMR) & ~3); + } + sci_out(port, SCBRR, t); + udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */ + } + + s->init_pins(port, termios->c_cflag); + sci_out(port, SCSCR, SCSCR_INIT(port)); + + if ((termios->c_cflag & CREAD) != 0) + sci_start_rx(port,0); + + spin_unlock_irqrestore(&port->lock, flags); +} + +static const char *sci_type(struct uart_port *port) +{ + switch (port->type) { + case PORT_SCI: return "sci"; + case PORT_SCIF: return "scif"; + case PORT_IRDA: return "irda"; + } + + return 0; +} + +static void sci_release_port(struct uart_port *port) +{ + /* Nothing here yet .. */ +} + +static int sci_request_port(struct uart_port *port) +{ + /* Nothing here yet .. */ + return 0; +} + +static void sci_config_port(struct uart_port *port, int flags) +{ + struct sci_port *s = &sci_ports[port->line]; + + port->type = s->type; +} + +static int sci_verify_port(struct uart_port *port, struct serial_struct *ser) +{ + struct sci_port *s = &sci_ports[port->line]; + + if (ser->irq != s->irqs[SCIx_TXI_IRQ] || ser->irq > NR_IRQS) + return -EINVAL; + if (ser->baud_base < 2400) + /* No paper tape reader for Mitch.. */ + return -EINVAL; + + return 0; +} + +static struct uart_ops sci_uart_ops = { + .tx_empty = sci_tx_empty, + .set_mctrl = sci_set_mctrl, + .get_mctrl = sci_get_mctrl, + .start_tx = sci_start_tx, + .stop_tx = sci_stop_tx, + .stop_rx = sci_stop_rx, + .enable_ms = sci_enable_ms, + .break_ctl = sci_break_ctl, + .startup = sci_startup, + .shutdown = sci_shutdown, + .set_termios = sci_set_termios, + .type = sci_type, + .release_port = sci_release_port, + .request_port = sci_request_port, + .config_port = sci_config_port, + .verify_port = sci_verify_port, +}; + +static struct sci_port sci_ports[SCI_NPORTS] = { +#if defined(CONFIG_CPU_SUBTYPE_SH7708) + { + .port = { + .membase = (void *)0xfffffe80, + .mapbase = 0xfffffe80, + .iotype = SERIAL_IO_MEM, + .irq = 25, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + .type = PORT_SCI, + .irqs = SCI_IRQS, + .init_pins = sci_init_pins_sci, + }, +#elif defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) + { + .port = { + .membase = (void *)0xfffffe80, + .mapbase = 0xfffffe80, + .iotype = SERIAL_IO_MEM, + .irq = 25, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + .type = PORT_SCI, + .irqs = SCI_IRQS, + .init_pins = sci_init_pins_sci, + }, + { + .port = { + .membase = (void *)0xa4000150, + .mapbase = 0xa4000150, + .iotype = SERIAL_IO_MEM, + .irq = 59, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 1, + }, + .type = PORT_SCIF, + .irqs = SH3_SCIF_IRQS, + .init_pins = sci_init_pins_scif, + }, + { + .port = { + .membase = (void *)0xa4000140, + .mapbase = 0xa4000140, + .iotype = SERIAL_IO_MEM, + .irq = 55, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 2, + }, + .type = PORT_IRDA, + .irqs = SH3_IRDA_IRQS, + .init_pins = sci_init_pins_irda, + } +#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751) + { + .port = { + .membase = (void *)0xffe00000, + .mapbase = 0xffe00000, + .iotype = SERIAL_IO_MEM, + .irq = 25, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + .type = PORT_SCI, + .irqs = SCI_IRQS, + .init_pins = sci_init_pins_sci, + }, + { + .port = { + .membase = (void *)0xffe80000, + .mapbase = 0xffe80000, + .iotype = SERIAL_IO_MEM, + .irq = 43, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 1, + }, + .type = PORT_SCIF, + .irqs = SH4_SCIF_IRQS, + .init_pins = sci_init_pins_scif, + }, +#elif defined(CONFIG_CPU_SUBTYPE_SH7760) + { + .port = { + .membase = (void *)0xfe600000, + .mapbase = 0xfe600000, + .iotype = SERIAL_IO_MEM, + .irq = 55, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + .type = PORT_SCIF, + .irqs = SH7760_SCIF0_IRQS, + .init_pins = sci_init_pins_scif, + }, + { + .port = { + .membase = (void *)0xfe610000, + .mapbase = 0xfe610000, + .iotype = SERIAL_IO_MEM, + .irq = 75, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 1, + }, + .type = PORT_SCIF, + .irqs = SH7760_SCIF1_IRQS, + .init_pins = sci_init_pins_scif, + }, + { + .port = { + .membase = (void *)0xfe620000, + .mapbase = 0xfe620000, + .iotype = SERIAL_IO_MEM, + .irq = 79, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 2, + }, + .type = PORT_SCIF, + .irqs = SH7760_SCIF2_IRQS, + .init_pins = sci_init_pins_scif, + }, +#elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) + { + .port = { + .membase = (void *)0xffe00000, + .mapbase = 0xffe00000, + .iotype = SERIAL_IO_MEM, + .irq = 26, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + .type = PORT_SCIF, + .irqs = STB1_SCIF1_IRQS, + .init_pins = sci_init_pins_scif, + }, + { + .port = { + .membase = (void *)0xffe80000, + .mapbase = 0xffe80000, + .iotype = SERIAL_IO_MEM, + .irq = 43, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 1, + }, + .type = PORT_SCIF, + .irqs = SH4_SCIF_IRQS, + .init_pins = sci_init_pins_scif, + }, +#elif defined(CONFIG_H83007) || defined(CONFIG_H83068) + { + .port = { + .membase = (void *)0x00ffffb0, + .mapbase = 0x00ffffb0, + .iotype = SERIAL_IO_MEM, + .irq = 54, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + .type = PORT_SCI, + .irqs = H8300H_SCI_IRQS0, + .init_pins = sci_init_pins_sci, + }, + { + .port = { + .membase = (void *)0x00ffffb8, + .mapbase = 0x00ffffb8, + .iotype = SERIAL_IO_MEM, + .irq = 58, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 1, + }, + .type = PORT_SCI, + .irqs = H8300H_SCI_IRQS1, + .init_pins = sci_init_pins_sci, + }, + { + .port = { + .membase = (void *)0x00ffffc0, + .mapbase = 0x00ffffc0, + .iotype = SERIAL_IO_MEM, + .irq = 62, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 2, + }, + .type = PORT_SCI, + .irqs = H8300H_SCI_IRQS2, + .init_pins = sci_init_pins_sci, + }, +#elif defined(CONFIG_H8S2678) + { + .port = { + .membase = (void *)0x00ffff78, + .mapbase = 0x00ffff78, + .iotype = SERIAL_IO_MEM, + .irq = 90, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + .type = PORT_SCI, + .irqs = H8S_SCI_IRQS0, + .init_pins = sci_init_pins_sci, + }, + { + .port = { + .membase = (void *)0x00ffff80, + .mapbase = 0x00ffff80, + .iotype = SERIAL_IO_MEM, + .irq = 94, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 1, + }, + .type = PORT_SCI, + .irqs = H8S_IRQS1, + .init_pins = sci_init_pins_sci, + }, + { + .port = { + .membase = (void *)0x00ffff88, + .mapbase = 0x00ffff88, + .iotype = SERIAL_IO_MEM, + .irq = 98, + .ops = &sci_uart_ops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 2, + }, + .type = PORT_SCI, + .irqs = H8S_IRQS2, + .init_pins = sci_init_pins_sci, + }, +#else +#error "CPU subtype not defined" +#endif +}; + +#ifdef CONFIG_SERIAL_SH_SCI_CONSOLE +/* + * Print a string to the serial port trying not to disturb + * any possible real use of the port... + */ +static void serial_console_write(struct console *co, const char *s, + unsigned count) +{ + put_string(serial_console_port, s, count); +} + +static int __init serial_console_setup(struct console *co, char *options) +{ + struct uart_port *port; + int baud = 115200; + int bits = 8; + int parity = 'n'; + int flow = 'n'; + + if (co->index >= SCI_NPORTS) + co->index = 0; + + serial_console_port = &sci_ports[co->index]; + port = &serial_console_port->port; + port->type = serial_console_port->type; + + /* + * We need to set the initial uartclk here, since otherwise it will + * only ever be setup at sci_init() time. + */ + port->uartclk = current_cpu_data.module_clock * 16; + + if (options) + uart_parse_options(options, &baud, &parity, &bits, &flow); + + return uart_set_options(port, co, baud, parity, bits, flow); +} + +static struct console serial_console = { + .name = "ttySC", + .device = uart_console_device, + .write = serial_console_write, + .setup = serial_console_setup, + .flags = CON_PRINTBUFFER, + .index = -1, + .data = &sci_uart_driver, +}; + +static int __init sci_console_init(void) +{ +#ifdef CONFIG_SH_EARLY_PRINTK + extern void sh_console_unregister(void); + + /* + * Now that the real console is available, unregister the one we + * used while first booting. + */ + sh_console_unregister(); +#endif + + register_console(&serial_console); + + return 0; +} + +console_initcall(sci_console_init); +#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ + +#ifdef CONFIG_SH_KGDB +/* + * FIXME: Most of this can go away.. at the moment, we rely on + * arch/sh/kernel/setup.c to do the command line parsing for kgdb, though + * most of that can easily be done here instead. + * + * For the time being, just accept the values that were parsed earlier.. + */ +static void __init kgdb_console_get_options(struct uart_port *port, int *baud, + int *parity, int *bits) +{ + *baud = kgdb_baud; + *parity = tolower(kgdb_parity); + *bits = kgdb_bits - '0'; +} + +/* + * The naming here is somewhat misleading, since kgdb_console_setup() takes + * care of the early-on initialization for kgdb, regardless of whether we + * actually use kgdb as a console or not. + * + * On the plus side, this lets us kill off the old kgdb_sci_setup() nonsense. + */ +int __init kgdb_console_setup(struct console *co, char *options) +{ + struct uart_port *port = &sci_ports[kgdb_portnum].port; + int baud = 38400; + int bits = 8; + int parity = 'n'; + int flow = 'n'; + + if (co->index >= SCI_NPORTS || co->index != kgdb_portnum) + co->index = kgdb_portnum; + + if (options) + uart_parse_options(options, &baud, &parity, &bits, &flow); + else + kgdb_console_get_options(port, &baud, &parity, &bits); + + kgdb_getchar = kgdb_sci_getchar; + kgdb_putchar = kgdb_sci_putchar; + + return uart_set_options(port, co, baud, parity, bits, flow); +} +#endif /* CONFIG_SH_KGDB */ + +#ifdef CONFIG_SH_KGDB_CONSOLE +static struct console kgdb_console = { + .name = "ttySC", + .write = kgdb_console_write, + .setup = kgdb_console_setup, + .flags = CON_PRINTBUFFER | CON_ENABLED, + .index = -1, + .data = &sci_uart_driver, +}; + +/* Register the KGDB console so we get messages (d'oh!) */ +static int __init kgdb_console_init(void) +{ + register_console(&kgdb_console); + + return 0; +} + +console_initcall(kgdb_console_init); +#endif /* CONFIG_SH_KGDB_CONSOLE */ + +#if defined(CONFIG_SH_KGDB_CONSOLE) +#define SCI_CONSOLE &kgdb_console +#elif defined(CONFIG_SERIAL_SH_SCI_CONSOLE) +#define SCI_CONSOLE &serial_console +#else +#define SCI_CONSOLE 0 +#endif + +static char banner[] __initdata = + KERN_INFO "SuperH SCI(F) driver initialized\n"; + +static struct uart_driver sci_uart_driver = { + .owner = THIS_MODULE, + .driver_name = "sci", +#ifdef CONFIG_DEVFS_FS + .devfs_name = "ttsc/", +#endif + .dev_name = "ttySC", + .major = SCI_MAJOR, + .minor = SCI_MINOR_START, + .nr = SCI_NPORTS, + .cons = SCI_CONSOLE, +}; + +static int __init sci_init(void) +{ + int chan, ret; + + printk("%s", banner); + + ret = uart_register_driver(&sci_uart_driver); + if (ret == 0) { + for (chan = 0; chan < SCI_NPORTS; chan++) { + struct sci_port *sciport = &sci_ports[chan]; + + sciport->port.uartclk = (current_cpu_data.module_clock * 16); + uart_add_one_port(&sci_uart_driver, &sciport->port); + sciport->break_timer.data = (unsigned long)sciport; + sciport->break_timer.function = sci_break_timer; + init_timer(&sciport->break_timer); + } + } + +#ifdef CONFIG_CPU_FREQ + cpufreq_register_notifier(&sci_nb, CPUFREQ_TRANSITION_NOTIFIER); + printk("sci: CPU frequency notifier registered\n"); +#endif + +#ifdef CONFIG_SH_STANDARD_BIOS + sh_bios_gdb_detach(); +#endif + + return ret; +} + +static void __exit sci_exit(void) +{ + int chan; + + for (chan = 0; chan < SCI_NPORTS; chan++) + uart_remove_one_port(&sci_uart_driver, &sci_ports[chan].port); + + uart_unregister_driver(&sci_uart_driver); +} + +module_init(sci_init); +module_exit(sci_exit); + diff -Nru a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/serial/sh-sci.h Sun Mar 28 13:12:08 2004 @@ -0,0 +1,435 @@ +/* $Id: sh-sci.h,v 1.4 2004/02/19 16:43:56 lethal Exp $ + * + * linux/drivers/serial/sh-sci.h + * + * SuperH on-chip serial module support. (SCI with no FIFO / with FIFO) + * Copyright (C) 1999, 2000 Niibe Yutaka + * Copyright (C) 2000 Greg Banks + * Copyright (C) 2002, 2003 Paul Mundt + * Modified to support multiple serial ports. Stuart Menefy (May 2000). + * Modified to support H8/300 Series Yoshinori Sato (Feb 2004). + */ +#include +#include + +#if defined(__H8300H__) || defined(__H8300S__) +#include +#if defined(CONFIG_H83007) || defined(CONFIG_H83068) +#include +#endif +#if defined(CONFIG_H8S2678) +#include +#endif +#endif + +/* Offsets into the sci_port->irqs array */ +#define SCIx_ERI_IRQ 0 +#define SCIx_RXI_IRQ 1 +#define SCIx_TXI_IRQ 2 + +/* ERI, RXI, TXI, BRI */ +#define SCI_IRQS { 23, 24, 25, 0 } +#define SH3_SCIF_IRQS { 56, 57, 59, 58 } +#define SH3_IRDA_IRQS { 52, 53, 55, 54 } +#define SH4_SCIF_IRQS { 40, 41, 43, 42 } +#define STB1_SCIF1_IRQS {23, 24, 26, 25 } +#define SH7760_SCIF0_IRQS { 52, 53, 55, 54 } +#define SH7760_SCIF1_IRQS { 72, 73, 75, 74 } +#define SH7760_SCIF2_IRQS { 76, 77, 79, 78 } +#define H8300H_SCI_IRQS0 {52, 53, 54, 0 } +#define H8300H_SCI_IRQS1 {56, 57, 58, 0 } +#define H8300H_SCI_IRQS2 {60, 61, 62, 0 } +#define H8S_SCI_IRQS0 {88, 89, 90, 0 } +#define H8S_SCI_IRQS1 {92, 93, 94, 0 } +#define H8S_SCI_IRQS2 {96, 97, 98, 0 } + +#if defined(CONFIG_CPU_SUBTYPE_SH7708) +# define SCI_NPORTS 1 +# define SCSPTR 0xffffff7c /* 8 bit */ +# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ +# define SCI_ONLY +#elif defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) +# define SCI_NPORTS 3 +# define SCPCR 0xA4000116 /* 16 bit SCI and SCIF */ +# define SCPDR 0xA4000136 /* 8 bit SCI and SCIF */ +# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ +# define SCI_AND_SCIF +#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751) +# define SCI_NPORTS 2 +# define SCSPTR1 0xffe0001c /* 8 bit SCI */ +# define SCSPTR2 0xFFE80020 /* 16 bit SCIF */ +# define SCIF_ORER 0x0001 /* overrun error bit */ +# define SCSCR_INIT(port) (((port)->type == PORT_SCI) ? \ + 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ : \ + 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ ) +# define SCI_AND_SCIF +#elif defined(CONFIG_CPU_SUBTYPE_SH7760) +# define SCI_NPORTS 3 +# define SCSPTR0 0xfe600000 /* 16 bit SCIF */ +# define SCSPTR1 0xfe610000 /* 16 bit SCIF */ +# define SCSPTR2 0xfe620000 /* 16 bit SCIF */ +# define SCIF_ORDER 0x0001 /* overrun error bit */ +# define SCSCR_INIT(port) 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ +# define SCIF_ONLY +#elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) +# define SCI_NPORTS 2 +# define SCSPTR1 0xffe00020 /* 16 bit SCIF */ +# define SCSPTR2 0xffe80020 /* 16 bit SCIF */ +# define SCIF_ORER 0x0001 /* overrun error bit */ +# define SCSCR_INIT(port) 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ +# define SCIF_ONLY +#elif defined(CONFIG_H83007) || defined(CONFIG_H83068) +# define SCI_NPORTS 3 +# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ +# define SCI_ONLY +# define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port) +#elif defined(CONFIG_H8S2678) +# define SCI_NPORTS 3 +# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ +# define SCI_ONLY +# define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port) +#else +# error CPU subtype not defined +#endif + +/* SCSCR */ +#define SCI_CTRL_FLAGS_TIE 0x80 /* all */ +#define SCI_CTRL_FLAGS_RIE 0x40 /* all */ +#define SCI_CTRL_FLAGS_TE 0x20 /* all */ +#define SCI_CTRL_FLAGS_RE 0x10 /* all */ +/* SCI_CTRL_FLAGS_REIE 0x08 * 7750 SCIF */ +/* SCI_CTRL_FLAGS_MPIE 0x08 * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +/* SCI_CTRL_FLAGS_TEIE 0x04 * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +/* SCI_CTRL_FLAGS_CKE1 0x02 * all */ +/* SCI_CTRL_FLAGS_CKE0 0x01 * 7707 SCI/SCIF, 7708 SCI, 7709 SCI/SCIF, 7750 SCI */ + +/* SCxSR SCI */ +#define SCI_TDRE 0x80 /* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +#define SCI_RDRF 0x40 /* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +#define SCI_ORER 0x20 /* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +#define SCI_FER 0x10 /* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +#define SCI_PER 0x08 /* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +#define SCI_TEND 0x04 /* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +/* SCI_MPB 0x02 * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ +/* SCI_MPBT 0x01 * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */ + +#define SCI_ERRORS ( SCI_PER | SCI_FER | SCI_ORER) + +/* SCxSR SCIF */ +#define SCIF_ER 0x0080 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ +#define SCIF_TEND 0x0040 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ +#define SCIF_TDFE 0x0020 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ +#define SCIF_BRK 0x0010 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ +#define SCIF_FER 0x0008 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ +#define SCIF_PER 0x0004 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ +#define SCIF_RDF 0x0002 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ +#define SCIF_DR 0x0001 /* 7707 SCIF, 7709 SCIF, 7750 SCIF */ + +#define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK) + +#if defined(SCI_ONLY) +# define SCxSR_TEND(port) SCI_TEND +# define SCxSR_ERRORS(port) SCI_ERRORS +# define SCxSR_RDxF(port) SCI_RDRF +# define SCxSR_TDxE(port) SCI_TDRE +# define SCxSR_ORER(port) SCI_ORER +# define SCxSR_FER(port) SCI_FER +# define SCxSR_PER(port) SCI_PER +# define SCxSR_BRK(port) 0x00 +# define SCxSR_RDxF_CLEAR(port) 0xbc +# define SCxSR_ERROR_CLEAR(port) 0xc4 +# define SCxSR_TDxE_CLEAR(port) 0x78 +# define SCxSR_BREAK_CLEAR(port) 0xc4 +#elif defined(SCIF_ONLY) +# define SCxSR_TEND(port) SCIF_TEND +# define SCxSR_ERRORS(port) SCIF_ERRORS +# define SCxSR_RDxF(port) SCIF_RDF +# define SCxSR_TDxE(port) SCIF_TDFE +# define SCxSR_ORER(port) 0x0000 +# define SCxSR_FER(port) SCIF_FER +# define SCxSR_PER(port) SCIF_PER +# define SCxSR_BRK(port) SCIF_BRK +# define SCxSR_RDxF_CLEAR(port) 0x00fc +# define SCxSR_ERROR_CLEAR(port) 0x0073 +# define SCxSR_TDxE_CLEAR(port) 0x00df +# define SCxSR_BREAK_CLEAR(port) 0x00e3 +#else +# define SCxSR_TEND(port) (((port)->type == PORT_SCI) ? SCI_TEND : SCIF_TEND) +# define SCxSR_ERRORS(port) (((port)->type == PORT_SCI) ? SCI_ERRORS : SCIF_ERRORS) +# define SCxSR_RDxF(port) (((port)->type == PORT_SCI) ? SCI_RDRF : SCIF_RDF) +# define SCxSR_TDxE(port) (((port)->type == PORT_SCI) ? SCI_TDRE : SCIF_TDFE) +# define SCxSR_ORER(port) (((port)->type == PORT_SCI) ? SCI_ORER : 0x0000) +# define SCxSR_FER(port) (((port)->type == PORT_SCI) ? SCI_FER : SCIF_FER) +# define SCxSR_PER(port) (((port)->type == PORT_SCI) ? SCI_PER : SCIF_PER) +# define SCxSR_BRK(port) (((port)->type == PORT_SCI) ? 0x00 : SCIF_BRK) +# define SCxSR_RDxF_CLEAR(port) (((port)->type == PORT_SCI) ? 0xbc : 0x00fc) +# define SCxSR_ERROR_CLEAR(port) (((port)->type == PORT_SCI) ? 0xc4 : 0x0073) +# define SCxSR_TDxE_CLEAR(port) (((port)->type == PORT_SCI) ? 0x78 : 0x00df) +# define SCxSR_BREAK_CLEAR(port) (((port)->type == PORT_SCI) ? 0xc4 : 0x00e3) +#endif + +/* SCFCR */ +#define SCFCR_RFRST 0x0002 +#define SCFCR_TFRST 0x0004 +#define SCFCR_MCE 0x0008 + +#define SCI_MAJOR 204 +#define SCI_MINOR_START 8 + +/* Generic serial flags */ +#define SCI_RX_THROTTLE 0x0000001 + +#define SCI_MAGIC 0xbabeface + +/* + * Events are used to schedule things to happen at timer-interrupt + * time, instead of at rs interrupt time. + */ +#define SCI_EVENT_WRITE_WAKEUP 0 + +struct sci_port { + struct uart_port port; + int type; + unsigned char irqs[4]; /* ERI, RXI, TXI, BRI */ + void (*init_pins)(struct uart_port *port, unsigned int cflag); + int break_flag; + struct timer_list break_timer; +}; + +#define SCI_IN(size, offset) \ + unsigned int addr = port->mapbase + (offset); \ + if ((size) == 8) { \ + return ctrl_inb(addr); \ + } else { \ + return ctrl_inw(addr); \ + } +#define SCI_OUT(size, offset, value) \ + unsigned int addr = port->mapbase + (offset); \ + if ((size) == 8) { \ + ctrl_outb(value, addr); \ + } else { \ + ctrl_outw(value, addr); \ + } + +#define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\ + static inline unsigned int sci_##name##_in(struct uart_port *port) \ + { \ + if (port->type == PORT_SCI) { \ + SCI_IN(sci_size, sci_offset) \ + } else { \ + SCI_IN(scif_size, scif_offset); \ + } \ + } \ + static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \ + { \ + if (port->type == PORT_SCI) { \ + SCI_OUT(sci_size, sci_offset, value) \ + } else { \ + SCI_OUT(scif_size, scif_offset, value); \ + } \ + } + +#define CPU_SCIF_FNS(name, scif_offset, scif_size) \ + static inline unsigned int sci_##name##_in(struct uart_port *port) \ + { \ + SCI_IN(scif_size, scif_offset); \ + } \ + static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \ + { \ + SCI_OUT(scif_size, scif_offset, value); \ + } + +#define CPU_SCI_FNS(name, sci_offset, sci_size) \ + static inline unsigned int sci_##name##_in(struct sci_port* port) \ + { \ + SCI_IN(sci_size, sci_offset); \ + } \ + static inline void sci_##name##_out(struct sci_port* port, unsigned int value) \ + { \ + SCI_OUT(sci_size, sci_offset, value); \ + } + +#ifdef CONFIG_CPU_SH3 +#define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ + sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ + h8_sci_offset, h8_sci_size) \ + CPU_SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh3_scif_offset, sh3_scif_size) +#define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) \ + CPU_SCIF_FNS(name, sh3_scif_offset, sh3_scif_size) +#elif defined(__H8300H__) || defined(__H8300S__) +#define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ + sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ + h8_sci_offset, h8_sci_size) \ + CPU_SCI_FNS(name, h8_sci_offset, h8_sci_size) +#define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) +#else +#define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ + sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ + h8_sci_offset, h8_sci_size) \ + CPU_SCIx_FNS(name, sh4_sci_offset, sh4_sci_size, sh4_scif_offset, sh4_scif_size) +#define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) \ + CPU_SCIF_FNS(name, sh4_scif_offset, sh4_scif_size) +#endif + +/* reg SCI/SH3 SCI/SH4 SCIF/SH3 SCIF/SH4 SCI/H8*/ +/* name off sz off sz off sz off sz off sz*/ +SCIx_FNS(SCSMR, 0x00, 8, 0x00, 8, 0x00, 8, 0x00, 16, 0x00, 8) +SCIx_FNS(SCBRR, 0x02, 8, 0x04, 8, 0x02, 8, 0x04, 8, 0x01, 8) +SCIx_FNS(SCSCR, 0x04, 8, 0x08, 8, 0x04, 8, 0x08, 16, 0x02, 8) +SCIx_FNS(SCxTDR, 0x06, 8, 0x0c, 8, 0x06, 8, 0x0C, 8, 0x03, 8) +SCIx_FNS(SCxSR, 0x08, 8, 0x10, 8, 0x08, 16, 0x10, 16, 0x04, 8) +SCIx_FNS(SCxRDR, 0x0a, 8, 0x14, 8, 0x0A, 8, 0x14, 8, 0x05, 8) +SCIF_FNS(SCFCR, 0x0c, 8, 0x18, 16) +SCIF_FNS(SCFDR, 0x0e, 16, 0x1C, 16) +SCIF_FNS(SCLSR, 0, 0, 0x24, 16) + +#define sci_in(port, reg) sci_##reg##_in(port) +#define sci_out(port, reg, value) sci_##reg##_out(port, value) + +/* H8/300 series SCI pins assignment */ +#if defined(__H8300H__) || defined(__H8300S__) +static const struct __attribute__((packed)) { + int port; /* GPIO port no */ + unsigned short rx,tx; /* GPIO bit no */ +} h8300_sci_pins[] = { +#if defined(CONFIG_H83007) || defined(CONFIG_H83068) + { /* SCI0 */ + .port = H8300_GPIO_P9, + .rx = H8300_GPIO_B2, + .tx = H8300_GPIO_B0, + }, + { /* SCI1 */ + .port = H8300_GPIO_P9, + .rx = H8300_GPIO_B3, + .tx = H8300_GPIO_B1, + }, + { /* SCI2 */ + .port = H8300_GPIO_PB, + .rx = H8300_GPIO_B7, + .tx = H8300_GPIO_B6, + } +#elif defined(CONFIG_H8S2678) + { /* SCI0 */ + .port = H8300_GPIO_P3, + .rx = H8300_GPIO_B2, + .tx = H8300_GPIO_B0, + }, + { /* SCI1 */ + .port = H8300_GPIO_P3, + .rx = H8300_GPIO_B3, + .tx = H8300_GPIO_B1, + }, + { /* SCI2 */ + .port = H8300_GPIO_P5, + .rx = H8300_GPIO_B1, + .tx = H8300_GPIO_B0, + } +#endif +}; +#endif + +#if defined(CONFIG_CPU_SUBTYPE_SH7708) +static inline int sci_rxd_in(struct uart_port *port) +{ + if (port->mapbase == 0xfffffe80) + return ctrl_inb(SCSPTR)&0x01 ? 1 : 0; /* SCI */ + return 1; +} +#elif defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) +static inline int sci_rxd_in(struct uart_port *port) +{ + if (port->mapbase == 0xfffffe80) + return ctrl_inb(SCPDR)&0x01 ? 1 : 0; /* SCI */ + if (port->mapbase == 0xa4000150) + return ctrl_inb(SCPDR)&0x10 ? 1 : 0; /* SCIF */ + if (port->mapbase == 0xa4000140) + return ctrl_inb(SCPDR)&0x04 ? 1 : 0; /* IRDA */ + return 1; +} +#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751) +static inline int sci_rxd_in(struct uart_port *port) +{ +#ifndef SCIF_ONLY + if (port->mapbase == 0xffe00000) + return ctrl_inb(SCSPTR1)&0x01 ? 1 : 0; /* SCI */ +#endif +#ifndef SCI_ONLY + if (port->mapbase == 0xffe80000) + return ctrl_inw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */ +#endif + return 1; +} +#elif defined(CONFIG_CPU_SUBTYPE_SH7760) +static inline int sci_rxd_in(struct uart_port *port) +{ + if (port->mapbase == 0xfe600000) + return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */ + if (port->mapbase == 0xfe610000) + return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */ + if (port->mapbase == 0xfe620000) + return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */ +} +#elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) +static inline int sci_rxd_in(struct uart_port *port) +{ + if (port->mapbase == 0xffe00000) + return ctrl_inw(SCSPTR1)&0x0001 ? 1 : 0; /* SCIF */ + else + return ctrl_inw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */ + +} +#elif defined(__H8300H__) || defined(__H8300S__) +static inline int sci_rxd_in(struct sci_port *port) +{ + int ch = (port->base - SMR0) >> 3; + return (H8300_SCI_DR(ch) & h8300_sci_pins[ch].rx) ? 1 : 0; +} +#endif + +/* + * Values for the BitRate Register (SCBRR) + * + * The values are actually divisors for a frequency which can + * be internal to the SH3 (14.7456MHz) or derived from an external + * clock source. This driver assumes the internal clock is used; + * to support using an external clock source, config options or + * possibly command-line options would need to be added. + * + * Also, to support speeds below 2400 (why?) the lower 2 bits of + * the SCSMR register would also need to be set to non-zero values. + * + * -- Greg Banks 27Feb2000 + * + * Answer: The SCBRR register is only eight bits, and the value in + * it gets larger with lower baud rates. At around 2400 (depending on + * the peripherial module clock) you run out of bits. However the + * lower two bits of SCSMR allow the module clock to be divided down, + * scaling the value which is needed in SCBRR. + * + * -- Stuart Menefy - 23 May 2000 + * + * I meant, why would anyone bother with bitrates below 2400. + * + * -- Greg Banks - 7Jul2000 + * + * You "speedist"! How will I use my 110bps ASR-33 teletype with paper + * tape reader as a console! + * + * -- Mitch Davis - 15 Jul 2000 + */ + +#define PCLK (current_cpu_data.module_clock) + +#if !defined(__H8300H__) && !defined(__H8300S__) +#define SCBRR_VALUE(bps) ((PCLK+16*bps)/(32*bps)-1) +#else +#define SCBRR_VALUE(bps) (((CONFIG_CPU_CLOCK*1000/32)/bps)-1) +#endif +#define BPS_2400 SCBRR_VALUE(2400) +#define BPS_4800 SCBRR_VALUE(4800) +#define BPS_9600 SCBRR_VALUE(9600) +#define BPS_19200 SCBRR_VALUE(19200) +#define BPS_38400 SCBRR_VALUE(38400) +#define BPS_57600 SCBRR_VALUE(57600) +#define BPS_115200 SCBRR_VALUE(115200) + diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c Sun Mar 28 13:12:07 2004 +++ b/drivers/usb/core/message.c Sun Mar 28 13:12:07 2004 @@ -794,9 +794,6 @@ static void release_interface(struct device *dev) { - struct usb_interface *interface = to_usb_interface(dev); - - complete(interface->released); } /* @@ -828,16 +825,12 @@ if (dev->actconfig) { for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { struct usb_interface *interface; - struct completion intf_completion; /* remove this interface */ interface = dev->actconfig->interface[i]; dev_dbg (&dev->dev, "unregistering interface %s\n", interface->dev.bus_id); - init_completion (&intf_completion); - interface->released = &intf_completion; device_unregister (&interface->dev); - wait_for_completion (&intf_completion); } dev->actconfig = 0; if (dev->state == USB_STATE_CONFIGURED) diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig --- a/drivers/video/Kconfig Sun Mar 28 13:12:07 2004 +++ b/drivers/video/Kconfig Sun Mar 28 13:12:07 2004 @@ -76,10 +76,6 @@ hardware found in Acorn RISC PCs and other ARM-based machines. If unsure, say N. -config FB_ANAKIN - bool "Anakin LCD support" - depends on FB && ARM && ARCH_ANAKIN - config FB_CLPS711X bool "CLPS711X LCD support" depends on FB && ARM && ARCH_CLPS711X diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile --- a/drivers/video/Makefile Sun Mar 28 13:12:07 2004 +++ b/drivers/video/Makefile Sun Mar 28 13:12:07 2004 @@ -28,7 +28,6 @@ obj-$(CONFIG_FB_PLATINUM) += platinumfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CT65550) += chipsfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_ANAKIN) += anakinfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CYBER) += cyberfb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o diff -Nru a/drivers/video/anakinfb.c b/drivers/video/anakinfb.c --- a/drivers/video/anakinfb.c Sun Mar 28 13:12:08 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,102 +0,0 @@ -/* - * linux/drivers/video/anakinfb.c - * - * Copyright (C) 2001 Aleph One Ltd. for Acunia N.V. - * - * 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. - * - * Changelog: - * 23-Apr-2001 TTC Created - */ - -#include -#include -#include -#include -#include -#include - -#include - -static u32 colreg[17]; -static struct fb_info fb_info; - -static struct fb_var_screeninfo anakinfb_var = { - .xres = 400, - .yres = 234, - .xres_virtual = 400, - .yres_virtual = 234, - .bits_per_pixel = 16, - .red = { 11, 5, 0 }, - .green = { 5, 6, 0 }, - .blue = { 0, 5, 0 }, - .activate = FB_ACTIVATE_NOW, - .height = -1, - .width = -1, - .vmode = FB_VMODE_NONINTERLACED, -}; - -static struct fb_fix_screeninfo anakinfb_fix = { - .id = "AnakinFB", - .smem_start = VGA_START, - .smem_len = VGA_SIZE, - .type = FB_TYPE_PACKED_PIXELS, - .visual = FB_VISUAL_TRUECOLOR, - .line_length = 400*2, - .accel = FB_ACCEL_NONE, -}; - -static int -anakinfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, - u_int transp, struct fb_info *info) -{ - if (regno > 15) - return 1; - - ((u16 *)(info->pseudo_palette))[regno] = (red & 0xf800) | (green & 0xfc00 >> 5) | (blue & 0xf800 >> 11); - return 0; -} - -static struct fb_ops anakinfb_ops = { - .owner = THIS_MODULE, - .fb_setcolreg = anakinfb_setcolreg, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, - .fb_cursor = soft_cursor, -}; - -int __init -anakinfb_init(void) -{ - memset(&fb_info, 0, sizeof(struct fb_info)); - - fb_info.flags = FBINFO_FLAG_DEFAULT; - fb_info.fbops = &anakinfb_ops; - fb_info.var = anakinfb_var; - fb_info.fix = anakinfb_fix; - fb_info.psuedo_palette = colreg; - if (!(request_mem_region(VGA_START, VGA_SIZE, "vga"))) - return -ENOMEM; - if (fb_info.screen_base = ioremap(VGA_START, VGA_SIZE)) { - release_mem_region(VGA_START, VGA_SIZE); - return -EIO; - } - - fb_alloc_cmap(&fb_info.cmap, 16, 0); - - if (register_framebuffer(&fb_info) < 0) { - iounmap(fb_info.screen_base); - release_mem_region(VGA_START, VGA_SIZE); - return -EINVAL; - } - - MOD_INC_USE_COUNT; - return 0; -} - -MODULE_AUTHOR("Tak-Shing Chan "); -MODULE_DESCRIPTION("Anakin framebuffer driver"); -MODULE_SUPPORTED_DEVICE("fb"); diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c --- a/drivers/video/console/fbcon.c Sun Mar 28 13:12:08 2004 +++ b/drivers/video/console/fbcon.c Sun Mar 28 13:12:08 2004 @@ -662,19 +662,17 @@ struct display *q = &fb_display[i]; struct vc_data *tmp = vc_cons[i].d; - if (vc->vc_font.width > 32) { - /* If we are not the first console on this - fb, copy the font from that console */ - vc->vc_font.width = tmp->vc_font.width; - vc->vc_font.height = tmp->vc_font.height; - vc->vc_font.data = p->fontdata = q->fontdata; - p->userfont = q->userfont; - if (p->userfont) { - REFCOUNT(p->fontdata)++; - charcnt = FNTCHARCNT(p->fontdata); - } - con_copy_unimap(vc->vc_num, i); + /* If we are not the first console on this + fb, copy the font from that console */ + vc->vc_font.width = tmp->vc_font.width; + vc->vc_font.height = tmp->vc_font.height; + vc->vc_font.data = p->fontdata = q->fontdata; + p->userfont = q->userfont; + if (p->userfont) { + REFCOUNT(p->fontdata)++; + charcnt = FNTCHARCNT(p->fontdata); } + con_copy_unimap(vc->vc_num, i); } if (!p->fontdata) { diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c --- a/drivers/video/fbmem.c Sun Mar 28 13:12:07 2004 +++ b/drivers/video/fbmem.c Sun Mar 28 13:12:07 2004 @@ -55,7 +55,6 @@ extern int acornfb_setup(char*); extern int amifb_init(void); extern int amifb_setup(char*); -extern int anakinfb_init(void); extern int atafb_init(void); extern int atafb_setup(char*); extern int macfb_init(void); @@ -180,9 +179,6 @@ #ifdef CONFIG_FB_AMIGA { "amifb", amifb_init, amifb_setup }, #endif -#ifdef CONFIG_FB_ANAKIN - { "anakinfb", anakinfb_init, NULL }, -#endif #ifdef CONFIG_FB_CLPS711X { "clps711xfb", clps711xfb_init, NULL }, #endif @@ -1181,11 +1177,9 @@ #elif defined(__mips__) pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK; pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED; -#elif defined(__sh__) - pgprot_val(vma->vm_page_prot) &= ~_PAGE_CACHABLE; #elif defined(__hppa__) pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; -#elif defined(__ia64__) || defined(__arm__) +#elif defined(__ia64__) || defined(__arm__) || defined(__sh__) vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); #else #warning What do we have to do here?? diff -Nru a/drivers/video/hitfb.c b/drivers/video/hitfb.c --- a/drivers/video/hitfb.c Sun Mar 28 13:12:07 2004 +++ b/drivers/video/hitfb.c Sun Mar 28 13:12:07 2004 @@ -1,16 +1,16 @@ /* - * $Id: hitfb.c,v 1.10 2004/02/01 19:46:04 lethal Exp $ + * $Id: hitfb.c,v 1.12 2004/03/16 00:07:51 lethal Exp $ * linux/drivers/video/hitfb.c -- Hitachi LCD frame buffer device * (C) 1999 Mihai Spatar * (C) 2000 YAEGASHI Takeshi * (C) 2003, 2004 Paul Mundt - * (C) 2003 Andriy Skulysh + * (C) 2003, 2004 Andriy Skulysh * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive for * more details. */ - + #include #include #include @@ -30,139 +30,137 @@ #include #include +#ifdef MACH_HP600 +#include +#include +#endif + +#define WIDTH 640 + static struct fb_var_screeninfo hitfb_var __initdata = { .activate = FB_ACTIVATE_NOW, .height = -1, - .width = -1, - .vmode = FB_VMODE_NONINTERLACED, + .width = -1, + .vmode = FB_VMODE_NONINTERLACED, }; static struct fb_fix_screeninfo hitfb_fix __initdata = { - .id = "Hitachi HD64461", - .type = FB_TYPE_PACKED_PIXELS, - .ypanstep = 8, - .accel = FB_ACCEL_NONE, + .id = "Hitachi HD64461", + .type = FB_TYPE_PACKED_PIXELS, + .ypanstep = 8, + .accel = FB_ACCEL_NONE, }; static u32 pseudo_palette[16]; static struct fb_info fb_info; - -#define WIDTH 640 - -static void hitfb_set_base(u32 offset) +static inline void hitfb_accel_wait(void) { - fb_writew(offset>>10,HD64461_LCDCBAR); -} - -static inline void hitfb_accel_wait() -{ - while (fb_readw(HD64461_GRCFGR) & HD64461_GRCFGR_ACCSTATUS) - ; + while (fb_readw(HD64461_GRCFGR) & HD64461_GRCFGR_ACCSTATUS) ; } static inline void hitfb_accel_start(int truecolor) { if (truecolor) { - fb_writew(6,HD64461_GRCFGR); + fb_writew(6, HD64461_GRCFGR); } else { - fb_writew(7,HD64461_GRCFGR); + fb_writew(7, HD64461_GRCFGR); } } -static inline void hitfb_accel_set_dest(int truecolor, u16 dx, u16 dy, - u16 width, u16 height) +static inline void hitfb_accel_set_dest(int truecolor, u16 dx, u16 dy, + u16 width, u16 height) { - u32 saddr=WIDTH*dy+dx; + u32 saddr = WIDTH * dy + dx; if (truecolor) saddr <<= 1; - - fb_writew(width,HD64461_BBTDWR); - fb_writew(height,HD64461_BBTDHR); - - fb_writew(saddr&0xffff,HD64461_BBTDSARL); - fb_writew(saddr>>16,HD64461_BBTDSARH); -} - -static inline void hitfb_accel_solidfill(int truecolor, u16 dx, u16 dy, - u16 width, u16 height, u16 color) -{ - hitfb_accel_set_dest(truecolor,dx,dy,width,height); - - fb_writew(0x00f0,HD64461_BBTROPR); - fb_writew(16,HD64461_BBTMDR); - fb_writew(color,HD64461_GRSCR); - hitfb_accel_start(truecolor); + fb_writew(width, HD64461_BBTDWR); + fb_writew(height, HD64461_BBTDHR); + + fb_writew(saddr & 0xffff, HD64461_BBTDSARL); + fb_writew(saddr >> 16, HD64461_BBTDSARH); + } -static inline void hitfb_accel_bitblt(int truecolor, u16 sx, u16 sy, u16 dx, u16 dy, - u16 width, u16 height, u16 rop, u32 mask_addr) +static inline void hitfb_accel_solidfill(int truecolor, u16 dx, u16 dy, + u16 width, u16 height, u16 color) { - u32 saddr,daddr; - u32 maddr=0; - fb_writew(rop,HD64461_BBTROPR); - - if((sy>3)+1)*(height+1)-1; - } else { - maddr=(((width>>4)+1)*(height+1)-1)*2; - } + fb_writew(0x00f0, HD64461_BBTROPR); + fb_writew(16, HD64461_BBTMDR); + fb_writew(color, HD64461_GRSCR); - fb_writew((1<<5)|1,HD64461_BBTMDR); - } else { - fb_writew(1,HD64461_BBTMDR); - } + hitfb_accel_start(truecolor); +} + +static inline void hitfb_accel_bitblt(int truecolor, u16 sx, u16 sy, u16 dx, + u16 dy, u16 width, u16 height, u16 rop, + u32 mask_addr) +{ + u32 saddr, daddr; + u32 maddr = 0; + + fb_writew(rop, HD64461_BBTROPR); + if ((sy < dy) || ((sy == dy) && (sx <= dx))) { + saddr = WIDTH * (sy + height) + sx + width; + daddr = WIDTH * (dy + height) + dx + width; + if (mask_addr) { + if (truecolor) + maddr = ((width >> 3) + 1) * (height + 1) - 1; + else + maddr = + (((width >> 4) + 1) * (height + 1) - 1) * 2; + + fb_writew((1 << 5) | 1, HD64461_BBTMDR); + } else + fb_writew(1, HD64461_BBTMDR); } else { - saddr=WIDTH*sy+sx; - daddr=WIDTH*dy+dx; + saddr = WIDTH * sy + sx; + daddr = WIDTH * dy + dx; if (mask_addr) { - fb_writew((1<<5),HD64461_BBTMDR); + fb_writew((1 << 5), HD64461_BBTMDR); } else { - outw(0,HD64461_BBTMDR); + fb_writew(0, HD64461_BBTMDR); } } - if (truecolor) { - saddr<<=1; - daddr<<=1; + saddr <<= 1; + daddr <<= 1; } - - fb_writew(width,HD64461_BBTDWR); - fb_writew(height,HD64461_BBTDHR); - fb_writew(saddr&0xffff,HD64461_BBTSSARL); - fb_writew(saddr>>16,HD64461_BBTSSARH); - fb_writew(daddr&0xffff,HD64461_BBTDSARL); - fb_writew(daddr>>16,HD64461_BBTDSARH); - + fb_writew(width, HD64461_BBTDWR); + fb_writew(height, HD64461_BBTDHR); + fb_writew(saddr & 0xffff, HD64461_BBTSSARL); + fb_writew(saddr >> 16, HD64461_BBTSSARH); + fb_writew(daddr & 0xffff, HD64461_BBTDSARL); + fb_writew(daddr >> 16, HD64461_BBTDSARH); if (mask_addr) { - maddr+=mask_addr; - fb_writew(maddr&0xffff,HD64461_BBTMARL); - fb_writew(maddr>>16,HD64461_BBTMARH); + maddr += mask_addr; + fb_writew(maddr & 0xffff, HD64461_BBTMARL); + fb_writew(maddr >> 16, HD64461_BBTMARH); } hitfb_accel_start(truecolor); } static void hitfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect) { - if (rect->rop != ROP_COPY) { - cfb_fillrect(p,rect); - } else { - fb_writew(0x00f0,HD64461_BBTROPR); - fb_writew(16,HD64461_BBTMDR); - - if (p->var.bits_per_pixel==16) { - fb_writew( ((u32*)(p->pseudo_palette))[rect->color] , HD64461_GRSCR ); - hitfb_accel_set_dest(1,rect->dx,rect->dy,rect->width,rect->height); + if (rect->rop != ROP_COPY) + cfb_fillrect(p, rect); + else { + fb_writew(0x00f0, HD64461_BBTROPR); + fb_writew(16, HD64461_BBTMDR); + + if (p->var.bits_per_pixel == 16) { + fb_writew(((u32 *) (p->pseudo_palette))[rect->color], + HD64461_GRSCR); + hitfb_accel_set_dest(1, rect->dx, rect->dy, rect->width, + rect->height); hitfb_accel_start(1); } else { fb_writew(rect->color, HD64461_GRSCR); - hitfb_accel_set_dest(0,rect->dx,rect->dy,rect->width,rect->height); + hitfb_accel_set_dest(0, rect->dx, rect->dy, rect->width, + rect->height); hitfb_accel_start(0); } hitfb_accel_wait(); @@ -171,23 +169,24 @@ static void hitfb_copyarea(struct fb_info *p, const struct fb_copyarea *area) { - hitfb_accel_bitblt(p->var.bits_per_pixel==16,area->sx,area->sy, - area->dx,area->dy,area->width,area->height,0x00cc,0); + hitfb_accel_bitblt(p->var.bits_per_pixel == 16, area->sx, area->sy, + area->dx, area->dy, area->width, area->height, + 0x00cc, 0); hitfb_accel_wait(); } static int hitfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { - int xoffset = var->xoffset; - int yoffset = var->yoffset; + int xoffset = var->xoffset; + int yoffset = var->yoffset; - if (xoffset!=0) + if (xoffset != 0) return -EINVAL; - hitfb_set_base(yoffset*2*640); + fb_writew(yoffset, HD64461_LCDCBAR); - return 0; + return 0; } int hitfb_blank(int blank_mode, struct fb_info *info) @@ -195,6 +194,12 @@ unsigned short v; if (blank_mode) { +#ifdef MACH_HP600 + sh_dac_disable(DAC_LCD_BRIGHTNESS); + v = fb_readw(HD64461_GPBDR); + v |= HD64461_GPBDR_LCDOFF; + fb_writew(v, HD64461_GPBDR); +#endif v = fb_readw(HD64461_LDR1); v &= ~HD64461_LDR1_DON; fb_writew(v, HD64461_LDR1); @@ -210,7 +215,12 @@ v = fb_readw(HD64461_STBCR); v &= ~HD64461_STBCR_SLCDST; fb_writew(v, HD64461_STBCR); - +#ifdef MACH_HP600 + sh_dac_enable(DAC_LCD_BRIGHTNESS); + v = fb_readw(HD64461_GPBDR); + v &= ~HD64461_GPBDR_LCDOFF; + fb_writew(v, HD64461_GPBDR); +#endif v = fb_readw(HD64461_LDR1); v |= HD64461_LDR1_DON; fb_writew(v, HD64461_LDR1); @@ -219,36 +229,71 @@ v &= ~HD64461_LCDCCR_MOFF; fb_writew(v, HD64461_LCDCCR); } - return 0; } static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green, - unsigned blue, unsigned transp, - struct fb_info *info) + unsigned blue, unsigned transp, struct fb_info *info) { if (regno >= info->cmap.len) return 1; - + switch (info->var.bits_per_pixel) { - case 8: - fb_writew(regno << 8, HD64461_CPTWAR); - fb_writew(red >> 10, HD64461_CPTWDR); - fb_writew(green >> 10, HD64461_CPTWDR); - fb_writew(blue >> 10, HD64461_CPTWDR); - break; - case 16: - ((u32*)(info->pseudo_palette))[regno] = - ((red & 0xf800) ) | - ((green & 0xfc00) >> 5) | - ((blue & 0xf800) >> 11); - break; + case 8: + fb_writew(regno << 8, HD64461_CPTWAR); + fb_writew(red >> 10, HD64461_CPTWDR); + fb_writew(green >> 10, HD64461_CPTWDR); + fb_writew(blue >> 10, HD64461_CPTWDR); + break; + case 16: + ((u32 *) (info->pseudo_palette))[regno] = + ((red & 0xf800)) | + ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11); + break; } return 0; } -static int hitfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) +static struct fb_ops hitfb_ops = { + .owner = THIS_MODULE, + .fb_setcolreg = hitfb_setcolreg, + .fb_blank = hitfb_blank, + .fb_pan_display = hitfb_pan_display, + .fb_fillrect = hitfb_fillrect, + .fb_copyarea = hitfb_copyarea, + .fb_imageblit = cfb_imageblit, + .fb_cursor = soft_cursor, +}; + +int __init hitfb_init(void) { + unsigned short lcdclor, ldr3, ldvndr; + int size; + + hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000; + hitfb_fix.smem_len = (MACH_HP690) ? 1024 * 1024 : 512 * 1024; + + lcdclor = fb_readw(HD64461_LCDCLOR); + ldvndr = fb_readw(HD64461_LDVNDR); + ldr3 = fb_readw(HD64461_LDR3); + + switch (ldr3 & 15) { + default: + case 4: + hitfb_var.bits_per_pixel = 8; + hitfb_var.xres = lcdclor; + break; + case 8: + hitfb_var.bits_per_pixel = 16; + hitfb_var.xres = lcdclor / 2; + break; + } + hitfb_fix.line_length = lcdclor; + hitfb_fix.visual = (hitfb_var.bits_per_pixel == 8) ? + FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; + hitfb_var.yres = ldvndr + 1; + hitfb_var.xres_virtual = hitfb_var.xres; + hitfb_var.yres_virtual = hitfb_fix.smem_len / lcdclor; switch (hitfb_var.bits_per_pixel) { case 8: hitfb_var.red.offset = 0; @@ -260,7 +305,7 @@ hitfb_var.transp.offset = 0; hitfb_var.transp.length = 0; break; - case 16: /* RGB 565 */ + case 16: /* RGB 565 */ hitfb_var.red.offset = 11; hitfb_var.red.length = 5; hitfb_var.green.offset = 5; @@ -272,70 +317,22 @@ break; } - return 0; -} + fb_info.fbops = &hitfb_ops; + fb_info.var = hitfb_var; + fb_info.fix = hitfb_fix; + fb_info.pseudo_palette = pseudo_palette; + fb_info.flags = FBINFO_FLAG_DEFAULT; -static struct fb_ops hitfb_ops = { - .owner = THIS_MODULE, - .fb_check_var = hitfb_check_var, - .fb_set_par = hitfb_set_par, - .fb_setcolreg = hitfb_setcolreg, - .fb_pan_display = hitfb_pan_display, - .fb_blank = hitfb_blank, - .fb_fillrect = hitfb_fillrect, - .fb_copyarea = hitfb_copyarea, - .fb_imageblit = cfb_imageblit, - .fb_cursor = soft_cursor, -}; - -int __init hitfb_init(void) -{ - unsigned short lcdclor, ldr3, ldvndr; - int size; - - hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000; - hitfb_fix.smem_len = (MACH_HP690) ? 1024*1024 : 512*1024; - - lcdclor = inw(HD64461_LCDCLOR); - ldvndr = inw(HD64461_LDVNDR); - ldr3 = inw(HD64461_LDR3); - - switch (ldr3&15) { - default: - case 4: - hitfb_var.bits_per_pixel = 8; - hitfb_var.xres = lcdclor; - break; - case 8: - hitfb_var.bits_per_pixel = 16; - hitfb_var.xres = lcdclor/2; - break; - } - - /* XXX: Most of this should go into hitfb_set_par().. --PFM. */ - hitfb_fix.line_length = lcdclor; - hitfb_fix.visual = (hitfb_var.bits_per_pixel == 8) ? - FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; - hitfb_var.yres = ldvndr+1; - hitfb_var.xres_virtual = hitfb_var.xres; - hitfb_var.yres_virtual = hitfb_fix.smem_len/lcdclor; - - fb_info.fbops = &hitfb_ops; - fb_info.var = hitfb_var; - fb_info.fix = hitfb_fix; - fb_info.pseudo_palette = pseudo_palette; - fb_info.flags = FBINFO_FLAG_DEFAULT; - - fb_info.screen_base = (void *) hitfb_fix.smem_start; + fb_info.screen_base = (void *)hitfb_fix.smem_start; size = (fb_info.var.bits_per_pixel == 8) ? 256 : 16; - fb_alloc_cmap(&fb_info.cmap, size, 0); + fb_alloc_cmap(&fb_info.cmap, size, 0); if (register_framebuffer(&fb_info) < 0) return -EINVAL; - + printk(KERN_INFO "fb%d: %s frame buffer device\n", - fb_info.node, fb_info.fix.id); + fb_info.node, fb_info.fix.id); return 0; } @@ -350,4 +347,3 @@ #endif MODULE_LICENSE("GPL"); - diff -Nru a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c --- a/drivers/video/pvr2fb.c Sun Mar 28 13:12:07 2004 +++ b/drivers/video/pvr2fb.c Sun Mar 28 13:12:07 2004 @@ -338,6 +338,7 @@ ((blue & 0xf800) >> 11); pvr2fb_set_pal_entry(par, regno, tmp); + ((u16*)(info->pseudo_palette))[regno] = tmp; break; case 24: /* RGB 888 */ red >>= 8; green >>= 8; blue >>= 8; @@ -348,6 +349,7 @@ tmp = (transp << 24) | (red << 16) | (green << 8) | blue; pvr2fb_set_pal_entry(par, regno, tmp); + ((u32*)(info->pseudo_palette))[regno] = tmp; break; default: pr_debug("Invalid bit depth %d?!?\n", info->var.bits_per_pixel); diff -Nru a/drivers/video/tgafb.c b/drivers/video/tgafb.c --- a/drivers/video/tgafb.c Sun Mar 28 13:12:08 2004 +++ b/drivers/video/tgafb.c Sun Mar 28 13:12:08 2004 @@ -25,6 +25,7 @@ #include #include #include