# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet v2.6.0-test6 -> 1.1413 # net/core/link_watch.c 1.5 -> 1.6 # scripts/pnmtologo.c 1.4 -> 1.5 # include/asm-parisc/pdc.h 1.2 -> 1.3 # include/asm-parisc/ioctl.h 1.1 -> 1.2 # drivers/net/irda/via-ircc.c 1.5 -> 1.6 # fs/ufs/super.c 1.36 -> 1.37 # net/core/utils.c 1.2 -> 1.3 # drivers/block/ps2esdi.c 1.69 -> 1.70 # drivers/scsi/megaraid.c 1.54 -> 1.55 # drivers/net/eexpress.c 1.14 -> 1.15 # drivers/net/irda/nsc-ircc.c 1.28 -> 1.29 # include/linux/acpi.h 1.28 -> 1.29 # arch/parisc/math-emu/fpudispatch.c 1.2 -> 1.3 # arch/parisc/kernel/pci.c 1.13 -> 1.14 # drivers/scsi/sym53c8xx_2/sym_hipd.c 1.12 -> 1.13 # include/asm-cris/cacheflush.h 1.1 -> 1.2 # include/asm-arm/arch-tbox/vmalloc.h 1.3 -> 1.4 # drivers/block/swim_iop.c 1.26 -> 1.27 # drivers/block/as-iosched.c 1.23 -> 1.24 # fs/adfs/super.c 1.25 -> 1.26 # kernel/rcupdate.c 1.6 -> 1.7 # fs/libfs.c 1.25 -> 1.26 # include/asm-arm/arch-clps711x/vmalloc.h 1.2 -> 1.3 # include/asm-parisc/bitops.h 1.5 -> 1.6 # kernel/ksyms.c 1.219 -> 1.232 # net/ipv4/ipvs/ip_vs_wrr.c 1.2 -> 1.3 # include/asm-sparc64/pgtable.h 1.29 -> 1.30 # drivers/pci/quirks.c 1.33 -> 1.34 # drivers/scsi/g_NCR5380.h 1.10 -> 1.11 # drivers/isdn/hardware/eicon/mntfunc.c 1.3 -> 1.4 # drivers/video/Kconfig 1.25 -> 1.30 # net/sched/sch_generic.c 1.8 -> 1.9 # drivers/net/irda/vlsi_ir.c 1.27 -> 1.28 # net/core/flow.c 1.14 -> 1.15 # arch/x86_64/kernel/setup.c 1.21.1.2 -> 1.23 # include/linux/mm.h 1.130 -> 1.132 # fs/file_table.c 1.26 -> 1.27 # arch/ia64/sn/io/sn2/module.c 1.3 -> 1.4 # drivers/serial/8250.c 1.36 -> 1.38 # net/core/neighbour.c 1.18 -> 1.19 # lib/Makefile 1.27 -> 1.28 # arch/i386/kernel/cpu/cpufreq/longhaul.c 1.35 -> 1.37 # fs/fat/dir.c 1.20 -> 1.21 # include/asm-ppc64/cacheflush.h 1.3 -> 1.4 # net/ipv4/ip_input.c 1.19 -> 1.20 # fs/ext2/inode.c 1.70 -> 1.71 # drivers/char/random.c 1.39 -> 1.40 # drivers/scsi/sun3_scsi.h 1.8 -> 1.9 # drivers/acpi/dispatcher/dswload.c 1.22 -> 1.23 # net/802/p8023.c 1.2 -> 1.3 # net/802/tr.c 1.15 -> 1.16 # drivers/scsi/sun3_scsi.c 1.18 -> 1.19 # Documentation/cpu-freq/user-guide.txt 1.9 -> 1.10 # arch/parisc/kernel/inventory.c 1.3 -> 1.4 # include/asm-mips/pgtable-64.h 1.1 -> 1.2 # drivers/acpi/pci_link.c 1.17 -> 1.20 # include/asm-i386/highmem.h 1.12 -> 1.13 # arch/alpha/kernel/core_marvel.c 1.14 -> 1.15 # include/asm-arm/arch-integrator/vmalloc.h 1.2 -> 1.3 # arch/parisc/kernel/firmware.c 1.1 -> 1.2 # include/acpi/acstruct.h 1.14 -> 1.15 # include/linux/sched.h 1.167 -> 1.168 # arch/i386/kernel/cpu/cpufreq/acpi.c 1.10 -> 1.11 # arch/parisc/lib/io.c 1.2 -> 1.3 # include/asm-arm/arch-adifcc/vmalloc.h 1.2 -> 1.3 # drivers/net/Space.c 1.39 -> 1.41 # net/sched/estimator.c 1.3 -> 1.4 # kernel/sysctl.c 1.53 -> 1.55 # arch/cris/mm/ioremap.c 1.4 -> 1.5 # include/asm-arm26/pgtable.h 1.2 -> 1.3 # net/ipv4/xfrm4_tunnel.c 1.8 -> 1.9 # arch/parisc/kernel/asm-offsets.c 1.3 -> 1.4 # include/asm-arm/arch-epxa10db/vmalloc.h 1.2 -> 1.3 # drivers/media/video/videodev.c 1.27 -> 1.28 # net/ipv4/protocol.c 1.7 -> 1.8 # arch/parisc/kernel/ptrace.c 1.9 -> 1.10 # include/asm-i386/mman.h 1.4 -> 1.5 # fs/smbfs/inode.c 1.44 -> 1.45 # fs/dcache.c 1.61 -> 1.62 # arch/i386/kernel/cpu/mcheck/mce.h 1.2 -> 1.3 # drivers/isdn/hardware/eicon/divasmain.c 1.15 -> 1.16 # net/ipv4/af_inet.c 1.58 -> 1.60 # drivers/net/arcnet/com20020-isa.c 1.9 -> 1.10 # include/asm-sparc64/visasm.h 1.4 -> 1.5 # arch/s390/mm/ioremap.c 1.7 -> 1.8 # drivers/net/loopback.c 1.9 -> 1.10 # arch/i386/Kconfig 1.83 -> 1.86 # drivers/cdrom/cdrom.c 1.40 -> 1.41 # include/linux/elf.h 1.25 -> 1.26 # fs/jfs/jfs_imap.c 1.27 -> 1.28 # drivers/net/arcnet/com20020-pci.c 1.16 -> 1.17 # include/asm-arm/arch-shark/vmalloc.h 1.2 -> 1.3 # fs/jbd/journal.c 1.64 -> 1.65 # net/ipv4/udp.c 1.50 -> 1.51 # drivers/acpi/parser/psparse.c 1.21 -> 1.22 # drivers/scsi/g_NCR5380.c 1.23 -> 1.24 # arch/alpha/kernel/setup.c 1.36 -> 1.37 # include/asm-arm/arch-l7200/vmalloc.h 1.2 -> 1.3 # arch/ppc/mm/pgtable.c 1.14 -> 1.15 # drivers/ide/legacy/umc8672.c 1.10 -> 1.11 # drivers/ide/legacy/qd65xx.c 1.8 -> 1.9 # drivers/ide/legacy/ali14xx.c 1.9 -> 1.10 # include/asm-x86_64/cacheflush.h 1.4 -> 1.5 # include/net/pkt_sched.h 1.6 -> 1.7 # include/asm-ia64/cacheflush.h 1.4 -> 1.5 # arch/i386/kernel/cpu/cpufreq/Kconfig 1.9 -> 1.11 # include/asm-parisc/page.h 1.4 -> 1.5 # arch/parisc/math-emu/types.h 1.1 -> (deleted) # drivers/net/ibmlana.c 1.10 -> 1.11 # net/sched/sch_fifo.c 1.5 -> 1.6 # security/dummy.c 1.27 -> 1.28 # arch/parisc/kernel/entry.S 1.11 -> 1.12 # include/asm-ppc/pgtable.h 1.25 -> 1.26 # drivers/block/Kconfig 1.11 -> 1.14 # net/sched/cls_api.c 1.5 -> 1.6 # sound/oss/btaudio.c 1.20 -> 1.22 # net/ipv4/devinet.c 1.20 -> 1.21 # include/asm-m68k/zorro.h 1.4 -> 1.5 # include/asm-arm/arch-anakin/vmalloc.h 1.2 -> 1.3 # drivers/net/wan/comx-hw-munich.c 1.14 -> 1.15 # arch/m68k/kernel/time.c 1.11 -> 1.12 # drivers/net/wan/dscc4.c 1.48 -> 1.49 # net/core/ethtool.c 1.7 -> 1.8 # include/linux/rcupdate.h 1.3 -> 1.4 # net/bridge/netfilter/Kconfig 1.8 -> 1.9 # arch/i386/mm/ioremap.c 1.18 -> 1.19 # include/asm-parisc/keyboard.h 1.2 -> 1.3 # include/linux/mca.h 1.7 -> 1.8 # arch/i386/kernel/entry.S 1.67 -> 1.69 # arch/x86_64/kernel/i387.c 1.7 -> 1.8 # drivers/char/ser_a2232.c 1.18 -> 1.19 # arch/i386/kernel/cpu/intel.c 1.22 -> 1.23 # net/ipv4/tcp.c 1.46 -> 1.48 # drivers/eisa/eisa-bus.c 1.12 -> 1.13 # drivers/video/console/sticore.c 1.14 -> 1.15 # arch/alpha/kernel/smp.c 1.37 -> 1.38 # net/ipv4/ip_fragment.c 1.10 -> 1.11 # drivers/ide/ide.c 1.96 -> 1.101 # arch/alpha/kernel/core_titan.c 1.20 -> 1.21 # include/asm-alpha/pgtable.h 1.19 -> 1.20 # drivers/scsi/ncr53c8xx.c 1.36 -> 1.37 # drivers/ide/legacy/dtc2278.c 1.9 -> 1.10 # net/ipv4/ip_sockglue.c 1.17 -> 1.18 # include/asm-ia64/pgtable.h 1.28 -> 1.29 # mm/bootmem.c 1.21 -> 1.22 # arch/i386/kernel/mpparse.c 1.50 -> 1.55 # drivers/net/arcnet/com20020.c 1.8 -> 1.9 # arch/parisc/kernel/unaligned.c 1.3 -> 1.4 # drivers/acpi/asus_acpi.c 1.1 -> 1.4 # include/sound/sndmagic.h 1.13 -> 1.14 # drivers/acpi/executer/exfldio.c 1.22 -> 1.23 # net/ipv4/tcp_ipv4.c 1.67 -> 1.68 # fs/hfs/file.c 1.14 -> 1.15 # net/core/filter.c 1.7 -> 1.8 # drivers/mtd/chips/cfi_cmdset_0020.c 1.1 -> 1.2 # include/asm-sparc/cacheflush.h 1.3 -> 1.4 # net/core/dev_mcast.c 1.1 -> 1.2 # include/asm-parisc/atomic.h 1.3 -> 1.4 # Documentation/iostats.txt 1.1 -> 1.2 # mm/filemap.c 1.208 -> 1.209 # fs/namei.c 1.85 -> 1.87 # include/asm-v850/cacheflush.h 1.4 -> 1.5 # fs/hfs/super.c 1.23 -> 1.24 # drivers/isdn/i4l/isdn_common.c 1.79 -> 1.80 # net/socket.c 1.68 -> 1.69 # include/asm-parisc/irq.h 1.5 -> 1.6 # Documentation/cachetlb.txt 1.8 -> 1.9 # arch/parisc/mm/ioremap.c 1.1 -> 1.2 # drivers/pci/hotplug/pci_hotplug.h 1.10 -> 1.11 # net/xfrm/xfrm_algo.c 1.11 -> 1.13 # include/asm-arm/arch-ebsa110/vmalloc.h 1.3 -> 1.4 # arch/i386/kernel/dmi_scan.c 1.44.1.1 -> 1.48 # drivers/net/irda/w83977af_ir.c 1.22 -> 1.23 # init/do_mounts.c 1.55.1.2 -> 1.58 # fs/exec.c 1.96 -> 1.97 # drivers/scsi/nsp32.c 1.21 -> 1.22 # net/core/scm.c 1.8 -> 1.9 # include/asm-h8300/cacheflush.h 1.1 -> 1.2 # include/asm-parisc/dma-mapping.h 1.3 -> 1.4 # arch/parisc/kernel/irq.c 1.17 -> 1.18 # drivers/acpi/tables.c 1.15 -> 1.16 # drivers/net/at1700.c 1.18 -> 1.19 # arch/parisc/kernel/binfmt_elf32.c 1.4 -> 1.5 # drivers/net/irda/ali-ircc.c 1.22 -> 1.23 # sound/parisc/harmony.c 1.2 -> 1.3 # arch/parisc/kernel/time.c 1.11 -> 1.12 # drivers/net/ne3210.c 1.9 -> 1.10 # net/netsyms.c 1.99 -> (deleted) # include/asm-arm/arch-ebsa285/vmalloc.h 1.3 -> 1.4 # net/Makefile 1.24 -> 1.25 # include/asm-sh/cacheflush.h 1.1 -> 1.2 # include/asm-parisc/rt_sigframe.h 1.1 -> 1.2 # fs/befs/linuxvfs.c 1.12 -> 1.15 # drivers/net/irda/donauboe.c 1.13 -> 1.14 # net/sched/sch_api.c 1.10 -> 1.12 # arch/i386/kernel/cpu/cpufreq/Makefile 1.9 -> 1.10 # include/asm-parisc/param.h 1.2 -> 1.3 # fs/super.c 1.107 -> 1.108 # fs/fat/inode.c 1.76 -> 1.77 # fs/binfmt_elf.c 1.53 -> 1.54 # net/core/dv.c 1.8 -> 1.9 # drivers/acpi/pci_irq.c 1.21 -> 1.22 # include/linux/moduleparam.h 1.3 -> 1.4 # fs/jfs/super.c 1.43 -> 1.44 # drivers/sbus/char/jsflash.c 1.32 -> 1.33 # include/asm-m68k/pci.h 1.5 -> 1.6 # arch/parisc/math-emu/Makefile 1.2 -> 1.3 # arch/parisc/math-emu/denormal.c 1.1 -> 1.2 # net/core/netfilter.c 1.25 -> 1.26 # net/ipv4/utils.c 1.3 -> 1.4 # net/irda/irda_device.c 1.23 -> 1.25 # fs/affs/file.c 1.26 -> 1.27 # include/linux/pci.h 1.107 -> 1.108 # drivers/acpi/dispatcher/dsutils.c 1.19 -> 1.20 # arch/i386/kernel/setup.c 1.96.1.1 -> 1.100 # arch/i386/kernel/smpboot.c 1.65 -> 1.66 # drivers/net/3c523.c 1.12 -> 1.13 # include/net/scm.h 1.4 -> 1.5 # arch/ia64/kernel/acpi.c 1.50 -> 1.51 # arch/mips/mm/ioremap.c 1.4 -> 1.5 # arch/parisc/mm/init.c 1.12 -> 1.13 # drivers/net/tokenring/smctr.c 1.25 -> 1.26 # sound/oss/dmasound/Kconfig 1.3 -> 1.4 # drivers/ide/ide-floppy.c 1.32 -> 1.33 # include/asm-arm/arch-nexuspci/vmalloc.h 1.2 -> 1.3 # include/asm-arm/arch-pxa/vmalloc.h 1.2 -> 1.3 # drivers/acpi/namespace/nsutils.c 1.24 -> 1.25 # net/netlink/af_netlink.c 1.34 -> 1.35 # net/802/hippi.c 1.3 -> 1.4 # net/core/dev.c 1.109 -> 1.112 # drivers/net/irda/irda-usb.c 1.44 -> 1.45 # drivers/ide/legacy/pdc4030.c 1.16 -> 1.17 # drivers/char/generic_serial.c 1.13 -> 1.14 # arch/alpha/kernel/time.c 1.21 -> 1.23 # drivers/i2c/i2c-sensor.c 1.28 -> 1.29 # drivers/isdn/hardware/eicon/divamnt.c 1.9 -> 1.10 # include/asm-i386/cacheflush.h 1.4 -> 1.5 # fs/hfs/file_cap.c 1.10 -> 1.11 # arch/i386/kernel/cpu/mcheck/winchip.c 1.1 -> 1.2 # include/acpi/acdisasm.h 1.1 -> 1.2 # include/asm-mips/pgtable-32.h 1.1 -> 1.2 # net/bridge/netfilter/ebt_vlan.c 1.7 -> 1.8 # net/ethernet/eth.c 1.5 -> 1.6 # fs/ext3/symlink.c 1.4 -> 1.5 # drivers/scsi/a2091.c 1.12 -> 1.13 # drivers/ide/ide-proc.c 1.13 -> 1.14 # drivers/isdn/hardware/eicon/dqueue.c 1.2 -> 1.3 # drivers/net/mac8390.c 1.12 -> 1.13 # drivers/acpi/ec.c 1.24 -> 1.25 # drivers/scsi/sym53c8xx_comm.h 1.14 -> 1.15 # include/linux/list.h 1.34 -> 1.35 # drivers/net/3c527.c 1.15 -> 1.16 # include/asm-sparc/pgtable.h 1.16 -> 1.17 # fs/Kconfig 1.35 -> 1.37 # include/linux/highuid.h 1.1 -> 1.2 # fs/buffer.c 1.214 -> 1.215 # mm/vmalloc.c 1.27 -> 1.28 # arch/i386/kernel/cpu/mcheck/k7.c 1.5 -> 1.7 # fs/hpfs/super.c 1.27 -> 1.28 # arch/i386/kernel/cpu/mcheck/p5.c 1.1 -> 1.2 # arch/m68k/Kconfig 1.22 -> 1.25 # fs/hpfs/hpfs_fn.h 1.16 -> 1.17 # arch/ppc64/kernel/process.c 1.39 -> 1.40 # arch/sh/mm/ioremap.c 1.5 -> 1.6 # arch/parisc/Kconfig 1.24 -> 1.25 # MAINTAINERS 1.168 -> 1.172 # drivers/ide/pci/sc1200.c 1.9 -> 1.10 # drivers/acpi/bus.c 1.33 -> 1.34 # net/core/dst.c 1.13 -> 1.14 # net/ipv4/ipvs/ip_vs_wlc.c 1.2 -> 1.3 # arch/ia64/sn/io/sn2/pic.c 1.4 -> 1.5 # net/core/datagram.c 1.10 -> 1.11 # net/bridge/netfilter/Makefile 1.7 -> 1.8 # drivers/net/irda/sir_dev.c 1.6 -> 1.7 # mm/highmem.c 1.44 -> 1.45 # drivers/net/irda/smsc-ircc2.c 1.1 -> 1.7 # net/unix/af_unix.c 1.54 -> 1.55 # arch/i386/kernel/cpu/mcheck/p4.c 1.3 -> 1.4 # drivers/net/wireless/arlan-main.c 1.28 -> 1.30 # arch/arm/mm/ioremap.c 1.4 -> 1.5 # arch/i386/kernel/cpu/mcheck/p6.c 1.1 -> 1.2 # include/asm-i386/unistd.h 1.29 -> 1.30 # include/asm-m68k/cacheflush.h 1.5 -> 1.6 # init/do_mounts.h 1.6.1.3 -> 1.10 # fs/udf/super.c 1.35 -> 1.36 # drivers/net/sk_mca.c 1.15 -> 1.16 # fs/ext2/super.c 1.53 -> 1.54 # arch/parisc/lib/checksum.c 1.3 -> 1.4 # include/asm-arm/arch-iop3xx/vmalloc.h 1.4 -> 1.5 # fs/hfs/file_hdr.c 1.11 -> 1.12 # fs/fcntl.c 1.29 -> 1.30 # drivers/parisc/superio.c 1.6 -> 1.7 # drivers/pci/power.c 1.6 -> (deleted) # drivers/acpi/events/evregion.c 1.19 -> 1.20 # drivers/acpi/dispatcher/dsfield.c 1.18 -> 1.19 # drivers/isdn/hardware/eicon/os_capi.h 1.1 -> 1.2 # fs/freevxfs/vxfs_immed.c 1.3 -> 1.4 # fs/ext3/inode.c 1.85 -> 1.86 # arch/m68k/sun3/config.c 1.10 -> 1.11 # drivers/char/agp/amd64-agp.c 1.63 -> 1.64 # drivers/net/irda/irport.c 1.20 -> 1.21 # net/ipv4/tcp_output.c 1.31 -> 1.32 # fs/affs/super.c 1.39 -> 1.40 # include/asm-i386/elf.h 1.9 -> 1.10 # include/asm-alpha/cacheflush.h 1.2 -> 1.3 # include/linux/hdlcdrv.h 1.3 -> 1.4 # scripts/bin2c.c 1.1 -> 1.2 # Documentation/crypto/api-intro.txt 1.15 -> 1.16 # arch/alpha/kernel/core_irongate.c 1.11 -> 1.12 # include/asm-arm/arch-rpc/vmalloc.h 1.2 -> 1.3 # arch/h8300/README 1.1 -> 1.2 # net/ipv4/ip_options.c 1.3 -> 1.4 # fs/seq_file.c 1.11 -> 1.12 # kernel/module.c 1.92 -> 1.93 # net/core/skbuff.c 1.30 -> 1.31 # drivers/mca/mca-proc.c 1.2 -> 1.3 # include/linux/security.h 1.25 -> 1.26 # include/asm-x86_64/pgtable.h 1.22 -> 1.23 # include/asm-parisc/pci.h 1.8 -> 1.9 # drivers/scsi/qlogicfc.c 1.37 -> 1.38 # include/asm-arm26/cacheflush.h 1.1 -> 1.2 # include/asm-ppc64/elf.h 1.12 -> 1.13 # include/asm-parisc/elf.h 1.7 -> 1.8 # net/ipv4/sysctl_net_ipv4.c 1.12 -> 1.13 # include/linux/hfs_fs.h 1.9 -> 1.10 # net/core/sock.c 1.27 -> 1.28 # fs/autofs4/inode.c 1.13 -> 1.14 # include/asm-mips/highmem.h 1.1 -> 1.2 # fs/autofs/inode.c 1.15 -> 1.16 # drivers/isdn/hardware/eicon/platform.h 1.5 -> 1.6 # include/asm-i386/pgtable.h 1.37 -> 1.38 # arch/i386/kernel/cpu/mcheck/mce.c 1.2 -> 1.3 # include/acpi/acconfig.h 1.42 -> 1.44 # net/ipv4/tcp_input.c 1.45 -> 1.46 # arch/m68k/atari/stram.c 1.28 -> 1.29 # include/asm-ppc/cacheflush.h 1.5 -> 1.6 # net/ipv4/tcp_minisocks.c 1.41 -> 1.42 # net/core/wireless.c 1.14 -> 1.15 # sound/oss/harmony.c 1.5 -> 1.6 # include/asm-mips/cacheflush.h 1.2 -> 1.3 # fs/jfs/jfs_debug.c 1.5 -> 1.6 # include/asm-s390/pgtable.h 1.19 -> 1.20 # net/802/fddi.c 1.2 -> 1.3 # kernel/sched.c 1.213 -> 1.216 # include/asm-ppc/zorro.h 1.1 -> 1.2 # drivers/ide/legacy/ht6560b.c 1.8 -> 1.9 # fs/efs/super.c 1.19 -> 1.20 # include/asm-x86_64/elf.h 1.6 -> 1.7 # kernel/params.c 1.5 -> 1.6 # Documentation/zorro.txt 1.2 -> 1.3 # net/ipv4/ipvs/ip_vs_lblcr.c 1.5 -> 1.6 # drivers/pci/hotplug/cpqphp.h 1.11 -> 1.12 # drivers/pci/hotplug/pci_hotplug_core.c 1.41 -> 1.42 # drivers/input/mouse/Kconfig 1.10 -> 1.11 # drivers/acpi/dispatcher/dsopcode.c 1.20 -> 1.21 # drivers/char/agp/via-agp.c 1.52 -> 1.53 # drivers/net/Kconfig 1.50 -> 1.55 # drivers/i2c/busses/Kconfig 1.28 -> 1.29 # net/ipv4/arp.c 1.30 -> 1.32 # arch/parisc/kernel/sys_parisc.c 1.9 -> 1.10 # arch/i386/kernel/acpi/boot.c 1.31 -> 1.32 # include/asm-m68k/pgtable.h 1.8 -> 1.9 # drivers/acpi/dispatcher/dswstate.c 1.19 -> 1.20 # include/asm-arm/arch-cl7500/vmalloc.h 1.2 -> 1.3 # drivers/scsi/sym53c8xx_2/sym_misc.c 1.1 -> 1.2 # arch/m68k/q40/q40ints.c 1.13 -> 1.15 # include/asm-parisc/pgtable.h 1.13 -> 1.15 # arch/parisc/kernel/drivers.c 1.7 -> 1.8 # include/asm-i386/acpi.h 1.8 -> 1.9 # fs/proc/inode.c 1.25 -> 1.26 # fs/hugetlbfs/inode.c 1.33 -> 1.34 # net/ipv4/ipvs/ip_vs_lblc.c 1.4 -> 1.5 # drivers/scsi/Kconfig 1.32 -> 1.39 # fs/ext3/super.c 1.76 -> 1.77 # arch/alpha/mm/init.c 1.18 -> 1.19 # drivers/input/joystick/analog.c 1.16 -> 1.17 # include/asm-arm/cacheflush.h 1.4 -> 1.5 # security/selinux/ss/services.c 1.1 -> 1.2 # drivers/pci/Makefile 1.34 -> 1.35 # drivers/acpi/namespace/nsdump.c 1.19 -> 1.20 # net/ipv4/inetpeer.c 1.7 -> 1.8 # arch/m68k/Makefile 1.13 -> 1.14 # net/irda/irsyms.c 1.17 -> 1.18 # drivers/scsi/gvp11.c 1.12 -> 1.13 # net/ipv4/tcp_timer.c 1.16 -> 1.17 # include/asm-m68knommu/cacheflush.h 1.4 -> 1.5 # drivers/acpi/dispatcher/dsinit.c 1.9 -> 1.10 # net/sched/police.c 1.3 -> 1.4 # drivers/pci/pool.c 1.15 -> 1.16 # net/ipv4/ipvs/ip_vs_lc.c 1.2 -> 1.3 # net/ipv4/icmp.c 1.36 -> 1.37 # arch/x86_64/mm/ioremap.c 1.10 -> 1.11 # drivers/acpi/executer/excreate.c 1.17 -> 1.18 # security/selinux/hooks.c 1.7 -> 1.8 # drivers/net/tokenring/madgemc.c 1.16 -> 1.17 # fs/compat_ioctl.c 1.6 -> 1.7 # include/asm-ppc64/pgtable.h 1.24 -> 1.25 # drivers/acpi/Makefile 1.35 -> 1.36 # drivers/input/keyboard/Kconfig 1.9 -> 1.10 # include/linux/compat_ioctl.h 1.9 -> 1.10 # arch/parisc/kernel/setup.c 1.8 -> 1.9 # net/ipv4/ipvs/ip_vs_sed.c 1.2 -> 1.3 # fs/isofs/inode.c 1.35 -> 1.36 # drivers/acpi/namespace/nssearch.c 1.19 -> 1.20 # fs/ext3/file.c 1.14 -> 1.15 # drivers/block/cciss.c 1.95 -> 1.96 # include/asm-parisc/cacheflush.h 1.5 -> 1.6 # include/asm-parisc/pgalloc.h 1.8 -> 1.9 # include/asm-ppc/highmem.h 1.14 -> 1.15 # fs/hpfs/file.c 1.13 -> 1.14 # arch/parisc/kernel/signal.c 1.11 -> 1.12 # include/asm-sparc64/cacheflush.h 1.2 -> 1.3 # net/ipv4/ip_output.c 1.43 -> 1.44 # net/ipv4/igmp.c 1.39 -> 1.40 # fs/inode.c 1.105 -> 1.106 # include/linux/mca-legacy.h 1.3 -> 1.4 # net/ipv4/route.c 1.71 -> 1.72 # drivers/isdn/hardware/eicon/debuglib.h 1.2 -> 1.3 # drivers/acpi/dispatcher/dswscope.c 1.13 -> 1.14 # include/asm-sparc/highmem.h 1.8 -> 1.9 # include/asm-parisc/tlbflush.h 1.1 -> 1.2 # drivers/block/acsi.c 1.54 -> 1.55 # drivers/net/ne2.c 1.10 -> 1.11 # drivers/block/scsi_ioctl.c 1.34 -> 1.35 # arch/ppc/mm/cachemap.c 1.9 -> 1.10 # net/ipv4/fib_frontend.c 1.13 -> 1.14 # include/asm-arm/arch-sa1100/vmalloc.h 1.2 -> 1.3 # drivers/acpi/Kconfig 1.20.1.1 -> 1.26 # arch/parisc/kernel/syscall.S 1.14 -> 1.15 # drivers/scsi/sym53c8xx_2/sym_glue.h 1.14 -> 1.15 # include/asm-s390/cacheflush.h 1.2 -> 1.3 # drivers/scsi/qla1280.c 1.49 -> 1.50 # arch/parisc/kernel/parisc_ksyms.c 1.11 -> 1.12 # net/ethernet/pe2.c 1.2 -> 1.3 # net/ipv4/ipvs/ip_vs_nq.c 1.2 -> 1.3 # fs/jfs/symlink.c 1.5 -> 1.6 # kernel/ptrace.c 1.31 -> 1.32 # arch/i386/kernel/i387.c 1.16 -> 1.17 # include/asm-parisc/processor.h 1.12 -> 1.13 # net/core/iovec.c 1.9 -> 1.10 # arch/parisc/kernel/traps.c 1.11 -> 1.12 # fs/block_dev.c 1.143 -> 1.144 # net/ipv4/ipip.c 1.32 -> 1.33 # include/asm-sh/pgtable.h 1.18 -> 1.19 # arch/parisc/kernel/module.c 1.7 -> 1.8 # fs/udf/inode.c 1.33 -> 1.34 # net/core/rtnetlink.c 1.17 -> 1.18 # drivers/video/stifb.c 1.18 -> 1.19 # drivers/scsi/sun3_scsi_vme.c 1.7 -> 1.8 # include/asm-cris/arch-v10/pgtable.h 1.1 -> 1.2 # drivers/mca/mca-legacy.c 1.5 -> 1.6 # include/net/irda/irda_device.h 1.8 -> 1.9 # include/asm-um/pgtable.h 1.11 -> 1.12 # include/asm-m68k/bitops.h 1.8 -> 1.9 # (new) -> 1.1 arch/parisc/kernel/syscall_table.S # (new) -> 1.1 include/linux/netfilter_bridge/ebt_limit.h # (new) -> 1.1 lib/parser.c # (new) -> 1.1 net/bridge/netfilter/ebt_limit.c # (new) -> 1.2 arch/i386/kernel/cpu/cpufreq/powernow-k8.c # (new) -> 1.1 arch/i386/kernel/cpu/cpufreq/powernow-k8.h # (new) -> 1.1 include/linux/parser.h # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/27 torvalds@home.osdl.org 1.1342.1.33 # Linux 2.6.0-test6 # -------------------------------------------- # 03/09/27 len.brown@intel.com 1.1342.1.34 # Merge intel.com:/home/lenb/bk/linux-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0 # -------------------------------------------- # 03/09/27 len.brown@intel.com 1.1342.7.1 # Merge intel.com:/home/lenb/bk/linux-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-release-2.6.0 # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.1 # o NET: move net/core/dev.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.2 # o NET: move net/core/sock.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 jgarzik@redhat.com 1.1342.9.1 # [MCA] include linux/mca-legacy.h directly, to access deprecated MCA API # -------------------------------------------- # 03/09/28 jgarzik@redhat.com 1.1342.9.2 # [MCA] convert mca-proc to use not-deprecated functions # -------------------------------------------- # 03/09/28 jgarzik@redhat.com 1.1342.9.3 # [MCA] don't include linux/mca-legacy.h from linux/mca.h. # # As the functions and definitions in linux/mca-legacy.h are deprecated, # require that users explicitly include linux/mca-legacy.h as needed. # # Prior to this change, _all_ users of linux/mca.h (i.e. proper users) # issued a warning at compile time, when the MCA legacy API was enabled. # Now only actual users of the legacy API cause warnings, not all MCA drivers. # -------------------------------------------- # 03/09/28 jgarzik@redhat.com 1.1342.9.4 # [wireless arlan] fix modular build # # 'probe' module parameter is only used when arlan is built as a module. # -------------------------------------------- # 03/09/28 jgarzik@redhat.com 1.1342.9.5 # Misc warning fixes: # * block/cciss: eliminate "comparison always false" warning # * char/agp/amd64-agp: properly suffix 64-bit constants # * ide/legacy/pdc4030: fix incomplete conversion to new IDE module API # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.3 # o NET: move net/core/neighbour.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 jgarzik@redhat.com 1.1342.10.1 # [janitor] Replace bcopy() uses with memcpy(), where possible. # # Affects: JFS, scsi/{sym,sym2}, arch/ia64/sn/io/sn2/{module,pic}.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.4 # o NET: move net/ipv4/tcp_ipv4.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.5 # o NET: move net/ipv4/af_inet.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 jgarzik@redhat.com 1.1342.9.6 # [BK] "bk ignore" aic7xxx auto-generated files # -------------------------------------------- # 03/09/28 davej@redhat.com 1.1342.5.4 # [CPUFREQ] powernow-k8 compile fix # -------------------------------------------- # 03/09/28 romieu@fr.zoreil.com 1.1342.11.1 # [PATCH] Fix debug statement after return in drivers/net/wireless/arlan-main.c # # This patch applies to 2.5.68 and is listed on kbugs.org. The debug statement # is never executed because it is after a return. # -------------------------------------------- # 03/09/28 shemminger@osdl.org 1.1342.11.2 # [PATCH] Fix warnings in hamradio/baycom build # # Sorry, overlooked the corresponding .h file in that patch, here it is. # -------------------------------------------- # 03/09/28 mzyngier@freesurf.fr 1.1342.11.3 # [PATCH] ne3210 update # # The enclosed patch ports the ne3210 driver over the EISA probing API. # # It also fixes some ioremap/isa_memcopy_fromio problems (depending on # where the card memory was mapped) by using ioremap unconditionally and # letting memcopy_fromio do the right thing. # # Finally, it removes the card from Space.c (warning, potential # interface renumbering !). # # The module options are currently disabled, until Rusty's # module_param_array() patch is included. I will re-introduce them ASAP. # # Quite heavily tested on x86. # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.6 # o NET: move net/ipv4/tcp.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.7 # o NET: move net/core/skbuff.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.8 # o NET: move net/socket.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.9 # o NET: move net/netlink/af_netlink.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.10 # o NET: move net/core/netfilter.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.11 # o NET: move net/ipv4/udp.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.12 # o NET: move net/ipv4/tcp_output.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.13 # o NET: move net/core/rtnetlink.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.14 # o NET: move net/sched/sch_generic.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.15 # o NET: move net/sched/police.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 torvalds@home.osdl.org 1.1342.9.7 # Merge bk://kernel.bkbits.net/jgarzik/misc-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/28 torvalds@home.osdl.org 1.1342.9.8 # Merge bk://kernel.bkbits.net/jgarzik/bcopy-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.16 # o NET: move net/ipv4/ip_sockglue.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.17 # o NET: move net/ipv4/devinet.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.18 # o NET: move net/core/ethtool.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.19 # o NET: move net/ipv4/tcp_minisocks.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.20 # o NET: move net/ipv4/tcp_input.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.21 # o NET: move net/ipv4/tcp_timer.c EXPORT_SYMBOLs from net/netsyms.c # # Also move the EXPORT_SYMBOL(tcp_statistics) to net/ipv4/tcp.c, so that # finally the tcp.h header can be removed from net/netsyms.c, ctags doesn't # catches the variables defined with DEFINE_SNMP_STAT :-\ # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.22 # o NET: move net/ipv4/ip_output.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.23 # o NET: move net/ipv4/arp.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.24 # o NET: move net/core/wireless.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.25 # o NET: move net/core/datagram.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.26 # o NET: move net/sched/sch_api.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.27 # o NET: move net/core/scm.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.28 # o NET: move net/core/iovec.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.29 # o NET: move net/core/utils.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.30 # o NET: move net/core/dst.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.31 # o NET: move net/core/dev_mcast.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.32 # o NET: move net/core/flow.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.33 # o NET: move net/core/filter.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.34 # o NET: move net/core/dv.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.35 # o NET: move net/core/link_watch.c EXPORT_SYMBOLs from net/netsyms.c # # Also fix a typo. # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.36 # o NET: move net/ipv4/route.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.37 # o NET: move net/ipv4/igmp.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.38 # o NET: move net/ipv4/icmp.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.39 # o NET: move net/ipv4/fib_frontend.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.40 # o NET: move net/ipv4/protocol.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.41 # o NET: move net/ipv4/ip_options.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.42 # o NET: move net/ipv4/tcp_output.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.43 # o NET: move net/ipv4/ip_fragment.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.44 # o NET: move net/ipv4/inetpeer.c EXPORT_SYMBOLs from net/netsyms.c # # And some leftovers from previous changesets also moved to net/core/dev.c # and net/sched/sch_api.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.45 # o NET: move net/ipv4/{ip_input,sysctl_net_ipv4}.c EXPORT_SYMBOLs from net/netsyms.c # # And also a leftover to net/ipv4/af_inet.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.46 # o NET: move net/802/*.c EXPORT_SYMBOLs from net/netsyms.c # # Also add #include to include/net/pkt_sched.h, as it uses # functions defined on this include (netif_queue_stopped, etc). Ah, the other # datalink stuff was moved as well (eth.c, pe2.c) # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.47 # o NET: move rest of net/sched/*.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.48 # o NET: move net/xfrm/xfrm_algo.c EXPORT_SYMBOL_GPLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.49 # o NET: move drivers/net/Space.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.50 # o NET: move drivers/net/loopback.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.51 # o NET: move fs/fcntl.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/28 acme@conectiva.com.br 1.1342.8.52 # o NET: move fs/file_table.c EXPORT_SYMBOLs from net/netsyms.c # -------------------------------------------- # 03/09/29 acme@conectiva.com.br 1.1342.8.53 # o NET: net/netsyms.c bites the dust # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.5.5 # [CPUFREQ] Fix ordering in kconfig. # -------------------------------------------- # 03/09/29 trini@org.rmk.(none) 1.1267.1.18 # [SERIAL] Make the Startech UART detection 'more correct' # -------------------------------------------- # 03/09/29 len.brown@intel.com 1.1267.30.9 # [ACPI] CONFIG_ACPI_RELAXED_AML from 2.4 # http://bugzilla.kernel.org/show_bug.cgi?id=1248 # -------------------------------------------- # 03/09/29 len.brown@intel.com 1.1342.1.35 # Merge intel.com:/home/lenb/bk/linux-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0 # -------------------------------------------- # 03/09/29 len.brown@intel.com 1.1342.7.2 # Merge intel.com:/home/lenb/bk/linux-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-release-2.6.0 # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.9 # [PATCH] affs sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.10 # [PATCH] befs sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.11 # [PATCH] ext3 sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.12 # [PATCH] fat sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.13 # [PATCH] freevxfs sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.14 # [PATCH] hfs sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.15 # [PATCH] hpfs sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.16 # [PATCH] jbd sparse fixes # -------------------------------------------- # 03/09/29 Andries.Brouwer@cwi.nl 1.1342.9.17 # [PATCH] jfs sparse fixes # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.18 # [PATCH] m68k zImage # # m68k: Build a zImage (vmlinux.gz) instead of an uncompressed image by default # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.19 # [PATCH] Q40/Q60 interrupts # # Q40/Q60: Must handle keyboard interrupts even before they are registered (from # Richard Zidlicky) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.20 # [PATCH] Sun-3 bootmem # # Sun-3: Use init_bootmem_node() instead of init_bootmem() for Sun-3, to avoid # setting min/max_low_pfn in init_bootmem(). This was screwing up SCSI, and the # new method is more like m68k/motorola. (from Sam Creasey) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.21 # [PATCH] Sun-3 SCSI # # Sun-3 SCSI updates (from Sam Creasey): # - Define sun3scsi_release() in sun3_scsi and sun3_scsi_vme so that the # drivers will actually be loaded by the SCSI subsystem. # - Remove some warnings. # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.22 # [PATCH] Q40/Q60 interrupts # # Q40/Q60: Fix warnings, add diagnostic message (from Richard Zidlicky) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.23 # [PATCH] M68k PCI # # M68k PCI: Include , like all other archs do # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.24 # [PATCH] M68k bitops # # M68k bitops: Make input parameters of *find*bit() routines const: # - find_first_zero_bit() # - find_next_zero_bit() # - sched_find_first_bit() # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.25 # [PATCH] Atari ST-RAM missing include # # Atari ST-RAM: Add missing include # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.26 # [PATCH] Mac SWIM floppy missing include # # Mac SWIM floppy: Add missing include # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.27 # [PATCH] Atari ACSI fix # # Atari ACSI: Add missing include and fix duplicate parameter type # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.28 # [PATCH] Macintosh 8390 Ethernet update # # Mac8390: Update for netdevice/8390 core changes in 2.5.8 # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.29 # [PATCH] Atari Hades support is broken # # Atari Hades support is broken (needs updates for the new PCI code) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.30 # [PATCH] Atari ST-RAM swap is broken # # Atari ST-RAM swap is broken (needs swap updates) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.31 # [PATCH] Macintosh SWIM IOP floppy is broken # # Macintosh SWIM IOP floppy is broken (needs bio updates) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.32 # [PATCH] Atari ACSI is broken # # Atari ACSI is broken (needs bio updates) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.33 # [PATCH] 53c7xx SCSI core is broken # # 53c7xx SCSI core is broken (needs SCSI updates (has_cmdblocks and device # lists)), breaking the following drivers: # - Amiga A4000T SCSI # - Amiga A4091 SCSI # - Amiga WarpEngine SCSI # - Amiga Blizzard PowerUP 603e+ SCSI # - MVME16x NCR53C710 SCSI # - BVME6000 NCR53C710 SCSI # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.34 # [PATCH] Amiga A2091 SCSI is broken # # Amiga A2091 SCSI is broken (needs SCSI device list updates and # a2091_bus_reset()) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.35 # [PATCH] Amiga GVP-II SCSI is broken # # Amiga GVP-II SCSI is broken (needs SCSI device list updates and # gvp11_bus_reset()) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.36 # [PATCH] Atari Bionet Ethernet is broken # # Atari Bionet Ethernet is broken (needs netif updates and broken ACSI) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.37 # [PATCH] Atari Pamsnet Ethernet is broken # # Atari Pamsnet Ethernet is broken (needs netif updates and broken ACSI) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.38 # [PATCH] MVME166/7 CD2401 serial is broken # # MVME166/7 CD2401 serial is broken (needs taskqueue updates) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.39 # [PATCH] Macintosh CS89x0 Ethernet is broken # # Macintosh CS89x0 Ethernet is broken (needs netif updates) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.40 # [PATCH] Atari frame buffer device is broken # # Atari frame buffer device is broken (needs update to new fbdev framework and # new iplan2p* drawing operations) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.41 # [PATCH] Amiga CyberVision 64 frame buffer device is broken # # Amiga CyberVision 64 frame buffer device is broken (needs update to new fbdev # framework) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.42 # [PATCH] Amiga Retina Z3 frame buffer device is broken # # Amiga Retina Z3 frame buffer device is broken (needs update to new fbdev # framework) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.43 # [PATCH] Amiga Cybervision 64/3D frame buffer device is broken # # Amiga Cybervision 64/3D frame buffer device is broken (needs update to new # fbdev framework) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.44 # [PATCH] Sun-3/3x frame buffer device is broken # # Sun-3/3x frame buffer device is broken (needs update to new fbdev and sbuslib # frameworks) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.45 # [PATCH] Atari NCR5380 SCSI is broken # # Atari NCR5380 SCSI is broken (needs old update_timeout() from scsi_obsolete) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.46 # [PATCH] Macintosh SMC 9194 Ethernet is broken # # Macintosh SMC 9194 Ethernet is broken (needs NuBus I/O abstractions) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.47 # [PATCH] Dmasound config # # Dmasound: Use select to get CONFIG_DMASOUND defined for all subdrivers (from # Christoph Hellwig). # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.48 # [PATCH] Amiga Zorro bus doc updates # # Amiga Zorro bus: Update the docs to match the current situation. # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.49 # [PATCH] Amiga A2091 SCSI fix # # A2091 SCSI: Fix compilation by getting rid of the obsolete SCSI host instance # loop and using per-card interrupt handlers instead. # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.50 # [PATCH] Amiga GVP-II SCSI fix # # GVP-II SCSI: Fix compilation by getting rid of the obsolete SCSI host instance # loop and using per-card interrupt handlers instead. # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.51 # [PATCH] Zorro include guards # # Zorro: Make closing include guards consistent with opening include guards # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.52 # [PATCH] Amiga A2232 Serial typo # # A2232 Serial: Fix typo # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.53 # [PATCH] M68k sched_clock() # # M68k: Add sched_clock() (introduced in 2.6.0-test6) # -------------------------------------------- # 03/09/29 geert@linux-m68k.org 1.1342.9.54 # [PATCH] Generic serial warning # # Generic serial: jiffies are unsigned long # -------------------------------------------- # 03/09/29 torvalds@home.osdl.org 1.1342.9.55 # Select the i8042 driver for mouse and keyboard only on PC's. # Other architectures have other low-level serial chips. # # Make "PC" configuration shorthand (same as "X86 && !EMBEDDED" # right now, but other PC-like architectures may start using it) # -------------------------------------------- # 03/09/29 piggin@cyberone.com.au 1.1342.9.56 # [PATCH] remove bogus UP on SMP kernel error # # This removes a bogus error message in the bogomips reporting code when # running an SMP kernel on UP. It makes the output consistent with what # you see on an SMP box. I noticed this while testing, but it recently # annoyed me again when booting a knoppix CD - its the first line you'll # see. # -------------------------------------------- # 03/09/29 axboe@suse.de 1.1342.9.57 # [PATCH] kill CDROM_SEND_PACKET # # The CDROM_SEND_PACKET ioctl is both slow and ugly, this patch keeps the # functionality but utilizes the much better sg_io() framework. # -------------------------------------------- # 03/09/29 bunk@fs.tum.de 1.1342.9.58 # [PATCH] select for fs/Kconfig # # This switches fs/Kconfig to use select where appropriate (affects # nfs{,d} and afs). # -------------------------------------------- # 03/09/29 smurf@play.smurf.noris.de 1.1342.9.59 # [PATCH] minor edit typo # # Editor wraparound and comments don't always like each other. # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.60 # [PATCH] megaraid ULL fix. # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.61 # [PATCH] K7 MCE handler fixes. # # Don't poke bank 0 on Athlon, some of them don't like it # and raise spurious MCEs. # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.62 # [PATCH] Correct address in MAINTAINERS # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.63 # [PATCH] ULL fixes for qlogicfc # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.64 # [PATCH] Cleanup SEP errata workaround. # # This looks a little simpler, and has the same effect. # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.65 # [PATCH] fix leak in btaudio # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.66 # [PATCH] logic thinko in i2c # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.67 # [PATCH] Correct URL in h8300 README # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1342.9.68 # [PATCH] VIA Typo in i2c. # -------------------------------------------- # 03/09/29 davej@redhat.com 1.1267.67.1 # [AGPGART] New VIA AGP PCI id. # -------------------------------------------- # 03/09/29 armin@melware.de 1.1342.9.69 # [PATCH] Eicon ISDN driver: fix compile error # # fix compiler error of badly punctuated macro definitions. # -------------------------------------------- # 03/09/29 armin@melware.de 1.1342.9.70 # [PATCH] Eicon ISDN driver: cleanups # # Removed doubled header file includes. # Removed includes of version.h. # Removed the use of __KERNEL_SYSCALLS__ # -------------------------------------------- # 03/09/29 bgerst@didntduck.org 1.1342.9.71 # [PATCH] i386 do_machine_check() is redundant. # # This removes "do_machine_check()" in favour of just calling the # appropriate machine check handler directly from the lowlevel exception # code. # -------------------------------------------- # 03/09/29 lxiep@us.ibm.com 1.1347 # [PATCH] PCI Hotplug: export hotplug_slots subsys # # This is needed for the PPC64 PCI hotplug driver. # -------------------------------------------- # 03/09/29 greg@kroah.com 1.1348 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/pci-2.6 # -------------------------------------------- # 03/09/29 davej@wopr.codemonkey.org.uk 1.1342.9.72 # Merge wopr.codemonkey.org.uk:/home/davej/src/bk-linus # into wopr.codemonkey.org.uk:/home/davej/src/cpufreq # -------------------------------------------- # 03/09/29 davej@wopr.codemonkey.org.uk 1.1342.12.1 # Merge wopr.codemonkey.org.uk:/home/davej/src/bk-linus # into wopr.codemonkey.org.uk:/home/davej/src/agpgart # -------------------------------------------- # 03/09/29 adobriyan@mail.ru 1.1349 # [PATCH] PCI: Remove setting TASK_RUNNING after schedule_timeout in /drivers/pci/ # -------------------------------------------- # 03/09/29 rmk@flint.arm.linux.org.uk 1.1267.1.19 # [SERIAL] Change maintainer entry for serial. # # Finally admit defeat and change the maintainers entry for 8250/16x50 # serial. # -------------------------------------------- # 03/09/29 torvalds@home.osdl.org 1.1342.13.1 # Merge bk://bk.arm.linux.org.uk/linux-2.6-serial # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/29 B.Zolnierkiewicz@elka.pw.edu.pl 1.1342.13.2 # [PATCH] fix /proc/ide/hdX/settings # # Blind strncpy()->strlcpy() conversion in 2.5.70 # made it impossible to change any setting, revert it. # -------------------------------------------- # 03/09/29 B.Zolnierkiewicz@elka.pw.edu.pl 1.1342.13.3 # [PATCH] update ali14xx driver # # - common ali14xx_init() for built-in and module # - do not call findPort() twice # - touch hwifs only if chipset was found and initialized # - release hwif only if hwif->chipset == ide_ali14xx # - when releasing hwif, restore hwif->channel to the default value # - mark exit functions with __exit # - do not use ide_hwifs[] directly # - minor cleanups # -------------------------------------------- # 03/09/29 B.Zolnierkiewicz@elka.pw.edu.pl 1.1342.13.4 # [PATCH] update dtc2278 driver # # - common dtc2278_init() for built-in and module # - touch hwifs only if hwif->chipset == ide_unknown for both ports, # so we don't thrash already used hwifs when loading module # - release hwif only if hwif->chipset == ide_dtc2278 # - mark exit functions with __exit # - do not use ide_hwifs[] directly # - minor cleanups # -------------------------------------------- # 03/09/29 B.Zolnierkiewicz@elka.pw.edu.pl 1.1342.13.5 # [PATCH] update ht6560b driver # # - common ht6560b_init() for built-in and module # - release hwif only if hwif->chipset == ide_ht6560b # - when releasing hwif, restore hwif->channel to the default value # - mark exit functions with __exit # - do not use ide_hwifs[] directly # - minor cleanups # -------------------------------------------- # 03/09/29 B.Zolnierkiewicz@elka.pw.edu.pl 1.1342.13.6 # [PATCH] update qd65xx driver # # - common qd65xx_init() for built-in and module # - release hwif only if hwif->chipset == ide_qd65xx # - mark exit functions with __exit # - do not use ide_hwifs[] directly # - minor cleanups # -------------------------------------------- # 03/09/29 B.Zolnierkiewicz@elka.pw.edu.pl 1.1342.13.7 # [PATCH] update umc8672 driver # # - common umc8672_init() for built-in and module # - release hwif only if hwif->chipset == ide_umc8672 # - mark exit functions with __exit # - do not use ide_hwifs[] directly # - minor cleanups # -------------------------------------------- # 03/09/29 acme@conectiva.com.br 1.1342.14.1 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/namei.c # -------------------------------------------- # 03/09/29 acme@conectiva.com.br 1.1342.14.2 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/buffer.c # -------------------------------------------- # 03/09/29 acme@conectiva.com.br 1.1342.14.3 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/dcache.c # -------------------------------------------- # 03/09/29 acme@conectiva.com.br 1.1342.14.4 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to kernel/sched.c # -------------------------------------------- # 03/09/29 acme@conectiva.com.br 1.1342.14.5 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/libfs.c # -------------------------------------------- # 03/09/29 torvalds@home.osdl.org 1.1342.13.8 # Merge bk://kernel.bkbits.net/acme/ksyms-2.6 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/29 len.brown@intel.com 1.1267.30.10 # [ACPI] ACPI Component Architecture 20030918 (Bob Moore) # # Found and fixed a longstanding problem with the late execution of # the various deferred AML opcodes (such as Operation Regions, # Buffer Fields, Buffers, and Packages)... # This fixes the "region size computed incorrectly" problem. # # Fixed several 64-bit issues with prototypes, casting and data types. # # Removed duplicate prototype from acdisasm.h # -------------------------------------------- # 03/09/29 len.brown@intel.com 1.1342.1.36 # Merge intel.com:/home/lenb/src/linux-acpi-test-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0 # -------------------------------------------- # 03/09/30 davej@redhat.com 1.1342.9.73 # [CPUFREQ] Longhaul >v1 can't use EBLCR for FSB, has to calculate it instead. # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1267.30.11 # [ACPI] CONFIG_ACPI is no longer necessary to enable HT (from 2.4.23) # if (CONFIG_ACPI || CONFIG_SMP) CONFIG_ACPI_BOOT=y # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1267.30.12 # [ACPI] add CONFIG_ACPI_RELAXED_AML to config menu # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1267.30.13 # [ACPI] acpi_pci_link_allocate() should stick with irq.active if set. (Andrew de Quincey) # Fixes OSDL #1186 "broken USB" and others # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1267.30.14 # [ACPI] GV3 IO port is 16-bits (Venkatesh Pallipadi) # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1342.1.37 # Merge intel.com:/home/lenb/src/linux-acpi-test-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0 # -------------------------------------------- # 03/09/30 zaitcev@redhat.com 1.1342.13.9 # [SPARC]: jsflash update # # Parts of this come from a janitor named Domen, unfortunately, # I forgot his e-mail... Anyhow, it's obvious that janitors # did not try to compile result of their efforts, this version # at least builds. # -------------------------------------------- # 03/09/30 urban.widmark@enlight.net 1.1342.13.10 # [SMBFS]: Create OLD_TO_NEW_foo macros in highuid.h and use # them instead of direct references to low2highfoo. # -------------------------------------------- # 03/09/30 ja@ssi.bg 1.1342.15.1 # [KERNEL]: Introduce list_for_each_entry_continue. # -------------------------------------------- # 03/09/30 ja@ssi.bg 1.1342.15.2 # [IPVS]: Simplify ip_vs_wrr_gcd_weight # -------------------------------------------- # 03/09/30 ja@ssi.bg 1.1342.15.3 # [IPVS]: The NQ scheduler must not return servers with weight 0. # -------------------------------------------- # 03/09/30 ja@ssi.bg 1.1342.15.4 # [IPVS]: Use list_for_each_entry_continue in some schedulers. # -------------------------------------------- # 03/09/30 bdschuym@pandora.be 1.1342.15.5 # [EBTABLES]: Add ebt_limit match. # # The patch below adds the ebt_limit match, which is the equivalent of # the iptables limit match. This enables limiting the number of frames # processed per time unit. # # The patch is from Tom Marshall . # -------------------------------------------- # 03/09/30 davem@nuts.ninka.net 1.1342.15.6 # [KERNEL]: Do not export set_cpus_allowed twice, and only if CONFIG_SMP. # -------------------------------------------- # 03/09/30 davem@nuts.ninka.net 1.1342.15.7 # [IPV4]: Do pskb_may_pull in arp_rcv() not arp_process(). # -------------------------------------------- # 03/09/30 davem@nuts.ninka.net 1.1342.15.8 # [IPV4]: In arp_rcv(), inspect skb->nh.arph after pskb_may_pull() not before. # -------------------------------------------- # 03/09/30 herbert@gondor.apana.org.au 1.1342.15.9 # [IPIP]: Avoid duplicate policy checks. # -------------------------------------------- # 03/09/30 bdschuym@pandora.be 1.1342.15.10 # [EBTABLES]: Use vlan_hdr not vlan_ethhdr in ebt_vlan.c # -------------------------------------------- # 03/09/30 davem@nuts.ninka.net 1.1342.13.11 # [SPARC64]: Always use sethi+jmpl to reach VISenter{,half}. # -------------------------------------------- # 03/09/30 davem@nuts.ninka.net 1.1342.8.54 # Merge bk://kernel.bkbits.net/acme/netsyms-2.6 # into nuts.ninka.net:/disk1/davem/BK/net-2.5 # -------------------------------------------- # 03/09/30 dfages@arkoon.net 1.1342.8.55 # [NET]: Fix HW_FLOWCONTROL on SMP. # -------------------------------------------- # 03/09/30 torvalds@home.osdl.org 1.1342.8.56 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1342.1.38 # [ACPI] acpi4asus-0.24a-0.25-2.6.0-test (Karol Kozimor) # -------------------------------------------- # 03/09/30 greg@kroah.com 1.1350 # Merge kroah.com:/home/linux/BK/bleed-2.5 # into kroah.com:/home/linux/BK/pci-2.5 # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1342.1.39 # [ACPI] acpi4asus-0.25-0.26.diff (Karol Kozimor) # -------------------------------------------- # 03/09/30 rtjohnso@eecs.berkeley.edu 1.1351 # [PATCH] PCI: __init documetation # # It might not have prevented me from reporting the potential bug, but I # would've known you'd thought about it, it might help future developers, # and it's unlikely to become dangerously wrong. # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1342.1.40 # [ACPI] build fix: remove 2nd __exit from asus_acpi.c # -------------------------------------------- # 03/09/30 len.brown@intel.com 1.1342.1.41 # [ACPI] deal with lack of acpi prt entries gracefully (Jesse Barnes) # -------------------------------------------- # 03/10/01 len.brown@intel.com 1.1342.1.42 # Merge intel.com:/home/lenb/bk/linux-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0 # -------------------------------------------- # 03/10/01 len.brown@intel.com 1.1342.7.3 # Merge intel.com:/home/lenb/bk/linux-2.6.0 # into intel.com:/home/lenb/bk/linux-acpi-release-2.6.0 # -------------------------------------------- # 03/10/01 len.brown@intel.com 1.1342.1.43 # Merge # -------------------------------------------- # 03/09/30 willy@debian.org 1.1352 # [PATCH] Remove ELF_CORE_SYNC # # ELF_CORE_SYNC and dump_smp_unlazy_fpu seem to have been introduced # by Ingo around 2.5.43, but as far as I can tell, never used. # -------------------------------------------- # 03/09/30 willy@debian.org 1.1353 # [PATCH] PA-RISC updates # # PA-RISC updates for 2.6.0-test6 # - Some more support for 64-bit userspace # - Move many EXPORT_SYMBOLs out of parisc_ksyms.c # - Make both the OSS and ALSA harmony drivers build # - ioctl typechecking # - Make math-emu build without warnings. # - Persuade SuckyIO to not crash the machine. # -------------------------------------------- # 03/09/30 akpm@osdl.org 1.1354 # [NET]: Fix xfrm_algo.c module exports. # -------------------------------------------- # 03/09/30 drepper@redhat.com 1.1355 # [NET]: Use task->tgid instead of task->pid in SCM credentials code. # -------------------------------------------- # 03/09/30 petri.koistinen@iki.fi 1.1356 # [NET]: Modernize network device help text. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1357 # [IRDA]: Get rid of destructor for irda devices. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1358 # [IRDA]: Add alloc_irdadev() interface. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1359 # [IRDA]: Convert irport to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1360 # [IRDA]: Convert ali-ircc to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1361 # [IRDA]: Convert donauboe to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1362 # [IRDA]: Convert nsc-ircc to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1363 # [IRDA]: Convert w83977af_ir to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1364 # [IRDA]: Convert sir to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1365 # [IRDA]: Convert via-ircc to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1366 # [IRDA]: Use unregister_netdev instead of explicit reference to rtnl_lock. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1367 # [IRDA]: Use register_netdev instead of explicit reference to rtnl_lock. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1368 # [IRDA]: In smsc-ircc2 use request_region instead of check_region. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1369 # [IRDA]: In smsc-ircc2 use request_region earlier in the setup process. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1370 # [IRDA]: In smsc-ircc2, fix whitespace and indentation. # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1371 # [IRDA]: Convert smsc-ircc2 to alloc_irdadev(). # -------------------------------------------- # 03/10/01 shemminger@osdl.org 1.1372 # [IRDA]: Convert irda-usb to alloc_irdadev(). # -------------------------------------------- # 03/10/01 axboe@suse.de 1.1353.1.1 # [PATCH] make ide-floppy work # # ide-floppy has screwy bio handling. I rewrote it and got confirmation # from one tester (the only one :) that it actually works now. # -------------------------------------------- # 03/10/01 torvalds@home.osdl.org 1.1373 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/10/01 torvalds@home.osdl.org 1.1374 # Merge http://linux-acpi.bkbits.net/linux-acpi-release-2.6.0 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/10/01 torvalds@home.osdl.org 1.1375 # Merge bk://linux-dj.bkbits.net/agpgart # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/10/01 torvalds@home.osdl.org 1.1376 # Merge bk://linux-dj.bkbits.net/cpufreq # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/10/01 viro@parcelfarce.linux.theplanet.co.uk 1.1377 # [PATCH] EFS set_blocksize() error handling # # There doesn't seem to be any active maintainer for EFS: It's either # abandoned, or never required specific patches too badly (also quite # possible in this case). # # It went into the tree in 2.3.2 and from there to 2.6.0-test6 I see # nothing that would look like maintainer's update. OTOH, it's read-only # and shouldn't be too badly broken (or hard to keep alive). # # Outside of trunk (i.e. in 2.4.16--) we have a backport of global 2.5 # change (sb_bread()) and check for set_blocksize() failures (from Alan). # This is the 2.6.x equivalent. # -------------------------------------------- # 03/10/01 piggin@cyberone.com.au 1.1378 # [PATCH] AS fix # # This picks up another place where aliases where getting lost. And adds # a couple of checks. I can't hang the osdl database thingy anymore. # # The transfer alias list loops could probably quite nicely be changed to # # if (unlikely(!list_empty( old_queuelist ))) # __list_splice( old_queuelist, new_queuelist.prev); # -------------------------------------------- # 03/10/01 riel@surriel.com 1.1379 # [PATCH] syscall number for vserver # # Vserver is a patch that implements BSD jail style virtual host semantics # inside Linux, where every process not only runs in its own namespace (it # reuses the chroot code for that, should switch to CLONE_NEWNS for 2.6), # but also its own hostname and IP address as well as its own view of # /proc. # # Because of that added functionality, it needs more than what is # available in the LSM framework (which can only allow/deny permissions, # not alter return values). # # The source code has been running stable for the last few years and is in # use at quite a few service providers. The Fedora project also wants to # use vserver for their build system. However, vserver for 2.4 just tacks # their syscalls onto the end of the syscall table and the userland tools # find those "dynamic numbers" somehow ... EWWWW. # # For 2.6 I'd like to do things right. At the moment the vserver patch # has sys_new_s_context and sys_set_ipv4root calls, but since we'll # probably end up getting an ipv6 call too and people are planning future # functionality, I guess it would be more appropriate to multiplex these # through one sys_vserver patch, in the same way sys_ipc works. # # For your reference, you can find more information about # vserver on these pages: # # http://www.13thfloor.at/VServer/ # http://www.solucorp.qc.ca/miscprj/s_context.hc # # I estimate the project has about a dozen developers now. We are # planning on making the implementation for 2.6 fairly lightweight, # reusing infrastructure from other code where possible and only doing # things through sys_vserver where there is no other way. # # This small change just adds sys_vserver to the syscall table. # -------------------------------------------- # 03/10/01 joern@wohnheim.fh-wedel.de 1.1380 # [PATCH] Fix wrong CONFIG_* in comment # # Our tools are somewhat too stupid. They find a mistyped CONFIG_HIGMEM # (missing 'H') and assume a dependency on config/higmem.h. Fix the comment. # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.2 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to mm/filemap.c # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.3 # o kernel/ksyms.c: set_cpus_schedule was EXPORT_SYMBOL_GPL, bring it back # # Originally, before this set of patches moving stuff out from kernel/ksyms.c, # set_cpus_schedule was EXPORT_SYMBOL_GPL, my mistake, bring it back. # # Also follow Andrew Morton's suggestions of moving the EXPORT_SYMBOL{_GPL) even # closer to the place where the symbol exported is defined, i.e. just after the # symbol definition, this makes mistakes more difficult to happen, as when the # symbol definition is #ifdefed the EXPORT_SYMBOL{_GPL} is in the same block. # -------------------------------------------- # 03/10/01 torvalds@home.osdl.org 1.1381 # Merge bk://kernel.bkbits.net/acme/ksyms-2.6 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/10/01 torvalds@home.osdl.org 1.1382 # Fix bogus preprocessor end comment to match the real scope. # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.4 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/block_dev.c # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.5 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/super.c # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.6 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to kernel/sysctl.c # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.7 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/inode.c # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.8 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/exec.c # -------------------------------------------- # 03/10/01 acme@parisc.kerneljanitors.org 1.1353.1.9 # o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/seq_file.c # -------------------------------------------- # 03/10/01 torvalds@home.osdl.org 1.1383 # Merge bk://kernel.bkbits.net/acme/ksyms-2.6 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/10/01 svm@kozmix.org 1.1384 # [PATCH] fix btaudio error case # # Free the right buffer on allocation error # -------------------------------------------- # 03/10/01 bfennema@falcon.csc.calpoly.edu 1.1385 # [PATCH] UDF oops on inode read failure # # This fixes an oops with failed inode reads on UDF # -------------------------------------------- # 03/10/01 Jay.Estabrook@hp.com 1.1386 # [PATCH] for Alpha against 2.6.0-test6 # # Here is a very small set of fixes for Linux/axp, with a new one for # "sched_clock" just introduced. # # Note that all but the arch/alpha/mm/init.c are required for a clean # build, since warnings->errors is still on. # # The arch/alpha/mm/init.c stuff is from Jeff for MARVEL, and MUST be there # for any machines running the latest firmware... # -------------------------------------------- # 03/10/01 ink@jurassic.park.msu.ru 1.1387 # [PATCH] Alpha cypress CPU frequency calibration # # This fixes (again...) CPU frequency calibration on some platforms with # the Cypress chip. That is, at some point CLOCK_TICK_RATE has been # changed to represent RTC reference clock instead of PIC one. Which # makes calibrate_cc_with_pic() produce utterly bogus results. # -------------------------------------------- # 03/10/01 jes@wildopensource.com 1.1388 # [PATCH] qla1280 locking update # # This fixes the qla1280 driver to not try to release an unlocked spinlock # at boot time - as well as a couple of other minor mods. # # I also changed the MMIO option to be dependant on X86_VISWS as it's # really a chipset problem and not something each and every driver should # be asking for. # # Getting a global CONFIG_MMIO_IS_BROKEN option would probable be a win # here. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1389 # [PATCH] dscc4 warning fixes # # - ifdef out a couple of unused functions # # - remove unused label # # - __setup function is not used when compiled as a module. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1390 # [PATCH] Fix memory leak in hugetlbfs # # From: "Chen, Kenneth W" # # The hugetlbfs_fill_super() doesn't free up memory allocated for sbinfo on # the way out in case of parsing error (and a few others). This leads to # memory leak If root tries to mount a hugetlbfs with invalid mount option. # Here is a patch that fix the problem. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1391 # [PATCH] Fix double request_region in com20020 # # From: Herbert Xu # # Currently com20020 and com20020_cs both call request_region on the same # block of ports leading to a conflict. This patch resolves this by moving # request_region out of the generic driver and into the isa/pci/cs drivers. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1392 # [PATCH] Add bin2c copyrights # # From: Oliver Xymoron # # I just noticed the ikconfig stuff made it into mainline via -mm. I # also just noticed that it's based in part on a patch I posted almost 5 # years ago: # # http://groups.google.com/groups?q=oliver+xymoron+config.gz&hl=en&lr=&ie=UTF-8&selm=fa.j8fsl5v.g08fjo%40ifi.uio.no&rnum=2 # # Sadly, after wandering aimlessly in the desert of unloved patches all # those years, all attribution got lost. This adds a copyright + license # to scripts/bin2c.c, which hasn't aged a day. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1393 # [PATCH] Add missing label in isdn_common.c # # From: Herbert Xu # # The last change to isdn_common.c removed a label that is used when # ISDN_PPP is defined. This patch puts it back. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1394 # [PATCH] dev_t forward compatibility fix # # From: Andries.Brouwer@cwi.nl # # ext2 used a 32-bit field for dev_t, with possibly undefined storage # following; thus, no action was required to go to 32-bit dev_t, but going to # 64-bit dev_t required some subtlety: 0 was written in the first word and # the 64 bits in the following two. Al truncated my 64-bit stuff to 32 bits # but did not understand why there was this split, and wrote 0 followed by a # single word. We should at least zero the word following to have # well-defined storage later. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1395 # [PATCH] x86 mman.h fix # # Remove duplicated #defines # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1396 # [PATCH] memory writeback/invalidation fixes # # From: "David S. Miller" # # This attempts to take care of 2 of the MM todos I had on # my backlog: # # 1) Zap the stupid flush_cache_all() thing with more meaningful # interfaces. # # 2) Resolve the ptrace user page access issues, first stage. # # The "first stage" mentioned for #2 is simply creating the # user page accesor interfaces. The next stage needs to be # mucking with get_user_pages() so that we can control when # the flush_dcache_page() occurs. Then we: # # 1) For every platform where flush_dcache_page() is a non-nop # add a call to the beginning of copy_{from,to}_user_page(). # 2) Make access_process_vm() set the "no dcache flush" bit in # it's call to get_user_pages(). # # The idea also was that we'd consolidate the write etc. boolean # args passed to get_user_pages() into flag bits too. # # But at least with the below, we can delete that reminder FIXME # comment from kernel/ptrace.c, the platforms have the necessary # tools and just need to make use of it :) # # As a bonus I noticed that VMALLOC_VMADDR() did absolutely nothing. # # After all of this I only have 1 real TODO left, and that's dealing # with the SMP TLB/pte invalidation stuff, very low priority until # someone starts doing more work with sparc32/SMP in 2.6.x :) # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1397 # [PATCH] table-driven filesystems option parsing # # From: "Randy.Dunlap" , Will Dyson , me # # Add generic filesystem options parser (infrastructure) and use it to parse # mount options in several filesystems (adfs, affs, autofs, autofs4, ext2, # ext3, fat, hfs, hpfs, isofs, jfs, procfs, udf, and ufs). # # It saves between 128 and 512 bytes per filesystem. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1398 # [PATCH] module parameter array fixes # # From: Rusty Russell # # Found this while converting netfilter modules to use the new # parameters. Also fixes an out-by-one error in maximum elements you # can put in array. # # The current "intarray" module params were never tested, and um, suck. # Only one person uses them, and it looks painful. # # Since noone uses them, replace them with tested versions. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1399 # [PATCH] check permission in ->open for /proc/sys/ # # From: Christoph Hellwig # # It's the only abuse of proc_iops left (except the totally b0rked comx # driver). The patch is from Al, I just forward-ported it from 2.4. # # Background: struct proc_dir_entry has a struct inode_operations *proc_iops # member, it's from Linux's stoneage and used internally by procfs to assign # either the link or directory inode ops. # # Unfortunately some drivers started to abuse it do do bad things like create # on lookup (that's the comx thingy which relies on unexported symbols and thus # is broken for modular builds since mid-2.3) or various ->permission tricks # (all gone by now). # # After this patch is gone I have another one that kills proc_iops and just # uses a normal conditional inside procfs to assign the right one directly. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1400 # [PATCH] fix memleak in mtd/chips/cfi_cmdset_0020.c # # From: Felipe W Damasio # # If other kmallocs failed after successfully allocating a "struct mtd_info", # it should be freed before returning NULL. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1401 # [PATCH] Fix bug in SELinux convert_context # # From: Stephen Smalley # # This patch fixes a bug introduced by earlier code cleanups in the SELinux # convert_context code that manifests upon a policy reload that removes # previously valid security attributes. Thanks to Magosanyi Arpad for # reporting the bug. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1402 # [PATCH] Pass nameidata to security_inode_permission hook # # From: Stephen Smalley # # This patch changes the security_inode_permission hook to also take a # nameidata parameter in addition to the existing inode and mask parameters. # # A nameidata is already passed (although sometimes NULL) to # fs/namei.c:permission(), and the patch changes exec_permission_lite() to # also take a nameidata parameter so that it can pass it along to the # security hook. # # The patch includes corresponding changes to the SELinux module to use the # nameidata information when it is available; this allows SELinux to include # pathname information in audit messages when a nameidata structure was # supplied. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1403 # [PATCH] scripts/pnmtologo.c warning fixes # # From: Rolf Eike Beer # # this patch makes some ints to unsigned ints. They are only used as loop # counters and compared to unsigned ints. GCC 3.3 doesn't like this. They # will never be negative anyway, so we could easily shut him up. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1404 # [PATCH] befs: fix resource leak on register_filesystem failure # # From: Will Dyson # # Remember to free the inode cache if register_filesystem() fails. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1405 # [PATCH] misc fixes # # - mpparse printk should be in hex (john stultz ) # # - fiddle with RCU copyright messages (Dipankar Sarma ) # # - use print_dev_t() for sysfs dev file in videodev.c (Gerd Knorr # ) # # - comx-hw-munich.c 64-bit warning fix (Vinay K Nallamothu # ) # # - random.c return val fix # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1406 # [PATCH] /proc/PID/auxv file and NT_AUXV core note # # From: Roland McGrath # # gdb really needs some way to know the AT_SYSINFO_EHDR value for a process # being debugged or for the dead process described by a core file. Without # this value, it can't find the information necessary to show backtraces of # threads waiting in system calls. There are any number of ways this # information could be made available. Here is one solution that provides # more debugging information in a clean and general fashion. # # I've added access to the AT_* values passed to a process for third parties # to examine for debugging purposes. The same data passed on the stack at # startup is made available in /proc/PID/auxv and is written in an NT_AUXV # note in core dumps. (Both of these are consistent with what Solaris does # using the same names.) # # Here are two different patches that implement the same thing differently. # The first patch uses a ref-counted data structure to copy the aux vector # and shares among forked mm's until they exec and get a new one. The second # patch avoids the complexity of that data structure by simply expanding the # mm_struct with space to hold a copy of the data. Both patches work # correctly; I have examined the new /proc/PID/auxv file and core dumps. # # I hope you will consider including one of these patches, or at least some # way of getting at this information from the debugger. I am certainly open # to other suggestions on implementing this feature, and to suggestions on # alternative interfaces for getting the AT_SYSINFO_EHDR value cleanly. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1407 # [PATCH] update Documentation/iostats.txt # # From: Rick Lindsley # # One typo corrected, and the references to 2.5 are minimized and mostly # changed to 2.6. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1408 # [PATCH] Fix compile warning in g_NCR5380 # # From: Andries.Brouwer@cwi.nl # # `generic_NCR5380_biosparam' declared `static' but never defined # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1409 # [PATCH] Fix allyesconfig for HugeTLB-less archs # # From: Geert Uytterhoeven # # Make that allyesconfig works on architectures that don't support HugeTLBs. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1410 # [PATCH] ioctl32 fix to SG_IO # # From: Arun Sharma # # A minor bug fix to the ioctl32 code handling SG_IO. sgio->dxferp is not # initialzed properly. # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1411 # [PATCH] Update James Morris's email address # # From: James Morris # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1412 # [PATCH] update unistd.h for sys_vserver # -------------------------------------------- # 03/10/02 akpm@osdl.org 1.1413 # [PATCH] Disable floppy and the related ioctl32s on some platforms # # From: Arun Sharma # # Based on some earlier discussion: # # http://marc.theaimsgroup.com/?t=106015010700002&r=1&w=2 # # here's a new patch that attempts to disable BLK_DEV_FD on platforms which # don't support it. The patch also attempts to remove the duplication of the # logic in compat_ioctl.h. # -------------------------------------------- # diff -Nru a/Documentation/cachetlb.txt b/Documentation/cachetlb.txt --- a/Documentation/cachetlb.txt Thu Oct 2 01:28:16 2003 +++ b/Documentation/cachetlb.txt Thu Oct 2 01:28:16 2003 @@ -59,9 +59,9 @@ address translations from the TLB. After running, this interface must make sure that any previous page table modifications for the address space 'vma->vm_mm' in the range - 'start' to 'end' will be visible to the cpu. That is, after + 'start' to 'end-1' will be visible to the cpu. That is, after running, here will be no entries in the TLB for 'mm' for - virtual addresses in the range 'start' to 'end'. + virtual addresses in the range 'start' to 'end-1'. The "vma" is the backing store being used for the region. Primarily, this is used for munmap() type operations. @@ -100,7 +100,7 @@ unsigned long start, unsigned long end) The software page tables for address space 'mm' for virtual - addresses in the range 'start' to 'end' are being torn down. + addresses in the range 'start' to 'end-1' are being torn down. Some platforms cache the lowest level of the software page tables in a linear virtually mapped array, to make TLB miss processing @@ -165,15 +165,7 @@ Here are the routines, one by one: -1) void flush_cache_all(void) - - The most severe flush of all. After this interface runs, - the entire cpu cache is flushed. - - This is usually invoked when the kernel page tables are - changed, since such translations are "global" in nature. - -2) void flush_cache_mm(struct mm_struct *mm) +1) void flush_cache_mm(struct mm_struct *mm) This interface flushes an entire user address space from the caches. That is, after running, there will be no cache @@ -183,13 +175,13 @@ page table operations such as what happens during fork, exit, and exec. -3) void flush_cache_range(struct vm_area_struct *vma, +2) void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) Here we are flushing a specific range of (user) virtual addresses from the cache. After running, there will be no entries in the cache for 'vma->vm_mm' for virtual addresses in - the range 'start' to 'end'. + the range 'start' to 'end-1'. The "vma" is the backing store being used for the region. Primarily, this is used for munmap() type operations. @@ -200,7 +192,7 @@ call flush_cache_page (see below) for each entry which may be modified. -4) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +3) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr) This time we need to remove a PAGE_SIZE sized range from the cache. The 'vma' is the backing structure used by @@ -215,6 +207,30 @@ This is used primarily during fault processing. +4) void flush_cache_kmaps(void) + + This routine need only be implemented if the platform utilizes + highmem. It will be called right before all of the kmaps + are invalidated. + + After running, there will be no entries in the cache for + the kernel virtual address range PKMAP_ADDR(0) to + PKMAP_ADDR(LAST_PKMAP). + + This routing should be implemented in asm/highmem.h + +5) void flush_cache_vmap(unsigned long start, unsigned long end) + void flush_cache_vunmap(unsigned long start, unsigned long end) + + Here in these two interfaces we are flushing a specific range + of (kernel) virtual addresses from the cache. After running, + there will be no entries in the cache for the kernel address + space for virtual addresses in the range 'start' to 'end-1'. + + The first of these two routines is invoked after map_vm_area() + has installed the page table entries. The second is invoked + before unmap_vm_area() deletes the page table entries. + There exists another whole class of cpu cache issues which currently require a whole different set of interfaces to handle properly. The biggest problem is that of virtual aliasing in the data cache @@ -317,23 +333,32 @@ dirty. Again, see sparc64 for examples of how to deal with this. + void copy_to_user_page(struct vm_area_struct *vma, struct page *page, + unsigned long user_vaddr, + void *dst, void *src, int len) + void copy_from_user_page(struct vm_area_struct *vma, struct page *page, + unsigned long user_vaddr, + void *dst, void *src, int len) + When the kernel needs to copy arbitrary data in and out + of arbitrary user pages (f.e. for ptrace()) it will use + these two routines. + + The page has been kmap()'d, and flush_cache_page() has + just been called for the user mapping of this page (if + necessary). + + Any necessary cache flushing or other coherency operations + that need to occur should happen here. If the processor's + instruction cache does not snoop cpu stores, it is very + likely that you will need to flush the instruction cache + for copy_to_user_page(). + void flush_icache_range(unsigned long start, unsigned long end) When the kernel stores into addresses that it will execute out of (eg when loading modules), this function is called. If the icache does not snoop stores then this routine will need to flush it. - - void flush_icache_user_range(struct vm_area_struct *vma, - struct page *page, unsigned long addr, int len) - This is called when the kernel stores into addresses that are - part of the address space of a user process (which may be some - other process than the current process). The addr argument - gives the virtual address in that process's address space, - page is the page which is being modified, and len indicates - how many bytes have been modified. The modified region must - not cross a page boundary. Currently this is only called from - kernel/ptrace.c. void flush_icache_page(struct vm_area_struct *vma, struct page *page) All the functionality of flush_icache_page can be implemented in diff -Nru a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt --- a/Documentation/cpu-freq/user-guide.txt Thu Oct 2 01:28:16 2003 +++ b/Documentation/cpu-freq/user-guide.txt Thu Oct 2 01:28:16 2003 @@ -57,6 +57,8 @@ AMD mobile K6-3+ AMD mobile Duron AMD mobile Athlon +AMD Opteron +AMD Athlon 64 Cyrix Media GXm Intel mobile PIII and Intel mobile PIII-M on certain chipsets Intel Pentium 4, Intel Xeon diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt --- a/Documentation/crypto/api-intro.txt Thu Oct 2 01:28:17 2003 +++ b/Documentation/crypto/api-intro.txt Thu Oct 2 01:28:17 2003 @@ -126,7 +126,7 @@ BUGS Send bug reports to: -James Morris +James Morris Cc: David S. Miller @@ -220,5 +220,5 @@ Generic scatterwalk code by Adam J. Richter Please send any credits updates or corrections to: -James Morris +James Morris diff -Nru a/Documentation/iostats.txt b/Documentation/iostats.txt --- a/Documentation/iostats.txt Thu Oct 2 01:28:16 2003 +++ b/Documentation/iostats.txt Thu Oct 2 01:28:16 2003 @@ -1,22 +1,22 @@ I/O statistics fields --------------- -Last modified 5/15/03 +Last modified Sep 30, 2003 -In 2.4.20 (and some versions before, with patches), and 2.5.45, -more extensive disk statistics were introduced to help measure disk +Since 2.4.20 (and some versions before, with patches), and 2.5.45, +more extensive disk statistics have been introduced to help measure disk activity. Tools such as sar and iostat typically interpret these and do the work for you, but in case you are interested in creating your own tools, the fields are explained here. -In most versions of the 2.4 patch, the information is found as additional -fields in /proc/partitions. In 2.5, the same information is found in -two places: one is in the file /proc/diskstats (appears in 2.5.69 and -beyond), and the other is within the sysfs file system, which must be -mounted in order to obtain the information. Throughout this document -we'll assume that sysfs is mounted on /sys, although of course it may -be mounted anywhere. In 2.5, both /proc/diskstats and sysfs use the -same source for the information and so should not differ. +In 2.4 now, the information is found as additional fields in +/proc/partitions. In 2.6, the same information is found in two +places: one is in the file /proc/diskstats, and the other is within +the sysfs file system, which must be mounted in order to obtain +the information. Throughout this document we'll assume that sysfs +is mounted on /sys, although of course it may be mounted anywhere. +Both /proc/diskstats and sysfs use the same source for the information +and so should not differ. Here are examples of these different formats: @@ -25,15 +25,15 @@ 3 1 9221278 hda1 35486 0 35496 38030 0 0 0 0 0 38030 38030 -2.5 sysfs: +2.6 sysfs: 446216 784926 9550688 4382310 424847 312726 5922052 19310380 0 3376340 23705160 35486 38030 38030 38030 -2.5 diskstats: +2.6 diskstats: 3 0 hda 446216 784926 9550688 4382310 424847 312726 5922052 19310380 0 3376340 23705160 3 1 hda1 35486 38030 38030 38030 -On 2.4 you might execute "grep 'hda ' /proc/partitions". On 2.5, you have +On 2.4 you might execute "grep 'hda ' /proc/partitions". On 2.6, you have a choice of "cat /sys/block/hda/stat" or "grep 'hda ' /proc/diskstats". The advantage of one over the other is that the sysfs choice works well if you are watching a known, small set of disks. /proc/diskstats may @@ -43,7 +43,7 @@ In 2.4, the statistics fields are those after the device name. In the above example, the first field of statistics would be 446216. -By contrast, in 2.5 if you look at /sys/block/hda/stat, you'll +By contrast, in 2.6 if you look at /sys/block/hda/stat, you'll find just the eleven fields, beginning with 446216. If you look at /proc/diskstats, the eleven fields will be preceded by the major and minor device numbers, and device name. Each of these formats provide @@ -93,35 +93,35 @@ To avoid introducing performance bottlenecks, no locks are held while modifying these counters. This implies that minor inaccuracies may be introduced when changes collide, so (for instance) adding up all the -read I/Os issued per partition should equal those made to the disks -... but due to the lack of locking it may only be very close. +read I/Os issued per partition should equal those made to the disks ... +but due to the lack of locking it may only be very close. -In release 2.5.65 the 2.5 counters were made per-cpu, which made the lack -of locking almost a non-issue. When the statistics are read, the per-cpu -counters are summed (possibly overflowing the unsigned 32-bit variable -they are summed to) and the result given to the user. There is no -convenient user interface for accessing the per-cpu counters themselves. +In 2.6, there are counters for each cpu, which made the lack of locking +almost a non-issue. When the statistics are read, the per-cpu counters +are summed (possibly overflowing the unsigned 32-bit variable they are +summed to) and the result given to the user. There is no convenient +user interface for accessing the per-cpu counters themselves. Disks vs Partitions ------------------- -There were significant changes between 2.4 and 2.5 in the I/O subsystem. +There were significant changes between 2.4 and 2.6 in the I/O subsystem. As a result, some statistic information disappeared. The translation from a disk address relative to a partition to the disk address relative to the host disk happens much earlier. All merges and timings now happen at the disk level rather than at both the disk and partition level as -in 2.4. Consequently, you'll see a different statistics output on 2.5 for +in 2.4. Consequently, you'll see a different statistics output on 2.6 for partitions from that for disks. There are only *four* fields available -for partitions on 2.5 machines. This is reflected in the examples above. +for partitions on 2.6 machines. This is reflected in the examples above. Field 1 -- # of reads issued This is the total number of reads issued to this partition. Field 2 -- # of sectors read This is the total number of sectors requested to be read from this partition. -Field 3 -- # of reads issued +Field 3 -- # of writes issued This is the total number of writes issued to this partition. -Field 4 -- # of sectors read +Field 4 -- # of sectors written This is the total number of sectors requested to be written to this partition. @@ -135,14 +135,16 @@ Additional notes ---------------- -In 2.5, sysfs is not mounted by default. Here's the line you'll want -to add to your /etc/fstab: +In 2.6, sysfs is not mounted by default. If your distribution of +Linux hasn't added it already, here's the line you'll want to add to +your /etc/fstab: none /sys sysfs defaults 0 0 -In 2.5, at the same time that disk statistics appeared in sysfs, they were -removed from /proc/stat. In 2.4, they appear in both /proc/partitions -and /proc/stat. +In 2.6, all disk statistics were removed from /proc/stat. In 2.4, they +appear in both /proc/partitions and /proc/stat, although the ones in +/proc/stat take a very different format from those in /proc/partitions +(see proc(5), if your system has it.) -- ricklind@us.ibm.com diff -Nru a/Documentation/zorro.txt b/Documentation/zorro.txt --- a/Documentation/zorro.txt Thu Oct 2 01:28:17 2003 +++ b/Documentation/zorro.txt Thu Oct 2 01:28:17 2003 @@ -2,7 +2,7 @@ ---------------------------------------- Written by Geert Uytterhoeven -Last revised: February 27, 2000 +Last revised: September 5, 2003 1. Introduction @@ -75,7 +75,7 @@ The treatment of these regions depends on the type of Zorro space: - Zorro II address space is always mapped and does not have to be mapped - explicitly using ioremap(). + explicitly using z_ioremap(). Conversion from bus/physical Zorro II addresses to kernel virtual addresses and vice versa is done using: @@ -83,22 +83,20 @@ virt_addr = ZTWO_VADDR(bus_addr); bus_addr = ZTWO_PADDR(virt_addr); - - Zorro III address space must be mapped explicitly using ioremap() first + - Zorro III address space must be mapped explicitly using z_ioremap() first before it can be accessed: - virt_addr = ioremap(bus_addr, size); + virt_addr = z_ioremap(bus_addr, size); ... - iounmap(virt_addr); + z_iounmap(virt_addr); 5. References ------------- linux/include/linux/zorro.h -linux/include/linux/ioport.h -linux/include/asm-m68k/io.h -linux/include/asm-m68k/amigahw.h -linux/include/asm-ppc/io.h +linux/include/asm-{m68k,ppc}/zorro.h +linux/include/linux/zorro_ids.h linux/drivers/zorro /proc/bus/zorro diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Thu Oct 2 01:28:17 2003 +++ b/MAINTAINERS Thu Oct 2 01:28:17 2003 @@ -114,8 +114,8 @@ S: Maintained 8250/16?50 (AND CLONE UARTS) SERIAL DRIVER -P: Theodore Ts'o -M: tytso@mit.edu +P: Russell King +M: rmk+serial@arm.linux.org.uk L: linux-serial@vger.kernel.org W: http://serial.sourceforge.net S: Maintained @@ -284,6 +284,16 @@ L: linux-net@vger.kernel.org S: Maintained +ASUS ACPI EXTRAS DRIVER +P: Karol Kozimor +M: sziwan@users.sourceforge.net +P: Julien Lerouge +M: julien.lerouge@free.fr +L: acpi4asus-user@lists.sourceforge.net +W: http://sourceforge.net/projects/acpi4asus +W: http://julien.lerouge.free.fr +S: Maintained + ATM P: Chas Williams M: chas@cmf.nrl.navy.mil @@ -509,7 +519,7 @@ CRYPTO API P: James Morris -M: jmorris@intercode.com.au +M: jmorris@redhat.com P: David S. Miller M: davem@redhat.com W http://samba.org/~jamesm/crypto/ @@ -624,7 +634,7 @@ P: Christoph Lameter M: christoph@lameter.com W: http://www.digi.com -L: digilnux@dgii.com +L: digilnux@digi.com S: Orphaned DIRECTORY NOTIFICATION @@ -1386,7 +1396,7 @@ P: Pekka Savola (ipv6) M: pekkas@netcore.fi P: James Morris -M: jmorris@intercode.com.au +M: jmorris@redhat.com P: Hideaki YOSHIFUJI M: yoshfuji@linux-ipv6.org L: netdev@oss.sgi.com diff -Nru a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c --- a/arch/alpha/kernel/core_irongate.c Thu Oct 2 01:28:17 2003 +++ b/arch/alpha/kernel/core_irongate.c Thu Oct 2 01:28:17 2003 @@ -391,7 +391,7 @@ cur_gatt = phys_to_virt(GET_GATT(baddr) & ~1); pte = cur_gatt[GET_GATT_OFF(baddr)] & ~1; - if (__alpha_remap_area_pages(VMALLOC_VMADDR(vaddr), + if (__alpha_remap_area_pages(vaddr, pte, PAGE_SIZE, 0)) { printk("AGP ioremap: FAILED to map...\n"); vfree(area->addr); diff -Nru a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c --- a/arch/alpha/kernel/core_marvel.c Thu Oct 2 01:28:16 2003 +++ b/arch/alpha/kernel/core_marvel.c Thu Oct 2 01:28:16 2003 @@ -696,7 +696,7 @@ } pfn >>= 1; /* make it a true pfn */ - if (__alpha_remap_area_pages(VMALLOC_VMADDR(vaddr), + if (__alpha_remap_area_pages(vaddr, pfn << PAGE_SHIFT, PAGE_SIZE, 0)) { printk("FAILED to map...\n"); diff -Nru a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c --- a/arch/alpha/kernel/core_titan.c Thu Oct 2 01:28:16 2003 +++ b/arch/alpha/kernel/core_titan.c Thu Oct 2 01:28:16 2003 @@ -534,7 +534,7 @@ } pfn >>= 1; /* make it a true pfn */ - if (__alpha_remap_area_pages(VMALLOC_VMADDR(vaddr), + if (__alpha_remap_area_pages(vaddr, pfn << PAGE_SHIFT, PAGE_SIZE, 0)) { printk("FAILED to map...\n"); diff -Nru a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c --- a/arch/alpha/kernel/setup.c Thu Oct 2 01:28:16 2003 +++ b/arch/alpha/kernel/setup.c Thu Oct 2 01:28:16 2003 @@ -1203,7 +1203,7 @@ platform_string(), nr_processors); #ifdef CONFIG_SMP - seq_printf(f, "cpus active\t\t: %d\n" + seq_printf(f, "cpus active\t\t: %ld\n" "cpu active mask\t\t: %016lx\n", num_online_cpus(), cpu_present_mask); #endif diff -Nru a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c --- a/arch/alpha/kernel/smp.c Thu Oct 2 01:28:16 2003 +++ b/arch/alpha/kernel/smp.c Thu Oct 2 01:28:16 2003 @@ -597,7 +597,7 @@ if (cpu_online(cpu)) bogosum += cpu_data[cpu].loops_per_jiffy; - printk(KERN_INFO "SMP: Total of %d processors activated " + printk(KERN_INFO "SMP: Total of %ld processors activated " "(%lu.%02lu BogoMIPS).\n", num_online_cpus(), (bogosum + 2500) / (500000/HZ), diff -Nru a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c --- a/arch/alpha/kernel/time.c Thu Oct 2 01:28:17 2003 +++ b/arch/alpha/kernel/time.c Thu Oct 2 01:28:17 2003 @@ -89,6 +89,16 @@ return result; } +/* + * Scheduler clock - returns current time in nanosec units. + * + * Copied from ARM code for expediency... ;-} + */ +unsigned long long sched_clock(void) +{ + return (unsigned long long)jiffies * (1000000000 / HZ); +} + /* * timer_interrupt() needs to keep up the real-time clock, @@ -239,8 +249,9 @@ * arch/i386/time.c. */ -#define CALIBRATE_LATCH (52 * LATCH) -#define CALIBRATE_TIME (52 * 1000020 / HZ) +#define PIC_TICK_RATE 1193180UL +#define CALIBRATE_LATCH 0xffff +#define TIMEOUT_COUNT 0x100000 static unsigned long __init calibrate_cc_with_pic(void) @@ -263,19 +274,15 @@ cc = rpcc(); do { - count+=100; /* by 1 takes too long to timeout from 0 */ - } while ((inb(0x61) & 0x20) == 0 && count > 0); + count++; + } while ((inb(0x61) & 0x20) == 0 && count < TIMEOUT_COUNT); cc = rpcc() - cc; /* Error: ECTCNEVERSET or ECPUTOOFAST. */ - if (count <= 100) - return 0; - - /* Error: ECPUTOOSLOW. */ - if (cc <= CALIBRATE_TIME) + if (count <= 1 || count == TIMEOUT_COUNT) return 0; - return (cc * 1000000UL) / CALIBRATE_TIME; + return ((long)cc * PIC_TICK_RATE) / (CALIBRATE_LATCH + 1); } /* The Linux interpretation of the CMOS clock register contents: diff -Nru a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c --- a/arch/alpha/mm/init.c Thu Oct 2 01:28:17 2003 +++ b/arch/alpha/mm/init.c Thu Oct 2 01:28:17 2003 @@ -210,7 +210,8 @@ /* Allocate one PGD and one PMD. In the case of SRM, we'll need these to actually remap the console. There is an assumption here that only one of each is needed, and this allows for 8MB. - Currently (late 1999), big consoles are still under 4MB. + On systems with larger consoles, additional pages will be + allocated as needed during the mapping process. In the case of not SRM, but not CONFIG_ALPHA_LARGE_VMALLOC, we need to allocate the PGD we use for vmalloc before we start @@ -237,6 +238,15 @@ unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT; crb->map[i].va = vaddr; for (j = 0; j < crb->map[i].count; ++j) { + /* Newer console's (especially on larger + systems) may require more pages of + PTEs. Grab additional pages as needed. */ + if (pmd != pmd_offset(pgd, vaddr)) { + memset(kernel_end, 0, PAGE_SIZE); + pmd = pmd_offset(pgd, vaddr); + pmd_set(pmd, (pte_t *)kernel_end); + kernel_end += PAGE_SIZE; + } set_pte(pte_offset_kernel(pmd, vaddr), pfn_pte(pfn, PAGE_KERNEL)); pfn++; diff -Nru a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c --- a/arch/arm/mm/ioremap.c Thu Oct 2 01:28:17 2003 +++ b/arch/arm/mm/ioremap.c Thu Oct 2 01:28:17 2003 @@ -150,7 +150,7 @@ if (!area) return NULL; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vfree(addr); return NULL; } diff -Nru a/arch/cris/mm/ioremap.c b/arch/cris/mm/ioremap.c --- a/arch/cris/mm/ioremap.c Thu Oct 2 01:28:16 2003 +++ b/arch/cris/mm/ioremap.c Thu Oct 2 01:28:16 2003 @@ -157,7 +157,7 @@ if (!area) return NULL; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vfree(addr); return NULL; } diff -Nru a/arch/h8300/README b/arch/h8300/README --- a/arch/h8300/README Thu Oct 2 01:28:17 2003 +++ b/arch/h8300/README Thu Oct 2 01:28:17 2003 @@ -16,7 +16,7 @@ 3.H8MAX Under development - see http://www.strawbelly-linux.com (Japanese Only) + see http://www.strawberry-linux.com (Japanese Only) * Toolchain Version gcc-3.1 or higher and patch diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Thu Oct 2 01:28:16 2003 +++ b/arch/i386/Kconfig Thu Oct 2 01:28:16 2003 @@ -1303,3 +1303,8 @@ bool depends on SMP || X86_VISWS default y + +config PC + bool + depends on X86 && !EMBEDDED + default y diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c Thu Oct 2 01:28:17 2003 +++ b/arch/i386/kernel/acpi/boot.c Thu Oct 2 01:28:17 2003 @@ -183,8 +183,7 @@ #endif /*CONFIG_X86_LOCAL_APIC*/ -#ifdef CONFIG_X86_IO_APIC - +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) static int __init acpi_parse_ioapic ( @@ -368,7 +367,6 @@ 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) { @@ -416,7 +414,7 @@ #endif /*CONFIG_X86_LOCAL_APIC*/ -#ifdef CONFIG_X86_IO_APIC +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) /* * I/O APIC @@ -472,7 +470,8 @@ acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; acpi_ioapic = 1; -#endif /*CONFIG_X86_IO_APIC*/ + +#endif /* CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER */ #ifdef CONFIG_X86_LOCAL_APIC if (acpi_lapic && acpi_ioapic) { @@ -480,6 +479,7 @@ clustered_apic_check(); } #endif + #ifdef CONFIG_HPET_TIMER acpi_table_parse(ACPI_HPET, acpi_parse_hpet); #endif diff -Nru a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig --- a/arch/i386/kernel/cpu/cpufreq/Kconfig Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig Thu Oct 2 01:28:16 2003 @@ -88,6 +88,16 @@ If in doubt, say N. +config X86_POWERNOW_K8 + tristate "AMD Opteron/Athlon64 PowerNow!" + depends on CPU_FREQ_TABLE + help + This adds the CPUFreq driver for mobile AMD Opteron/Athlon64 processors. + + For details, take a look at linux/Documentation/cpu-freq. + + If in doubt, say N. + config X86_GX_SUSPMOD tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" depends on CPU_FREQ diff -Nru a/arch/i386/kernel/cpu/cpufreq/Makefile b/arch/i386/kernel/cpu/cpufreq/Makefile --- a/arch/i386/kernel/cpu/cpufreq/Makefile Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/cpu/cpufreq/Makefile Thu Oct 2 01:28:16 2003 @@ -1,5 +1,6 @@ obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o +obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o obj-$(CONFIG_X86_LONGHAUL) += longhaul.o obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o obj-$(CONFIG_ELAN_CPUFREQ) += elanfreq.o diff -Nru a/arch/i386/kernel/cpu/cpufreq/acpi.c b/arch/i386/kernel/cpu/cpufreq/acpi.c --- a/arch/i386/kernel/cpu/cpufreq/acpi.c Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/cpu/cpufreq/acpi.c Thu Oct 2 01:28:16 2003 @@ -231,7 +231,7 @@ int state) { u16 port = 0; - u8 value = 0; + u16 value = 0; int i = 0; struct cpufreq_freqs cpufreq_freqs; @@ -282,9 +282,9 @@ value = (u16) perf->states[state].control; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Writing 0x%02x to port 0x%04x\n", value, port)); + "Writing 0x%04x to port 0x%04x\n", value, port)); - outb(value, port); + outw(value, port); /* * Then we read the 'status_register' and compare the value with the @@ -296,12 +296,12 @@ port = perf->status_register; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Looking for 0x%02x from port 0x%04x\n", - (u8) perf->states[state].status, port)); + "Looking for 0x%04x from port 0x%04x\n", + (u16) perf->states[state].status, port)); for (i=0; i<100; i++) { - value = inb(port); - if (value == (u8) perf->states[state].status) + value = inw(port); + if (value == (u16) perf->states[state].status) break; udelay(10); } @@ -309,7 +309,7 @@ /* notify cpufreq */ cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE); - if (value != perf->states[state].status) { + if (value != (u16) perf->states[state].status) { unsigned int tmp = cpufreq_freqs.new; cpufreq_freqs.new = cpufreq_freqs.old; cpufreq_freqs.old = tmp; diff -Nru a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c Thu Oct 2 01:28:15 2003 +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c Thu Oct 2 01:28:15 2003 @@ -70,21 +70,6 @@ } -static unsigned int longhaul_get_cpu_fsb (void) -{ - unsigned long lo, hi; - unsigned int eblcr_fsb_table[] = { 66, 133, 100, -1 }; - unsigned int invalue=0; - - if (fsb == 0) { - rdmsr (MSR_IA32_EBL_CR_POWERON, lo, hi); - invalue = (lo & (1<<18|1<<19)) >>18; - fsb = eblcr_fsb_table[invalue]; - } - return fsb; -} - - static int longhaul_get_cpu_mult (void) { unsigned long invalue=0,lo, hi; @@ -168,7 +153,7 @@ break; /* - * Longhaul v3. (Ezra-T [C5M], Nehemiag [C5N]) + * Longhaul v3. (Ezra-T [C5M], Nehemiah [C5N]) * This can also do voltage scaling, but see above. * Ezra-T was alleged to do FSB scaling too, but it never worked in practice. */ @@ -193,6 +178,39 @@ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); } +/* + * Centaur decided to make life a little more tricky. + * Only longhaul v1 is allowed to read EBLCR BSEL[0:1]. + * Samuel2 and above have to try and guess what the FSB is. + * We do this by assuming we booted at maximum multiplier, and interpolate + * between that value multiplied by possible FSBs and cpu_mhz which + * was calculated at boot time. Really ugly, but no other way to do this. + */ +static int _guess (int guess, int maxmult) +{ + int target; + + target = ((maxmult/10)*guess); + if (maxmult%10 != 0) + target += (guess/2); + target &= ~0xf; + return target; +} + +static int guess_fsb(int maxmult) +{ + int speed = (cpu_khz/1000) & ~0xf; + int i; + int speeds[3] = { 66, 100, 133 }; + + for (i=0; i<3; i++) { + if (_guess(speeds[i],maxmult) == speed) + return speeds[i]; + } + return 0; +} + + static int __init longhaul_get_ranges (void) { @@ -203,8 +221,8 @@ -1,110,120,-1,135,115,125,105,130,150,160,140,-1,155,-1,145 }; unsigned int j, k = 0; union msr_longhaul longhaul; - - fsb = longhaul_get_cpu_fsb(); + unsigned long lo, hi; + unsigned int eblcr_fsb_table[] = { 66, 133, 100, -1 }; switch (longhaul_version) { case 1: @@ -212,6 +230,9 @@ Assume min=3.0x & max = whatever we booted at. */ minmult = 30; maxmult = longhaul_get_cpu_mult(); + rdmsr (MSR_IA32_EBL_CR_POWERON, lo, hi); + invalue = (lo & (1<<18|1<<19)) >>18; + fsb = eblcr_fsb_table[invalue]; break; case 2 ... 3: @@ -222,14 +243,13 @@ invalue += 16; maxmult=multipliers[invalue]; -#if 0 invalue = longhaul.bits.MinMHzBR; - if (longhaul.bits.MinMHzBR4); - invalue += 16; - minmult = multipliers[invalue]; -#else - minmult = 30; /* as per spec */ -#endif + if (longhaul.bits.MinMHzBR4 == 1) + minmult = 30; + else + minmult = multipliers[invalue]; + + fsb = guess_fsb(maxmult); break; } diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c Thu Oct 2 01:28:18 2003 @@ -0,0 +1,1020 @@ +/* + * (c) 2003 Advanced Micro Devices, Inc. + * Your use of this code is subject to the terms and conditions of the + * GNU general public license version 2. See "../../../COPYING" or + * http://www.gnu.org/licenses/gpl.html + * + * Support : paul.devriendt@amd.com + * + * Based on the powernow-k7.c module written by Dave Jones. + * (C) 2003 Dave Jones on behalf of SuSE Labs + * Licensed under the terms of the GNU GPL License version 2. + * Based upon datasheets & sample CPUs kindly provided by AMD. + * + * Processor information obtained from Chapter 9 (Power and Thermal Management) + * of the "BIOS and Kernel Developer's Guide for the AMD Athlon 64 and AMD + * Opteron Processors", revision 3.03, available for download from www.amd.com + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define PFX "powernow-k8: " +#define BFX PFX "BIOS error: " +#define VERSION "version 1.00.08 - September 26, 2003" +#include "powernow-k8.h" + +#ifdef CONFIG_PREEMPT +#warning this driver has not been tested on a preempt system +#endif + +static u32 vstable; /* voltage stabalization time, from PSB, units 20 us */ +static u32 plllock; /* pll lock time, from PSB, units 1 us */ +static u32 numps; /* number of p-states, from PSB */ +static u32 rvo; /* ramp voltage offset, from PSB */ +static u32 irt; /* isochronous relief time, from PSB */ +static u32 vidmvs; /* usable value calculated from mvs, from PSB */ +struct pst_s *ppst; /* array of p states, valid for this part */ +static u32 currvid; /* keep track of the current fid / vid */ +static u32 currfid; + +/* +The PSB table supplied by BIOS allows for the definition of the number of +p-states that can be used when running on a/c, and the number of p-states +that can be used when running on battery. This allows laptop manufacturers +to force the system to save power when running from battery. The relationship +is : + 1 <= number_of_battery_p_states <= maximum_number_of_p_states + +This driver does NOT have the support in it to detect transitions from +a/c power to battery power, and thus trigger the transition to a lower +p-state if required. This is because I need ACPI and the 2.6 kernel to do +this, and this is a 2.4 kernel driver. Check back for a new improved driver +for the 2.6 kernel soon. + +This code therefore assumes it is on battery at all times, and thus +restricts performance to number_of_battery_p_states. For desktops, + number_of_battery_p_states == maximum_number_of_pstates, +so this is not actually a restriction. +*/ + +static u32 batps; /* limit on the number of p states when on battery */ + /* - set by BIOS in the PSB/PST */ + +static struct cpufreq_driver cpufreq_amd64_driver = { + .verify = drv_verify, + .target = drv_target, + .init = drv_cpu_init, + .name = "cpufreq-amd64", + .owner = THIS_MODULE, +}; + +#define SEARCH_UP 1 +#define SEARCH_DOWN 0 + +/* Return a frequency in MHz, given an input fid */ +u32 +find_freq_from_fid(u32 fid) +{ + return 800 + (fid * 100); +} + +/* Return a fid matching an input frequency in MHz */ +u32 +find_fid_from_freq(u32 freq) +{ + return (freq - 800) / 100; +} + +/* Return the vco fid for an input fid */ +static u32 +convert_fid_to_vco_fid(u32 fid) +{ + if (fid < HI_FID_TABLE_BOTTOM) { + return 8 + (2 * fid); + } else { + return fid; + } +} + +/* Sort the fid/vid frequency table into ascending order by fid. The spec */ +/* implies that it will be sorted by BIOS, but, it only implies it, and I */ +/* prefer not to trust when I can check. */ +/* Yes, it is a simple bubble sort, but the PST is really small, so the */ +/* choice of algorithm is pretty irrelevant. */ +static inline void +sort_pst(struct pst_s *ppst, u32 numpstates) +{ + u32 i; + u8 tempfid; + u8 tempvid; + int swaps = 1; + + while (swaps) { + swaps = 0; + for (i = 0; i < (numpstates - 1); i++) { + if (ppst[i].fid > ppst[i + 1].fid) { + swaps = 1; + tempfid = ppst[i].fid; + tempvid = ppst[i].vid; + ppst[i].fid = ppst[i + 1].fid; + ppst[i].vid = ppst[i + 1].vid; + ppst[i + 1].fid = tempfid; + ppst[i + 1].vid = tempvid; + } + } + } + + return; +} + +/* Return 1 if the pending bit is set. Unless we are actually just told the */ +/* processor to transition a state, seeing this bit set is really bad news. */ +static inline int +pending_bit_stuck(void) +{ + u32 lo; + u32 hi; + + rdmsr(MSR_FIDVID_STATUS, lo, hi); + return lo & MSR_S_LO_CHANGE_PENDING ? 1 : 0; +} + +/* Update the global current fid / vid values from the status msr. Returns 1 */ +/* on error. */ +static int +query_current_values_with_pending_wait(void) +{ + u32 lo; + u32 hi; + u32 i = 0; + + lo = MSR_S_LO_CHANGE_PENDING; + while (lo & MSR_S_LO_CHANGE_PENDING) { + if (i++ > 0x1000000) { + printk(KERN_ERR PFX "detected change pending stuck\n"); + return 1; + } + rdmsr(MSR_FIDVID_STATUS, lo, hi); + } + + currvid = hi & MSR_S_HI_CURRENT_VID; + currfid = lo & MSR_S_LO_CURRENT_FID; + + return 0; +} + +/* the isochronous relief time */ +static inline void +count_off_irt(void) +{ + udelay((1 << irt) * 10); + return; +} + +/* the voltage stabalization time */ +static inline void +count_off_vst(void) +{ + udelay(vstable * VST_UNITS_20US); + return; +} + +/* write the new fid value along with the other control fields to the msr */ +static int +write_new_fid(u32 fid) +{ + u32 lo; + u32 savevid = currvid; + + if ((fid & INVALID_FID_MASK) || (currvid & INVALID_VID_MASK)) { + printk(KERN_ERR PFX "internal error - overflow on fid write\n"); + return 1; + } + + lo = fid | (currvid << MSR_C_LO_VID_SHIFT) | MSR_C_LO_INIT_FID_VID; + + dprintk(KERN_DEBUG PFX "writing fid %x, lo %x, hi %x\n", + fid, lo, plllock * PLL_LOCK_CONVERSION); + + wrmsr(MSR_FIDVID_CTL, lo, plllock * PLL_LOCK_CONVERSION); + + if (query_current_values_with_pending_wait()) + return 1; + + count_off_irt(); + + if (savevid != currvid) { + printk(KERN_ERR PFX + "vid changed on fid transition, save %x, currvid %x\n", + savevid, currvid); + return 1; + } + + if (fid != currfid) { + printk(KERN_ERR PFX + "fid transition failed, fid %x, currfid %x\n", + fid, currfid); + return 1; + } + + return 0; +} + +/* Write a new vid to the hardware */ +static int +write_new_vid(u32 vid) +{ + u32 lo; + u32 savefid = currfid; + + if ((currfid & INVALID_FID_MASK) || (vid & INVALID_VID_MASK)) { + printk(KERN_ERR PFX "internal error - overflow on vid write\n"); + return 1; + } + + lo = currfid | (vid << MSR_C_LO_VID_SHIFT) | MSR_C_LO_INIT_FID_VID; + + dprintk(KERN_DEBUG PFX "writing vid %x, lo %x, hi %x\n", + vid, lo, STOP_GRANT_5NS); + + wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS); + + if (query_current_values_with_pending_wait()) { + return 1; + } + + if (savefid != currfid) { + printk(KERN_ERR PFX + "fid changed on vid transition, save %x currfid %x\n", + savefid, currfid); + return 1; + } + + if (vid != currvid) { + printk(KERN_ERR PFX + "vid transition failed, vid %x, currvid %x\n", + vid, currvid); + return 1; + } + + return 0; +} + +/* Reduce the vid by the max of step or reqvid. */ +/* Decreasing vid codes represent increasing voltages : */ +/* vid of 0 is 1.550V, vid of 0x1e is 0.800V, vid of 0x1f is off. */ +static int +decrease_vid_code_by_step(u32 reqvid, u32 step) +{ + if ((currvid - reqvid) > step) + reqvid = currvid - step; + + if (write_new_vid(reqvid)) + return 1; + + count_off_vst(); + + return 0; +} + +/* Change the fid and vid, by the 3 phases. */ +static inline int +transition_fid_vid(u32 reqfid, u32 reqvid) +{ + if (core_voltage_pre_transition(reqvid)) + return 1; + + if (core_frequency_transition(reqfid)) + return 1; + + if (core_voltage_post_transition(reqvid)) + return 1; + + if (query_current_values_with_pending_wait()) + return 1; + + if ((reqfid != currfid) || (reqvid != currvid)) { + printk(KERN_ERR PFX "failed: req 0x%x 0x%x, curr 0x%x 0x%x\n", + reqfid, reqvid, currfid, currvid); + return 1; + } + + dprintk(KERN_INFO PFX + "transitioned: new fid 0x%x, vid 0x%x\n", currfid, currvid); + + return 0; +} + +/* Phase 1 - core voltage transition ... setup appropriate voltage for the */ +/* fid transition. */ +static inline int +core_voltage_pre_transition(u32 reqvid) +{ + u32 rvosteps = rvo; + u32 savefid = currfid; + + dprintk(KERN_DEBUG PFX + "ph1: start, currfid 0x%x, currvid 0x%x, reqvid 0x%x, rvo %x\n", + currfid, currvid, reqvid, rvo); + + while (currvid > reqvid) { + dprintk(KERN_DEBUG PFX "ph1: curr 0x%x, requesting vid 0x%x\n", + currvid, reqvid); + if (decrease_vid_code_by_step(reqvid, vidmvs)) + return 1; + } + + while (rvosteps > 0) { + if (currvid == 0) { + rvosteps = 0; + } else { + dprintk(KERN_DEBUG PFX + "ph1: changing vid for rvo, requesting 0x%x\n", + currvid - 1); + if (decrease_vid_code_by_step(currvid - 1, 1)) + return 1; + rvosteps--; + } + } + + if (query_current_values_with_pending_wait()) + return 1; + + if (savefid != currfid) { + printk(KERN_ERR PFX "ph1 err, currfid changed 0x%x\n", currfid); + return 1; + } + + dprintk(KERN_DEBUG PFX "ph1 complete, currfid 0x%x, currvid 0x%x\n", + currfid, currvid); + + return 0; +} + +/* Phase 2 - core frequency transition */ +static inline int +core_frequency_transition(u32 reqfid) +{ + u32 vcoreqfid; + u32 vcocurrfid; + u32 vcofiddiff; + u32 savevid = currvid; + + if ((reqfid < HI_FID_TABLE_BOTTOM) && (currfid < HI_FID_TABLE_BOTTOM)) { + printk(KERN_ERR PFX "ph2 illegal lo-lo transition 0x%x 0x%x\n", + reqfid, currfid); + return 1; + } + + if (currfid == reqfid) { + printk(KERN_ERR PFX "ph2 null fid transition 0x%x\n", currfid); + return 0; + } + + dprintk(KERN_DEBUG PFX + "ph2 starting, currfid 0x%x, currvid 0x%x, reqfid 0x%x\n", + currfid, currvid, reqfid); + + vcoreqfid = convert_fid_to_vco_fid(reqfid); + vcocurrfid = convert_fid_to_vco_fid(currfid); + vcofiddiff = vcocurrfid > vcoreqfid ? vcocurrfid - vcoreqfid + : vcoreqfid - vcocurrfid; + + while (vcofiddiff > 2) { + if (reqfid > currfid) { + if (currfid > LO_FID_TABLE_TOP) { + if (write_new_fid(currfid + 2)) { + return 1; + } + } else { + if (write_new_fid + (2 + convert_fid_to_vco_fid(currfid))) { + return 1; + } + } + } else { + if (write_new_fid(currfid - 2)) + return 1; + } + + vcocurrfid = convert_fid_to_vco_fid(currfid); + vcofiddiff = vcocurrfid > vcoreqfid ? vcocurrfid - vcoreqfid + : vcoreqfid - vcocurrfid; + } + + if (write_new_fid(reqfid)) + return 1; + + if (query_current_values_with_pending_wait()) + return 1; + + if (currfid != reqfid) { + printk(KERN_ERR PFX + "ph2 mismatch, failed fid transition, curr %x, req %x\n", + currfid, reqfid); + return 1; + } + + if (savevid != currvid) { + printk(KERN_ERR PFX + "ph2 vid changed, save %x, curr %x\n", savevid, + currvid); + return 1; + } + + dprintk(KERN_DEBUG PFX "ph2 complete, currfid 0x%x, currvid 0x%x\n", + currfid, currvid); + + return 0; +} + +/* Phase 3 - core voltage transition flow ... jump to the final vid. */ +static inline int +core_voltage_post_transition(u32 reqvid) +{ + u32 savefid = currfid; + u32 savereqvid = reqvid; + + dprintk(KERN_DEBUG PFX "ph3 starting, currfid 0x%x, currvid 0x%x\n", + currfid, currvid); + + if (reqvid != currvid) { + if (write_new_vid(reqvid)) + return 1; + + if (savefid != currfid) { + printk(KERN_ERR PFX + "ph3: bad fid change, save %x, curr %x\n", + savefid, currfid); + return 1; + } + + if (currvid != reqvid) { + printk(KERN_ERR PFX + "ph3: failed vid transition\n, req %x, curr %x", + reqvid, currvid); + return 1; + } + } + + if (query_current_values_with_pending_wait()) + return 1; + + if (savereqvid != currvid) { + dprintk(KERN_ERR PFX "ph3 failed, currvid 0x%x\n", currvid); + return 1; + } + + if (savefid != currfid) { + dprintk(KERN_ERR PFX "ph3 failed, currfid changed 0x%x\n", + currfid); + return 1; + } + + dprintk(KERN_DEBUG PFX "ph3 complete, currfid 0x%x, currvid 0x%x\n", + currfid, currvid); + + return 0; +} + +static inline int +check_supported_cpu(void) +{ + struct cpuinfo_x86 *c = cpu_data; + u32 eax, ebx, ecx, edx; + + if (num_online_cpus() != 1) { + printk(KERN_INFO PFX "multiprocessor systems not supported\n"); + return 0; + } + + if (c->x86_vendor != X86_VENDOR_AMD) { + printk(KERN_INFO PFX "Not an AMD processor\n"); + return 0; + } + + eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE); + if ((eax & CPUID_XFAM_MOD) == ATHLON64_XFAM_MOD) { + dprintk(KERN_DEBUG PFX "AMD Althon 64 Processor found\n"); + if ((eax & CPUID_F1_STEP) < ATHLON64_REV_C0) { + printk(KERN_INFO PFX "Revision C0 or better " + "AMD Athlon 64 processor required\n"); + return 0; + } + } else if ((eax & CPUID_XFAM_MOD) == OPTERON_XFAM_MOD) { + dprintk(KERN_DEBUG PFX "AMD Opteron Processor found\n"); + } else { + printk(KERN_INFO PFX + "AMD Athlon 64 or AMD Opteron processor required\n"); + return 0; + } + + eax = cpuid_eax(CPUID_GET_MAX_CAPABILITIES); + if (eax < CPUID_FREQ_VOLT_CAPABILITIES) { + printk(KERN_INFO PFX + "No frequency change capabilities detected\n"); + return 0; + } + + cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx); + if ((edx & P_STATE_TRANSITION_CAPABLE) != P_STATE_TRANSITION_CAPABLE) { + printk(KERN_INFO PFX "Power state transitions not supported\n"); + return 0; + } + + printk(KERN_INFO PFX "Found AMD Athlon 64 / Opteron processor " + "supporting p-state transitions\n"); + + return 1; +} + +/* Find and validate the PSB/PST table in BIOS. */ +static inline int +find_psb_table(void) +{ + struct psb_s *psb; + struct pst_s *pst; + unsigned i, j; + u32 lastfid; + u32 mvs; + u8 maxvid; + + for (i = 0xc0000; i < 0xffff0; i += 0x10) { + /* Scan BIOS looking for the signature. */ + /* It can not be at ffff0 - it is too big. */ + + psb = phys_to_virt(i); + if (memcmp(psb, PSB_ID_STRING, PSB_ID_STRING_LEN) != 0) + continue; + + dprintk(KERN_DEBUG PFX "found PSB header at 0x%p\n", psb); + + dprintk(KERN_DEBUG PFX "table vers: 0x%x\n", psb->tableversion); + if (psb->tableversion != PSB_VERSION_1_4) { + printk(KERN_INFO BFX "PSB table is not v1.4\n"); + return -ENODEV; + } + + dprintk(KERN_DEBUG PFX "flags: 0x%x\n", psb->flags1); + if (psb->flags1) { + printk(KERN_ERR BFX "unknown flags\n"); + return -ENODEV; + } + + vstable = psb->voltagestabilizationtime; + printk(KERN_INFO PFX "voltage stable time: %d (units 20us)\n", + vstable); + + dprintk(KERN_DEBUG PFX "flags2: 0x%x\n", psb->flags2); + rvo = psb->flags2 & 3; + irt = ((psb->flags2) >> 2) & 3; + mvs = ((psb->flags2) >> 4) & 3; + vidmvs = 1 << mvs; + batps = ((psb->flags2) >> 6) & 3; + printk(KERN_INFO PFX "p states on battery: %d ", batps); + switch (batps) { + case 0: + printk("- all available\n"); + break; + case 1: + printk("- only the minimum\n"); + break; + case 2: + printk("- only the 2 lowest\n"); + break; + case 3: + printk("- only the 3 lowest\n"); + break; + } + printk(KERN_INFO PFX "ramp voltage offset: %d\n", rvo); + printk(KERN_INFO PFX "isochronous relief time: %d\n", irt); + printk(KERN_INFO PFX "maximum voltage step: %d\n", mvs); + + dprintk(KERN_DEBUG PFX "numpst: 0x%x\n", psb->numpst); + if (psb->numpst != 1) { + printk(KERN_ERR BFX "numpst must be 1\n"); + return -ENODEV; + } + + dprintk(KERN_DEBUG PFX "cpuid: 0x%x\n", psb->cpuid); + + plllock = psb->plllocktime; + printk(KERN_INFO PFX "pll lock time: 0x%x\n", plllock); + + maxvid = psb->maxvid; + printk(KERN_INFO PFX "maxfid: 0x%x\n", psb->maxfid); + printk(KERN_INFO PFX "maxvid: 0x%x\n", maxvid); + + numps = psb->numpstates; + printk(KERN_INFO PFX "numpstates: 0x%x\n", numps); + if (numps < 2) { + printk(KERN_ERR BFX "no p states to transition\n"); + return -ENODEV; + } + + if (batps == 0) { + batps = numps; + } else if (batps > numps) { + printk(KERN_ERR BFX "batterypstates > numpstates\n"); + batps = numps; + } else { + printk(KERN_ERR PFX + "Restricting operation to %d p-states\n", batps); + printk(KERN_ERR PFX + "Check for an updated driver to access all " + "%d p-states\n", numps); + } + + if ((numps <= 1) || (batps <= 1)) { + printk(KERN_ERR PFX "only 1 p-state to transition\n"); + return -ENODEV; + } + + ppst = kmalloc(sizeof (struct pst_s) * numps, GFP_KERNEL); + if (!ppst) { + printk(KERN_ERR PFX "ppst memory alloc failure\n"); + return -ENOMEM; + } + + pst = (struct pst_s *) (psb + 1); + for (j = 0; j < numps; j++) { + ppst[j].fid = pst[j].fid; + ppst[j].vid = pst[j].vid; + printk(KERN_INFO PFX + " %d : fid 0x%x, vid 0x%x\n", j, + ppst[j].fid, ppst[j].vid); + } + sort_pst(ppst, numps); + + lastfid = ppst[0].fid; + if (lastfid > LO_FID_TABLE_TOP) + printk(KERN_INFO BFX "first fid not in lo freq tbl\n"); + + if ((lastfid > MAX_FID) || (lastfid & 1) || (ppst[0].vid > LEAST_VID)) { + printk(KERN_ERR BFX "first fid/vid bad (0x%x - 0x%x)\n", + lastfid, ppst[0].vid); + kfree(ppst); + return -ENODEV; + } + + for (j = 1; j < numps; j++) { + if ((lastfid >= ppst[j].fid) + || (ppst[j].fid & 1) + || (ppst[j].fid < HI_FID_TABLE_BOTTOM) + || (ppst[j].fid > MAX_FID) + || (ppst[j].vid > LEAST_VID)) { + printk(KERN_ERR BFX + "invalid fid/vid in pst(%x %x)\n", + ppst[j].fid, ppst[j].vid); + kfree(ppst); + return -ENODEV; + } + lastfid = ppst[j].fid; + } + + for (j = 0; j < numps; j++) { + if (ppst[j].vid < rvo) { /* vid+rvo >= 0 */ + printk(KERN_ERR BFX + "0 vid exceeded with pstate %d\n", j); + return -ENODEV; + } + if (ppst[j].vid < maxvid+rvo) { /* vid+rvo >= maxvid */ + printk(KERN_ERR BFX + "maxvid exceeded with pstate %d\n", j); + return -ENODEV; + } + } + + if (query_current_values_with_pending_wait()) { + kfree(ppst); + return -EIO; + } + + printk(KERN_INFO PFX "currfid 0x%x, currvid 0x%x\n", + currfid, currvid); + + for (j = 0; j < numps; j++) + if ((ppst[j].fid==currfid) && (ppst[j].vid==currvid)) + return (0); + + printk(KERN_ERR BFX "currfid/vid do not match PST, ignoring\n"); + return 0; + } + + printk(KERN_ERR BFX "no PSB\n"); + return -ENODEV; +} + +/* Converts a frequency (that might not necessarily be a multiple of 200) */ +/* to a fid. */ +u32 +find_closest_fid(u32 freq, int searchup) +{ + if (searchup == SEARCH_UP) + freq += MIN_FREQ_RESOLUTION - 1; + + freq = (freq / MIN_FREQ_RESOLUTION) * MIN_FREQ_RESOLUTION; + + if (freq < MIN_FREQ) + freq = MIN_FREQ; + else if (freq > MAX_FREQ) + freq = MAX_FREQ; + + return find_fid_from_freq(freq); +} + +static int +find_match(u32 * ptargfreq, u32 * pmin, u32 * pmax, int searchup, u32 * pfid, + u32 * pvid) +{ + u32 availpstates = batps; + u32 targfid = find_closest_fid(*ptargfreq, searchup); + u32 minfid = find_closest_fid(*pmin, SEARCH_DOWN); + u32 maxfid = find_closest_fid(*pmax, SEARCH_UP); + u32 minidx = 0; + u32 maxidx = availpstates - 1; + u32 targidx = 0xffffffff; + int i; + + dprintk(KERN_DEBUG PFX "find match: freq %d MHz, min %d, max %d\n", + *ptargfreq, *pmin, *pmax); + + /* Restrict values to the frequency choices in the PST */ + if (minfid < ppst[0].fid) + minfid = ppst[0].fid; + if (maxfid > ppst[maxidx].fid) + maxfid = ppst[maxidx].fid; + + /* Find appropriate PST index for the minimim fid */ + for (i = 0; i < (int) availpstates; i++) { + if (minfid >= ppst[i].fid) + minidx = i; + } + + /* Find appropriate PST index for the maximum fid */ + for (i = availpstates - 1; i >= 0; i--) { + if (maxfid <= ppst[i].fid) + maxidx = i; + } + + if (minidx > maxidx) + maxidx = minidx; + + /* Frequency ids are now constrained by limits matching PST entries */ + minfid = ppst[minidx].fid; + maxfid = ppst[maxidx].fid; + + /* Limit the target frequency to these limits */ + if (targfid < minfid) + targfid = minfid; + else if (targfid > maxfid) + targfid = maxfid; + + /* Find the best target index into the PST, contrained by the range */ + if (searchup == SEARCH_UP) { + for (i = maxidx; i >= (int) minidx; i--) { + if (targfid <= ppst[i].fid) + targidx = i; + } + } else { + for (i = minidx; i <= (int) maxidx; i++) { + if (targfid >= ppst[i].fid) + targidx = i; + } + } + + if (targidx == 0xffffffff) { + printk(KERN_ERR PFX "could not find target\n"); + return 1; + } + + *pmin = find_freq_from_fid(minfid); + *pmax = find_freq_from_fid(maxfid); + *ptargfreq = find_freq_from_fid(ppst[targidx].fid); + + if (pfid) + *pfid = ppst[targidx].fid; + if (pvid) + *pvid = ppst[targidx].vid; + + return 0; +} + +/* Take a frequency, and issue the fid/vid transition command */ +static inline int +transition_frequency(u32 * preq, u32 * pmin, u32 * pmax, u32 searchup) +{ + u32 fid; + u32 vid; + int res; + struct cpufreq_freqs freqs; + + if (find_match(preq, pmin, pmax, searchup, &fid, &vid)) + return 1; + + dprintk(KERN_DEBUG PFX "table matched fid 0x%x, giving vid 0x%x\n", + fid, vid); + + if (query_current_values_with_pending_wait()) + return 1; + + if ((currvid == vid) && (currfid == fid)) { + dprintk(KERN_DEBUG PFX + "target matches current values (fid 0x%x, vid 0x%x)\n", + fid, vid); + return 0; + } + + if ((fid < HI_FID_TABLE_BOTTOM) && (currfid < HI_FID_TABLE_BOTTOM)) { + printk(KERN_ERR PFX + "ignoring illegal change in lo freq table-%x to %x\n", + currfid, fid); + return 1; + } + + dprintk(KERN_DEBUG PFX "changing to fid 0x%x, vid 0x%x\n", fid, vid); + + freqs.cpu = 0; /* only true because SMP not supported */ + + freqs.old = find_freq_from_fid(currfid); + freqs.new = find_freq_from_fid(fid); + cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); + + res = transition_fid_vid(fid, vid); + + freqs.new = find_freq_from_fid(currfid); + cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); + + return res; +} + +/* Driver entry point to switch to the target frequency */ +static int +drv_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation) +{ + u32 checkfid = currfid; + u32 checkvid = currvid; + u32 reqfreq = targfreq / 1000; + u32 minfreq = pol->min / 1000; + u32 maxfreq = pol->max / 1000; + + if (ppst == 0) { + printk(KERN_ERR PFX "targ: ppst 0\n"); + return -ENODEV; + } + + if (pending_bit_stuck()) { + printk(KERN_ERR PFX "drv targ fail: change pending bit set\n"); + return -EIO; + } + + dprintk(KERN_DEBUG PFX "targ: %d kHz, min %d, max %d, relation %d\n", + targfreq, pol->min, pol->max, relation); + + if (query_current_values_with_pending_wait()) + return -EIO; + + dprintk(KERN_DEBUG PFX "targ: curr fid 0x%x, vid 0x%x\n", + currfid, currvid); + + if ((checkvid != currvid) || (checkfid != currfid)) { + printk(KERN_ERR PFX + "error - out of sync, fid 0x%x 0x%x, vid 0x%x 0x%x\n", + checkfid, currfid, checkvid, currvid); + } + + if (transition_frequency(&reqfreq, &minfreq, &maxfreq, + relation == + CPUFREQ_RELATION_H ? SEARCH_UP : SEARCH_DOWN)) + { + printk(KERN_ERR PFX "transition frequency failed\n"); + return 1; + } + + pol->cur = 1000 * find_freq_from_fid(currfid); + + return 0; +} + +/* Driver entry point to verify the policy and range of frequencies */ +static int +drv_verify(struct cpufreq_policy *pol) +{ + u32 min = pol->min / 1000; + u32 max = pol->max / 1000; + u32 targ = min; + int res; + + if (ppst == 0) { + printk(KERN_ERR PFX "verify - ppst 0\n"); + return -ENODEV; + } + + if (pending_bit_stuck()) { + printk(KERN_ERR PFX "failing verify, change pending bit set\n"); + return -EIO; + } + + dprintk(KERN_DEBUG PFX + "ver: cpu%d, min %d, max %d, cur %d, pol %d\n", pol->cpu, + pol->min, pol->max, pol->cur, pol->policy); + + if (pol->cpu != 0) { + printk(KERN_ERR PFX "verify - cpu not 0\n"); + return -ENODEV; + } + + res = find_match(&targ, &min, &max, + pol->policy == CPUFREQ_POLICY_POWERSAVE ? + SEARCH_DOWN : SEARCH_UP, 0, 0); + if (!res) { + pol->min = min * 1000; + pol->max = max * 1000; + } + return res; +} + +/* per CPU init entry point to the driver */ +static int __init +drv_cpu_init(struct cpufreq_policy *pol) +{ + if (pol->cpu != 0) { + printk(KERN_ERR PFX "init not cpu 0\n"); + return -ENODEV; + } + + pol->policy = CPUFREQ_POLICY_PERFORMANCE; /* boot as fast as we can */ + + /* Take a crude guess here. */ + pol->cpuinfo.transition_latency = ((rvo + 8) * vstable * VST_UNITS_20US) + + (3 * (1 << irt) * 10); + + if (query_current_values_with_pending_wait()) + return -EIO; + + pol->cur = 1000 * find_freq_from_fid(currfid); + dprintk(KERN_DEBUG PFX "policy current frequency %d kHz\n", pol->cur); + + /* min/max the cpu is capable of */ + pol->cpuinfo.min_freq = 1000 * find_freq_from_fid(ppst[0].fid); + pol->cpuinfo.max_freq = 1000 * find_freq_from_fid(ppst[numps-1].fid); + pol->min = 1000 * find_freq_from_fid(ppst[0].fid); + pol->max = 1000 * find_freq_from_fid(ppst[batps - 1].fid); + + printk(KERN_INFO PFX "cpu_init done, current fid 0x%x, vid 0x%x\n", + currfid, currvid); + + return 0; +} + +/* driver entry point for init */ +static int __init +drv_init(void) +{ + int rc; + + printk(KERN_INFO PFX VERSION "\n"); + + if (check_supported_cpu() == 0) + return -ENODEV; + + rc = find_psb_table(); + if (rc) + return rc; + + if (pending_bit_stuck()) { + printk(KERN_ERR PFX "drv_init fail, change pending bit set\n"); + kfree(ppst); + return -EIO; + } + + return cpufreq_register_driver(&cpufreq_amd64_driver); +} + +/* driver entry point for term */ +static void __exit +drv_exit(void) +{ + dprintk(KERN_INFO PFX "drv_exit\n"); + + cpufreq_unregister_driver(&cpufreq_amd64_driver); + kfree(ppst); +} + +MODULE_AUTHOR("Paul Devriendt "); +MODULE_DESCRIPTION("AMD Athlon 64 and Opteron processor frequency driver."); +MODULE_LICENSE("GPL"); + +module_init(drv_init); +module_exit(drv_exit); diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h Thu Oct 2 01:28:18 2003 @@ -0,0 +1,126 @@ +/* + * (c) 2003 Advanced Micro Devices, Inc. + * Your use of this code is subject to the terms and conditions of the + * GNU general public license version 2. See "../../../COPYING" or + * http://www.gnu.org/licenses/gpl.html + */ + +/* processor's cpuid instruction support */ +#define CPUID_PROCESSOR_SIGNATURE 1 /* function 1 */ +#define CPUID_F1_FAM 0x00000f00 /* family mask */ +#define CPUID_F1_XFAM 0x0ff00000 /* extended family mask */ +#define CPUID_F1_MOD 0x000000f0 /* model mask */ +#define CPUID_F1_STEP 0x0000000f /* stepping level mask */ +#define CPUID_XFAM_MOD 0x0ff00ff0 /* xtended fam, fam + model */ +#define ATHLON64_XFAM_MOD 0x00000f40 /* xtended fam, fam + model */ +#define OPTERON_XFAM_MOD 0x00000f50 /* xtended fam, fam + model */ +#define ATHLON64_REV_C0 8 +#define CPUID_GET_MAX_CAPABILITIES 0x80000000 +#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 +#define P_STATE_TRANSITION_CAPABLE 6 + +/* Model Specific Registers for p-state transitions. MSRs are 64-bit. For */ +/* writes (wrmsr - opcode 0f 30), the register number is placed in ecx, and */ +/* the value to write is placed in edx:eax. For reads (rdmsr - opcode 0f 32), */ +/* the register number is placed in ecx, and the data is returned in edx:eax. */ + +#define MSR_FIDVID_CTL 0xc0010041 +#define MSR_FIDVID_STATUS 0xc0010042 + +/* Field definitions within the FID VID Low Control MSR : */ +#define MSR_C_LO_INIT_FID_VID 0x00010000 +#define MSR_C_LO_NEW_VID 0x00001f00 +#define MSR_C_LO_NEW_FID 0x0000002f +#define MSR_C_LO_VID_SHIFT 8 + +/* Field definitions within the FID VID High Control MSR : */ +#define MSR_C_HI_STP_GNT_TO 0x000fffff + +/* Field definitions within the FID VID Low Status MSR : */ +#define MSR_S_LO_CHANGE_PENDING 0x80000000 /* cleared when completed */ +#define MSR_S_LO_MAX_RAMP_VID 0x1f000000 +#define MSR_S_LO_MAX_FID 0x003f0000 +#define MSR_S_LO_START_FID 0x00003f00 +#define MSR_S_LO_CURRENT_FID 0x0000003f + +/* Field definitions within the FID VID High Status MSR : */ +#define MSR_S_HI_MAX_WORKING_VID 0x001f0000 +#define MSR_S_HI_START_VID 0x00001f00 +#define MSR_S_HI_CURRENT_VID 0x0000001f + +/* fids (frequency identifiers) are arranged in 2 tables - lo and hi */ +#define LO_FID_TABLE_TOP 6 +#define HI_FID_TABLE_BOTTOM 8 + +#define LO_VCOFREQ_TABLE_TOP 1400 /* corresponding vco frequency values */ +#define HI_VCOFREQ_TABLE_BOTTOM 1600 + +#define MIN_FREQ_RESOLUTION 200 /* fids jump by 2 matching freq jumps by 200 */ + +#define MAX_FID 0x2a /* Spec only gives FID values as far as 5 GHz */ + +#define LEAST_VID 0x1e /* Lowest (numerically highest) useful vid value */ + +#define MIN_FREQ 800 /* Min and max freqs, per spec */ +#define MAX_FREQ 5000 + +#define INVALID_FID_MASK 0xffffffc1 /* not a valid fid if these bits are set */ + +#define INVALID_VID_MASK 0xffffffe0 /* not a valid vid if these bits are set */ + +#define STOP_GRANT_5NS 1 /* min poss memory access latency for voltage change */ + +#define PLL_LOCK_CONVERSION (1000/5) /* ms to ns, then divide by clock period */ + +#define MAXIMUM_VID_STEPS 1 /* Current cpus only allow a single step of 25mV */ + +#define VST_UNITS_20US 20 /* Voltage Stabalization Time is in units of 20us */ + +/* +Version 1.4 of the PSB table. This table is constructed by BIOS and is +to tell the OS's power management driver which VIDs and FIDs are +supported by this particular processor. This information is obtained from +the data sheets for each processor model by the system vendor and +incorporated into the BIOS. +If the data in the PSB / PST is wrong, then this driver will program the +wrong values into hardware, which is very likely to lead to a crash. +*/ + +#define PSB_ID_STRING "AMDK7PNOW!" +#define PSB_ID_STRING_LEN 10 + +#define PSB_VERSION_1_4 0x14 + +struct psb_s { + u8 signature[10]; + u8 tableversion; + u8 flags1; + u16 voltagestabilizationtime; + u8 flags2; + u8 numpst; + u32 cpuid; + u8 plllocktime; + u8 maxfid; + u8 maxvid; + u8 numpstates; +}; + +/* Pairs of fid/vid values are appended to the version 1.4 PSB table. */ +struct pst_s { + u8 fid; + u8 vid; +}; + +#ifdef DEBUG +#define dprintk(msg...) printk(msg) +#else +#define dprintk(msg...) do { } while(0) +#endif + +static inline int core_voltage_pre_transition(u32 reqvid); +static inline int core_voltage_post_transition(u32 reqvid); +static inline int core_frequency_transition(u32 reqfid); +static int drv_verify(struct cpufreq_policy *pol); +static int drv_target(struct cpufreq_policy *pol, unsigned targfreq, + unsigned relation); +static int __init drv_cpu_init(struct cpufreq_policy *pol); diff -Nru a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c --- a/arch/i386/kernel/cpu/intel.c Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/cpu/intel.c Thu Oct 2 01:28:16 2003 @@ -238,12 +238,9 @@ } /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it until model 3 mask 3 */ - if ( c->x86 == 6) { - unsigned model_mask = (c->x86_model << 8) + c->x86_mask; - if (model_mask < 0x0303) - clear_bit(X86_FEATURE_SEP, c->x86_capability); - } - + if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) < 0x633) + clear_bit(X86_FEATURE_SEP, c->x86_capability); + /* Names for the Pentium II/Celeron processors detectable only by also checking the cache size. Dixon is NOT a Celeron. */ diff -Nru a/arch/i386/kernel/cpu/mcheck/k7.c b/arch/i386/kernel/cpu/mcheck/k7.c --- a/arch/i386/kernel/cpu/mcheck/k7.c Thu Oct 2 01:28:17 2003 +++ b/arch/i386/kernel/cpu/mcheck/k7.c Thu Oct 2 01:28:17 2003 @@ -17,7 +17,7 @@ #include "mce.h" /* Machine Check Handler For AMD Athlon/Duron */ -static void k7_machine_check(struct pt_regs * regs, long error_code) +static asmlinkage void k7_machine_check(struct pt_regs * regs, long error_code) { int recover=1; u32 alow, ahigh, high, low; @@ -31,7 +31,7 @@ printk (KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", smp_processor_id(), mcgsth, mcgstl); - for (i=0; i"), - MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1011"), NO_MATCH }}, - { force_acpi_ht, "ABIT i440BX-W83977", { MATCH(DMI_BOARD_VENDOR, "ABIT "), MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"), @@ -978,7 +973,10 @@ { disable_acpi_pci, "ASUS A7V", { MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), MATCH(DMI_BOARD_NAME, ""), - MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), NO_MATCH }}, + /* newer BIOS, Revision 1011, does work */ + MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), + NO_MATCH }}, + #endif { NULL, } diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/entry.S Thu Oct 2 01:28:16 2003 @@ -595,7 +595,7 @@ #ifdef CONFIG_X86_MCE ENTRY(machine_check) pushl $0 - pushl $do_machine_check + pushl machine_check_vector jmp error_code #endif @@ -879,5 +879,6 @@ .long sys_tgkill /* 270 */ .long sys_utimes .long sys_fadvise64_64 + .long sys_ni_syscall /* sys_vserver */ nr_syscalls=(.-sys_call_table)/4 diff -Nru a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c --- a/arch/i386/kernel/i387.c Thu Oct 2 01:28:18 2003 +++ b/arch/i386/kernel/i387.c Thu Oct 2 01:28:18 2003 @@ -549,13 +549,3 @@ } return fpvalid; } - - -#ifdef CONFIG_SMP -void dump_smp_unlazy_fpu(void) -{ - unlazy_fpu(current); - return; -} -#endif - diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/mpparse.c Thu Oct 2 01:28:16 2003 @@ -169,7 +169,7 @@ if (num_processors >= NR_CPUS) { printk(KERN_WARNING "NR_CPUS limit of %i reached. Cannot " - "boot CPU(apicid 0x%d).\n", NR_CPUS, m->mpc_apicid); + "boot CPU(apicid 0x%x).\n", NR_CPUS, m->mpc_apicid); return; } num_processors++; @@ -830,7 +830,7 @@ MP_processor_info(&processor); } -#ifdef CONFIG_X86_IO_APIC +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER) #define MP_ISA_BUS 0 #define MP_MAX_IOAPIC_PIN 127 @@ -1019,10 +1019,6 @@ } } -#ifdef CONFIG_ACPI - -/* Ensure the ACPI SCI interrupt level is active low, edge-triggered */ - extern FADT_DESCRIPTOR acpi_fadt; void __init mp_config_ioapic_for_sci(int irq) @@ -1031,6 +1027,7 @@ 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; @@ -1049,32 +1046,37 @@ while ((void *) entry < madt_end) { if (entry->header.type == ACPI_MADT_INT_SRC_OVR && - acpi_fadt.sci_int == entry->bus_irq) { - /* - * See the note at the end of ACPI 2.0b section - * 5.2.10.8 for what this is about. - */ - if (entry->bus_irq != entry->global_irq) { - acpi_fadt.sci_int = entry->global_irq; - irq = entry->global_irq; - break; - } - else - return; - } - + 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; - io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 1, 1); // Active low, level triggered + io_apic_set_pci_routing(ioapic, ioapic_pin, irq, + (flags.trigger >> 1) , (flags.polarity >> 1)); } -#endif /* CONFIG_ACPI */ #ifdef CONFIG_ACPI_PCI @@ -1110,8 +1112,10 @@ } /* Don't set up the ACPI SCI because it's already set up */ - if (acpi_fadt.sci_int == irq) + if (acpi_fadt.sci_int == irq) { + entry->irq = irq; /*we still need to set entry's irq*/ continue; + } ioapic = mp_find_ioapic(irq); if (ioapic < 0) @@ -1154,5 +1158,5 @@ } #endif /*CONFIG_ACPI_PCI*/ -#endif /* CONFIG_X86_IO_APIC */ +#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/ #endif /*CONFIG_ACPI_BOOT*/ diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/setup.c Thu Oct 2 01:28:16 2003 @@ -64,10 +64,10 @@ unsigned long mmu_cr4_features; EXPORT_SYMBOL_GPL(mmu_cr4_features); -#ifdef CONFIG_ACPI - int acpi_disabled __initdata = 0; +#ifdef CONFIG_ACPI_INTERPRETER + int acpi_disabled = 0; #else - int acpi_disabled __initdata = 1; + int acpi_disabled = 1; #endif EXPORT_SYMBOL(acpi_disabled); diff -Nru a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c --- a/arch/i386/kernel/smpboot.c Thu Oct 2 01:28:16 2003 +++ b/arch/i386/kernel/smpboot.c Thu Oct 2 01:28:16 2003 @@ -937,6 +937,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) { int apicid, cpu, bit, kicked; + unsigned long bogosum = 0; /* * Setup boot CPU information @@ -1048,26 +1049,25 @@ /* * Allow the user to impress friends. */ - Dprintk("Before bogomips.\n"); - if (!cpucount) { - printk(KERN_ERR "Error: only one processor found.\n"); - } else { - unsigned long bogosum = 0; - for (cpu = 0; cpu < NR_CPUS; cpu++) - if (cpu_isset(cpu, cpu_callout_map)) - bogosum += cpu_data[cpu].loops_per_jiffy; - printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", - cpucount+1, - bogosum/(500000/HZ), - (bogosum/(5000/HZ))%100); - Dprintk("Before bogocount - setting activated=1.\n"); - } + for (cpu = 0; cpu < NR_CPUS; cpu++) + if (cpu_isset(cpu, cpu_callout_map)) + bogosum += cpu_data[cpu].loops_per_jiffy; + printk(KERN_INFO + "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", + cpucount+1, + bogosum/(500000/HZ), + (bogosum/(5000/HZ))%100); + + Dprintk("Before bogocount - setting activated=1.\n"); if (smp_b_stepping) printk(KERN_WARNING "WARNING: SMP operation may be unreliable with B stepping processors.\n"); - /* Don't taint if we are running SMP kernel on a single non-MP approved Athlon */ + /* + * Don't taint if we are running SMP kernel on a single non-MP + * approved Athlon + */ if (tainted & TAINT_UNSAFE_SMP) { if (cpucount) printk (KERN_INFO "WARNING: This combination of AMD processors is not suitable for SMP.\n"); diff -Nru a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c --- a/arch/i386/mm/ioremap.c Thu Oct 2 01:28:16 2003 +++ b/arch/i386/mm/ioremap.c Thu Oct 2 01:28:16 2003 @@ -158,7 +158,7 @@ return NULL; area->phys_addr = phys_addr; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vunmap(addr); return NULL; } diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c Thu Oct 2 01:28:16 2003 +++ b/arch/ia64/kernel/acpi.c Thu Oct 2 01:28:16 2003 @@ -56,7 +56,7 @@ unsigned char acpi_kbd_controller_present = 1; -int acpi_disabled __initdata; /* XXX this shouldn't be needed---we can't boot without ACPI! */ +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/sn/io/sn2/module.c b/arch/ia64/sn/io/sn2/module.c --- a/arch/ia64/sn/io/sn2/module.c Thu Oct 2 01:28:15 2003 +++ b/arch/ia64/sn/io/sn2/module.c Thu Oct 2 01:28:15 2003 @@ -166,7 +166,6 @@ { lboard_t *board; klmod_serial_num_t *comp; - char * bcopy(const char * src, char * dest, int count); char serial_number[16]; /* @@ -215,9 +214,9 @@ #endif if (comp->snum.snum_str[0] != '\0') { - bcopy(comp->snum.snum_str, - m->sys_snum, - MAX_SERIAL_NUM_SIZE); + memcpy(m->sys_snum, + comp->snum.snum_str, + MAX_SERIAL_NUM_SIZE); m->sys_snum_valid = 1; } } diff -Nru a/arch/ia64/sn/io/sn2/pic.c b/arch/ia64/sn/io/sn2/pic.c --- a/arch/ia64/sn/io/sn2/pic.c Thu Oct 2 01:28:17 2003 +++ b/arch/ia64/sn/io/sn2/pic.c Thu Oct 2 01:28:17 2003 @@ -29,8 +29,6 @@ #include #include -extern char *bcopy(const char * src, char * dest, int count); - #define PCI_BUS_NO_1 1 @@ -51,7 +49,7 @@ (arbitrary_info_t *)&pinv) == GRAPH_SUCCESS) { NEW(peer_pinv); - bcopy((const char *)pinv, (char *)peer_pinv, sizeof(inventory_t)); + memcpy(peer_pinv, pinv, sizeof(inventory_t)); if (hwgraph_info_add_LBL(peer_conn_v, INFO_LBL_INVENT, (arbitrary_info_t)peer_pinv) != GRAPH_SUCCESS) { DEL(peer_pinv); diff -Nru a/arch/m68k/Kconfig b/arch/m68k/Kconfig --- a/arch/m68k/Kconfig Thu Oct 2 01:28:17 2003 +++ b/arch/m68k/Kconfig Thu Oct 2 01:28:17 2003 @@ -87,7 +87,7 @@ config HADES bool "Hades support" - depends on ATARI + depends on ATARI && BROKEN help This option enables support for the Hades Atari clone. If you plan to use this kernel on a Hades, say Y here; otherwise say N. @@ -361,7 +361,7 @@ config STRAM_SWAP bool "Support for ST-RAM as swap space" - depends on ATARI + depends on ATARI && BROKEN ---help--- Some Atari 68k macines (including the 520STF and 1020STE) divide their addressible memory into ST and TT sections. The TT section @@ -961,7 +961,7 @@ config SERIAL167 bool "CD2401 support for MVME166/7 serial ports" - depends on MVME16x + depends on MVME16x && BROKEN help This is the driver for the serial ports on the Motorola MVME166, 167, and 172 boards. Everyone using one of these boards should say diff -Nru a/arch/m68k/Makefile b/arch/m68k/Makefile --- a/arch/m68k/Makefile Thu Oct 2 01:28:17 2003 +++ b/arch/m68k/Makefile Thu Oct 2 01:28:17 2003 @@ -76,6 +76,8 @@ core-$(CONFIG_M68060) += arch/m68k/ifpsp060/ core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/ +all: zImage + lilo: vmlinux if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi diff -Nru a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c --- a/arch/m68k/atari/stram.c Thu Oct 2 01:28:17 2003 +++ b/arch/m68k/atari/stram.c Thu Oct 2 01:28:17 2003 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff -Nru a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c --- a/arch/m68k/kernel/time.c Thu Oct 2 01:28:16 2003 +++ b/arch/m68k/kernel/time.c Thu Oct 2 01:28:16 2003 @@ -171,3 +171,12 @@ write_sequnlock_irq(&xtime_lock); return 0; } + +/* + * Scheduler clock - returns current time in ns units. + */ +unsigned long long sched_clock(void) +{ + return (unsigned long long)jiffies*(1000000000/HZ); +} + diff -Nru a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c --- a/arch/m68k/q40/q40ints.c Thu Oct 2 01:28:17 2003 +++ b/arch/m68k/q40/q40ints.c Thu Oct 2 01:28:17 2003 @@ -200,7 +200,9 @@ irqreturn_t q40_process_int (int level, struct pt_regs *fp) { - printk("unexpected interrupt %x\n",level); + printk("unexpected interrupt vec=%x, pc=%lx, d0=%lx, d0_orig=%lx, d1=%lx, d2=%lx\n", + level, fp->pc, fp->d0, fp->orig_d0, fp->d1, fp->d2); + printk("\tIIRQ_REG = %x, EIRQ_REG = %x\n",master_inb(IIRQ_REG),master_inb(EIRQ_REG)); return IRQ_HANDLED; } @@ -378,7 +380,7 @@ /*printk("reenabling irq %d\n",irq); */ #endif } -// used to do 'goto repeat;' her, this delayed bh processing too long +// used to do 'goto repeat;' here, this delayed bh processing too long return IRQ_HANDLED; } } @@ -387,6 +389,7 @@ } iirq: mir=master_inb(IIRQ_REG); + /* should test whether keyboard irq is really enabled, doing it in defhand */ if (mir&Q40_IRQ_KEYB_MASK) { irq_tab[Q40_IRQ_KEYBOARD].count++; irq_tab[Q40_IRQ_KEYBOARD].handler(Q40_IRQ_KEYBOARD,irq_tab[Q40_IRQ_KEYBOARD].dev_id,fp); @@ -413,7 +416,9 @@ static irqreturn_t q40_defhand (int irq, void *dev_id, struct pt_regs *fp) { - printk ("Unknown q40 interrupt 0x%02x\n", irq); + if (irq!=Q40_IRQ_KEYBOARD) + printk ("Unknown q40 interrupt %d\n", irq); + else master_outb(-1,KEYBOARD_UNLOCK_REG); return IRQ_NONE; } static irqreturn_t sys_default_handler(int lev, void *dev_id, struct pt_regs *regs) diff -Nru a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c --- a/arch/m68k/sun3/config.c Thu Oct 2 01:28:17 2003 +++ b/arch/m68k/sun3/config.c Thu Oct 2 01:28:17 2003 @@ -129,7 +129,7 @@ high_memory = (void *)memory_end; availmem = memory_start; - availmem += init_bootmem(start_page, num_pages); + availmem += init_bootmem_node(NODE_DATA(0), start_page, 0, num_pages); availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK; free_bootmem(__pa(availmem), memory_end - (availmem)); diff -Nru a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c --- a/arch/mips/mm/ioremap.c Thu Oct 2 01:28:16 2003 +++ b/arch/mips/mm/ioremap.c Thu Oct 2 01:28:16 2003 @@ -162,7 +162,7 @@ if (!area) return NULL; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vunmap(addr); return NULL; } diff -Nru a/arch/parisc/Kconfig b/arch/parisc/Kconfig --- a/arch/parisc/Kconfig Thu Oct 2 01:28:17 2003 +++ b/arch/parisc/Kconfig Thu Oct 2 01:28:17 2003 @@ -150,6 +150,7 @@ config HPUX bool "Support for HP-UX binaries" + depends on !PARISC64 config NR_CPUS int "Maximum number of CPUs (2-32)" @@ -189,6 +190,8 @@ #source drivers/ieee1394/Kconfig #source drivers/message/i2o/Kconfig + +source "net/Kconfig" #source "drivers/isdn/Kconfig" diff -Nru a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c --- a/arch/parisc/kernel/asm-offsets.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/asm-offsets.c Thu Oct 2 01:28:16 2003 @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -248,6 +249,9 @@ DEFINE(DTLB_OFF_STRIDE, offsetof(struct pdc_cache_info, dt_off_stride)); DEFINE(DTLB_OFF_COUNT, offsetof(struct pdc_cache_info, dt_off_count)); DEFINE(DTLB_LOOP, offsetof(struct pdc_cache_info, dt_loop)); + BLANK(); + DEFINE(PA_BLOCKSTEP_BIT, 31-PT_BLOCKSTEP_BIT); + DEFINE(PA_SINGLESTEP_BIT, 31-PT_SINGLESTEP_BIT); BLANK(); return 0; } diff -Nru a/arch/parisc/kernel/binfmt_elf32.c b/arch/parisc/kernel/binfmt_elf32.c --- a/arch/parisc/kernel/binfmt_elf32.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/binfmt_elf32.c Thu Oct 2 01:28:16 2003 @@ -88,7 +88,9 @@ */ #define SET_PERSONALITY(ex, ibcs2) \ - current->personality = PER_LINUX_32BIT + current->personality = PER_LINUX32; \ + current->thread.map_base = DEFAULT_MAP_BASE32; \ + current->thread.task_size = DEFAULT_TASK_SIZE32 \ #define jiffies_to_timeval jiffies_to_compat_timeval static __inline__ void @@ -99,3 +101,25 @@ } #include "../../../fs/binfmt_elf.c" + +/* Set up a separate execution domain for ELF32 binaries running + * on an ELF64 kernel */ + +static struct exec_domain parisc32_exec_domain = { + .name = "Linux/ELF32", + .pers_low = PER_LINUX32, + .pers_high = PER_LINUX32, +}; + +static int __init parisc32_exec_init(void) +{ + /* steal the identity signal mappings from the default domain */ + parisc32_exec_domain.signal_map = default_exec_domain.signal_map; + parisc32_exec_domain.signal_invmap = default_exec_domain.signal_invmap; + + register_exec_domain(&parisc32_exec_domain); + + return 0; +} + +__initcall(parisc32_exec_init); diff -Nru a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c --- a/arch/parisc/kernel/drivers.c Thu Oct 2 01:28:17 2003 +++ b/arch/parisc/kernel/drivers.c Thu Oct 2 01:28:17 2003 @@ -28,6 +28,7 @@ /* See comments in include/asm-parisc/pci.h */ struct hppa_dma_ops *hppa_dma_ops; +EXPORT_SYMBOL(hppa_dma_ops); static struct parisc_device root; @@ -155,6 +156,7 @@ return driver_register(&driver->drv); } +EXPORT_SYMBOL(register_parisc_driver); /** * count_parisc_driver - count # of devices this driver would match @@ -187,6 +189,7 @@ driver_unregister(&driver->drv); return 0; } +EXPORT_SYMBOL(unregister_parisc_driver); static struct parisc_device *find_device_by_addr(unsigned long hpa) { @@ -257,7 +260,7 @@ path.mod = dev->hw_path; return print_hwpath(&path, output); } - +EXPORT_SYMBOL(print_pa_hwpath); #if defined(CONFIG_PCI) || defined(CONFIG_ISA) /** @@ -289,6 +292,7 @@ padev = padev->parent; } } +EXPORT_SYMBOL(get_pci_node_path); /** * print_pci_hwpath - Returns hardware path for PCI devices @@ -306,6 +310,8 @@ get_pci_node_path(dev, &path); return print_hwpath(&path, output); } +EXPORT_SYMBOL(print_pci_hwpath); + #endif /* defined(CONFIG_PCI) || defined(CONFIG_ISA) */ diff -Nru a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S --- a/arch/parisc/kernel/entry.S Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/entry.S Thu Oct 2 01:28:16 2003 @@ -2225,18 +2225,23 @@ LDREG TI_TASK(%r1),%r1 STREG %r28,TASK_PT_GR28(%r1) - /* Save other hpux returns if personality is PER_HPUX */ +#ifdef CONFIG_HPUX /* cannot be easily included */ #define PER_HPUX 0x10 LDREG TASK_PERSONALITY(%r1),%r19 -#warning the ldo+CMPIB could probably be done better but 0x10 i soutside of range of CMPIB + + /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ ldo -PER_HPUX(%r19), %r19 CMPIB<>,n 0,%r19,1f + + /* Save other hpux returns if personality is PER_HPUX */ STREG %r22,TASK_PT_GR22(%r1) STREG %r29,TASK_PT_GR29(%r1) 1: +#endif /* CONFIG_HPUX */ + /* Seems to me that dp could be wrong here, if the syscall involved * calling a module, and nothing got round to restoring dp on return. */ @@ -2315,18 +2320,16 @@ depi 3,31,2,%r31 /* ensure return to user mode. */ #ifdef __LP64__ - /* Since we are returning to a 32 bit user process, we always - * clear the W bit. This means that the be (and mtsp) gets - * executed in narrow mode, but that is OK, since we are - * returning to a 32 bit process. When we support 64 bit processes - * we won't clear the W bit, so the be will run in wide mode. - */ - - be 0(%sr3,%r31) /* return to user space */ + /* decide whether to reset the wide mode bit + * + * For a syscall, the W bit is stored in the lowest bit + * of sp. Extract it and reset W if it is zero */ + extrd,u,*<> %r30,63,1,%r1 rsm PSW_SM_W, %r0 -#else - be,n 0(%sr3,%r31) /* return to user space */ + /* now reset the lowest bit of sp if it was set */ + xor %r30,%r1,%r30 #endif + be,n 0(%sr3,%r31) /* return to user space */ /* We have to return via an RFI, so that PSW T and R bits can be set * appropriately. @@ -2340,12 +2343,19 @@ LDREG TASK_PT_PSW(%r1),%r2 /* Get old PSW */ ldi 0x0b,%r20 /* Create new PSW */ depi -1,13,1,%r20 /* C, Q, D, and I bits */ - bb,>=,n %r19,15,try_tbit /* PT_SINGLESTEP */ + + /* The values of PA_SINGLESTEP_BIT and PA_BLOCKSTEP_BIT are + * set in include/linux/ptrace.h and converted to PA bitmap + * numbers in asm-offsets.c */ + + /* if ((%r19.PA_SINGLESTEP_BIT)) { %r20.27=1} */ + extru,= %r19,PA_SINGLESTEP_BIT,1,%r0 depi -1,27,1,%r20 /* R bit */ -try_tbit: - bb,>=,n %r19,14,psw_setup /* PT_BLOCKSTEP, see ptrace.c */ + + /* if ((%r19.PA_BLOCKSTEP_BIT)) { %r20.7=1} */ + extru,= %r19,PA_BLOCKSTEP_BIT,1,%r0 depi -1,7,1,%r20 /* T bit */ -psw_setup: + STREG %r20,TASK_PT_PSW(%r1) /* Always store space registers, since sr3 can be changed (e.g. fork) */ diff -Nru a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c --- a/arch/parisc/kernel/firmware.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/firmware.c Thu Oct 2 01:28:16 2003 @@ -41,19 +41,20 @@ * prumpf 991016 */ +#include + +#include +#include #include +#include #include #include -#include -#include #include #include #include #include /* for boot_cpu_data */ -#include - static spinlock_t pdc_lock = SPIN_LOCK_UNLOCKED; static unsigned long pdc_result[32] __attribute__ ((aligned (8))); static unsigned long pdc_result2[32] __attribute__ ((aligned (8))); @@ -151,6 +152,7 @@ return retval; } +EXPORT_SYMBOL(pdc_add_valid); /** * pdc_chassis_info - Return chassis information. @@ -264,6 +266,7 @@ return retval; } +EXPORT_SYMBOL(pdc_iodc_read); /** * pdc_system_map_find_mods - Locate unarchitected modules. @@ -518,6 +521,7 @@ return retval; } +EXPORT_SYMBOL(pdc_lan_station_id); /** @@ -594,6 +598,7 @@ spin_unlock_irq(&pdc_lock); return retval >= PDC_OK; } +EXPORT_SYMBOL(pdc_get_initiator); /** @@ -660,6 +665,7 @@ return retval; } +EXPORT_SYMBOL(pdc_tod_read); /** * pdc_tod_set - Set the Time-Of-Day clock. @@ -678,6 +684,7 @@ return retval; } +EXPORT_SYMBOL(pdc_tod_set); #ifdef __LP64__ int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, @@ -772,20 +779,34 @@ } /* - * pdc_suspend_usb - Stop USB controller + * pdc_io_reset - Hack to avoid overlapping range registers of Bridges devices. + * Primarily a problem on T600 (which parisc-linux doesn't support) but + * who knows what other platform firmware might do with this OS "hook". + */ +void pdc_io_reset(void) +{ + spin_lock_irq(&pdc_lock); + mem_pdc_call(PDC_IO, PDC_IO_RESET, 0); + spin_unlock_irq(&pdc_lock); +} + +/* + * pdc_io_reset_devices - Hack to Stop USB controller * * If PDC used the usb controller, the usb controller * is still running and will crash the machines during iommu * setup, because of still running DMA. This PDC call - * stops the USB controller + * stops the USB controller. + * Normally called after calling pdc_io_reset(). */ -void pdc_suspend_usb(void) +void pdc_io_reset_devices(void) { spin_lock_irq(&pdc_lock); - mem_pdc_call(PDC_IO, PDC_IO_SUSPEND_USB, 0); + mem_pdc_call(PDC_IO, PDC_IO_RESET_DEVICES, 0); spin_unlock_irq(&pdc_lock); } + /** * pdc_iodc_putc - Console character print using IODC. * @c: the character to output. @@ -905,6 +926,7 @@ return retval; } +EXPORT_SYMBOL(pdc_sti_call); #ifdef __LP64__ /** diff -Nru a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c --- a/arch/parisc/kernel/inventory.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/inventory.c Thu Oct 2 01:28:16 2003 @@ -526,12 +526,14 @@ int i; long status = PDC_OK; +#if defined(CONFIG_IOMMU_SBA) && defined(CONFIG_SUPERIO) /* - * first stop the usb controller, otherwise the machine - * might crash during iommu setup + * Stop the suckyio usb controller on Astro based systems. + * Otherwise the machine might crash during iommu setup. */ -#warning We still probably need to worry about USB here, but how? - /* pdc_suspend_usb(); */ + pdc_io_reset(); + pdc_io_reset_devices(); +#endif for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) { struct parisc_device *dev; diff -Nru a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c --- a/arch/parisc/kernel/irq.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/irq.c Thu Oct 2 01:28:16 2003 @@ -193,6 +193,7 @@ else BUG(); } +EXPORT_SYMBOL(disable_irq); void enable_irq(int irq) { @@ -208,6 +209,7 @@ else BUG(); } +EXPORT_SYMBOL(enable_irq); int show_interrupts(struct seq_file *p, void *v) { @@ -698,6 +700,7 @@ { while (in_irq()) ; } +EXPORT_SYMBOL(synchronize_irq); #endif @@ -847,6 +850,7 @@ { return 0; } +EXPORT_SYMBOL(probe_irq_mask); void __init init_IRQ(void) { diff -Nru a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c --- a/arch/parisc/kernel/module.c Thu Oct 2 01:28:18 2003 +++ b/arch/parisc/kernel/module.c Thu Oct 2 01:28:18 2003 @@ -73,10 +73,7 @@ Elf32_Addr addr; }; -struct fdesc_entry { - Elf32_Addr addr; - Elf32_Addr gp; -}; +#define Elf_Fdesc Elf32_Fdesc struct stub_entry { Elf32_Word insns[2]; /* each stub entry has two insns */ @@ -86,11 +83,7 @@ Elf64_Addr addr; }; -struct fdesc_entry { - Elf64_Addr dummy[2]; - Elf64_Addr addr; - Elf64_Addr gp; -}; +#define Elf_Fdesc Elf64_Fdesc struct stub_entry { Elf64_Word insns[4]; /* each stub entry has four insns */ @@ -276,7 +269,7 @@ me->core_size = ALIGN(me->core_size, 16); me->arch.fdesc_offset = me->core_size; - me->core_size += fdescs * sizeof(struct fdesc_entry); + me->core_size += fdescs * sizeof(Elf_Fdesc); me->core_size = ALIGN(me->core_size, 16); me->arch.stub_offset = me->core_size; @@ -322,7 +315,7 @@ #ifdef __LP64__ static Elf_Addr get_fdesc(struct module *me, unsigned long value) { - struct fdesc_entry *fdesc = me->module_core + me->arch.fdesc_offset; + Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset; if (!value) { printk(KERN_ERR "%s: zero OPD requested!\n", me->name); @@ -664,7 +657,7 @@ *loc64 = get_fdesc(me, val+addend); DEBUGP("FDESC for %s at %p points to %lx\n", strtab + sym->st_name, *loc64, - ((struct fdesc_entry *)*loc64)->addr); + ((Elf_Fdesc *)*loc64)->addr); } else { /* if the symbol is not local to this * module then val+addend is a pointer @@ -696,10 +689,10 @@ Elf_Sym *newptr, *oldptr; Elf_Shdr *symhdr = NULL; #ifdef DEBUG - struct fdesc_entry *entry; + Elf_Fdesc *entry; u32 *addr; - entry = (struct fdesc_entry *)me->init; + entry = (Elf_Fdesc *)me->init; printk("FINALIZE, ->init FPTR is %p, GP %lx ADDR %lx\n", entry, entry->gp, entry->addr); addr = (u32 *)entry->addr; diff -Nru a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c --- a/arch/parisc/kernel/parisc_ksyms.c Thu Oct 2 01:28:18 2003 +++ b/arch/parisc/kernel/parisc_ksyms.c Thu Oct 2 01:28:18 2003 @@ -26,19 +26,6 @@ EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strpbrk); -#include /* struct parisc_device for asm/pci.h */ -#include -EXPORT_SYMBOL(hppa_dma_ops); -#if defined(CONFIG_PCI) || defined(CONFIG_ISA) -EXPORT_SYMBOL(get_pci_node_path); -#endif - -#include -#include -EXPORT_SYMBOL(enable_irq); -EXPORT_SYMBOL(disable_irq); -EXPORT_SYMBOL(probe_irq_mask); - #include EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(boot_cpu_data); @@ -46,10 +33,6 @@ #include EXPORT_SYMBOL(pm_power_off); -#ifdef CONFIG_SMP -EXPORT_SYMBOL(synchronize_irq); -#endif /* CONFIG_SMP */ - #include EXPORT_SYMBOL(__xchg8); EXPORT_SYMBOL(__xchg32); @@ -74,14 +57,6 @@ EXPORT_SYMBOL($global$); #endif -EXPORT_SYMBOL(register_parisc_driver); -EXPORT_SYMBOL(unregister_parisc_driver); -EXPORT_SYMBOL(print_pci_hwpath); -EXPORT_SYMBOL(print_pa_hwpath); -EXPORT_SYMBOL(pdc_iodc_read); -EXPORT_SYMBOL(pdc_tod_read); -EXPORT_SYMBOL(pdc_tod_set); - #include EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(iounmap); @@ -89,22 +64,6 @@ EXPORT_SYMBOL(__memcpy_fromio); EXPORT_SYMBOL(__memset_io); -#if defined(CONFIG_PCI) || defined(CONFIG_ISA) -EXPORT_SYMBOL(inb); -EXPORT_SYMBOL(inw); -EXPORT_SYMBOL(inl); -EXPORT_SYMBOL(outb); -EXPORT_SYMBOL(outw); -EXPORT_SYMBOL(outl); - -EXPORT_SYMBOL(insb); -EXPORT_SYMBOL(insw); -EXPORT_SYMBOL(insl); -EXPORT_SYMBOL(outsb); -EXPORT_SYMBOL(outsw); -EXPORT_SYMBOL(outsl); -#endif - #include EXPORT_SYMBOL(flush_kernel_dcache_range_asm); EXPORT_SYMBOL(flush_kernel_dcache_page); @@ -130,17 +89,6 @@ EXPORT_SYMBOL(__down_interruptible); EXPORT_SYMBOL(__down); -#include -#include -EXPORT_SYMBOL(csum_partial_copy_nocheck); -EXPORT_SYMBOL(csum_partial_copy_from_user); - -#include -EXPORT_SYMBOL(pdc_add_valid); -EXPORT_SYMBOL(pdc_lan_station_id); -EXPORT_SYMBOL(pdc_get_initiator); -EXPORT_SYMBOL(pdc_sti_call); - extern void $$divI(void); extern void $$divU(void); extern void $$remI(void); @@ -218,6 +166,3 @@ extern void $$dyncall(void); EXPORT_SYMBOL($$dyncall); #endif - -#include -EXPORT_SYMBOL(vmalloc_start); diff -Nru a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c --- a/arch/parisc/kernel/pci.c Thu Oct 2 01:28:15 2003 +++ b/arch/parisc/kernel/pci.c Thu Oct 2 01:28:15 2003 @@ -88,7 +88,8 @@ EISA_IN(size); \ if (!parisc_pci_hba[b]) return (u##size) -1; \ return pci_port->in##type(parisc_pci_hba[b], PCI_PORT_ADDR(addr)); \ -} +} \ +EXPORT_SYMBOL(in##type); PCI_PORT_IN(b, 8) PCI_PORT_IN(w, 16) @@ -102,7 +103,8 @@ EISA_OUT(size); \ if (!parisc_pci_hba[b]) return; \ pci_port->out##type(parisc_pci_hba[b], PCI_PORT_ADDR(addr), d); \ -} +} \ +EXPORT_SYMBOL(out##type); PCI_PORT_OUT(b, 8) PCI_PORT_OUT(w, 16) diff -Nru a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c --- a/arch/parisc/kernel/ptrace.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/ptrace.c Thu Oct 2 01:28:16 2003 @@ -23,16 +23,6 @@ #include #include -/* These are used in entry.S, syscall_restore_rfi. We need to record the - * current stepping mode somewhere other than in PSW, because there is no - * concept of saving and restoring the users PSW over a syscall. We choose - * to use these two bits in task->ptrace. These bits must not clash with - * any PT_* defined in include/linux/sched.h, and must match with the bit - * tests in entry.S - */ -#define PT_SINGLESTEP 0x10000 -#define PT_BLOCKSTEP 0x20000 - /* PSW bits we allow the debugger to modify */ #define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB) diff -Nru a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c --- a/arch/parisc/kernel/setup.c Thu Oct 2 01:28:18 2003 +++ b/arch/parisc/kernel/setup.c Thu Oct 2 01:28:18 2003 @@ -43,6 +43,7 @@ #include #include /* for pa7300lc_init() proto */ #include +#include #define COMMAND_LINE_SIZE 1024 char saved_command_line[COMMAND_LINE_SIZE]; @@ -208,27 +209,32 @@ proc_runway_root = proc_mkdir("bus/runway", 0); } break; + default: + /* FIXME: this was added to prevent the compiler + * complaining about missing pcx, pcxs and pcxt + * I'm assuming they have neither gsc nor runway */ + break; } } static struct resource central_bus = { .name = "Central Bus", - .start = (unsigned long)0xfffffffffff80000, - .end = (unsigned long)0xfffffffffffaffff, + .start = F_EXTEND(0xfff80000), + .end = F_EXTEND(0xfffaffff), .flags = IORESOURCE_MEM, }; static struct resource local_broadcast = { .name = "Local Broadcast", - .start = (unsigned long)0xfffffffffffb0000, - .end = (unsigned long)0xfffffffffffdffff, + .start = F_EXTEND(0xfffb0000), + .end = F_EXTEND(0xfffdffff), .flags = IORESOURCE_MEM, }; static struct resource global_broadcast = { .name = "Global Broadcast", - .start = (unsigned long)0xfffffffffffe0000, - .end = (unsigned long)0xffffffffffffffff, + .start = F_EXTEND(0xfffe0000), + .end = F_EXTEND(0xffffffff), .flags = IORESOURCE_MEM, }; diff -Nru a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c --- a/arch/parisc/kernel/signal.c Thu Oct 2 01:28:18 2003 +++ b/arch/parisc/kernel/signal.c Thu Oct 2 01:28:18 2003 @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include #include @@ -41,8 +43,11 @@ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) -/* Use this to get at 32-bit user passed pointers. - * See sys_sparc32.c for description about these. */ +/* gcc will complain if a pointer is cast to an integer of different + * size. If you really need to do this (and we do for an ELF32 user + * application in an ELF64 kernel) then you have to do a cast to an + * integer of the same size first. The A() macro accomplishes + * this. */ #define A(__x) ((unsigned long)(__x)) int do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall); @@ -166,11 +171,17 @@ struct rt_sigframe *frame; struct siginfo si; sigset_t set; - unsigned long usp = regs->gr[30]; + unsigned long usp = (regs->gr[30] & ~(0x01UL)); + unsigned long sigframe_size = PARISC_RT_SIGFRAME_SIZE; +#ifdef __LP64__ + if(personality(current->personality) == PER_LINUX32) + sigframe_size = PARISC_RT_SIGFRAME_SIZE32; +#endif + /* Unwind the user stack to get the rt_sigframe structure. */ frame = (struct rt_sigframe *) - (usp - PARISC_RT_SIGFRAME_SIZE); + (usp - sigframe_size); DBG(("in sys_rt_sigreturn, frame is %p\n", frame)); if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) @@ -271,11 +282,12 @@ sigset_t *set, struct pt_regs *regs, int in_syscall) { struct rt_sigframe *frame; - unsigned long rp, usp, haddr; + unsigned long rp, usp; + unsigned long haddr, sigframe_size; struct siginfo si; int err = 0; - usp = regs->gr[30]; + usp = (regs->gr[30] & ~(0x01UL)); frame = get_sigframe(ka, usp, sizeof(*frame)); DBG(("setup_rt_frame 1: frame %p info %p\n", frame, info)); @@ -308,64 +320,86 @@ } #endif -#undef CACHE_FLUSHING_IS_NOT_BROKEN -#ifdef CACHE_FLUSHING_IS_NOT_BROKEN + flush_user_dcache_range((unsigned long) &frame->tramp[0], + (unsigned long) &frame->tramp[4]); flush_user_icache_range((unsigned long) &frame->tramp[0], (unsigned long) &frame->tramp[4]); -#else - /* It should *always* be cache line-aligned, but the compiler - sometimes screws up. */ - asm volatile("fdc 0(%%sr3,%0)\n\t" - "fdc %1(%%sr3,%0)\n\t" - "sync\n\t" - "fic 0(%%sr3,%0)\n\t" - "fic %1(%%sr3,%0)\n\t" - "sync\n\t" - : : "r" (frame->tramp), "r" (L1_CACHE_BYTES)); -#endif rp = (unsigned long) frame->tramp; if (err) goto give_sigsegv; -/* Much more has to happen with signals than this -- but it'll at least */ -/* provide a pointer to some places which definitely need a look. */ -#define HACK u32 - - haddr = (HACK)A(ka->sa.sa_handler); - /* ARGH! Fucking brain damage. You don't want to know. */ - if (haddr & 2) { - HACK *plabel; - HACK ltp; - - plabel = (HACK *) (haddr & ~3); - err |= __get_user(haddr, plabel); - err |= __get_user(ltp, plabel + 1); + haddr = A(ka->sa.sa_handler); + /* The sa_handler may be a pointer to a function descriptor */ +#ifdef __LP64__ + if(personality(current->personality) == PER_LINUX32) { +#endif + if (haddr & PA_PLABEL_FDESC) { + Elf32_Fdesc fdesc; + Elf32_Fdesc *ufdesc = (Elf32_Fdesc *)A(haddr & ~3); + + err = __copy_from_user(&fdesc, ufdesc, sizeof(fdesc)); + + if (err) + goto give_sigsegv; + + haddr = fdesc.addr; + regs->gr[19] = fdesc.gp; + } +#ifdef __LP64__ + } else { + Elf64_Fdesc fdesc; + Elf64_Fdesc *ufdesc = (Elf64_Fdesc *)A(haddr & ~3); + + err = __copy_from_user(&fdesc, ufdesc, sizeof(fdesc)); + if (err) goto give_sigsegv; - regs->gr[19] = ltp; + + haddr = fdesc.addr; + regs->gr[19] = fdesc.gp; + DBG(("64 bit signal, exe=%#lx, r19=%#lx, in_syscall=%d\n", + haddr, regs->gr[19], in_syscall)); } +#endif /* The syscall return path will create IAOQ values from r31. */ - if (in_syscall) - regs->gr[31] = (HACK) haddr; - else { - regs->gr[0] = USER_PSW; - regs->iaoq[0] = (HACK) haddr | 3; + sigframe_size = PARISC_RT_SIGFRAME_SIZE; +#ifdef __LP64__ + if(personality(current->personality) == PER_LINUX32) + sigframe_size = PARISC_RT_SIGFRAME_SIZE32; +#endif + if (in_syscall) { + regs->gr[31] = haddr; +#ifdef __LP64__ + if(personality(current->personality) == PER_LINUX) + sigframe_size |= 1; +#endif + } else { + unsigned long psw = USER_PSW; +#ifdef __LP64__ + if(personality(current->personality) == PER_LINUX) + psw |= PSW_W; +#endif + + regs->gr[0] = psw; + regs->iaoq[0] = haddr | 3; regs->iaoq[1] = regs->iaoq[0] + 4; } regs->gr[2] = rp; /* userland return pointer */ regs->gr[26] = sig; /* signal number */ - regs->gr[25] = (HACK)A(&frame->info); /* siginfo pointer */ - regs->gr[24] = (HACK)A(&frame->uc); /* ucontext pointer */ + regs->gr[25] = A(&frame->info); /* siginfo pointer */ + regs->gr[24] = A(&frame->uc); /* ucontext pointer */ + DBG(("making sigreturn frame: %#lx + %#x = %#lx\n", - regs->gr[30], PARISC_RT_SIGFRAME_SIZE, - regs->gr[30] + PARISC_RT_SIGFRAME_SIZE)); + regs->gr[30], sigframe_size, + regs->gr[30] + sigframe_size)); /* Raise the user stack pointer to make a proper call frame. */ - regs->gr[30] = ((HACK)A(frame) + PARISC_RT_SIGFRAME_SIZE); + regs->gr[30] = (A(frame) + sigframe_size); + DBG(("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n", current->comm, current->pid, frame, regs->gr[30], diff -Nru a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c --- a/arch/parisc/kernel/sys_parisc.c Thu Oct 2 01:28:17 2003 +++ b/arch/parisc/kernel/sys_parisc.c Thu Oct 2 01:28:17 2003 @@ -65,7 +65,7 @@ */ static int get_offset(struct address_space *mapping) { - int offset = (int) mapping << (PAGE_SHIFT - 8); + int offset = (unsigned long) mapping << (PAGE_SHIFT - 8); return offset & 0x3FF000; } #endif @@ -165,12 +165,13 @@ return raddr; } - /* Fucking broken ABI */ #ifdef CONFIG_PARISC64 extern asmlinkage long sys_truncate(const char *, unsigned long); extern asmlinkage long sys_ftruncate(unsigned int, unsigned long); +extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long); + asmlinkage long parisc_truncate64(const char * path, unsigned int high, unsigned int low) { @@ -181,6 +182,21 @@ unsigned int high, unsigned int low) { return sys_ftruncate(fd, (long)high << 32 | low); +} + +/* stubs for the benefit of the syscall_table since truncate64 and truncate + * are identical on LP64 */ +asmlinkage long sys_truncate64(const char * path, unsigned long length) +{ + return sys_truncate(path, length); +} +asmlinkage long sys_ftruncate64(unsigned int fd, unsigned long length) +{ + return sys_ftruncate(fd, length); +} +asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + return sys_fcntl(fd, cmd, arg); } #else diff -Nru a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S --- a/arch/parisc/kernel/syscall.S Thu Oct 2 01:28:18 2003 +++ b/arch/parisc/kernel/syscall.S Thu Oct 2 01:28:18 2003 @@ -69,9 +69,14 @@ * exit from the syscall, and also use that value to know * whether to do narrow or wide syscalls. -PB */ - ssm PSW_SM_W, %r0 + ssm PSW_SM_W, %r1 + extrd,u %r1,PSW_W_BIT,1,%r1 + /* sp must be aligned on 4, so deposit the W bit setting into + * the bottom of sp temporarily */ + or,ev %r1,%r30,%r30 + b,n 1f /* The top halves of argument registers must be cleared on syscall - * entry. + * entry from narrow executable. */ depdi 0, 31, 32, %r26 depdi 0, 31, 32, %r25 @@ -79,11 +84,13 @@ depdi 0, 31, 32, %r23 depdi 0, 31, 32, %r22 depdi 0, 31, 32, %r21 +1: #endif mfctl %cr30,%r1 xor %r1,%r30,%r30 /* ye olde xor trick */ xor %r1,%r30,%r1 xor %r1,%r30,%r30 + ldo THREAD_SZ_ALGN+FRAME_SIZE(%r30),%r30 /* set up kernel stack */ /* N.B.: It is critical that we don't set sr7 to 0 until r30 @@ -104,9 +111,19 @@ PSW value is stored. This is needed for gdb and sys_ptrace. */ STREG %r0, TASK_PT_PSW(%r1) STREG %r2, TASK_PT_GR2(%r1) /* preserve rp */ + STREG %r19, TASK_PT_GR19(%r1) + LDREGM -FRAME_SIZE(%r30), %r2 /* get users sp back */ +#ifdef __LP64__ + extrd,u %r2,63,1,%r19 /* W hidden in bottom bit */ +#if 0 + xor %r19,%r2,%r2 /* clear bottom bit */ + depd,z %r19,1,1,%r19 + std %r19,TASK_PT_PSW(%r1) +#endif +#endif STREG %r2, TASK_PT_GR30(%r1) /* ... and save it */ - STREG %r19, TASK_PT_GR19(%r1) + STREG %r20, TASK_PT_GR20(%r1) STREG %r21, TASK_PT_GR21(%r1) STREG %r22, TASK_PT_GR22(%r1) @@ -130,6 +147,7 @@ #ifdef __LP64__ ldo -16(%r30),%r29 /* Reference param save area */ + copy %r19,%r2 /* W bit back to r2 */ #else /* no need to save these on stack in wide mode because the first 8 * args are passed in registers */ @@ -144,9 +162,17 @@ /* Note! We cannot use the syscall table that is mapped nearby since the gateway page is mapped execute-only. */ +#ifdef __LP64__ + ldil L%sys_call_table, %r1 + or,= %r2,%r2,%r2 + addil L%(sys_call_table64-sys_call_table), %r1 + ldo R%sys_call_table(%r1), %r19 + or,= %r2,%r2,%r2 + ldo R%sys_call_table64(%r1), %r19 +#else ldil L%sys_call_table, %r1 ldo R%sys_call_table(%r1), %r19 - +#endif comiclr,>>= __NR_Linux_syscalls, %r20, %r0 b,n .Lsyscall_nosys @@ -317,304 +343,21 @@ ldil L%syscall_exit_rfi,%r1 be,n R%syscall_exit_rfi(%sr7,%r1) -#ifdef __LP64__ -/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and - * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific - * implementation is required on wide palinux. Use ENTRY_COMP where - * the compatability layer has a useful 32-bit implementation. - */ -#define ENTRY_SAME(_name_) .dword sys_##_name_ -#define ENTRY_DIFF(_name_) .dword sys32_##_name_ -#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented -#define ENTRY_OURS(_name_) .dword parisc_##_name_ -#define ENTRY_COMP(_name_) .dword compat_sys_##_name_ -#else -#define ENTRY_SAME(_name_) .word sys_##_name_ -#define ENTRY_DIFF(_name_) .word sys_##_name_ -#define ENTRY_UHOH(_name_) .word sys_##_name_ -#define ENTRY_OURS(_name_) .word parisc_##_name_ -#define ENTRY_COMP(_name_) .word sys_##_name_ -#endif - - .align 8 + .align 4096 .export sys_call_table .Lsys_call_table: sys_call_table: - ENTRY_SAME(ni_syscall) /* 0 - old "setup()" system call*/ - ENTRY_SAME(exit) - ENTRY_SAME(fork_wrapper) - ENTRY_SAME(read) - ENTRY_SAME(write) - ENTRY_SAME(open) /* 5 */ - ENTRY_SAME(close) - ENTRY_SAME(waitpid) - ENTRY_SAME(creat) - ENTRY_SAME(link) - ENTRY_SAME(unlink) /* 10 */ - ENTRY_DIFF(execve_wrapper) - ENTRY_SAME(chdir) - /* See comments in kernel/time.c!!! Maybe we don't need this? */ - ENTRY_DIFF(time) - ENTRY_SAME(mknod) - ENTRY_SAME(chmod) /* 15 */ - ENTRY_SAME(lchown) - ENTRY_SAME(socket) - /* struct stat is MAYBE identical wide and narrow ?? */ - ENTRY_COMP(newstat) - ENTRY_DIFF(lseek) - ENTRY_SAME(getpid) /* 20 */ - /* the 'void * data' parameter may need re-packing in wide */ - ENTRY_DIFF(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 */ - ENTRY_SAME(bind) - ENTRY_SAME(setuid) - ENTRY_SAME(getuid) - ENTRY_SAME(stime) /* 25 */ - ENTRY_SAME(ptrace) - ENTRY_SAME(alarm) - /* see stat comment */ - ENTRY_COMP(newfstat) - ENTRY_SAME(pause) - /* struct utimbuf uses time_t which might vary */ - ENTRY_COMP(utime) /* 30 */ - /* struct sockaddr... */ - ENTRY_SAME(connect) - ENTRY_SAME(listen) - ENTRY_SAME(access) - ENTRY_SAME(nice) - /* struct sockaddr... */ - ENTRY_SAME(accept) /* 35 */ - ENTRY_SAME(sync) - ENTRY_SAME(kill) - ENTRY_SAME(rename) - ENTRY_SAME(mkdir) - ENTRY_SAME(rmdir) /* 40 */ - ENTRY_SAME(dup) - ENTRY_SAME(pipe) - ENTRY_COMP(times) - /* struct sockaddr... */ - ENTRY_SAME(getsockname) - /* it seems possible brk() could return a >4G pointer... */ - ENTRY_SAME(brk) /* 45 */ - ENTRY_SAME(setgid) - ENTRY_SAME(getgid) - ENTRY_SAME(signal) - ENTRY_SAME(geteuid) - ENTRY_SAME(getegid) /* 50 */ - ENTRY_SAME(acct) - ENTRY_SAME(umount) - /* struct sockaddr... */ - ENTRY_SAME(getpeername) - ENTRY_COMP(ioctl) - ENTRY_COMP(fcntl) /* 55 */ - ENTRY_SAME(socketpair) - ENTRY_SAME(setpgid) - ENTRY_SAME(send) - ENTRY_SAME(newuname) - ENTRY_SAME(umask) /* 60 */ - ENTRY_SAME(chroot) - ENTRY_SAME(ustat) - ENTRY_SAME(dup2) - ENTRY_SAME(getppid) - ENTRY_SAME(getpgrp) /* 65 */ - ENTRY_SAME(setsid) - ENTRY_SAME(pivot_root) - /* I don't like this */ - ENTRY_UHOH(sgetmask) - ENTRY_UHOH(ssetmask) - ENTRY_SAME(setreuid) /* 70 */ - ENTRY_SAME(setregid) - ENTRY_SAME(mincore) - ENTRY_COMP(sigpending) - ENTRY_SAME(sethostname) - /* Following 3 have linux-common-code structs containing longs -( */ - ENTRY_COMP(setrlimit) /* 75 */ - ENTRY_COMP(getrlimit) - ENTRY_COMP(getrusage) - /* struct timeval and timezone are maybe?? consistent wide and narrow */ - ENTRY_DIFF(gettimeofday) - ENTRY_DIFF(settimeofday) - ENTRY_SAME(getgroups) /* 80 */ - ENTRY_SAME(setgroups) - /* struct socketaddr... */ - ENTRY_SAME(sendto) - ENTRY_SAME(symlink) - /* see stat comment */ - ENTRY_COMP(newlstat) - ENTRY_SAME(readlink) /* 85 */ - ENTRY_SAME(ni_syscall) /* was uselib */ - ENTRY_SAME(swapon) - ENTRY_SAME(reboot) - ENTRY_SAME(mmap2) - ENTRY_SAME(mmap) /* 90 */ - ENTRY_SAME(munmap) - ENTRY_SAME(truncate) - ENTRY_SAME(ftruncate) - ENTRY_SAME(fchmod) - ENTRY_SAME(fchown) /* 95 */ - ENTRY_SAME(getpriority) - ENTRY_SAME(setpriority) - ENTRY_SAME(recv) - ENTRY_COMP(statfs) - ENTRY_COMP(fstatfs) /* 100 */ - ENTRY_SAME(stat64) - ENTRY_SAME(ni_syscall) /* was socketcall */ - ENTRY_SAME(syslog) - /* even though manpage says struct timeval contains longs, ours has - * time_t and suseconds_t -- both of which are safe wide/narrow */ - ENTRY_COMP(setitimer) - ENTRY_COMP(getitimer) /* 105 */ - ENTRY_SAME(capget) - ENTRY_SAME(capset) - ENTRY_OURS(pread64) - ENTRY_OURS(pwrite64) - ENTRY_SAME(getcwd) /* 110 */ - ENTRY_SAME(vhangup) - ENTRY_SAME(fstat64) - ENTRY_SAME(vfork_wrapper) - /* struct rusage contains longs... */ - ENTRY_COMP(wait4) - ENTRY_SAME(swapoff) /* 115 */ - ENTRY_DIFF(sysinfo) - ENTRY_SAME(shutdown) - ENTRY_SAME(fsync) - ENTRY_SAME(madvise) - ENTRY_SAME(clone_wrapper) /* 120 */ - ENTRY_SAME(setdomainname) - ENTRY_DIFF(sendfile) - /* struct sockaddr... */ - ENTRY_SAME(recvfrom) - /* struct timex contains longs */ - ENTRY_DIFF(adjtimex) - ENTRY_SAME(mprotect) /* 125 */ - /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */ - ENTRY_COMP(sigprocmask) - ENTRY_SAME(ni_syscall) /* create_module */ - ENTRY_SAME(init_module) - ENTRY_SAME(delete_module) - ENTRY_SAME(ni_syscall) /* 130: get_kernel_syms */ - /* time_t inside struct dqblk */ - ENTRY_SAME(quotactl) - ENTRY_SAME(getpgid) - ENTRY_SAME(fchdir) - ENTRY_SAME(bdflush) - ENTRY_SAME(sysfs) /* 135 */ - ENTRY_SAME(personality) - ENTRY_SAME(ni_syscall) /* for afs_syscall */ - ENTRY_SAME(setfsuid) - ENTRY_SAME(setfsgid) - /* I think this might work */ - ENTRY_SAME(llseek) /* 140 */ - /* struct linux_dirent has longs, like 'unsigned long d_ino' which - * almost definitely should be 'ino_t d_ino' but it's too late now */ - ENTRY_DIFF(getdents) - /* it is POSSIBLE that select will be OK because even though fd_set - * contains longs, the macros and sizes are clever. */ - ENTRY_DIFF(select) - ENTRY_SAME(flock) - ENTRY_SAME(msync) - /* struct iovec contains pointers */ - ENTRY_DIFF(readv) /* 145 */ - ENTRY_DIFF(writev) - ENTRY_SAME(getsid) - ENTRY_SAME(fdatasync) - /* struct __sysctl_args is a mess */ - ENTRY_DIFF(sysctl) - ENTRY_SAME(mlock) /* 150 */ - ENTRY_SAME(munlock) - ENTRY_SAME(mlockall) - ENTRY_SAME(munlockall) - /* struct sched_param is ok for now */ - ENTRY_SAME(sched_setparam) - ENTRY_SAME(sched_getparam) /* 155 */ - ENTRY_SAME(sched_setscheduler) - ENTRY_SAME(sched_getscheduler) - ENTRY_SAME(sched_yield) - ENTRY_SAME(sched_get_priority_max) - ENTRY_SAME(sched_get_priority_min) /* 160 */ - /* These 2 would've worked if someone had defined struct timespec - * carefully, like timeval for example (which is about the same). - * Unfortunately it contains a long :-( */ - ENTRY_DIFF(sched_rr_get_interval) - ENTRY_COMP(nanosleep) - ENTRY_SAME(mremap) - ENTRY_SAME(setresuid) - ENTRY_SAME(getresuid) /* 165 */ - ENTRY_DIFF(sigaltstack_wrapper) - ENTRY_SAME(ni_syscall) /* query_module */ - ENTRY_SAME(poll) - /* structs contain pointers and an in_addr... */ - ENTRY_DIFF(nfsservctl) - ENTRY_SAME(setresgid) /* 170 */ - ENTRY_SAME(getresgid) - ENTRY_SAME(prctl) - /* signals need a careful review */ - ENTRY_SAME(rt_sigreturn_wrapper) - ENTRY_DIFF(rt_sigaction) - ENTRY_DIFF(rt_sigprocmask) /* 175 */ - ENTRY_DIFF(rt_sigpending) - ENTRY_UHOH(rt_sigtimedwait) - /* even though the struct siginfo_t is different, it appears like - * all the paths use values which should be same wide and narrow. - * Also the struct is padded to 128 bytes which means we don't have - * to worry about faulting trying to copy in a larger 64-bit - * struct from a 32-bit user-space app. - */ - ENTRY_SAME(rt_sigqueueinfo) - ENTRY_SAME(rt_sigsuspend_wrapper) /* not really SAME -- see the code */ - ENTRY_SAME(chown) /* 180 */ - /* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */ - ENTRY_COMP(setsockopt) - ENTRY_SAME(getsockopt) - ENTRY_COMP(sendmsg) - ENTRY_COMP(recvmsg) - ENTRY_SAME(semop) /* 185 */ - ENTRY_SAME(semget) - ENTRY_DIFF(semctl_broken) - ENTRY_DIFF(msgsnd) - ENTRY_DIFF(msgrcv) - ENTRY_SAME(msgget) /* 190 */ - ENTRY_SAME(msgctl_broken) - ENTRY_SAME(shmat_wrapper) - ENTRY_SAME(shmdt) - ENTRY_SAME(shmget) - ENTRY_SAME(shmctl_broken) /* 195 */ - ENTRY_SAME(ni_syscall) /* streams1 */ - ENTRY_SAME(ni_syscall) /* streams2 */ - ENTRY_SAME(lstat64) - ENTRY_OURS(truncate64) - ENTRY_OURS(ftruncate64) /* 200 */ - ENTRY_SAME(getdents64) - ENTRY_COMP(fcntl64) - ENTRY_SAME(ni_syscall) - ENTRY_SAME(ni_syscall) - ENTRY_SAME(ni_syscall) /* 205 */ - ENTRY_SAME(gettid) - ENTRY_OURS(readahead) - ENTRY_SAME(ni_syscall) /* tkill */ - - ENTRY_SAME(sendfile64) - ENTRY_COMP(futex) /* 210 */ - ENTRY_COMP(sched_setaffinity) - ENTRY_COMP(sched_getaffinity) - ENTRY_SAME(ni_syscall) - ENTRY_SAME(ni_syscall) - ENTRY_SAME(io_setup) /* 215 */ - ENTRY_SAME(io_destroy) - ENTRY_SAME(io_getevents) - ENTRY_SAME(io_submit) - ENTRY_SAME(io_cancel) - ENTRY_SAME(alloc_hugepages) /* 220 */ - ENTRY_SAME(free_hugepages) - ENTRY_SAME(exit_group) - ENTRY_DIFF(lookup_dcookie) - ENTRY_SAME(epoll_create) - ENTRY_SAME(epoll_ctl) /* 225 */ - ENTRY_SAME(epoll_wait) - ENTRY_SAME(remap_file_pages) +#include "syscall_table.S" .end +#ifdef __LP64__ + .align 4096 + .export sys_call_table64 +.Lsys_call_table64: +sys_call_table64: +#define SYSCALL_TABLE_64BIT +#include "syscall_table.S" +#endif + /* Make sure nothing else is placed on this page */ diff -Nru a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/parisc/kernel/syscall_table.S Thu Oct 2 01:28:18 2003 @@ -0,0 +1,304 @@ +#undef ENTRY_SAME +#undef ENTRY_DIFF +#undef ENTRY_UHOH +#undef ENTRY_COMP +#undef ENTRY_OURS +#if defined(__LP64__) && !defined(SYSCALL_TABLE_64BIT) +/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and + * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific + * implementation is required on wide palinux. Use ENTRY_COMP where + * the compatability layer has a useful 32-bit implementation. + */ +#define ENTRY_SAME(_name_) .dword sys_##_name_ +#define ENTRY_DIFF(_name_) .dword sys32_##_name_ +#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented +#define ENTRY_OURS(_name_) .dword parisc_##_name_ +#define ENTRY_COMP(_name_) .dword compat_sys_##_name_ +#elif defined(__LP64__) && defined(SYSCALL_TABLE_64BIT) +#define ENTRY_SAME(_name_) .dword sys_##_name_ +#define ENTRY_DIFF(_name_) .dword sys_##_name_ +#define ENTRY_UHOH(_name_) .dword sys_##_name_ +#define ENTRY_OURS(_name_) .dword sys_##_name_ +#define ENTRY_COMP(_name_) .dword sys_##_name_ +#else +#define ENTRY_SAME(_name_) .word sys_##_name_ +#define ENTRY_DIFF(_name_) .word sys_##_name_ +#define ENTRY_UHOH(_name_) .word sys_##_name_ +#define ENTRY_OURS(_name_) .word parisc_##_name_ +#define ENTRY_COMP(_name_) .word sys_##_name_ +#endif + + ENTRY_SAME(ni_syscall) /* 0 - old "setup()" system call*/ + ENTRY_SAME(exit) + ENTRY_SAME(fork_wrapper) + ENTRY_SAME(read) + ENTRY_SAME(write) + ENTRY_SAME(open) /* 5 */ + ENTRY_SAME(close) + ENTRY_SAME(waitpid) + ENTRY_SAME(creat) + ENTRY_SAME(link) + ENTRY_SAME(unlink) /* 10 */ + ENTRY_DIFF(execve_wrapper) + ENTRY_SAME(chdir) + /* See comments in kernel/time.c!!! Maybe we don't need this? */ + ENTRY_DIFF(time) + ENTRY_SAME(mknod) + ENTRY_SAME(chmod) /* 15 */ + ENTRY_SAME(lchown) + ENTRY_SAME(socket) + /* struct stat is MAYBE identical wide and narrow ?? */ + ENTRY_COMP(newstat) + ENTRY_DIFF(lseek) + ENTRY_SAME(getpid) /* 20 */ + /* the 'void * data' parameter may need re-packing in wide */ + ENTRY_DIFF(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 */ + ENTRY_SAME(bind) + ENTRY_SAME(setuid) + ENTRY_SAME(getuid) + ENTRY_SAME(stime) /* 25 */ + ENTRY_SAME(ptrace) + ENTRY_SAME(alarm) + /* see stat comment */ + ENTRY_COMP(newfstat) + ENTRY_SAME(pause) + /* struct utimbuf uses time_t which might vary */ + ENTRY_COMP(utime) /* 30 */ + /* struct sockaddr... */ + ENTRY_SAME(connect) + ENTRY_SAME(listen) + ENTRY_SAME(access) + ENTRY_SAME(nice) + /* struct sockaddr... */ + ENTRY_SAME(accept) /* 35 */ + ENTRY_SAME(sync) + ENTRY_SAME(kill) + ENTRY_SAME(rename) + ENTRY_SAME(mkdir) + ENTRY_SAME(rmdir) /* 40 */ + ENTRY_SAME(dup) + ENTRY_SAME(pipe) + ENTRY_COMP(times) + /* struct sockaddr... */ + ENTRY_SAME(getsockname) + /* it seems possible brk() could return a >4G pointer... */ + ENTRY_SAME(brk) /* 45 */ + ENTRY_SAME(setgid) + ENTRY_SAME(getgid) + ENTRY_SAME(signal) + ENTRY_SAME(geteuid) + ENTRY_SAME(getegid) /* 50 */ + ENTRY_SAME(acct) + ENTRY_SAME(umount) + /* struct sockaddr... */ + ENTRY_SAME(getpeername) + ENTRY_COMP(ioctl) + ENTRY_COMP(fcntl) /* 55 */ + ENTRY_SAME(socketpair) + ENTRY_SAME(setpgid) + ENTRY_SAME(send) + ENTRY_SAME(newuname) + ENTRY_SAME(umask) /* 60 */ + ENTRY_SAME(chroot) + ENTRY_SAME(ustat) + ENTRY_SAME(dup2) + ENTRY_SAME(getppid) + ENTRY_SAME(getpgrp) /* 65 */ + ENTRY_SAME(setsid) + ENTRY_SAME(pivot_root) + /* I don't like this */ + ENTRY_UHOH(sgetmask) + ENTRY_UHOH(ssetmask) + ENTRY_SAME(setreuid) /* 70 */ + ENTRY_SAME(setregid) + ENTRY_SAME(mincore) + ENTRY_COMP(sigpending) + ENTRY_SAME(sethostname) + /* Following 3 have linux-common-code structs containing longs -( */ + ENTRY_COMP(setrlimit) /* 75 */ + ENTRY_COMP(getrlimit) + ENTRY_COMP(getrusage) + /* struct timeval and timezone are maybe?? consistent wide and narrow */ + ENTRY_DIFF(gettimeofday) + ENTRY_DIFF(settimeofday) + ENTRY_SAME(getgroups) /* 80 */ + ENTRY_SAME(setgroups) + /* struct socketaddr... */ + ENTRY_SAME(sendto) + ENTRY_SAME(symlink) + /* see stat comment */ + ENTRY_COMP(newlstat) + ENTRY_SAME(readlink) /* 85 */ + ENTRY_SAME(ni_syscall) /* was uselib */ + ENTRY_SAME(swapon) + ENTRY_SAME(reboot) + ENTRY_SAME(mmap2) + ENTRY_SAME(mmap) /* 90 */ + ENTRY_SAME(munmap) + ENTRY_SAME(truncate) + ENTRY_SAME(ftruncate) + ENTRY_SAME(fchmod) + ENTRY_SAME(fchown) /* 95 */ + ENTRY_SAME(getpriority) + ENTRY_SAME(setpriority) + ENTRY_SAME(recv) + ENTRY_COMP(statfs) + ENTRY_COMP(fstatfs) /* 100 */ + ENTRY_SAME(stat64) + ENTRY_SAME(ni_syscall) /* was socketcall */ + ENTRY_SAME(syslog) + /* even though manpage says struct timeval contains longs, ours has + * time_t and suseconds_t -- both of which are safe wide/narrow */ + ENTRY_COMP(setitimer) + ENTRY_COMP(getitimer) /* 105 */ + ENTRY_SAME(capget) + ENTRY_SAME(capset) + ENTRY_OURS(pread64) + ENTRY_OURS(pwrite64) + ENTRY_SAME(getcwd) /* 110 */ + ENTRY_SAME(vhangup) + ENTRY_SAME(fstat64) + ENTRY_SAME(vfork_wrapper) + /* struct rusage contains longs... */ + ENTRY_COMP(wait4) + ENTRY_SAME(swapoff) /* 115 */ + ENTRY_DIFF(sysinfo) + ENTRY_SAME(shutdown) + ENTRY_SAME(fsync) + ENTRY_SAME(madvise) + ENTRY_SAME(clone_wrapper) /* 120 */ + ENTRY_SAME(setdomainname) + ENTRY_DIFF(sendfile) + /* struct sockaddr... */ + ENTRY_SAME(recvfrom) + /* struct timex contains longs */ + ENTRY_DIFF(adjtimex) + ENTRY_SAME(mprotect) /* 125 */ + /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */ + ENTRY_COMP(sigprocmask) + ENTRY_SAME(ni_syscall) /* create_module */ + ENTRY_SAME(init_module) + ENTRY_SAME(delete_module) + ENTRY_SAME(ni_syscall) /* 130: get_kernel_syms */ + /* time_t inside struct dqblk */ + ENTRY_SAME(quotactl) + ENTRY_SAME(getpgid) + ENTRY_SAME(fchdir) + ENTRY_SAME(bdflush) + ENTRY_SAME(sysfs) /* 135 */ + ENTRY_SAME(personality) + ENTRY_SAME(ni_syscall) /* for afs_syscall */ + ENTRY_SAME(setfsuid) + ENTRY_SAME(setfsgid) + /* I think this might work */ + ENTRY_SAME(llseek) /* 140 */ + /* struct linux_dirent has longs, like 'unsigned long d_ino' which + * almost definitely should be 'ino_t d_ino' but it's too late now */ + ENTRY_DIFF(getdents) + /* it is POSSIBLE that select will be OK because even though fd_set + * contains longs, the macros and sizes are clever. */ + ENTRY_DIFF(select) + ENTRY_SAME(flock) + ENTRY_SAME(msync) + /* struct iovec contains pointers */ + ENTRY_DIFF(readv) /* 145 */ + ENTRY_DIFF(writev) + ENTRY_SAME(getsid) + ENTRY_SAME(fdatasync) + /* struct __sysctl_args is a mess */ + ENTRY_DIFF(sysctl) + ENTRY_SAME(mlock) /* 150 */ + ENTRY_SAME(munlock) + ENTRY_SAME(mlockall) + ENTRY_SAME(munlockall) + /* struct sched_param is ok for now */ + ENTRY_SAME(sched_setparam) + ENTRY_SAME(sched_getparam) /* 155 */ + ENTRY_SAME(sched_setscheduler) + ENTRY_SAME(sched_getscheduler) + ENTRY_SAME(sched_yield) + ENTRY_SAME(sched_get_priority_max) + ENTRY_SAME(sched_get_priority_min) /* 160 */ + /* These 2 would've worked if someone had defined struct timespec + * carefully, like timeval for example (which is about the same). + * Unfortunately it contains a long :-( */ + ENTRY_DIFF(sched_rr_get_interval) + ENTRY_COMP(nanosleep) + ENTRY_SAME(mremap) + ENTRY_SAME(setresuid) + ENTRY_SAME(getresuid) /* 165 */ + ENTRY_DIFF(sigaltstack_wrapper) + ENTRY_SAME(ni_syscall) /* query_module */ + ENTRY_SAME(poll) + /* structs contain pointers and an in_addr... */ + ENTRY_DIFF(nfsservctl) + ENTRY_SAME(setresgid) /* 170 */ + ENTRY_SAME(getresgid) + ENTRY_SAME(prctl) + /* signals need a careful review */ + ENTRY_SAME(rt_sigreturn_wrapper) + ENTRY_DIFF(rt_sigaction) + ENTRY_DIFF(rt_sigprocmask) /* 175 */ + ENTRY_DIFF(rt_sigpending) + ENTRY_UHOH(rt_sigtimedwait) + /* even though the struct siginfo_t is different, it appears like + * all the paths use values which should be same wide and narrow. + * Also the struct is padded to 128 bytes which means we don't have + * to worry about faulting trying to copy in a larger 64-bit + * struct from a 32-bit user-space app. + */ + ENTRY_SAME(rt_sigqueueinfo) + ENTRY_SAME(rt_sigsuspend_wrapper) /* not really SAME -- see the code */ + ENTRY_SAME(chown) /* 180 */ + /* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */ + ENTRY_COMP(setsockopt) + ENTRY_SAME(getsockopt) + ENTRY_COMP(sendmsg) + ENTRY_COMP(recvmsg) + ENTRY_SAME(semop) /* 185 */ + ENTRY_SAME(semget) + ENTRY_DIFF(semctl_broken) + ENTRY_DIFF(msgsnd) + ENTRY_DIFF(msgrcv) + ENTRY_SAME(msgget) /* 190 */ + ENTRY_SAME(msgctl_broken) + ENTRY_SAME(shmat_wrapper) + ENTRY_SAME(shmdt) + ENTRY_SAME(shmget) + ENTRY_SAME(shmctl_broken) /* 195 */ + ENTRY_SAME(ni_syscall) /* streams1 */ + ENTRY_SAME(ni_syscall) /* streams2 */ + ENTRY_SAME(lstat64) + ENTRY_OURS(truncate64) + ENTRY_OURS(ftruncate64) /* 200 */ + ENTRY_SAME(getdents64) + ENTRY_COMP(fcntl64) + ENTRY_SAME(ni_syscall) + ENTRY_SAME(ni_syscall) + ENTRY_SAME(ni_syscall) /* 205 */ + ENTRY_SAME(gettid) + ENTRY_OURS(readahead) + ENTRY_SAME(ni_syscall) /* tkill */ + + ENTRY_SAME(sendfile64) + ENTRY_COMP(futex) /* 210 */ + ENTRY_COMP(sched_setaffinity) + ENTRY_COMP(sched_getaffinity) + ENTRY_SAME(ni_syscall) + ENTRY_SAME(ni_syscall) + ENTRY_SAME(io_setup) /* 215 */ + ENTRY_SAME(io_destroy) + ENTRY_SAME(io_getevents) + ENTRY_SAME(io_submit) + ENTRY_SAME(io_cancel) + ENTRY_SAME(alloc_hugepages) /* 220 */ + ENTRY_SAME(free_hugepages) + ENTRY_SAME(exit_group) + ENTRY_DIFF(lookup_dcookie) + ENTRY_SAME(epoll_create) + ENTRY_SAME(epoll_ctl) /* 225 */ + ENTRY_SAME(epoll_wait) + ENTRY_SAME(remap_file_pages) diff -Nru a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c --- a/arch/parisc/kernel/time.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/time.c Thu Oct 2 01:28:16 2003 @@ -48,7 +48,9 @@ parisc_do_profile(struct pt_regs *regs) { unsigned long pc = regs->iaoq[0]; +#if 0 extern unsigned long prof_cpu_mask; +#endif extern char _stext; profile_hook(regs); @@ -60,6 +62,10 @@ return; #if 0 + /* FIXME: when we have irq affinity to cpu, we need to + * only look at the cpus specified in this mask + */ + if (!((1 << smp_processor_id()) & prof_cpu_mask)) return; #endif @@ -206,7 +212,6 @@ * done, and then undo it! */ nsec -= gettimeoffset() * 1000; - nsec -= (jiffies - wall_jiffies) * (NSEC_PER_SEC / HZ); wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); @@ -221,6 +226,16 @@ } write_sequnlock_irq(&xtime_lock); return 0; +} + +/* + * XXX: We can do better than this. + * Returns nanoseconds + */ + +unsigned long long sched_clock(void) +{ + return (unsigned long long)jiffies * (1000000000 / HZ); } diff -Nru a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c --- a/arch/parisc/kernel/traps.c Thu Oct 2 01:28:18 2003 +++ b/arch/parisc/kernel/traps.c Thu Oct 2 01:28:18 2003 @@ -678,12 +678,13 @@ } if (user_mode(regs)) { - if (fault_space != regs->sr[7]) { + if ((fault_space>>SPACEID_SHIFT) != (regs->sr[7] >> SPACEID_SHIFT)) { #ifdef PRINT_USER_FAULTS if (fault_space == 0) printk(KERN_DEBUG "User Fault on Kernel Space "); else - printk(KERN_DEBUG "User Fault (long pointer) "); + printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", + code); printk("pid=%d command='%s'\n", current->pid, current->comm); show_regs(regs); #endif diff -Nru a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c --- a/arch/parisc/kernel/unaligned.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/kernel/unaligned.c Thu Oct 2 01:28:16 2003 @@ -369,8 +369,8 @@ void handle_unaligned(struct pt_regs *regs) { - unsigned long unaligned_count = 0; - unsigned long last_time = 0; + static unsigned long unaligned_count = 0; + static unsigned long last_time = 0; unsigned long newbase = R1(regs->iir)?regs->gr[R1(regs->iir)]:0; int modify = 0; int ret = -1; @@ -380,7 +380,6 @@ /* if the unaligned access is inside the kernel: * if the access is caused by a syscall, then we fault the calling * user process - * otherwise we halt the kernel */ if (!user_mode(regs)) { @@ -427,10 +426,10 @@ show_regs(regs); #endif } - } - if (!unaligned_enabled) - goto force_sigbus; + if (!unaligned_enabled) + goto force_sigbus; + } /* handle modification - OK, it's ugly, see the instruction manual */ switch (MAJOR_OP(regs->iir)) diff -Nru a/arch/parisc/lib/checksum.c b/arch/parisc/lib/checksum.c --- a/arch/parisc/lib/checksum.c Thu Oct 2 01:28:17 2003 +++ b/arch/parisc/lib/checksum.c Thu Oct 2 01:28:17 2003 @@ -16,8 +16,10 @@ * * $Id: checksum.c,v 1.3 1997/12/01 17:57:34 ralf Exp $ */ -#include +#include #include + +#include #include #include #include @@ -109,6 +111,7 @@ return sum; } +EXPORT_SYMBOL(csum_partial_copy_nocheck); /* * Copy from userspace and compute checksum. If we catch an exception @@ -128,3 +131,4 @@ return csum_partial(dst, len, sum); } +EXPORT_SYMBOL(csum_partial_copy_from_user); diff -Nru a/arch/parisc/lib/io.c b/arch/parisc/lib/io.c --- a/arch/parisc/lib/io.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/lib/io.c Thu Oct 2 01:28:16 2003 @@ -8,6 +8,7 @@ */ #include +#include #include /* Copies a block of memory to a device in an efficient manner. @@ -457,3 +458,10 @@ break; } } + +EXPORT_SYMBOL(insb); +EXPORT_SYMBOL(insw); +EXPORT_SYMBOL(insl); +EXPORT_SYMBOL(outsb); +EXPORT_SYMBOL(outsw); +EXPORT_SYMBOL(outsl); diff -Nru a/arch/parisc/math-emu/Makefile b/arch/parisc/math-emu/Makefile --- a/arch/parisc/math-emu/Makefile Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/math-emu/Makefile Thu Oct 2 01:28:16 2003 @@ -2,6 +2,11 @@ # Makefile for the linux/parisc floating point code # +# See arch/parisc/math-emu/README +CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ + -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \ + -Wno-implicit-int + obj-y := frnd.o driver.o decode_exc.o fpudispatch.o denormal.o \ dfmpy.o sfmpy.o sfsqrt.o dfsqrt.o dfadd.o fmpyfadd.o \ sfadd.o dfsub.o sfsub.o fcnvfxt.o fcnvff.o fcnvxf.o \ diff -Nru a/arch/parisc/math-emu/denormal.c b/arch/parisc/math-emu/denormal.c --- a/arch/parisc/math-emu/denormal.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/math-emu/denormal.c Thu Oct 2 01:28:16 2003 @@ -47,7 +47,7 @@ #include "sgl_float.h" #include "dbl_float.h" #include "hppa.h" -#include "types.h" +#include /* #include */ #undef Fpustatus_register diff -Nru a/arch/parisc/math-emu/fpudispatch.c b/arch/parisc/math-emu/fpudispatch.c --- a/arch/parisc/math-emu/fpudispatch.c Thu Oct 2 01:28:15 2003 +++ b/arch/parisc/math-emu/fpudispatch.c Thu Oct 2 01:28:15 2003 @@ -50,7 +50,7 @@ #define FPUDEBUG 0 #include "float.h" -#include "types.h" +#include #include /* #include */ /* #include */ diff -Nru a/arch/parisc/math-emu/types.h b/arch/parisc/math-emu/types.h --- a/arch/parisc/math-emu/types.h Thu Oct 2 01:28:16 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,25 +0,0 @@ -/* - * Linux/PA-RISC Project (http://www.parisc-linux.org/) - * - * Floating-point emulation code - * Copyright (C) 2001 Hewlett-Packard (Paul Bame) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#define BUG() do { \ - printk(KERN_ERR "floating-pt emulation BUG at %s:%d!\n", __FILE__, __LINE__); \ -} while (0) diff -Nru a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c --- a/arch/parisc/mm/init.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/mm/init.c Thu Oct 2 01:28:16 2003 @@ -430,6 +430,8 @@ & ~(VM_MAP_OFFSET-1))) void *vmalloc_start; +EXPORT_SYMBOL(vmalloc_start); + #ifdef CONFIG_PA11 unsigned long pcxl_dma_start; #endif @@ -617,8 +619,6 @@ static void __init pagetable_init(void) { int range; - - printk("pagetable_init\n"); /* Map each physical memory range to its kernel vaddr */ diff -Nru a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c --- a/arch/parisc/mm/ioremap.c Thu Oct 2 01:28:16 2003 +++ b/arch/parisc/mm/ioremap.c Thu Oct 2 01:28:16 2003 @@ -159,7 +159,7 @@ if (!area) return NULL; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vfree(addr); return NULL; } diff -Nru a/arch/ppc/mm/cachemap.c b/arch/ppc/mm/cachemap.c --- a/arch/ppc/mm/cachemap.c Thu Oct 2 01:28:18 2003 +++ b/arch/ppc/mm/cachemap.c Thu Oct 2 01:28:18 2003 @@ -101,7 +101,7 @@ if (! area) goto out; - va = VMALLOC_VMADDR(area->addr); + va = (unsigned long) area->addr; flags = _PAGE_KERNEL | _PAGE_NO_CACHE; diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c --- a/arch/ppc/mm/pgtable.c Thu Oct 2 01:28:16 2003 +++ b/arch/ppc/mm/pgtable.c Thu Oct 2 01:28:16 2003 @@ -195,7 +195,7 @@ area = get_vm_area(size, VM_IOREMAP); if (area == 0) return NULL; - v = VMALLOC_VMADDR(area->addr); + v = (unsigned long) area->addr; } else { v = (ioremap_bot -= size); } diff -Nru a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c --- a/arch/ppc64/kernel/process.c Thu Oct 2 01:28:17 2003 +++ b/arch/ppc64/kernel/process.c Thu Oct 2 01:28:17 2003 @@ -70,23 +70,6 @@ #endif /* CONFIG_SMP */ } -#ifdef CONFIG_SMP -static void smp_unlazy_onefpu(void *arg) -{ - struct pt_regs *regs = current->thread.regs; - - if (!regs) - return; - if (regs->msr & MSR_FP) - giveup_fpu(current); -} - -void dump_smp_unlazy_fpu(void) -{ - smp_call_function(smp_unlazy_onefpu, NULL, 1, 1); -} -#endif - int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) { struct pt_regs *regs = tsk->thread.regs; diff -Nru a/arch/s390/mm/ioremap.c b/arch/s390/mm/ioremap.c --- a/arch/s390/mm/ioremap.c Thu Oct 2 01:28:16 2003 +++ b/arch/s390/mm/ioremap.c Thu Oct 2 01:28:16 2003 @@ -124,7 +124,7 @@ if (!area) return NULL; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vfree(addr); return NULL; } diff -Nru a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c --- a/arch/sh/mm/ioremap.c Thu Oct 2 01:28:17 2003 +++ b/arch/sh/mm/ioremap.c Thu Oct 2 01:28:17 2003 @@ -149,7 +149,7 @@ if (!area) return NULL; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vfree(addr); return NULL; } diff -Nru a/arch/x86_64/kernel/i387.c b/arch/x86_64/kernel/i387.c --- a/arch/x86_64/kernel/i387.c Thu Oct 2 01:28:16 2003 +++ b/arch/x86_64/kernel/i387.c Thu Oct 2 01:28:16 2003 @@ -138,12 +138,3 @@ } return fpvalid; } - -#ifdef CONFIG_SMP -void dump_smp_unlazy_fpu(void) -{ - unlazy_fpu(current); - return; -} -#endif - diff -Nru a/arch/x86_64/mm/ioremap.c b/arch/x86_64/mm/ioremap.c --- a/arch/x86_64/mm/ioremap.c Thu Oct 2 01:28:18 2003 +++ b/arch/x86_64/mm/ioremap.c Thu Oct 2 01:28:18 2003 @@ -159,7 +159,7 @@ if (!area) return NULL; addr = area->addr; - if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) { + if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { vunmap(addr); return NULL; } diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig Thu Oct 2 01:28:18 2003 +++ b/drivers/acpi/Kconfig Thu Oct 2 01:28:18 2003 @@ -3,34 +3,14 @@ # menu "ACPI (Advanced Configuration and Power Interface) Support" - -config ACPI_HT - bool "ACPI Processor Enumeration for HT" - depends on X86 - default y - ---help--- - ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT) - and physical processors. It is designed to obsolete several older - specifications, including the MultiProcessor Specification (MPS), - which supported only physical processors. - - CONFIG_ACPI_HT includes the minimal ACPI boot-time code - necessary to enumerate logical processors and enable HT. - - CONFIG_ACPI includes CONFIG_ACPI_HT, plus IO APIC enumeration, - and the hooks to run the ACPI AML interpreter for run-time events. - - When CONFIG_ACPI is selected, the command-line option "acpi=ht" - is available to run just the ACPI boot-time code -- just as if - only CONFIG_ACPI_HT were selected. - - Note that "acpi=off" can be used to disable all ACPI code in the kernel. - -config ACPI - bool "Full ACPI Support" depends on !X86_VISWS depends on !IA64_HP_SIM - depends on IA64 || (X86 || ACPI_HT) + depends on IA64 || X86 + +config ACPI + bool "ACPI Support" + depends on IA64 || X86 + default y ---help--- Advanced Configuration and Power Interface (ACPI) support for @@ -62,12 +42,19 @@ config ACPI_BOOT bool - depends on ACPI || ACPI_HT + depends on ACPI || X86_HT + default y + +config ACPI_INTERPRETER + bool + depends on ACPI + depends on !IA64_SGI_SN default y config ACPI_SLEEP bool "Sleep States (EXPERIMENTAL)" depends on X86 && ACPI + depends on ACPI_INTERPRETER depends on EXPERIMENTAL && PM default y ---help--- @@ -93,7 +80,8 @@ config ACPI_AC tristate "AC Adapter" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m help This driver adds support for the AC Adapter object, which indicates @@ -102,7 +90,8 @@ config ACPI_BATTERY tristate "Battery" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m help This driver adds support for battery information through @@ -111,7 +100,7 @@ config ACPI_BUTTON tristate "Button" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default m help @@ -123,7 +112,7 @@ config ACPI_FAN tristate "Fan" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default m help @@ -132,7 +121,7 @@ config ACPI_PROCESSOR tristate "Processor" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default m help @@ -152,14 +141,15 @@ config ACPI_NUMA bool "NUMA support" - depends on ACPI + depends on ACPI_INTERPRETER depends on NUMA depends on !X86_64 default y if IA64_GENERIC || IA64_SGI_SN2 config ACPI_ASUS tristate "ASUS/Medion Laptop Extras" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m ---help--- This driver provides support for extra features of ACPI-compatible @@ -170,6 +160,9 @@ display brightness and output, switching the LCD backlight on and off, and most importantly, allows you to blink those fancy LEDs intended for reporting mail and wireless status. + + Note: display switching code is currently considered EXPERIMENTAL, + toying with these values may even lock your machine. All settings are changed via /proc/acpi/asus directory entries. Owner and group for these entries can be set with asus_uid and asus_gid @@ -185,7 +178,8 @@ config ACPI_TOSHIBA tristate "Toshiba Laptop Extras" - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default m ---help--- This driver adds support for access to certain system settings @@ -212,7 +206,7 @@ config ACPI_DEBUG bool "Debug Statements" - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default n help @@ -222,19 +216,14 @@ config ACPI_BUS bool - depends on ACPI - depends on !IA64_SGI_SN - default y - -config ACPI_INTERPRETER - bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default y config ACPI_EC bool - depends on X86 && ACPI + depends on X86 + depends on ACPI_INTERPRETER default y help This driver is required on some systems for the proper operation of @@ -243,19 +232,19 @@ config ACPI_POWER bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default y config ACPI_PCI bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default PCI config ACPI_SYSTEM bool - depends on ACPI + depends on ACPI_INTERPRETER depends on !IA64_SGI_SN default y help @@ -264,9 +253,21 @@ config ACPI_EFI bool - depends on ACPI + depends on ACPI_INTERPRETER depends on IA64 default y + +config ACPI_RELAXED_AML + bool "Relaxed AML" + depends on ACPI_INTERPRETER + depends on !IA64_SGI_SN + default n + help + If you say `Y' here, the ACPI interpreter will relax its checking + for valid AML and will ignore some AML mistakes, such as off-by-one + errors in region sizes. Some laptops may require this option. In + particular, many Toshiba laptops require this for correct operation + of the AC module. endmenu diff -Nru a/drivers/acpi/Makefile b/drivers/acpi/Makefile --- a/drivers/acpi/Makefile Thu Oct 2 01:28:18 2003 +++ b/drivers/acpi/Makefile Thu Oct 2 01:28:18 2003 @@ -18,7 +18,7 @@ # ACPI Boot-Time Table Parsing # obj-$(CONFIG_ACPI_BOOT) += tables.o -obj-$(CONFIG_ACPI) += blacklist.o +obj-$(CONFIG_ACPI_INTERPRETER) += blacklist.o # # ACPI Core Subsystem (Interpreter) diff -Nru a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c --- a/drivers/acpi/asus_acpi.c Thu Oct 2 01:28:16 2003 +++ b/drivers/acpi/asus_acpi.c Thu Oct 2 01:28:16 2003 @@ -26,13 +26,17 @@ * Johann Wiesner - Small compile fixes * John Belmonte - ACPI code for Toshiba laptop was a good starting point. * - * TODO + * TODO: * add Fn key status - * Add mode selection on module loading (parameter) -> still necessary ? + * Add mode selection on module loading (parameter) -> still necessary? * Complete display switching -- may require dirty hacks? - * */ +#include +#if defined (CONFIG_MODVERSIONS) && !defined (MODVERSIONS) && defined (MODULE) +#include +#endif + #include #include #include @@ -41,7 +45,7 @@ #include #include -#define ASUS_ACPI_VERSION "0.24a" +#define ASUS_ACPI_VERSION "0.26" #define PROC_ASUS "asus" //the directory #define PROC_MLED "mled" @@ -110,20 +114,24 @@ struct model_data *methods; //methods available on the laptop u8 brightness; //brighness level enum { - L2X = 0, //L200D -> TODO check Q11 (Fn+F8) - // Calling this method simply hang the + A1X=0, //A1340D, A1300F + A2X, //A2500H + D1X, //D1 + L1X, //L1400B + L2X, //L2000D -> TODO check Q11 (Fn+F8) + // Calling this method simply hangs the // computer, ISMI method hangs the laptop. - L3X, //L3C L3D, //L3400D + L3X, //L3C + L5X, //L5C TODO this model seems to have one more + // LED, add support M2X, //M2400E + M3N, //M3700N, but also S1300N -> TODO WLED S1X, //S1300A -> TODO special keys do not work ? - D1X, //D1 - L1X, //L1400B - A1X, //A1340D, A1300F - J1X, //S200 (J1) - //TODO A1370D does not seems to have a ATK device + S2X, //S200 (J1 reported), Victor MP-XP7210 + //TODO A1370D does not seem to have an ATK device // L8400 model doesn't have ATK - END_MODEL, + END_MODEL } model; //Models currently supported u16 event_count[128]; //count for each event TODO make this better }; @@ -133,7 +141,8 @@ #define S1X_PREFIX "\\_SB.PCI0.PX40." #define L1X_PREFIX S1X_PREFIX #define A1X_PREFIX "\\_SB.PCI0.ISA.EC0." -#define J1X_PREFIX A1X_PREFIX +#define S2X_PREFIX A1X_PREFIX +#define M3N_PREFIX "\\_SB.PCI0.SBRG.EC0." static struct model_data model_conf[END_MODEL] = { /* @@ -147,33 +156,43 @@ * it seems to be a kind of switch, but what for ? * */ + {"A1X", "MLED", "\\MAIL", NULL, NULL, A1X_PREFIX "_Q10", "\\BKLI", + A1X_PREFIX "_Q0E", A1X_PREFIX "_Q0F", NULL, NULL, NULL, NULL, NULL}, + + {"A2X", "MLED", NULL, "WLED", "\\SG66", "\\Q10", "\\BAOF", + "\\Q0E", "\\Q0F", "SPLV", "GPLV", "\\CMOD", "SDSP", "\\INFB"}, + + {"D1X", "MLED", NULL, NULL, NULL, "\\Q0D", "\\GP11", + "\\Q0C", "\\Q0B", NULL, NULL, "\\BLVL", "SDSP","\\INFB"}, + + {"L1X", "MLED", NULL, "WLED", NULL, L1X_PREFIX "Q10", "\\PNOF", + L1X_PREFIX "Q0F", L1X_PREFIX "Q0E", "SPLV", "GPLV", "\\BRIT", NULL, NULL}, + {"L2X", "MLED", "\\SGP6", "WLED", "\\RCP3", "\\Q10", "\\SGP0", "\\Q0E", "\\Q0F", NULL, NULL, NULL, "SDSP", "\\INFB"}, + {"L3D", "MLED", "\\MALD", "WLED", NULL, "\\Q10", "\\BKLG", + "\\Q0E", "\\Q0F", "SPLV", "GPLV", "\\BLVL", "SDSP", "\\INFB"}, + {"L3X", "MLED", NULL, "WLED", NULL, L3X_PREFIX "_Q10", "\\GL32", L3X_PREFIX "_Q0F", L3X_PREFIX "_Q0E", "SPLV", "GPLV", "\\BLVL", "SDSP", "\\_SB.PCI0.PCI1.VGAC.NMAP"}, - {"L3D", "MLED", "\\MALD", "WLED", NULL, "\\Q10", "\\BKLG", - "\\Q0E", "\\Q0F", "SPLV", "GPLV", "\\BLVL", "SDSP", "\\INFB"}, - + {"L5X", "MLED", NULL, "WLED", "WRED", "\\Q0D", "\\BAOF", + "\\Q0C","\\Q0B", "SPLV", "GPLV", NULL, "SDSP", "\\INFB"}, + {"M2X", "MLED", NULL, "WLED", NULL, "\\Q10", "\\GP06", "\\Q0E","\\Q0F", "SPLV", "GPLV", NULL, "SDSP", "\\INFB"}, + + {"M3N", "MLED", NULL, "WLED", "\\PO33", M3N_PREFIX "_Q10", "\\BKLT", + M3N_PREFIX "_Q0F", M3N_PREFIX "_Q0E", "SPLV", "GPLV", "\\LBTN", "SDSP", + "\\ADVG"}, {"S1X", "MLED", "\\EMLE", "WLED", NULL, S1X_PREFIX "Q10", "\\PNOF", S1X_PREFIX "Q0F", S1X_PREFIX "Q0E", "SPLV", "GPLV", "\\BRIT", NULL, NULL}, - {"D1X", "MLED", NULL, NULL, NULL, "\\Q0D", "\\GP11", - "\\Q0C", "\\Q0B", NULL, NULL, "\\BLVL", "SDSP","\\INFB"}, - - {"L1X", "MLED", NULL, "WLED", NULL, L1X_PREFIX "Q10", "\\PNOF", - L1X_PREFIX "Q0F", L1X_PREFIX "Q0E", "SPLV", "GPLV", "\\BRIT", NULL, NULL}, - - {"A1X", "MLED", "\\MAIL", NULL, NULL, A1X_PREFIX "_Q10", "\\BKLI", - A1X_PREFIX "_Q0E", A1X_PREFIX "_Q0F", NULL, NULL, NULL, NULL, NULL}, - - {"J1X", "MLED", "\\MAIL", NULL, NULL, J1X_PREFIX "_Q10", "\\BKLI", - J1X_PREFIX "_Q0B", J1X_PREFIX "_Q0A", NULL, NULL, NULL, NULL, NULL} + {"S2X", "MLED", "\\MAIL", NULL, NULL, S2X_PREFIX "_Q10", "\\BKLI", + S2X_PREFIX "_Q0B", S2X_PREFIX "_Q0A", NULL, NULL, NULL, NULL, NULL} }; /* procdir we use */ @@ -234,7 +253,7 @@ output.length = sizeof(out_obj); output.pointer = &out_obj; - status = acpi_evaluate_object(handle, (char*) method, NULL, &output); + status = acpi_evaluate_object(handle, (char *) method, NULL, &output); *val = out_obj.integer.value; return (status == AE_OK) && (out_obj.type == ACPI_TYPE_INTEGER); } @@ -249,6 +268,7 @@ void *data) { int len = 0; + int sfun; struct asus_hotk *hotk = (struct asus_hotk *) data; char buf[16]; //enough for all info /* @@ -257,28 +277,27 @@ */ len += sprintf(page, ACPI_HOTK_NAME " " ASUS_ACPI_VERSION "\n"); - len += - sprintf(page + len, "Model reference : %s\n", - hotk->methods->name); + len += sprintf(page + len, "Model reference : %s\n", + hotk->methods->name); + if(read_acpi_int(hotk->handle, "SFUN", &sfun)) + len += sprintf(page + len, "SFUN value : 0x%04x\n", sfun); if (asus_info) { - snprintf(buf, 5, "%s", asus_info->signature); - len += sprintf(page + len, "ACPI signature : %s\n", buf); snprintf(buf, 16, "%d", asus_info->length); - len += sprintf(page + len, "Table length : %s\n", buf); - snprintf(buf, 16, "%d", asus_info->revision); - len += sprintf(page + len, "ACPI minor version : %s\n", buf); + len += sprintf(page + len, "DSDT length : %s\n", buf); snprintf(buf, 16, "%d", asus_info->checksum); - len += sprintf(page + len, "Checksum : %s\n", buf); + len += sprintf(page + len, "DSDT checksum : %s\n", buf); + snprintf(buf, 16, "%d", asus_info->revision); + len += sprintf(page + len, "DSDT revision : %s\n", buf); snprintf(buf, 7, "%s", asus_info->oem_id); - len += sprintf(page + len, "OEM identification : %s\n", buf); + len += sprintf(page + len, "OEM id : %s\n", buf); snprintf(buf, 9, "%s", asus_info->oem_table_id); len += sprintf(page + len, "OEM table id : %s\n", buf); snprintf(buf, 16, "%x", asus_info->oem_revision); - len += sprintf(page + len, "OEM rev number : 0x%s\n", buf); + len += sprintf(page + len, "OEM revision : 0x%s\n", buf); snprintf(buf, 5, "%s", asus_info->asl_compiler_id); - len += sprintf(page + len, "ASL comp vendor ID : %s\n", buf); + len += sprintf(page + len, "ASL comp vendor id : %s\n", buf); snprintf(buf, 16, "%x", asus_info->asl_compiler_revision); - len += sprintf(page + len, "ASL comp rev number: 0x%s\n", buf); + len += sprintf(page + len, "ASL comp revision : 0x%s\n", buf); } return len; @@ -304,7 +323,7 @@ &led_status)) len = sprintf(page, "%d\n", led_status); else - printk(KERN_NOTICE "Asus ACPI: Error reading MLED " + printk(KERN_WARNING "Asus ACPI: Error reading MLED " "status\n"); } else { len = sprintf(page, "%d\n", (hotk->status & MLED_ON) ? 1 : 0); @@ -334,7 +353,7 @@ /* We don't have to check mt_mled exists if we are here :) */ if (!write_acpi_int(hotk->handle, hotk->methods->mt_mled, led_out, NULL)) - printk(KERN_NOTICE "Asus ACPI: MLED write failed\n"); + printk(KERN_WARNING "Asus ACPI: MLED write failed\n"); @@ -355,11 +374,11 @@ int led_status; if (hotk->methods->wled_status) { - if (read_acpi_int(NULL, hotk->methods->mled_status, + if (read_acpi_int(NULL, hotk->methods->wled_status, &led_status)) len = sprintf(page, "%d\n", led_status); else - printk(KERN_NOTICE "Asus ACPI: Error reading WLED " + printk(KERN_WARNING "Asus ACPI: Error reading WLED " "status\n"); } else { len = sprintf(page, "%d\n", (hotk->status & WLED_ON) ? 1 : 0); @@ -386,7 +405,7 @@ /* We don't have to check if mt_wled exists if we are here :) */ if (!write_acpi_int(hotk->handle, hotk->methods->mt_wled, led_out, NULL)) - printk(KERN_NOTICE "Asus ACPI: WLED write failed\n"); + printk(KERN_WARNING "Asus ACPI: WLED write failed\n"); return count; @@ -399,7 +418,7 @@ /* We don't have to check anything, if we are here */ if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd)) - printk(KERN_NOTICE "Asus ACPI: Error reading LCD status\n"); + printk(KERN_WARNING "Asus ACPI: Error reading LCD status\n"); if (hotk->model == L2X) lcd = ~lcd; @@ -438,7 +457,7 @@ acpi_evaluate_object(NULL, hotk->methods->mt_lcd_switch, NULL, NULL); if (ACPI_FAILURE(status)) - printk(KERN_NOTICE "Asus ACPI: Error switching LCD\n"); + printk(KERN_WARNING "Asus ACPI: Error switching LCD\n"); } return count; @@ -452,15 +471,15 @@ { acpi_status status = 0; - /* ATKD laptop */ + /* SPLV laptop */ if(hotk->methods->brightness_set) { if (!write_acpi_int(hotk->handle, hotk->methods->brightness_set, value, NULL)) - printk(KERN_NOTICE "Asus ACPI: Error changing brightness\n"); + printk(KERN_WARNING "Asus ACPI: Error changing brightness\n"); return; } - /* HOTK laptop if we are here, act as appropriate */ + /* No SPLV method if we are here, act as appropriate */ value -= hotk->brightness; while (value != 0) { status = acpi_evaluate_object(NULL, (value > 0) ? @@ -469,7 +488,7 @@ NULL, NULL); (value > 0) ? value-- : value++; if (ACPI_FAILURE(status)) - printk(KERN_NOTICE "Asus ACPI: Error changing brightness\n"); + printk(KERN_WARNING "Asus ACPI: Error changing brightness\n"); } return; } @@ -478,15 +497,15 @@ { int value; - if(hotk->methods->brightness_get) { /* ATKD laptop */ + if(hotk->methods->brightness_get) { /* SPLV/GPLV laptop */ if (!read_acpi_int(hotk->handle, hotk->methods->brightness_get, &value)) - printk(KERN_NOTICE "Asus ACPI: Error reading brightness\n"); + printk(KERN_WARNING "Asus ACPI: Error reading brightness\n"); } else if (hotk->methods->brightness_status) { /* For D1 for example */ if (!read_acpi_int(NULL, hotk->methods->brightness_status, &value)) - printk(KERN_NOTICE "Asus ACPI: Error reading brightness\n"); - } else /* HOTK laptop */ + printk(KERN_WARNING "Asus ACPI: Error reading brightness\n"); + } else /* No GPLV method */ value = hotk->brightness; return value; } @@ -512,7 +531,7 @@ /* 0 <= value <= 15 */ set_brightness(value, hotk); } else { - printk(KERN_NOTICE "Asus ACPI: Error reading user input\n"); + printk(KERN_WARNING "Asus ACPI: Error reading user input\n"); } return count; @@ -523,7 +542,7 @@ /* no sanity check needed for now */ if (!write_acpi_int(hotk->handle, hotk->methods->display_set, value, NULL)) - printk(KERN_NOTICE "Asus ACPI: Error setting display\n"); + printk(KERN_WARNING "Asus ACPI: Error setting display\n"); return; } @@ -540,12 +559,12 @@ struct asus_hotk *hotk = (struct asus_hotk *) data; if (!read_acpi_int(hotk->handle, hotk->methods->display_get, &value)) - printk(KERN_NOTICE "Asus ACPI: Error reading display status\n"); + printk(KERN_WARNING "Asus ACPI: Error reading display status\n"); return sprintf(page, "%d\n", value); } /* - * Preliminary support for display switching. As of now: 0x01 should activate + * Experimental support for display switching. As of now: 0x01 should activate * the LCD output, 0x02 should do for CRT, and 0x04 for TV-Out. Any combination * (bitwise) of these will suffice. I never actually tested 3 displays hooked up * simultaneously, so be warned. @@ -562,13 +581,13 @@ if (sscanf(buffer, "%d", &value) == 1) set_display(value, hotk); else { - printk(KERN_NOTICE "Asus ACPI: Error reading user input\n"); + printk(KERN_WARNING "Asus ACPI: Error reading user input\n"); } return count; } -static int asus_hotk_add_fs(struct acpi_device *device) +static int __init asus_hotk_add_fs(struct acpi_device *device) { struct proc_dir_entry *proc; struct asus_hotk *hotk = acpi_driver_data(device); @@ -582,7 +601,7 @@ if ((asus_uid == 0) && (asus_gid == 0)){ mode = S_IFREG | S_IRUGO | S_IWUGO; - }else{ + } else { mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP; } @@ -598,7 +617,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_INFOS + printk(KERN_WARNING " Unable to create " PROC_INFOS " fs entry\n"); } @@ -612,7 +631,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_WLED + printk(KERN_WARNING " Unable to create " PROC_WLED " fs entry\n"); } } @@ -627,7 +646,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_MLED + printk(KERN_WARNING " Unable to create " PROC_MLED " fs entry\n"); } } @@ -646,7 +665,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_LCD + printk(KERN_WARNING " Unable to create " PROC_LCD " fs entry\n"); } } @@ -662,7 +681,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_BRN + printk(KERN_WARNING " Unable to create " PROC_BRN " fs entry\n"); } } @@ -677,19 +696,19 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_DISP + printk(KERN_WARNING " Unable to create " PROC_DISP " fs entry\n"); } } - return (AE_OK); + return 0; } static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) { /* TODO Find a better way to handle events count. Here, in data, we receive - * the hotk, so we can make anything !! + * the hotk, so we can do anything! */ struct asus_hotk *hotk = (struct asus_hotk *) data; @@ -712,19 +731,40 @@ * This function is used to initialize the hotk with right values. In this * method, we can make all the detection we want, and modify the hotk struct */ -static int asus_hotk_get_info(struct asus_hotk *hotk) +static int __init asus_hotk_get_info(struct asus_hotk *hotk) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *model = NULL; + int bsts_result; + acpi_status status; - /* - * We have to write 0 on init this far for all ASUS models + /* + * Get DSDT headers early enough to allow for differentiating between + * models, but late enough to allow acpi_bus_register_driver() to fail + * before doing anything ACPI-specific. Should we encounter a machine, + * which needs special handling (i.e. its hotkey device has a different + * HID), this bit will be moved. A global variable asus_info contains + * the DSDT header. */ + status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt); + if (ACPI_FAILURE(status)) + printk(KERN_WARNING " Couldn't get the DSDT table header\n"); + else + asus_info = (struct acpi_table_header *) dsdt.pointer; + + /* We have to write 0 on init this far for all ASUS models */ if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { - printk(KERN_NOTICE " Hotkey initialization failed\n"); + printk(KERN_ERR " Hotkey initialization failed\n"); return -ENODEV; } + /* For testing purposes */ + if (!read_acpi_int(hotk->handle, "BSTS", &bsts_result)) + printk(KERN_WARNING " Error calling BSTS\n"); + else if (bsts_result) + printk(KERN_NOTICE " BSTS called, 0x%02x returned\n", bsts_result); + /* * Here, we also use asus_info to make decision. For example, on INIT * method, S1X and L1X models both reports to be L84F, but they don't @@ -749,26 +789,34 @@ hotk->model = L3X; else if (strncmp(model->string.pointer, "M2", 2) == 0) hotk->model = M2X; + else if (strncmp(model->string.pointer, "M3N", 3) == 0 || + strncmp(model->string.pointer, "S1N", 3) == 0) + hotk->model = M3N; /* S1300N is similar enough */ else if (strncmp(model->string.pointer, "L2", 2) == 0) hotk->model = L2X; - else if (strncmp(model->string.pointer, "L8", 2) == 0) + else if (strncmp(model->string.pointer, "L8", 2) == 0) { /* S1300A reports L84F, but L1400B too */ - if (strncmp(asus_info->oem_table_id, "L1", 2) == 0) - hotk->model = L1X; - else + if (asus_info) { + if (strncmp(asus_info->oem_table_id, "L1", 2) == 0) + hotk->model = L1X; + } else hotk->model = S1X; + } else if (strncmp(model->string.pointer, "D1", 2) == 0) hotk->model = D1X; else if (strncmp(model->string.pointer, "A1", 2) == 0) hotk->model = A1X; + else if (strncmp(model->string.pointer, "A2", 2) == 0) + hotk->model = A2X; else if (strncmp(model->string.pointer, "J1", 2) == 0) - hotk->model = J1X; - + hotk->model = S2X; + else if (strncmp(model->string.pointer, "L5", 2) == 0) + hotk->model = L5X; if (hotk->model == END_MODEL) { /* By default use the same values, as I don't know others */ - printk("unsupported, trying default values, contact the " - "developers\n"); + printk("unsupported, trying default values, supply the " + "developers with your DSDT\n"); hotk->model = L2X; } else { printk("supported\n"); @@ -783,7 +831,7 @@ -static int asus_hotk_check(struct asus_hotk *hotk) +static int __init asus_hotk_check(struct asus_hotk *hotk) { int result = 0; @@ -797,7 +845,7 @@ if (hotk->device->status.present) { result = asus_hotk_get_info(hotk); } else { - printk(KERN_NOTICE " Hotkey device not present, aborting\n"); + printk(KERN_ERR " Hotkey device not present, aborting\n"); return(-EINVAL); } @@ -806,7 +854,7 @@ -static int asus_hotk_add(struct acpi_device *device) +static int __init asus_hotk_add(struct acpi_device *device) { struct asus_hotk *hotk = NULL; acpi_status status = AE_OK; @@ -815,6 +863,9 @@ if (!device) return(-EINVAL); + printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", + ASUS_ACPI_VERSION); + hotk = (struct asus_hotk *) kmalloc(sizeof(struct asus_hotk), GFP_KERNEL); if (!hotk) @@ -842,25 +893,23 @@ */ status = acpi_install_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY, asus_hotk_notify, hotk); - if (ACPI_FAILURE(status)) { - printk(KERN_NOTICE - " Error installing notify handler\n"); - } else { - printk(KERN_DEBUG - " Notify Handler installed successfully\n"); - } + if (ACPI_FAILURE(status)) + printk(KERN_ERR " Error installing notify handler\n"); - /* For HOTK laptops: init the hotk->brightness value */ + /* For laptops without GPLV: init the hotk->brightness value */ if ((!hotk->methods->brightness_get) && (!hotk->methods->brightness_status) && (hotk->methods->brightness_up && hotk->methods->brightness_down)) { status = acpi_evaluate_object(NULL, hotk->methods->brightness_down, NULL, NULL); if (ACPI_FAILURE(status)) - printk(KERN_NOTICE " Error changing brightness\n"); - status = acpi_evaluate_object(NULL, hotk->methods->brightness_up, - NULL, NULL); - if (ACPI_FAILURE(status)) - printk(KERN_NOTICE " Error changing brightness\n"); + printk(KERN_WARNING " Error changing brightness\n"); + else { + status = acpi_evaluate_object(NULL, hotk->methods->brightness_up, + NULL, NULL); + if (ACPI_FAILURE(status)) + printk(KERN_WARNING " Strange, error changing" + " brightness\n"); + } } end: @@ -887,7 +936,7 @@ status = acpi_remove_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY, asus_hotk_notify); if (ACPI_FAILURE(status)) - printk(KERN_NOTICE "Error removing notify handler\n"); + printk(KERN_ERR "Asus ACPI: Error removing notify handler\n"); kfree(hotk); @@ -899,35 +948,17 @@ static int __init asus_acpi_init(void) { - int result = 0; - acpi_status status = 0; - struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; - - printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", - ASUS_ACPI_VERSION); - /* - * Here is the code to know the model we are running on. We need to - * know this before calling the acpi_bus_register_driver function, in - * case the HID for the laptop we are running on is different from - * ACPI_HOTK_HID, which I have never seen yet :) - * - * This information is then available in the global var asus_info - */ - status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt); - if (ACPI_FAILURE(status)) { - printk(KERN_NOTICE " Couldn't get the DSDT table header\n"); - } else { - asus_info = (struct acpi_table_header *) dsdt.pointer; - } + int result; asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); - if (!asus_proc_dir) + if (!asus_proc_dir) { + printk(KERN_ERR "Asus ACPI: Unable to create /proc entry"); return(-ENODEV); + } asus_proc_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&asus_hotk_driver); if (result < 0) { - printk(KERN_NOTICE " Error registering " ACPI_HOTK_NAME " \n"); remove_proc_entry(PROC_ASUS, acpi_root_dir); return(-ENODEV); } diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c --- a/drivers/acpi/bus.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/bus.c Thu Oct 2 01:28:17 2003 @@ -634,8 +634,7 @@ * the EC parameters out of that. */ status = acpi_ec_ecdt_probe(); - if (ACPI_FAILURE(status)) - goto error1; + /* Ignore result. Not having an ECDT is not fatal. */ #endif status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION); diff -Nru a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c --- a/drivers/acpi/dispatcher/dsfield.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/dispatcher/dsfield.c Thu Oct 2 01:28:17 2003 @@ -105,27 +105,33 @@ return_ACPI_STATUS (AE_AML_NO_OPERAND); } - /* - * During the load phase, we want to enter the name of the field into - * the namespace. During the execute phase (when we evaluate the size - * operand), we want to lookup the name - */ - if (walk_state->parse_flags & ACPI_PARSE_EXECUTE) { - flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE; + if (walk_state->deferred_node) { + node = walk_state->deferred_node; + status = AE_OK; } else { - flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; - } + /* + * During the load phase, we want to enter the name of the field into + * the namespace. During the execute phase (when we evaluate the size + * operand), we want to lookup the name + */ + if (walk_state->parse_flags & ACPI_PARSE_EXECUTE) { + flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE; + } + else { + flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; + } - /* - * Enter the name_string into the namespace - */ - status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string, - ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1, - flags, walk_state, &(node)); - if (ACPI_FAILURE (status)) { - ACPI_REPORT_NSERROR (arg->common.value.string, status); - return_ACPI_STATUS (status); + /* + * Enter the name_string into the namespace + */ + status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string, + ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1, + flags, walk_state, &(node)); + if (ACPI_FAILURE (status)) { + ACPI_REPORT_NSERROR (arg->common.value.string, status); + return_ACPI_STATUS (status); + } } /* We could put the returned object (Node) on the object stack for later, but diff -Nru a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c --- a/drivers/acpi/dispatcher/dsinit.c Thu Oct 2 01:28:18 2003 +++ b/drivers/acpi/dispatcher/dsinit.c Thu Oct 2 01:28:18 2003 @@ -135,7 +135,7 @@ } /* - * Always parse methods to detect errors, we may delete + * Always parse methods to detect errors, we will delete * the parse tree below */ status = acpi_ds_parse_method (obj_handle); @@ -150,7 +150,7 @@ } /* - * Delete the parse tree. We simple re-parse the method + * Delete the parse tree. We simply re-parse the method * for every execution since there isn't much overhead */ acpi_ns_delete_namespace_subtree (obj_handle); diff -Nru a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c --- a/drivers/acpi/dispatcher/dsopcode.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/dispatcher/dsopcode.c Thu Oct 2 01:28:17 2003 @@ -65,7 +65,7 @@ * * RETURN: Status. * - * DESCRIPTION: Late execution of region or field arguments + * DESCRIPTION: Late (deferred) execution of region or field arguments * ****************************************************************************/ @@ -111,7 +111,10 @@ return_ACPI_STATUS (status); } + /* Mark this parse as a deferred opcode */ + walk_state->parse_flags = ACPI_PARSE_DEFERRED_OP; + walk_state->deferred_node = node; /* Pass1: Parse the entire declaration */ @@ -128,7 +131,7 @@ arg->common.node = node; acpi_ps_delete_parse_tree (op); - /* Evaluate the address and length arguments for the Buffer Field */ + /* Evaluate the deferred arguments */ op = acpi_ps_alloc_op (AML_INT_EVAL_SUBTREE_OP); if (!op) { @@ -144,6 +147,8 @@ return_ACPI_STATUS (AE_NO_MEMORY); } + /* Execute the opcode and arguments */ + status = acpi_ds_init_aml_walk (walk_state, op, NULL, aml_start, aml_length, NULL, NULL, 3); if (ACPI_FAILURE (status)) { @@ -151,6 +156,9 @@ return_ACPI_STATUS (status); } + /* Mark this execution as a deferred opcode */ + + walk_state->deferred_node = node; status = acpi_ps_parse_aml (walk_state); acpi_ps_delete_parse_tree (op); return_ACPI_STATUS (status); @@ -192,7 +200,7 @@ node = obj_desc->buffer_field.node; ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_BUFFER_FIELD, node, NULL)); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] buffer_field JIT Init\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] buffer_field Arg Init\n", node->name.ascii)); /* Execute the AML code for the term_arg arguments */ @@ -207,7 +215,7 @@ * * FUNCTION: acpi_ds_get_buffer_arguments * - * PARAMETERS: obj_desc - A valid Bufferobject + * PARAMETERS: obj_desc - A valid Buffer object * * RETURN: Status. * @@ -240,7 +248,7 @@ return_ACPI_STATUS (AE_AML_INTERNAL); } - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Buffer JIT Init\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Buffer Arg Init\n")); /* Execute the AML code for the term_arg arguments */ @@ -254,7 +262,7 @@ * * FUNCTION: acpi_ds_get_package_arguments * - * PARAMETERS: obj_desc - A valid Packageobject + * PARAMETERS: obj_desc - A valid Package object * * RETURN: Status. * @@ -287,7 +295,7 @@ return_ACPI_STATUS (AE_AML_INTERNAL); } - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Package JIT Init\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Package Arg Init\n")); /* Execute the AML code for the term_arg arguments */ @@ -335,11 +343,12 @@ node = obj_desc->region.node; - ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_REGION, node, NULL)); + ACPI_DEBUG_EXEC (acpi_ut_display_init_pathname (ACPI_TYPE_REGION, node, NULL)); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] op_region Init at AML %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] op_region Arg Init at AML %p\n", node->name.ascii, extra_desc->extra.aml_start)); + /* Execute the argument AML */ status = acpi_ds_execute_arguments (node, acpi_ns_get_parent_node (node), extra_desc->extra.aml_length, extra_desc->extra.aml_start); @@ -505,14 +514,16 @@ goto cleanup; } - /* Entire field must fit within the current length of the buffer */ if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Field size %d exceeds Buffer size %d (bits)\n", - bit_offset + bit_count, 8 * (u32) buffer_desc->buffer.length)); + "Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", + ((struct acpi_namespace_node *) result_desc)->name.ascii, + bit_offset + bit_count, + buffer_desc->buffer.node->name.ascii, + 8 * (u32) buffer_desc->buffer.length)); status = AE_AML_BUFFER_LIMIT; goto cleanup; } diff -Nru a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c --- a/drivers/acpi/dispatcher/dsutils.c Thu Oct 2 01:28:16 2003 +++ b/drivers/acpi/dispatcher/dsutils.c Thu Oct 2 01:28:16 2003 @@ -53,6 +53,7 @@ #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME ("dsutils") + #ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* @@ -196,7 +197,6 @@ acpi_ps_get_opcode_name (op->common.parent->common.aml_opcode), op)); return_VALUE (FALSE); - } @@ -239,7 +239,6 @@ return_VOID; } - if (!acpi_ds_is_result_used (op, walk_state)) { /* * Must pop the result stack (obj_desc should be equal to result_obj) @@ -389,61 +388,77 @@ * in name_string */ + /* - * Differentiate between a namespace "create" operation - * versus a "lookup" operation (IMODE_LOAD_PASS2 vs. - * IMODE_EXECUTE) in order to support the creation of - * namespace objects during the execution of control methods. + * Special handling for buffer_field declarations. This is a deferred + * opcode that unfortunately defines the field name as the last + * parameter instead of the first. We get here when we are performing + * the deferred execution, so the actual name of the field is already + * in the namespace. We don't want to attempt to look it up again + * because we may be executing in a different scope than where the + * actual opcode exists. */ - parent_op = arg->common.parent; - op_info = acpi_ps_get_opcode_info (parent_op->common.aml_opcode); - if ((op_info->flags & AML_NSNODE) && - (parent_op->common.aml_opcode != AML_INT_METHODCALL_OP) && - (parent_op->common.aml_opcode != AML_REGION_OP) && - (parent_op->common.aml_opcode != AML_INT_NAMEPATH_OP)) { - /* Enter name into namespace if not found */ - - interpreter_mode = ACPI_IMODE_LOAD_PASS2; + if ((walk_state->deferred_node) && + (walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD) && + (arg_index != 0)) { + obj_desc = ACPI_CAST_PTR (union acpi_operand_object, walk_state->deferred_node); + status = AE_OK; } + else /* All other opcodes */ { + /* + * Differentiate between a namespace "create" operation + * versus a "lookup" operation (IMODE_LOAD_PASS2 vs. + * IMODE_EXECUTE) in order to support the creation of + * namespace objects during the execution of control methods. + */ + parent_op = arg->common.parent; + op_info = acpi_ps_get_opcode_info (parent_op->common.aml_opcode); + if ((op_info->flags & AML_NSNODE) && + (parent_op->common.aml_opcode != AML_INT_METHODCALL_OP) && + (parent_op->common.aml_opcode != AML_REGION_OP) && + (parent_op->common.aml_opcode != AML_INT_NAMEPATH_OP)) { + /* Enter name into namespace if not found */ - else { - /* Return a failure if name not found */ - - interpreter_mode = ACPI_IMODE_EXECUTE; - } + interpreter_mode = ACPI_IMODE_LOAD_PASS2; + } + else { + /* Return a failure if name not found */ - status = acpi_ns_lookup (walk_state->scope_info, name_string, - ACPI_TYPE_ANY, interpreter_mode, - ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, - walk_state, - ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc)); - /* - * The only case where we pass through (ignore) a NOT_FOUND - * error is for the cond_ref_of opcode. - */ - if (status == AE_NOT_FOUND) { - if (parent_op->common.aml_opcode == AML_COND_REF_OF_OP) { - /* - * For the Conditional Reference op, it's OK if - * the name is not found; We just need a way to - * indicate this to the interpreter, set the - * object to the root - */ - obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node); - status = AE_OK; + interpreter_mode = ACPI_IMODE_EXECUTE; } - else { - /* - * We just plain didn't find it -- which is a - * very serious error at this point - */ - status = AE_AML_NAME_NOT_FOUND; + status = acpi_ns_lookup (walk_state->scope_info, name_string, + ACPI_TYPE_ANY, interpreter_mode, + ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, + walk_state, + ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc)); + /* + * The only case where we pass through (ignore) a NOT_FOUND + * error is for the cond_ref_of opcode. + */ + if (status == AE_NOT_FOUND) { + if (parent_op->common.aml_opcode == AML_COND_REF_OF_OP) { + /* + * For the Conditional Reference op, it's OK if + * the name is not found; We just need a way to + * indicate this to the interpreter, set the + * object to the root + */ + obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node); + status = AE_OK; + } + else { + /* + * We just plain didn't find it -- which is a + * very serious error at this point + */ + status = AE_AML_NAME_NOT_FOUND; + } } - } - if (ACPI_FAILURE (status)) { - ACPI_REPORT_NSERROR (name_string, status); + if (ACPI_FAILURE (status)) { + ACPI_REPORT_NSERROR (name_string, status); + } } /* Free the namestring created above */ @@ -464,8 +479,6 @@ } ACPI_DEBUGGER_EXEC (acpi_db_display_argument_object (obj_desc, walk_state)); } - - else { /* Check for null name case */ @@ -480,7 +493,6 @@ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Null namepath: Arg=%p\n", arg)); } - else { opcode = arg->common.aml_opcode; } diff -Nru a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c --- a/drivers/acpi/dispatcher/dswload.c Thu Oct 2 01:28:15 2003 +++ b/drivers/acpi/dispatcher/dswload.c Thu Oct 2 01:28:16 2003 @@ -248,6 +248,14 @@ * buffer_field, or Package), the name of the object is already * in the namespace. */ + if (walk_state->deferred_node) { + /* This name is already in the namespace, get the node */ + + node = walk_state->deferred_node; + status = AE_OK; + break; + } + flags = ACPI_NS_NO_UPSEARCH; if ((walk_state->opcode != AML_SCOPE_OP) && (!(walk_state->parse_flags & ACPI_PARSE_DEFERRED_OP))) { @@ -589,7 +597,17 @@ * Enter the named type into the internal namespace. We enter the name * as we go downward in the parse tree. Any necessary subobjects that involve * arguments to the opcode must be created as we go back up the parse tree later. + * + * Note: Name may already exist if we are executing a deferred opcode. */ + if (walk_state->deferred_node) { + /* This name is already in the namespace, get the node */ + + node = walk_state->deferred_node; + status = AE_OK; + break; + } + status = acpi_ns_lookup (walk_state->scope_info, buffer_ptr, object_type, ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, walk_state, &(node)); break; diff -Nru a/drivers/acpi/dispatcher/dswscope.c b/drivers/acpi/dispatcher/dswscope.c --- a/drivers/acpi/dispatcher/dswscope.c Thu Oct 2 01:28:18 2003 +++ b/drivers/acpi/dispatcher/dswscope.c Thu Oct 2 01:28:18 2003 @@ -121,10 +121,9 @@ /* Make sure object type is valid */ if (!acpi_ut_valid_object_type (type)) { - ACPI_REPORT_WARNING (("ds_scope_stack_push: type code out of range\n")); + ACPI_REPORT_WARNING (("ds_scope_stack_push: Invalid object type: 0x%X\n", type)); } - /* Allocate a new scope object */ scope_info = acpi_ut_create_generic_state (); @@ -146,13 +145,13 @@ old_scope_info = walk_state->scope_info; if (old_scope_info) { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, - "[%4.4s] (%10s)", + "[%4.4s] (%s)", old_scope_info->scope.node->name.ascii, acpi_ut_get_type_name (old_scope_info->common.value))); } else { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, - "[\\___] (%10s)", "ROOT")); + "[\\___] (%s)", "ROOT")); } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, @@ -163,7 +162,6 @@ /* Push new scope object onto stack */ acpi_ut_push_generic_state (&walk_state->scope_info, scope_info); - return_ACPI_STATUS (AE_OK); } @@ -207,7 +205,7 @@ walk_state->scope_depth--; ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "[%.2d] Popped scope [%4.4s] (%10s), New scope -> ", + "[%.2d] Popped scope [%4.4s] (%s), New scope -> ", (u32) walk_state->scope_depth, scope_info->scope.node->name.ascii, acpi_ut_get_type_name (scope_info->common.value))); @@ -225,7 +223,6 @@ } acpi_ut_delete_generic_state (scope_info); - return_ACPI_STATUS (AE_OK); } diff -Nru a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c --- a/drivers/acpi/dispatcher/dswstate.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/dispatcher/dswstate.c Thu Oct 2 01:28:17 2003 @@ -56,11 +56,12 @@ * FUNCTION: acpi_ds_result_insert * * PARAMETERS: Object - Object to push + * Index - Where to insert the object * walk_state - Current Walk state * * RETURN: Status * - * DESCRIPTION: Push an object onto this walk's result stack + * DESCRIPTION: Insert an object onto this walk's result stack * ******************************************************************************/ @@ -114,6 +115,7 @@ * FUNCTION: acpi_ds_result_remove * * PARAMETERS: Object - Where to return the popped object + * Index - Where to extract the object * walk_state - Current Walk state * * RETURN: Status @@ -233,6 +235,7 @@ return (AE_AML_NO_RETURN_VALUE); } + /******************************************************************************* * * FUNCTION: acpi_ds_result_pop_from_bottom @@ -295,7 +298,6 @@ *object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL", state, walk_state)); - return (AE_OK); } @@ -358,8 +360,7 @@ * * FUNCTION: acpi_ds_result_stack_push * - * PARAMETERS: Object - Object to push - * walk_state - Current Walk state + * PARAMETERS: walk_state - Current Walk state * * RETURN: Status * @@ -420,7 +421,6 @@ return (AE_AML_NO_OPERAND); } - state = acpi_ut_pop_generic_state (&walk_state->results); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, @@ -572,6 +572,7 @@ } #endif + /******************************************************************************* * * FUNCTION: acpi_ds_obj_stack_pop @@ -641,6 +642,7 @@ u32 i; union acpi_operand_object *obj_desc; + ACPI_FUNCTION_NAME ("ds_obj_stack_pop_and_delete"); @@ -883,8 +885,15 @@ * FUNCTION: acpi_ds_init_aml_walk * * PARAMETERS: walk_state - New state to be initialized + * Op - Current parse op + * method_node - Control method NS node, if any + * aml_start - Start of AML + * aml_length - Length of AML + * Params - Method args, if any + * return_obj_desc - Where to store a return object, if any + * pass_number - 1, 2, or 3 * - * RETURN: None + * RETURN: Status * * DESCRIPTION: Initialize a walk state for a pass 1 or 2 parse tree walk * @@ -927,9 +936,9 @@ if (method_node) { walk_state->parser_state.start_node = method_node; - walk_state->walk_type = ACPI_WALK_METHOD; - walk_state->method_node = method_node; - walk_state->method_desc = acpi_ns_get_attached_object (method_node); + walk_state->walk_type = ACPI_WALK_METHOD; + walk_state->method_node = method_node; + walk_state->method_desc = acpi_ns_get_attached_object (method_node); /* Push start scope on scope stack and make it current */ @@ -956,6 +965,7 @@ while (extra_op && !extra_op->common.node) { extra_op = extra_op->common.parent; } + if (!extra_op) { parser_state->start_node = NULL; } @@ -1014,7 +1024,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p walk still has a scope list\n", walk_state)); } - /* Always must free any linked control states */ + /* Always must free any linked control states */ while (walk_state->control_state) { state = walk_state->control_state; diff -Nru a/drivers/acpi/ec.c b/drivers/acpi/ec.c --- a/drivers/acpi/ec.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/ec.c Thu Oct 2 01:28:17 2003 @@ -32,7 +32,7 @@ #include #include #include - +#include #define _COMPONENT ACPI_EC_COMPONENT ACPI_MODULE_NAME ("acpi_ec") @@ -412,7 +412,10 @@ * The EC object is in the handler context and is needed * when calling the acpi_ec_space_handler. */ - *return_context = handler_context; + if(function == ACPI_REGION_DEACTIVATE) + *return_context = NULL; + else + *return_context = handler_context; return AE_OK; } diff -Nru a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c --- a/drivers/acpi/events/evregion.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/events/evregion.c Thu Oct 2 01:28:17 2003 @@ -382,7 +382,7 @@ union acpi_operand_object *obj_desc; union acpi_operand_object **last_obj_ptr; acpi_adr_space_setup region_setup; - void *region_context; + void **region_context; union acpi_operand_object *region_obj2; acpi_status status; @@ -394,7 +394,7 @@ if (!region_obj2) { return_VOID; } - region_context = region_obj2->extra.region_context; + region_context = ®ion_obj2->extra.region_context; /* Get the address handler from the region object */ @@ -450,7 +450,7 @@ region_setup = handler_obj->address_space.setup; status = region_setup (region_obj, ACPI_REGION_DEACTIVATE, - handler_obj->address_space.context, ®ion_context); + handler_obj->address_space.context, region_context); /* Init routine may fail, Just ignore errors */ diff -Nru a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c --- a/drivers/acpi/executer/excreate.c Thu Oct 2 01:28:18 2003 +++ b/drivers/acpi/executer/excreate.c Thu Oct 2 01:28:18 2003 @@ -286,7 +286,7 @@ ACPI_FUNCTION_TRACE ("ex_create_region"); - /* Get the Node from the object stack */ + /* Get the Namespace Node */ node = walk_state->op->common.node; @@ -311,7 +311,6 @@ ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (%X)\n", acpi_ut_get_region_name (region_space), region_space)); - /* Create the region descriptor */ obj_desc = acpi_ut_create_internal_object (ACPI_TYPE_REGION); @@ -375,6 +374,7 @@ ACPI_FUNCTION_TRACE ("ex_create_table_region"); + /* Get the Node from the object stack */ node = walk_state->op->common.node; @@ -392,7 +392,6 @@ status = acpi_tb_find_table (operand[1]->string.pointer, operand[2]->string.pointer, operand[3]->string.pointer, &table); - if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } @@ -489,7 +488,6 @@ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0], obj_desc, ACPI_TYPE_PROCESSOR); - /* Remove local reference to the object */ acpi_ut_remove_reference (obj_desc); @@ -540,7 +538,6 @@ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0], obj_desc, ACPI_TYPE_POWER); - /* Remove local reference to the object */ acpi_ut_remove_reference (obj_desc); @@ -609,7 +606,6 @@ obj_desc->method.concurrency = (u8) (((method_flags & METHOD_FLAGS_SYNCH_LEVEL) >> 4) + 1); } - else { obj_desc->method.concurrency = INFINITE_CONCURRENCY; } diff -Nru a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c --- a/drivers/acpi/executer/exfldio.c Thu Oct 2 01:28:16 2003 +++ b/drivers/acpi/executer/exfldio.c Thu Oct 2 01:28:16 2003 @@ -139,7 +139,41 @@ field_datum_byte_offset, obj_desc->common_field.access_byte_width, rgn_desc->region.node->name.ascii, rgn_desc->region.length)); - return_ACPI_STATUS (AE_AML_REGION_LIMIT); + #ifdef CONFIG_ACPI_RELAXED_AML + { + /* + * Allow access to the field if it is within the region size + * rounded up to a multiple of the access byte width. This + * overcomes "off-by-one" programming errors in the AML often + * found in Toshiba laptops. These errors were allowed by + * the Microsoft ASL compiler. + */ + u32 rounded_length = ACPI_ROUND_UP(rgn_desc->region.length, + obj_desc->common_field.access_byte_width); + + if (rounded_length < (obj_desc->common_field.base_byte_offset + + field_datum_byte_offset + + obj_desc->common_field.access_byte_width)) { + return_ACPI_STATUS (AE_AML_REGION_LIMIT); + } else { + static int warn_once = 1; + if (warn_once) { + // Could also associate a flag with each field, and + // warn once for each field. + ACPI_REPORT_WARNING(( + "The ACPI AML in your computer contains errors, " + "please nag the manufacturer to correct it.\n")); + ACPI_REPORT_WARNING(( + "Allowing relaxed access to fields; " + "turn on CONFIG_ACPI_DEBUG for details.\n")); + warn_once = 0; + } + return_ACPI_STATUS (AE_OK); + } + } + #else + return_ACPI_STATUS (AE_AML_REGION_LIMIT); + #endif } return_ACPI_STATUS (AE_OK); diff -Nru a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c --- a/drivers/acpi/namespace/nsdump.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/namespace/nsdump.c Thu Oct 2 01:28:17 2003 @@ -234,7 +234,7 @@ case ACPI_TYPE_DEVICE: - acpi_os_printf ("Notify object: %p", obj_desc); + acpi_os_printf ("Notify Object: %p\n", obj_desc); break; @@ -371,7 +371,7 @@ case ACPI_TYPE_LOCAL_BANK_FIELD: case ACPI_TYPE_LOCAL_INDEX_FIELD: - acpi_os_printf (" Off %.2X Len %.2X Acc %.2hd\n", + acpi_os_printf ("Off %.2X Len %.2X Acc %.2hd\n", (obj_desc->common_field.base_byte_offset * 8) + obj_desc->common_field.start_field_bit_offset, obj_desc->common_field.bit_length, diff -Nru a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c --- a/drivers/acpi/namespace/nssearch.c Thu Oct 2 01:28:18 2003 +++ b/drivers/acpi/namespace/nssearch.c Thu Oct 2 01:28:18 2003 @@ -96,7 +96,7 @@ scope_name = acpi_ns_get_external_pathname (node); if (scope_name) { - ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s [%p] For %4.4s (%s)\n", + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s (%p) For [%4.4s] (%s)\n", scope_name, node, (char *) &target_name, acpi_ut_get_type_name (type))); ACPI_MEM_FREE (scope_name); @@ -117,9 +117,9 @@ * Found matching entry. */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "Name %4.4s Type [%s] found in scope [%4.4s] %p\n", + "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", (char *) &target_name, acpi_ut_get_type_name (next_node->type), - next_node->name.ascii, next_node)); + next_node, node->name.ascii, node)); *return_node = next_node; return_ACPI_STATUS (AE_OK); @@ -143,7 +143,7 @@ /* Searched entire namespace level, not found */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "Name %4.4s Type [%s] not found in search in scope [%4.4s] %p first child %p\n", + "Name [%4.4s] (%s) not found in search in scope [%4.4s] %p first child %p\n", (char *) &target_name, acpi_ut_get_type_name (type), node->name.ascii, node, node->child)); diff -Nru a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c --- a/drivers/acpi/namespace/nsutils.c Thu Oct 2 01:28:17 2003 +++ b/drivers/acpi/namespace/nsutils.c Thu Oct 2 01:28:17 2003 @@ -175,6 +175,11 @@ acpi_status status; + if (!node) { + acpi_os_printf ("[NULL NAME]"); + return; + } + /* Convert handle to a full pathname and print it (with supplied message) */ buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; @@ -470,11 +475,11 @@ *result = 0; if (info->fully_qualified) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "returning [%p] (abs) \"\\%s\"\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Returning [%p] (abs) \"\\%s\"\n", internal_name, internal_name)); } else { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "returning [%p] (rel) \"%s\"\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Returning [%p] (rel) \"%s\"\n", internal_name, internal_name)); } diff -Nru a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c --- a/drivers/acpi/parser/psparse.c Thu Oct 2 01:28:16 2003 +++ b/drivers/acpi/parser/psparse.c Thu Oct 2 01:28:16 2003 @@ -437,7 +437,6 @@ return_ACPI_STATUS (AE_BAD_PARAMETER); } - parser_state = &walk_state->parser_state; walk_state->arg_types = 0; @@ -705,10 +704,9 @@ walk_state->arg_types = 0; break; - default: - /* Op is not a constant or string, append each argument */ + /* Op is not a constant or string, append each argument to the Op */ while (GET_CURRENT_ARG_TYPE (walk_state->arg_types) && !walk_state->arg_count) { @@ -727,23 +725,23 @@ INCREMENT_ARG_LIST (walk_state->arg_types); } + /* Special processing for certain opcodes */ + switch (op->common.aml_opcode) { case AML_METHOD_OP: - /* For a method, save the length and address of the body */ - /* - * Skip parsing of control method or opregion body, + * Skip parsing of control method * because we don't have enough info in the first pass - * to parse them correctly. + * to parse it correctly. + * + * Save the length and address of the body */ op->named.data = parser_state->aml; op->named.length = (u32) (parser_state->pkg_end - parser_state->aml); - /* - * Skip body of method. For op_regions, we must continue - * parsing because the opregion is not a standalone - * package (We don't know where the end is). - */ + + /* Skip body of method */ + parser_state->aml = parser_state->pkg_end; walk_state->arg_count = 0; break; @@ -756,15 +754,15 @@ (op->common.parent->common.aml_opcode == AML_NAME_OP) && (walk_state->descending_callback != acpi_ds_exec_begin_op)) { /* - * Skip parsing of + * Skip parsing of Buffers and Packages * because we don't have enough info in the first pass * to parse them correctly. */ op->named.data = aml_op_start; op->named.length = (u32) (parser_state->pkg_end - aml_op_start); - /* - * Skip body - */ + + /* Skip body */ + parser_state->aml = parser_state->pkg_end; walk_state->arg_count = 0; } @@ -778,6 +776,7 @@ break; default: + /* No action for all other opcodes */ break; } diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c --- a/drivers/acpi/pci_irq.c Thu Oct 2 01:28:16 2003 +++ b/drivers/acpi/pci_irq.c Thu Oct 2 01:28:16 2003 @@ -71,6 +71,9 @@ ACPI_FUNCTION_TRACE("acpi_pci_irq_find_prt_entry"); + if (!acpi_prt.count) + return_PTR(NULL); + /* * Parse through all PRT entries looking for a match on the specified * PCI device's segment, bus, device, and pin (don't care about func). diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c --- a/drivers/acpi/pci_link.c Thu Oct 2 01:28:16 2003 +++ b/drivers/acpi/pci_link.c Thu Oct 2 01:28:16 2003 @@ -220,7 +220,6 @@ return AE_CTRL_TERMINATE; } - static int acpi_pci_link_get_current ( struct acpi_pci_link *link) @@ -279,6 +278,28 @@ return_VALUE(result); } +static int +acpi_pci_link_try_get_current ( + struct acpi_pci_link *link, + int irq) +{ + int result; + + ACPI_FUNCTION_TRACE("acpi_pci_link_try_get_current"); + + result = acpi_pci_link_get_current(link); + if (result && link->irq.active) { + return_VALUE(result); + } + + if (!link->irq.active) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No active IRQ resource found\n")); + printk(KERN_WARNING "_CRS returns NULL! Using IRQ %d for device (%s [%s]).\n", irq, acpi_device_name(link->device), acpi_device_bid(link->device)); + link->irq.active = irq; + } + + return 0; +} static int acpi_pci_link_set ( @@ -294,6 +315,7 @@ struct acpi_buffer buffer = {sizeof(resource)+1, &resource}; int i = 0; int valid = 0; + int resource_type = 0; ACPI_FUNCTION_TRACE("acpi_pci_link_set"); @@ -317,20 +339,32 @@ } } + /* 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; + } + +retry_programming: + memset(&resource, 0, sizeof(resource)); /* NOTE: PCI interrupts are always level / active_low / shared. But not all interrupts > 15 are PCI interrupts. Rely on the ACPI IRQ definition for parameters */ - if (irq <= 15) { + switch(resource_type) { + case ACPI_RSTYPE_IRQ: resource.res.id = ACPI_RSTYPE_IRQ; resource.res.length = sizeof(struct acpi_resource); resource.res.data.irq.edge_level = link->irq.edge_level; resource.res.data.irq.active_high_low = link->irq.active_high_low; resource.res.data.irq.number_of_interrupts = 1; resource.res.data.irq.interrupts[0] = irq; - } - else { + break; + + case ACPI_RSTYPE_EXT_IRQ: resource.res.id = ACPI_RSTYPE_EXT_IRQ; resource.res.length = sizeof(struct acpi_resource); resource.res.data.extended_irq.producer_consumer = ACPI_CONSUMER; @@ -339,11 +373,21 @@ resource.res.data.extended_irq.number_of_interrupts = 1; resource.res.data.extended_irq.interrupts[0] = irq; /* ignore resource_source, it's optional */ + break; } resource.end.id = ACPI_RSTYPE_END_TAG; /* Attempt to set the resource */ status = acpi_set_current_resources(link->handle, &buffer); + + /* if we failed and IRQ <= 15, try again with an extended descriptor */ + if (ACPI_FAILURE(status) && (resource_type == ACPI_RSTYPE_IRQ)) { + resource_type = ACPI_RSTYPE_EXT_IRQ; + printk(PREFIX "Retrying with extended IRQ descriptor\n"); + goto retry_programming; + } + + /* check for total failure */ if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n")); return_VALUE(-ENODEV); @@ -361,7 +405,7 @@ } /* Make sure the active IRQ is the one we requested. */ - result = acpi_pci_link_get_current(link); + result = acpi_pci_link_try_get_current(link, irq); if (result) { return_VALUE(result); } @@ -456,16 +500,16 @@ irq = link->irq.active; } else { irq = link->irq.possible[0]; - } - /* - * Select the best IRQ. This is done in reverse to promote + /* + * Select the best IRQ. This is done in reverse to promote * the use of IRQs 9, 10, 11, and >15. */ for (i=(link->irq.possible_count-1); i>0; i--) { if (acpi_irq_penalty[irq] > acpi_irq_penalty[link->irq.possible[i]]) irq = link->irq.possible[i]; } + } /* Attempt to enable the link device at this IRQ. */ if (acpi_pci_link_set(link, irq)) { @@ -574,10 +618,6 @@ else printk(" %d", link->irq.possible[i]); } - if (!link->irq.active) - printk(", disabled"); - else if (!found) - printk(", enabled at IRQ %d", link->irq.active); printk(")\n"); /* TBD: Acquire/release lock */ diff -Nru a/drivers/acpi/tables.c b/drivers/acpi/tables.c --- a/drivers/acpi/tables.c Thu Oct 2 01:28:16 2003 +++ b/drivers/acpi/tables.c Thu Oct 2 01:28:16 2003 @@ -69,7 +69,8 @@ static unsigned long sdt_pa; /* Physical Address */ static unsigned long sdt_count; /* Table count */ -static struct acpi_table_sdt *sdt_entry; + +static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES]; void acpi_table_print ( @@ -418,12 +419,6 @@ sdt_count = ACPI_MAX_TABLES; } - sdt_entry = alloc_bootmem(sdt_count * sizeof(struct acpi_table_sdt)); - if (!sdt_entry) { - printk(KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n"); - return -ENOMEM; - } - for (i = 0; i < sdt_count; i++) sdt_entry[i].pa = (unsigned long) mapped_xsdt->entry[i]; } @@ -468,12 +463,6 @@ printk(KERN_WARNING PREFIX "Truncated %lu RSDT entries\n", (sdt_count - ACPI_MAX_TABLES)); sdt_count = ACPI_MAX_TABLES; - } - - sdt_entry = alloc_bootmem(sdt_count * sizeof(struct acpi_table_sdt)); - if (!sdt_entry) { - printk(KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n"); - return -ENOMEM; } for (i = 0; i < sdt_count; i++) diff -Nru a/drivers/block/Kconfig b/drivers/block/Kconfig --- a/drivers/block/Kconfig Thu Oct 2 01:28:16 2003 +++ b/drivers/block/Kconfig Thu Oct 2 01:28:16 2003 @@ -6,7 +6,7 @@ config BLK_DEV_FD tristate "Normal floppy disk support" - depends on !X86_PC9800 && !ARCH_S390 + depends on ISA || M68 || SPARC64 ---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 @@ -35,7 +35,7 @@ config BLK_DEV_SWIM_IOP bool "Macintosh IIfx/Quadra 900/Quadra 950 floppy support (EXPERIMENTAL)" - depends on MAC && EXPERIMENTAL + depends on MAC && EXPERIMENTAL && BROKEN help Say Y here to support the SWIM (Super Woz Integrated Machine) IOP floppy controller on the Macintosh IIfx and Quadra 900/950. @@ -63,7 +63,7 @@ config ATARI_ACSI tristate "Atari ACSI support" - depends on ATARI + depends on ATARI && BROKEN ---help--- This enables support for the Atari ACSI interface. The driver supports hard disks and CD-ROMs, which have 512-byte sectors, or can diff -Nru a/drivers/block/acsi.c b/drivers/block/acsi.c --- a/drivers/block/acsi.c Thu Oct 2 01:28:18 2003 +++ b/drivers/block/acsi.c Thu Oct 2 01:28:18 2003 @@ -63,6 +63,7 @@ #include /* for HDIO_GETGEO */ #include #include +#include #include #include @@ -346,7 +347,7 @@ static int acsicmd_dma( const char *cmd, char *buffer, int blocks, int rwflag, int enable); static int acsi_reqsense( char *buffer, int targ, int lun); -static void acsi_print_error(const unsigned char *errblk, int struct acsi_info_struct *aip); +static void acsi_print_error(const unsigned char *errblk, struct acsi_info_struct *aip); static irqreturn_t acsi_interrupt (int irq, void *data, struct pt_regs *fp); static void unexpected_acsi_interrupt( void ); static void bad_rw_intr( void ); diff -Nru a/drivers/block/as-iosched.c b/drivers/block/as-iosched.c --- a/drivers/block/as-iosched.c Thu Oct 2 01:28:15 2003 +++ b/drivers/block/as-iosched.c Thu Oct 2 01:28:15 2003 @@ -914,6 +914,8 @@ struct as_rq *arq = RQ_DATA(rq); struct as_io_context *aic; + WARN_ON(!list_empty(&rq->queuelist)); + if (unlikely(arq->state != AS_RQ_DISPATCHED)) return; @@ -926,6 +928,7 @@ if (ad->batch_data_dir == REQ_SYNC) ad->new_batch = 1; } + WARN_ON(ad->nr_dispatched == 0); ad->nr_dispatched--; /* @@ -1140,8 +1143,6 @@ /* * take it off the sort and fifo list, add to dispatch queue */ - as_remove_queued_request(ad->q, rq); - insert = ad->dispatch->prev; while (!list_empty(&rq->queuelist)) { @@ -1159,6 +1160,7 @@ ad->nr_dispatched++; } + as_remove_queued_request(ad->q, rq); list_add(&rq->queuelist, insert); if (arq->io_context && arq->io_context->aic) atomic_inc(&arq->io_context->aic->nr_dispatched); @@ -1325,12 +1327,27 @@ static inline void as_add_aliased_request(struct as_data *ad, struct as_rq *arq, struct as_rq *alias) { + struct request *req = arq->request; + struct list_head *insert = alias->request->queuelist.prev; + + /* + * Transfer list of aliases + */ + while (!list_empty(&req->queuelist)) { + struct request *__rq = list_entry_rq(req->queuelist.next); + struct as_rq *__arq = RQ_DATA(__rq); + + list_move_tail(&__rq->queuelist, &alias->request->queuelist); + + WARN_ON(__arq->state != AS_RQ_QUEUED); + } + /* * Another request with the same start sector on the rbtree. * Link this request to that sector. They are untangled in * as_move_to_dispatch */ - list_add_tail(&arq->request->queuelist, &alias->request->queuelist); + list_add(&arq->request->queuelist, insert); /* * Don't want to have to handle merges. @@ -1389,9 +1406,6 @@ as_antic_stop(ad); } } - - - arq->state = AS_RQ_QUEUED; } diff -Nru a/drivers/block/cciss.c b/drivers/block/cciss.c --- a/drivers/block/cciss.c Thu Oct 2 01:28:18 2003 +++ b/drivers/block/cciss.c Thu Oct 2 01:28:18 2003 @@ -636,9 +636,11 @@ { return -EINVAL; } +#if 0 /* 'buf_size' member is 16-bits, and always smaller than kmalloc limit */ /* Check kmalloc limits */ if(iocommand.buf_size > 128000) return -EINVAL; +#endif if(iocommand.buf_size > 0) { buff = kmalloc(iocommand.buf_size, GFP_KERNEL); diff -Nru a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c --- a/drivers/block/ps2esdi.c Thu Oct 2 01:28:15 2003 +++ b/drivers/block/ps2esdi.c Thu Oct 2 01:28:15 2003 @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c --- a/drivers/block/scsi_ioctl.c Thu Oct 2 01:28:18 2003 +++ b/drivers/block/scsi_ioctl.c Thu Oct 2 01:28:18 2003 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -140,40 +141,36 @@ } static int sg_io(request_queue_t *q, struct block_device *bdev, - struct sg_io_hdr *uptr) + struct sg_io_hdr *hdr) { unsigned long start_time; int reading, writing; - struct sg_io_hdr hdr; struct request *rq; struct bio *bio; char sense[SCSI_SENSE_BUFFERSIZE]; void *buffer; - if (copy_from_user(&hdr, uptr, sizeof(*uptr))) - return -EFAULT; - - if (hdr.interface_id != 'S') + if (hdr->interface_id != 'S') return -EINVAL; - if (hdr.cmd_len > sizeof(rq->cmd)) + if (hdr->cmd_len > sizeof(rq->cmd)) return -EINVAL; /* * we'll do that later */ - if (hdr.iovec_count) + if (hdr->iovec_count) return -EOPNOTSUPP; - if (hdr.dxfer_len > (q->max_sectors << 9)) + if (hdr->dxfer_len > (q->max_sectors << 9)) return -EIO; reading = writing = 0; buffer = NULL; bio = NULL; - if (hdr.dxfer_len) { - unsigned int bytes = (hdr.dxfer_len + 511) & ~511; + if (hdr->dxfer_len) { + unsigned int bytes = (hdr->dxfer_len + 511) & ~511; - switch (hdr.dxfer_direction) { + switch (hdr->dxfer_direction) { default: return -EINVAL; case SG_DXFER_TO_FROM_DEV: @@ -191,8 +188,8 @@ * first try to map it into a bio. reading from device will * be a write to vm. */ - bio = bio_map_user(bdev, (unsigned long) hdr.dxferp, - hdr.dxfer_len, reading); + bio = bio_map_user(bdev, (unsigned long) hdr->dxferp, + hdr->dxfer_len, reading); /* * if bio setup failed, fall back to slow approach @@ -203,11 +200,11 @@ return -ENOMEM; if (writing) { - if (copy_from_user(buffer, hdr.dxferp, - hdr.dxfer_len)) + if (copy_from_user(buffer, hdr->dxferp, + hdr->dxfer_len)) goto out_buffer; } else - memset(buffer, 0, hdr.dxfer_len); + memset(buffer, 0, hdr->dxfer_len); } } @@ -216,11 +213,10 @@ /* * fill in request structure */ - rq->cmd_len = hdr.cmd_len; - if (copy_from_user(rq->cmd, hdr.cmdp, hdr.cmd_len)) - goto out_request; - if (sizeof(rq->cmd) != hdr.cmd_len) - memset(rq->cmd + hdr.cmd_len, 0, sizeof(rq->cmd) - hdr.cmd_len); + rq->cmd_len = hdr->cmd_len; + memcpy(rq->cmd, hdr->cmdp, hdr->cmd_len); + if (sizeof(rq->cmd) != hdr->cmd_len) + memset(rq->cmd + hdr->cmd_len, 0, sizeof(rq->cmd) - hdr->cmd_len); memset(sense, 0, sizeof(sense)); rq->sense = sense; @@ -234,9 +230,9 @@ blk_rq_bio_prep(q, rq, bio); rq->data = buffer; - rq->data_len = hdr.dxfer_len; + rq->data_len = hdr->dxfer_len; - rq->timeout = (hdr.timeout * HZ) / 1000; + rq->timeout = (hdr->timeout * HZ) / 1000; if (!rq->timeout) rq->timeout = q->sg_timeout; if (!rq->timeout) @@ -254,33 +250,30 @@ bio_unmap_user(bio, reading); /* write to all output members */ - hdr.status = rq->errors; - hdr.masked_status = (hdr.status >> 1) & 0x1f; - hdr.msg_status = 0; - hdr.host_status = 0; - hdr.driver_status = 0; - hdr.info = 0; - if (hdr.masked_status || hdr.host_status || hdr.driver_status) - hdr.info |= SG_INFO_CHECK; - hdr.resid = rq->data_len; - hdr.duration = ((jiffies - start_time) * 1000) / HZ; - hdr.sb_len_wr = 0; + hdr->status = rq->errors; + hdr->masked_status = (hdr->status >> 1) & 0x1f; + hdr->msg_status = 0; + hdr->host_status = 0; + hdr->driver_status = 0; + hdr->info = 0; + if (hdr->masked_status || hdr->host_status || hdr->driver_status) + hdr->info |= SG_INFO_CHECK; + hdr->resid = rq->data_len; + hdr->duration = ((jiffies - start_time) * 1000) / HZ; + hdr->sb_len_wr = 0; - if (rq->sense_len && hdr.sbp) { - int len = min((unsigned int) hdr.mx_sb_len, rq->sense_len); + if (rq->sense_len && hdr->sbp) { + int len = min((unsigned int) hdr->mx_sb_len, rq->sense_len); - if (!copy_to_user(hdr.sbp, rq->sense, len)) - hdr.sb_len_wr = len; + if (!copy_to_user(hdr->sbp, rq->sense, len)) + hdr->sb_len_wr = len; } blk_put_request(rq); - if (copy_to_user(uptr, &hdr, sizeof(*uptr))) - goto out_buffer; - if (buffer) { if (reading) - if (copy_to_user(hdr.dxferp, buffer, hdr.dxfer_len)) + if (copy_to_user(hdr->dxferp, buffer, hdr->dxfer_len)) goto out_buffer; kfree(buffer); @@ -289,8 +282,6 @@ /* may not have succeeded, but output values written to control * structure (struct sg_io_hdr). */ return 0; -out_request: - blk_put_request(rq); out_buffer: kfree(buffer); return -EFAULT; @@ -437,9 +428,71 @@ case SG_EMULATED_HOST: err = sg_emulated_host(q, (int *) arg); break; - case SG_IO: - err = sg_io(q, bdev, (struct sg_io_hdr *) arg); + case SG_IO: { + struct sg_io_hdr hdr; + + if (copy_from_user(&hdr, (struct sg_io_hdr *) arg, sizeof(hdr))) { + err = -EFAULT; + break; + } + err = sg_io(q, bdev, &hdr); + if (copy_to_user((struct sg_io_hdr *) arg, &hdr, sizeof(hdr))) + err = -EFAULT; break; + } + case CDROM_SEND_PACKET: { + struct cdrom_generic_command cgc; + struct sg_io_hdr hdr; + + if (copy_from_user(&cgc, (struct cdrom_generic_command *) arg, sizeof(cgc))) { + err = -EFAULT; + break; + } + cgc.timeout = clock_t_to_jiffies(cgc.timeout); + memset(&hdr, 0, sizeof(hdr)); + hdr.interface_id = 'S'; + hdr.cmd_len = sizeof(cgc.cmd); + hdr.dxfer_len = cgc.buflen; + err = 0; + switch (cgc.data_direction) { + case CGC_DATA_UNKNOWN: + hdr.dxfer_direction = SG_DXFER_UNKNOWN; + break; + case CGC_DATA_WRITE: + hdr.dxfer_direction = SG_DXFER_TO_DEV; + break; + case CGC_DATA_READ: + hdr.dxfer_direction = SG_DXFER_FROM_DEV; + break; + case CGC_DATA_NONE: + hdr.dxfer_direction = SG_DXFER_NONE; + break; + default: + err = -EINVAL; + } + if (err) + break; + + hdr.dxferp = cgc.buffer; + hdr.sbp = (char *) cgc.sense; + if (hdr.sbp) + hdr.mx_sb_len = sizeof(struct request_sense); + hdr.timeout = cgc.timeout; + hdr.cmdp = cgc.cmd; + hdr.cmd_len = sizeof(cgc.cmd); + err = sg_io(q, bdev, &hdr); + + if (hdr.status) + err = -EIO; + + cgc.stat = err; + cgc.buflen = hdr.resid; + if (copy_to_user((struct cdrom_generic_command *) arg, &cgc, sizeof(cgc))) + err = -EFAULT; + + break; + } + /* * old junk scsi send command ioctl */ diff -Nru a/drivers/block/swim_iop.c b/drivers/block/swim_iop.c --- a/drivers/block/swim_iop.c Thu Oct 2 01:28:15 2003 +++ b/drivers/block/swim_iop.c Thu Oct 2 01:28:15 2003 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff -Nru a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c --- a/drivers/cdrom/cdrom.c Thu Oct 2 01:28:16 2003 +++ b/drivers/cdrom/cdrom.c Thu Oct 2 01:28:16 2003 @@ -1856,57 +1856,6 @@ return cdo->generic_packet(cdi, &cgc); } -static int cdrom_do_cmd(struct cdrom_device_info *cdi, - struct cdrom_generic_command *cgc) -{ - struct request_sense *usense, sense; - unsigned char *ubuf; - int ret; - - if (cgc->data_direction == CGC_DATA_UNKNOWN) - return -EINVAL; - - if (cgc->buflen < 0 || cgc->buflen >= 131072) - return -EINVAL; - - usense = cgc->sense; - cgc->sense = &sense; - if (usense && !access_ok(VERIFY_WRITE, usense, sizeof(*usense))) { - return -EFAULT; - } - - ubuf = cgc->buffer; - if (cgc->data_direction == CGC_DATA_READ || - cgc->data_direction == CGC_DATA_WRITE) { - cgc->buffer = kmalloc(cgc->buflen, GFP_KERNEL); - if (cgc->buffer == NULL) - return -ENOMEM; - } - - - if (cgc->data_direction == CGC_DATA_READ) { - if (!access_ok(VERIFY_READ, ubuf, cgc->buflen)) { - kfree(cgc->buffer); - return -EFAULT; - } - } else if (cgc->data_direction == CGC_DATA_WRITE) { - if (copy_from_user(cgc->buffer, ubuf, cgc->buflen)) { - kfree(cgc->buffer); - return -EFAULT; - } - } - - ret = cdi->ops->generic_packet(cdi, cgc); - __copy_to_user(usense, cgc->sense, sizeof(*usense)); - if (!ret && cgc->data_direction == CGC_DATA_READ) - __copy_to_user(ubuf, cgc->buffer, cgc->buflen); - if (cgc->data_direction == CGC_DATA_READ || - cgc->data_direction == CGC_DATA_WRITE) { - kfree(cgc->buffer); - } - return ret; -} - static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, unsigned long arg) { @@ -2176,14 +2125,6 @@ return 0; } - case CDROM_SEND_PACKET: { - if (!CDROM_CAN(CDC_GENERIC_PACKET)) - return -ENOSYS; - cdinfo(CD_DO_IOCTL, "entering CDROM_SEND_PACKET\n"); - IOCTL_IN(arg, struct cdrom_generic_command, cgc); - cgc.timeout = clock_t_to_jiffies(cgc.timeout); - return cdrom_do_cmd(cdi, &cgc); - } case CDROM_NEXT_WRITABLE: { long next = 0; cdinfo(CD_DO_IOCTL, "entering CDROM_NEXT_WRITABLE\n"); diff -Nru a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c --- a/drivers/char/agp/amd64-agp.c Thu Oct 2 01:28:17 2003 +++ b/drivers/char/agp/amd64-agp.c Thu Oct 2 01:28:17 2003 @@ -91,9 +91,9 @@ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { tmp = agp_bridge->driver->mask_memory(mem->memory[i], mem->type); - BUG_ON(tmp & 0xffffff0000000ffc); - pte = (tmp & 0x000000ff00000000) >> 28; - pte |=(tmp & 0x00000000fffff000); + BUG_ON(tmp & 0xffffff0000000ffcULL); + pte = (tmp & 0x000000ff00000000ULL) >> 28; + pte |=(tmp & 0x00000000fffff000ULL); pte |= GPTE_VALID | GPTE_COHERENT; agp_bridge->gatt_table[j] = pte; diff -Nru a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c --- a/drivers/char/agp/via-agp.c Thu Oct 2 01:28:17 2003 +++ b/drivers/char/agp/via-agp.c Thu Oct 2 01:28:17 2003 @@ -251,6 +251,11 @@ .chipset_name = "Pro 266", }, + { + .device_id = PCI_DEVICE_ID_VIA_XN266, + .chipset_name = "Apollo Pro266", + }, + /* VT8361 */ { .device_id = PCI_DEVICE_ID_VIA_8361, diff -Nru a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c --- a/drivers/char/generic_serial.c Thu Oct 2 01:28:17 2003 +++ b/drivers/char/generic_serial.c Thu Oct 2 01:28:17 2003 @@ -348,7 +348,7 @@ static int gs_wait_tx_flushed (void * ptr, int timeout) { struct gs_port *port = ptr; - long end_jiffies; + unsigned long end_jiffies; int jiffies_to_transmit, charsleft = 0, rv = 0; int rcib; diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c Thu Oct 2 01:28:15 2003 +++ b/drivers/char/random.c Thu Oct 2 01:28:15 2003 @@ -1735,7 +1735,7 @@ tmp = kmalloc(size * sizeof(__u32), GFP_KERNEL); if (!tmp) - return -EFAULT; + return -ENOMEM; spin_lock_irqsave(&random_state->lock, flags); ent_count = random_state->entropy_count; diff -Nru a/drivers/char/ser_a2232.c b/drivers/char/ser_a2232.c --- a/drivers/char/ser_a2232.c Thu Oct 2 01:28:16 2003 +++ b/drivers/char/ser_a2232.c Thu Oct 2 01:28:16 2003 @@ -703,7 +703,7 @@ a2232_driver->name = "ttyY"; a2232_driver->major = A2232_NORMAL_MAJOR; a2232_driver->type = TTY_DRIVER_TYPE_SERIAL; - a2232_driver->subtype = SERIAL_TTY_NORMAL; + a2232_driver->subtype = SERIAL_TYPE_NORMAL; a2232_driver->init_termios = tty_std_termios; a2232_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; diff -Nru a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c --- a/drivers/eisa/eisa-bus.c Thu Oct 2 01:28:16 2003 +++ b/drivers/eisa/eisa-bus.c Thu Oct 2 01:28:16 2003 @@ -33,23 +33,22 @@ #endif #define EISA_MAX_FORCED_DEV 16 -#define EISA_FORCED_OFFSET 2 -static int enable_dev[EISA_MAX_FORCED_DEV + EISA_FORCED_OFFSET] = { 1, EISA_MAX_FORCED_DEV, }; -static int disable_dev[EISA_MAX_FORCED_DEV + EISA_FORCED_OFFSET] = { 1, EISA_MAX_FORCED_DEV, }; +static int enable_dev[EISA_MAX_FORCED_DEV]; +static int enable_dev_count; +static int disable_dev[EISA_MAX_FORCED_DEV]; +static int disable_dev_count; static int is_forced_dev (int *forced_tab, + int forced_count, struct eisa_root_device *root, struct eisa_device *edev) { int i, x; - for (i = 0; i < EISA_MAX_FORCED_DEV; i++) { - if (!forced_tab[EISA_FORCED_OFFSET + i]) - return 0; - + for (i = 0; i < forced_count; i++) { x = (root->bus_nr << 8) | edev->slot; - if (forced_tab[EISA_FORCED_OFFSET + i] == x) + if (forced_tab[i] == x) return 1; } @@ -198,10 +197,10 @@ #endif } - if (is_forced_dev (enable_dev, root, edev)) + if (is_forced_dev (enable_dev, enable_dev_count, root, edev)) edev->state = EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED; - if (is_forced_dev (disable_dev, root, edev)) + if (is_forced_dev (disable_dev, disable_dev_count, root, edev)) edev->state = EISA_CONFIG_FORCED; return 0; @@ -418,12 +417,8 @@ return 0; } -/* Couldn't use intarray with checking on... :-( */ -#undef param_check_intarray -#define param_check_intarray(name, p) - -module_param(enable_dev, intarray, 0444); -module_param(disable_dev, intarray, 0444); +module_param_array(enable_dev, int, enable_dev_count, 0444); +module_param_array(disable_dev, int, disable_dev_count, 0444); postcore_initcall (eisa_init); diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig --- a/drivers/i2c/busses/Kconfig Thu Oct 2 01:28:17 2003 +++ b/drivers/i2c/busses/Kconfig Thu Oct 2 01:28:17 2003 @@ -285,7 +285,7 @@ will be called i2c-velleman. config I2C_VIA - tristate "VIA 82C58B" + tristate "VIA 82C586B" depends on I2C_ALGOBIT && PCI && EXPERIMENTAL help diff -Nru a/drivers/i2c/i2c-sensor.c b/drivers/i2c/i2c-sensor.c --- a/drivers/i2c/i2c-sensor.c Thu Oct 2 01:28:17 2003 +++ b/drivers/i2c/i2c-sensor.c Thu Oct 2 01:28:17 2003 @@ -133,7 +133,7 @@ i += 2) { if (((adapter_id == address_data->probe[i]) || ((address_data-> - probe[i] == ANY_I2C_BUS) & !is_isa)) + probe[i] == ANY_I2C_BUS) && !is_isa)) && (addr == address_data->probe[i + 1])) { dev_dbg(&adapter->dev, "found probe parameter for adapter %d, addr %04x\n", adapter_id, addr); found = 1; @@ -141,7 +141,7 @@ } for (i = 0; !found && (address_data->probe_range[i] != I2C_CLIENT_END); i += 3) { if ( ((adapter_id == address_data->probe_range[i]) || - ((address_data->probe_range[i] == ANY_I2C_BUS) & !is_isa)) && + ((address_data->probe_range[i] == ANY_I2C_BUS) && !is_isa)) && (addr >= address_data->probe_range[i + 1]) && (addr <= address_data->probe_range[i + 2])) { found = 1; diff -Nru a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c --- a/drivers/ide/ide-floppy.c Thu Oct 2 01:28:17 2003 +++ b/drivers/ide/ide-floppy.c Thu Oct 2 01:28:17 2003 @@ -156,7 +156,6 @@ int request_transfer; /* Bytes to transfer */ int actually_transferred; /* Bytes actually transferred */ int buffer_size; /* Size of our data buffer */ - char *b_data; /* Pointer which runs on the buffers */ int b_count; /* Missing/Available data on the current buffer */ struct request *rq; /* The corresponding request */ u8 *buffer; /* Data buffer */ @@ -515,9 +514,6 @@ u8 reserved[4]; } idefloppy_mode_parameter_header_t; -#define IDEFLOPPY_MIN(a,b) ((a)<(b) ? (a):(b)) -#define IDEFLOPPY_MAX(a,b) ((a)>(b) ? (a):(b)) - /* * Too bad. The drive wants to send us data which we are not ready to accept. * Just throw it away. @@ -575,59 +571,68 @@ static void idefloppy_input_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, unsigned int bcount) { struct request *rq = pc->rq; - struct bio *bio = rq->bio; - int count; + struct bio_vec *bvec; + struct bio *bio; + unsigned long flags; + char *data; + int count, i, done = 0; - while (bcount) { - if (pc->b_count == bio->bi_size) { - rq->sector += rq->current_nr_sectors; - rq->nr_sectors -= rq->current_nr_sectors; - idefloppy_do_end_request(drive, 1, 0); - if ((bio = rq->bio) != NULL) - pc->b_count = 0; - } - if (bio == NULL) { - printk(KERN_ERR "%s: bio == NULL in " - "idefloppy_input_buffers, bcount == %d\n", - drive->name, bcount); - idefloppy_discard_data(drive, bcount); - return; + rq_for_each_bio(bio, rq) { + bio_for_each_segment(bvec, bio, i) { + if (!bcount) + break; + + count = min(bvec->bv_len, bcount); + + data = bvec_kmap_irq(bvec, &flags); + atapi_input_bytes(drive, data, count); + bvec_kunmap_irq(data, &flags); + + bcount -= count; + pc->b_count += count; + done += count; } - count = IDEFLOPPY_MIN(bio->bi_size - pc->b_count, bcount); - atapi_input_bytes(drive, bio_data(bio) + pc->b_count, count); - bcount -= count; - pc->b_count += count; + } + + idefloppy_do_end_request(drive, 1, done >> 9); + + if (bcount) { + printk(KERN_ERR "%s: leftover data in idefloppy_input_buffers, bcount == %d\n", drive->name, bcount); + idefloppy_discard_data(drive, bcount); } } static void idefloppy_output_buffers (ide_drive_t *drive, idefloppy_pc_t *pc, unsigned int bcount) { struct request *rq = pc->rq; - struct bio *bio = rq->bio; - int count; - - while (bcount) { - if (!pc->b_count) { - rq->sector += rq->current_nr_sectors; - rq->nr_sectors -= rq->current_nr_sectors; - idefloppy_do_end_request(drive, 1, 0); - if ((bio = rq->bio) != NULL) { - pc->b_data = bio_data(bio); - pc->b_count = bio->bi_size; - } - } - if (bio == NULL) { - printk(KERN_ERR "%s: bio == NULL in " - "idefloppy_output_buffers, bcount == %d\n", - drive->name, bcount); - idefloppy_write_zeros(drive, bcount); - return; + struct bio *bio; + struct bio_vec *bvec; + unsigned long flags; + int count, i, done = 0; + char *data; + + rq_for_each_bio(bio, rq) { + bio_for_each_segment(bvec, bio, i) { + if (!bcount) + break; + + count = min(bvec->bv_len, bcount); + + data = bvec_kmap_irq(bvec, &flags); + atapi_output_bytes(drive, data, count); + bvec_kunmap_irq(data, &flags); + + bcount -= count; + pc->b_count += count; + done += count; } - count = IDEFLOPPY_MIN(pc->b_count, bcount); - atapi_output_bytes(drive, pc->b_data, count); - bcount -= count; - pc->b_data += count; - pc->b_count -= count; + } + + idefloppy_do_end_request(drive, 1, done >> 9); + + if (bcount) { + printk(KERN_ERR "%s: leftover data in idefloppy_output_buffers, bcount == %d\n", drive->name, bcount); + idefloppy_write_zeros(drive, bcount); } } @@ -732,8 +737,6 @@ pc->request_transfer = 0; pc->buffer = pc->pc_buffer; pc->buffer_size = IDEFLOPPY_PC_BUFFER_SIZE; - pc->b_data = NULL; -// pc->bio = NULL; pc->callback = &idefloppy_pc_callback; } @@ -1199,7 +1202,6 @@ put_unaligned(htonl(block), (unsigned int *) &pc->c[2]); pc->callback = &idefloppy_rw_callback; pc->rq = rq; - pc->b_data = rq->buffer; pc->b_count = cmd == READ ? 0 : rq->bio->bi_size; if (rq->flags & REQ_RW) set_bit(PC_WRITING, &pc->flags); diff -Nru a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c --- a/drivers/ide/ide-proc.c Thu Oct 2 01:28:17 2003 +++ b/drivers/ide/ide-proc.c Thu Oct 2 01:28:17 2003 @@ -522,7 +522,8 @@ if (*p != ':') goto parse_error; len = IDE_MIN(p - start, MAX_LEN); - strlcpy(name, start, IDE_MIN(len, MAX_LEN)); + strncpy(name, start, IDE_MIN(len, MAX_LEN)); + name[len] = 0; if (n > 0) { --n; diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c Thu Oct 2 01:28:16 2003 +++ b/drivers/ide/ide.c Thu Oct 2 01:28:16 2003 @@ -1804,23 +1804,23 @@ #endif #ifdef CONFIG_BLK_DEV_ALI14XX static int __initdata probe_ali14xx; -extern void init_ali14xx(void); +extern int ali14xx_init(void); #endif #ifdef CONFIG_BLK_DEV_UMC8672 static int __initdata probe_umc8672; -extern void init_umc8672(void); +extern int umc8672_init(void); #endif #ifdef CONFIG_BLK_DEV_DTC2278 static int __initdata probe_dtc2278; -extern void init_dtc2278(void); +extern int dtc2278_init(void); #endif #ifdef CONFIG_BLK_DEV_HT6560B static int __initdata probe_ht6560b; -extern void init_ht6560b(void); +extern int ht6560b_init(void); #endif #ifdef CONFIG_BLK_DEV_QD65XX static int __initdata probe_qd65xx; -extern void init_qd65xx(void); +extern int qd65xx_init(void); #endif static int __initdata is_chipset_set[MAX_HWIFS]; @@ -2601,23 +2601,23 @@ #endif #ifdef CONFIG_BLK_DEV_ALI14XX if (probe_ali14xx) - init_ali14xx(); + (void)ali14xx_init(); #endif #ifdef CONFIG_BLK_DEV_UMC8672 if (probe_umc8672) - init_umc8672(); + (void)umc8672_init(); #endif #ifdef CONFIG_BLK_DEV_DTC2278 if (probe_dtc2278) - init_dtc2278(); + (void)dtc2278_init(); #endif #ifdef CONFIG_BLK_DEV_HT6560B if (probe_ht6560b) - init_ht6560b(); + (void)ht6560b_init(); #endif #ifdef CONFIG_BLK_DEV_QD65XX if (probe_qd65xx) - init_qd65xx(); + (void)qd65xx_init(); #endif initializing = 1; diff -Nru a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c --- a/drivers/ide/legacy/ali14xx.c Thu Oct 2 01:28:16 2003 +++ b/drivers/ide/legacy/ali14xx.c Thu Oct 2 01:28:16 2003 @@ -198,22 +198,12 @@ return t; } -int __init probe_ali14xx (void) +static int __init ali14xx_probe(void) { - /* auto-detect IDE controller port */ - if (!findPort()) { - printk(KERN_ERR "ali14xx: not found.\n"); - return 1; - } + ide_hwif_t *hwif, *mate; - printk(KERN_DEBUG "ali14xx: base= 0x%03x, regOn = 0x%02x.\n", basePort, regOn); - ide_hwifs[0].chipset = ide_ali14xx; - ide_hwifs[1].chipset = ide_ali14xx; - ide_hwifs[0].tuneproc = &ali14xx_tune_drive; - ide_hwifs[1].tuneproc = &ali14xx_tune_drive; - ide_hwifs[0].mate = &ide_hwifs[1]; - ide_hwifs[1].mate = &ide_hwifs[0]; - ide_hwifs[1].channel = 1; + printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n", + basePort, regOn); /* initialize controller registers */ if (!initRegisters()) { @@ -221,74 +211,59 @@ return 1; } - probe_hwif_init(&ide_hwifs[0]); - probe_hwif_init(&ide_hwifs[1]); + hwif = &ide_hwifs[0]; + mate = &ide_hwifs[1]; - return 0; -} + hwif->chipset = ide_ali14xx; + hwif->tuneproc = &ali14xx_tune_drive; + hwif->mate = mate; + + mate->chipset = ide_ali14xx; + mate->tuneproc = &ali14xx_tune_drive; + mate->mate = hwif; + mate->channel = 1; -static void ali14xx_release (void) -{ - if (ide_hwifs[0].chipset != ide_ali14xx && - ide_hwifs[1].chipset != ide_ali14xx) - return; + probe_hwif_init(hwif); + probe_hwif_init(mate); - ide_hwifs[0].chipset = ide_unknown; - ide_hwifs[1].chipset = ide_unknown; - ide_hwifs[0].tuneproc = NULL; - ide_hwifs[1].tuneproc = NULL; - ide_hwifs[0].mate = NULL; - ide_hwifs[1].mate = NULL; + return 0; } -#ifndef MODULE -/* - * init_ali14xx: - * - * called by ide.c when parsing command line - */ - -void __init init_ali14xx (void) +/* Can be called directly from ide.c. */ +int __init ali14xx_init(void) { /* auto-detect IDE controller port */ - if (findPort()) - if (probe_ali14xx()) - goto no_detect; - return; - -no_detect: + if (findPort()) { + if (ali14xx_probe()) + return -ENODEV; + return 0; + } printk(KERN_ERR "ali14xx: not found.\n"); - ali14xx_release(); + return -ENODEV; } -#else - -MODULE_AUTHOR("see local file"); -MODULE_DESCRIPTION("support of ALI 14XX IDE chipsets"); -MODULE_LICENSE("GPL"); - -static int __init ali14xx_mod_init(void) +#ifdef MODULE +static void __exit ali14xx_release_hwif(ide_hwif_t *hwif) { - /* auto-detect IDE controller port */ - if (findPort()) - if (probe_ali14xx()) { - ali14xx_release(); - return -ENODEV; - } + if (hwif->chipset != ide_ali14xx) + return; - if (ide_hwifs[0].chipset != ide_ali14xx && - ide_hwifs[1].chipset != ide_ali14xx) { - ali14xx_release(); - return -ENODEV; - } - return 0; + hwif->chipset = ide_unknown; + hwif->tuneproc = NULL; + hwif->mate = NULL; + hwif->channel = 0; } -module_init(ali14xx_mod_init); -static void __exit ali14xx_mod_exit(void) +static void __exit ali14xx_exit(void) { - ali14xx_release(); + ali14xx_release_hwif(&ide_hwifs[0]); + ali14xx_release_hwif(&ide_hwifs[1]); } -module_exit(ali14xx_mod_exit); + +module_init(ali14xx_init); +module_exit(ali14xx_exit); #endif +MODULE_AUTHOR("see local file"); +MODULE_DESCRIPTION("support of ALI 14XX IDE chipsets"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c --- a/drivers/ide/legacy/dtc2278.c Thu Oct 2 01:28:16 2003 +++ b/drivers/ide/legacy/dtc2278.c Thu Oct 2 01:28:16 2003 @@ -95,9 +95,16 @@ HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1; } -void __init probe_dtc2278 (void) +static int __init probe_dtc2278(void) { unsigned long flags; + ide_hwif_t *hwif, *mate; + + hwif = &ide_hwifs[0]; + mate = &ide_hwifs[1]; + + if (hwif->chipset != ide_unknown || mate->chipset != ide_unknown) + return 1; local_irq_save(flags); /* @@ -117,76 +124,60 @@ #endif local_irq_restore(flags); - ide_hwifs[0].serialized = 1; - ide_hwifs[1].serialized = 1; - ide_hwifs[0].chipset = ide_dtc2278; - ide_hwifs[1].chipset = ide_dtc2278; - ide_hwifs[0].tuneproc = &tune_dtc2278; - ide_hwifs[0].drives[0].no_unmask = 1; - ide_hwifs[0].drives[1].no_unmask = 1; - ide_hwifs[1].drives[0].no_unmask = 1; - ide_hwifs[1].drives[1].no_unmask = 1; - ide_hwifs[0].mate = &ide_hwifs[1]; - ide_hwifs[1].mate = &ide_hwifs[0]; - ide_hwifs[1].channel = 1; + hwif->serialized = 1; + hwif->chipset = ide_dtc2278; + hwif->tuneproc = &tune_dtc2278; + hwif->drives[0].no_unmask = 1; + hwif->drives[1].no_unmask = 1; + hwif->mate = mate; + + mate->serialized = 1; + mate->chipset = ide_dtc2278; + mate->drives[0].no_unmask = 1; + mate->drives[1].no_unmask = 1; + mate->mate = hwif; + mate->channel = 1; + + probe_hwif_init(hwif); + probe_hwif_init(mate); - probe_hwif_init(&ide_hwifs[0]); - probe_hwif_init(&ide_hwifs[1]); + return 0; } -static void dtc2278_release (void) +/* Can be called directly from ide.c. */ +int __init dtc2278_init(void) { - if (ide_hwifs[0].chipset != ide_dtc2278 && - ide_hwifs[1].chipset != ide_dtc2278) + if (probe_dtc2278()) { + printk(KERN_ERR "dtc2278: ide interfaces already in use!\n"); + return -EBUSY; + } + return 0; +} + +#ifdef MODULE +static void __exit dtc2278_release_hwif(ide_hwif_t *hwif) +{ + if (hwif->chipset != ide_dtc2278) return; - ide_hwifs[0].serialized = 0; - ide_hwifs[1].serialized = 0; - ide_hwifs[0].chipset = ide_unknown; - ide_hwifs[1].chipset = ide_unknown; - ide_hwifs[0].tuneproc = NULL; - ide_hwifs[0].drives[0].no_unmask = 0; - ide_hwifs[0].drives[1].no_unmask = 0; - ide_hwifs[1].drives[0].no_unmask = 0; - ide_hwifs[1].drives[1].no_unmask = 0; - ide_hwifs[0].mate = NULL; - ide_hwifs[1].mate = NULL; + hwif->serialized = 0; + hwif->chipset = ide_unknown; + hwif->tuneproc = NULL; + hwif->drives[0].no_unmask = 0; + hwif->drives[1].no_unmask = 0; + hwif->mate = NULL; } -#ifndef MODULE -/* - * init_dtc2278: - * - * called by ide.c when parsing command line - */ - -void __init init_dtc2278 (void) +static void __exit dtc2278_exit(void) { - probe_dtc2278(); + dtc2278_release_hwif(&ide_hwifs[0]); + dtc2278_release_hwif(&ide_hwifs[1]); } -#else +module_init(dtc2278_init); +module_exit(dtc2278_exit); +#endif MODULE_AUTHOR("See Local File"); MODULE_DESCRIPTION("support of DTC-2278 VLB IDE chipsets"); MODULE_LICENSE("GPL"); - -static int __init dtc2278_mod_init(void) -{ - probe_dtc2278(); - if (ide_hwifs[0].chipset != ide_dtc2278 && - ide_hwifs[1].chipset != ide_dtc2278) { - dtc2278_release(); - return -ENODEV; - } - return 0; -} -module_init(dtc2278_mod_init); - -static void __exit dtc2278_mod_exit(void) -{ - dtc2278_release(); -} -module_exit(dtc2278_mod_exit); -#endif - diff -Nru a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c --- a/drivers/ide/legacy/ht6560b.c Thu Oct 2 01:28:17 2003 +++ b/drivers/ide/legacy/ht6560b.c Thu Oct 2 01:28:17 2003 @@ -304,35 +304,16 @@ #endif } -void ht6560b_release (void) -{ - if (ide_hwifs[0].chipset != ide_ht6560b && - ide_hwifs[1].chipset != ide_ht6560b) - return; - - ide_hwifs[0].chipset = ide_unknown; - ide_hwifs[1].chipset = ide_unknown; - ide_hwifs[0].tuneproc = NULL; - ide_hwifs[1].tuneproc = NULL; - ide_hwifs[0].selectproc = NULL; - ide_hwifs[1].selectproc = NULL; - ide_hwifs[0].serialized = 0; - ide_hwifs[1].serialized = 0; - ide_hwifs[0].mate = NULL; - ide_hwifs[1].mate = NULL; - - ide_hwifs[0].drives[0].drive_data = 0; - ide_hwifs[0].drives[1].drive_data = 0; - ide_hwifs[1].drives[0].drive_data = 0; - ide_hwifs[1].drives[1].drive_data = 0; - release_region(HT_CONFIG_PORT, 1); -} - -static int __init ht6560b_mod_init(void) +/* Can be called directly from ide.c. */ +int __init ht6560b_init(void) { + ide_hwif_t *hwif, *mate; int t; - if (!request_region(HT_CONFIG_PORT, 1, ide_hwifs[0].name)) { + hwif = &ide_hwifs[0]; + mate = &ide_hwifs[1]; + + if (!request_region(HT_CONFIG_PORT, 1, hwif->name)) { printk(KERN_NOTICE "%s: HT_CONFIG_PORT not found\n", __FUNCTION__); return -ENODEV; @@ -343,39 +324,33 @@ goto release_region; } - ide_hwifs[0].chipset = ide_ht6560b; - ide_hwifs[1].chipset = ide_ht6560b; - ide_hwifs[0].selectproc = &ht6560b_selectproc; - ide_hwifs[1].selectproc = &ht6560b_selectproc; - ide_hwifs[0].tuneproc = &tune_ht6560b; - ide_hwifs[1].tuneproc = &tune_ht6560b; - ide_hwifs[0].serialized = 1; /* is this needed? */ - ide_hwifs[1].serialized = 1; /* is this needed? */ - ide_hwifs[0].mate = &ide_hwifs[1]; - ide_hwifs[1].mate = &ide_hwifs[0]; - ide_hwifs[1].channel = 1; + hwif->chipset = ide_ht6560b; + hwif->selectproc = &ht6560b_selectproc; + hwif->tuneproc = &tune_ht6560b; + hwif->serialized = 1; /* is this needed? */ + hwif->mate = mate; + + mate->chipset = ide_ht6560b; + mate->selectproc = &ht6560b_selectproc; + mate->tuneproc = &tune_ht6560b; + mate->serialized = 1; /* is this needed? */ + mate->mate = hwif; + mate->channel = 1; /* * Setting default configurations for drives */ t = (HT_CONFIG_DEFAULT << 8); t |= HT_TIMING_DEFAULT; - ide_hwifs[0].drives[0].drive_data = t; - ide_hwifs[0].drives[1].drive_data = t; - t |= (HT_SECONDARY_IF << 8); - ide_hwifs[1].drives[0].drive_data = t; - ide_hwifs[1].drives[1].drive_data = t; + hwif->drives[0].drive_data = t; + hwif->drives[1].drive_data = t; - probe_hwif_init(&ide_hwifs[0]); - probe_hwif_init(&ide_hwifs[1]); + t |= (HT_SECONDARY_IF << 8); + mate->drives[0].drive_data = t; + mate->drives[1].drive_data = t; -#ifdef MODULE - if (ide_hwifs[0].chipset != ide_ht6560b && - ide_hwifs[1].chipset != ide_ht6560b) { - ht6560b_release(); - return -ENODEV; - } -#endif + probe_hwif_init(hwif); + probe_hwif_init(mate); return 0; @@ -384,24 +359,34 @@ return -ENODEV; } -MODULE_AUTHOR("See Local File"); -MODULE_DESCRIPTION("HT-6560B EIDE-controller support"); -MODULE_LICENSE("GPL"); - #ifdef MODULE -static void __exit ht6560b_mod_exit(void) +static void __exit ht6560b_release_hwif(ide_hwif_t *hwif) { - ht6560b_release(); + if (hwif->chipset != ide_ht6560b) + return; + + hwif->chipset = ide_unknown; + hwif->tuneproc = NULL; + hwif->selectproc = NULL; + hwif->serialized = 0; + hwif->mate = NULL; + hwif->channel = 0; + + hwif->drives[0].drive_data = 0; + hwif->drives[1].drive_data = 0; } -module_init(ht6560b_mod_init); -module_exit(ht6560b_mod_exit); -#else -/* - * called by ide.c when parsing command line - */ -void __init init_ht6560b (void) +static void __exit ht6560b_exit(void) { - ht6560b_mod_init(); /* ignore return value */ + ht6560b_release_hwif(&ide_hwifs[0]); + ht6560b_release_hwif(&ide_hwifs[1]); + release_region(HT_CONFIG_PORT, 1); } + +module_init(ht6560b_init); +module_exit(ht6560b_exit); #endif + +MODULE_AUTHOR("See Local File"); +MODULE_DESCRIPTION("HT-6560B EIDE-controller support"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/ide/legacy/pdc4030.c b/drivers/ide/legacy/pdc4030.c --- a/drivers/ide/legacy/pdc4030.c Thu Oct 2 01:28:17 2003 +++ b/drivers/ide/legacy/pdc4030.c Thu Oct 2 01:28:17 2003 @@ -304,22 +304,16 @@ #ifndef MODULE if (enable_promise_support == 0) - return; + return 0; #endif for (index = 0; index < MAX_HWIFS; index++) { hwif = &ide_hwifs[index]; - if (hwif->chipset == ide_unknown && detect_pdc4030(hwif)) { -#ifndef MODULE - setup_pdc4030(hwif); -#else + if (hwif->chipset == ide_unknown && detect_pdc4030(hwif)) return setup_pdc4030(hwif); -#endif - } } -#ifdef MODULE + return 0; -#endif } static void __exit release_pdc4030(ide_hwif_t *hwif, ide_hwif_t *mate) diff -Nru a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c --- a/drivers/ide/legacy/qd65xx.c Thu Oct 2 01:28:16 2003 +++ b/drivers/ide/legacy/qd65xx.c Thu Oct 2 01:28:16 2003 @@ -338,12 +338,12 @@ * called to setup an ata channel : adjusts attributes & links for tuning */ -void __init qd_setup (int unit, int base, int config, unsigned int data0, unsigned int data1, void (*tuneproc) (ide_drive_t *, u8 pio)) +static void __init qd_setup(ide_hwif_t *hwif, int base, int config, + unsigned int data0, unsigned int data1, + void (*tuneproc) (ide_drive_t *, u8 pio)) { - ide_hwif_t *hwif = &ide_hwifs[unit]; - hwif->chipset = ide_qd65xx; - hwif->channel = unit; + hwif->channel = hwif->index; hwif->select_data = base; hwif->config_data = config; hwif->drives[0].drive_data = data0; @@ -354,19 +354,20 @@ probe_hwif_init(hwif); } +#ifdef MODULE /* * qd_unsetup: * * called to unsetup an ata channel : back to default values, unlinks tuning */ -static void __exit qd_unsetup (int unit) +static void __exit qd_unsetup(ide_hwif_t *hwif) { - ide_hwif_t *hwif = &ide_hwifs[unit]; u8 config = hwif->config_data; int base = hwif->select_data; void *tuneproc = (void *) hwif->tuneproc; - if (!(hwif->chipset == ide_qd65xx)) return; + if (hwif->chipset != ide_qd65xx) + return; printk(KERN_NOTICE "%s: back to defaults\n", hwif->name); @@ -381,13 +382,14 @@ qd_write_reg(QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0])); qd_write_reg(QD6580_DEF_DATA2, QD_TIMREG(&hwif->drives[1])); } else { - qd_write_reg(unit?QD6580_DEF_DATA2:QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0])); + qd_write_reg(hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0])); } } else { printk(KERN_WARNING "Unknown qd65xx tuning fonction !\n"); printk(KERN_WARNING "keeping settings !\n"); } } +#endif /* * qd_probe: @@ -396,8 +398,9 @@ * return 1 if another qd may be probed */ -int __init qd_probe (int base) +static int __init qd_probe(int base) { + ide_hwif_t *hwif; u8 config; u8 unit; @@ -414,9 +417,8 @@ /* qd6500 found */ - printk(KERN_NOTICE "%s: qd6500 at %#x\n", - ide_hwifs[unit].name, base); - + hwif = &ide_hwifs[unit]; + printk(KERN_NOTICE "%s: qd6500 at %#x\n", hwif->name, base); printk(KERN_DEBUG "qd6500: config=%#x, ID3=%u\n", config, QD_ID3); @@ -425,8 +427,8 @@ return 1; } - qd_setup(unit, base, config, QD6500_DEF_DATA, - QD6500_DEF_DATA, &qd6500_tune_drive); + qd_setup(hwif, base, config, QD6500_DEF_DATA, QD6500_DEF_DATA, + &qd6500_tune_drive); return 1; } @@ -448,25 +450,31 @@ if (control & QD_CONTR_SEC_DISABLED) { /* secondary disabled */ + + hwif = &ide_hwifs[unit]; printk(KERN_INFO "%s: qd6580: single IDE board\n", - ide_hwifs[unit].name); - qd_setup(unit, base, config | (control << 8), - QD6580_DEF_DATA, QD6580_DEF_DATA2, - &qd6580_tune_drive); + hwif->name); + qd_setup(hwif, base, config | (control << 8), + QD6580_DEF_DATA, QD6580_DEF_DATA2, + &qd6580_tune_drive); qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); return 1; } else { + ide_hwif_t *mate; + + hwif = &ide_hwifs[0]; + mate = &ide_hwifs[1]; /* secondary enabled */ printk(KERN_INFO "%s&%s: qd6580: dual IDE board\n", - ide_hwifs[0].name,ide_hwifs[1].name); + hwif->name, mate->name); - qd_setup(0, base, config | (control << 8), - QD6580_DEF_DATA, QD6580_DEF_DATA, - &qd6580_tune_drive); - qd_setup(1, base, config | (control << 8), - QD6580_DEF_DATA2, QD6580_DEF_DATA2, - &qd6580_tune_drive); + qd_setup(hwif, base, config | (control << 8), + QD6580_DEF_DATA, QD6580_DEF_DATA, + &qd6580_tune_drive); + qd_setup(mate, base, config | (control << 8), + QD6580_DEF_DATA2, QD6580_DEF_DATA2, + &qd6580_tune_drive); qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); return 0; /* no other qd65xx possible */ @@ -476,38 +484,28 @@ return 1; } -#ifndef MODULE -/* - * init_qd65xx: - * - * called by ide.c when parsing command line - */ - -void __init init_qd65xx (void) -{ - if (qd_probe(0x30)) qd_probe(0xb0); -} - -#else - -MODULE_AUTHOR("Samuel Thibault"); -MODULE_DESCRIPTION("support of qd65xx vlb ide chipset"); -MODULE_LICENSE("GPL"); - -static int __init qd65xx_mod_init(void) +/* Can be called directly from ide.c. */ +int __init qd65xx_init(void) { - if (qd_probe(0x30)) qd_probe(0xb0); + if (qd_probe(0x30)) + qd_probe(0xb0); if (ide_hwifs[0].chipset != ide_qd65xx && ide_hwifs[1].chipset != ide_qd65xx) return -ENODEV; return 0; } -module_init(qd65xx_mod_init); -static void __exit qd65xx_mod_exit(void) +#ifdef MODULE +static void __exit qd65xx_exit(void) { - qd_unsetup(0); - qd_unsetup(1); + qd_unsetup(&ide_hwifs[0]); + qd_unsetup(&ide_hwifs[1]); } -module_exit(qd65xx_mod_exit); + +module_init(qd65xx_init); +module_exit(qd65xx_exit); #endif + +MODULE_AUTHOR("Samuel Thibault"); +MODULE_DESCRIPTION("support of qd65xx vlb ide chipset"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c --- a/drivers/ide/legacy/umc8672.c Thu Oct 2 01:28:16 2003 +++ b/drivers/ide/legacy/umc8672.c Thu Oct 2 01:28:16 2003 @@ -124,16 +124,16 @@ spin_unlock_irqrestore(&ide_lock, flags); } -int __init probe_umc8672 (void) +static int __init umc8672_probe(void) { unsigned long flags; + ide_hwif_t *hwif, *mate; - local_irq_save(flags); if (!request_region(0x108, 2, "umc8672")) { - local_irq_restore(flags); printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n"); return 1; } + local_irq_save(flags); outb_p(0x5A,0x108); /* enable umc */ if (in_umc (0xd5) != 0xa0) { local_irq_restore(flags); @@ -146,82 +146,62 @@ umc_set_speeds (current_speeds); local_irq_restore(flags); - ide_hwifs[0].chipset = ide_umc8672; - ide_hwifs[1].chipset = ide_umc8672; - ide_hwifs[0].tuneproc = &tune_umc; - ide_hwifs[1].tuneproc = &tune_umc; - ide_hwifs[0].mate = &ide_hwifs[1]; - ide_hwifs[1].mate = &ide_hwifs[0]; - ide_hwifs[1].channel = 1; + hwif = &ide_hwifs[0]; + mate = &ide_hwifs[1]; - probe_hwif_init(&ide_hwifs[0]); - probe_hwif_init(&ide_hwifs[1]); + hwif->chipset = ide_umc8672; + hwif->tuneproc = &tune_umc; + hwif->mate = mate; + + mate->chipset = ide_umc8672; + mate->tuneproc = &tune_umc; + mate->mate = hwif; + mate->channel = 1; + + probe_hwif_init(hwif); + probe_hwif_init(mate); return 0; } -static void umc8672_release (void) +/* Can be called directly from ide.c. */ +int __init umc8672_init(void) { - unsigned long flags; + if (umc8672_probe()) + return -ENODEV; + return 0; +} - local_irq_save(flags); - if (ide_hwifs[0].chipset != ide_umc8672 && - ide_hwifs[1].chipset != ide_umc8672) { - local_irq_restore(flags); +#ifdef MODULE +static void __exit umc8672_release_hwif(ide_hwif_t *hwif) +{ + if (hwif->chipset != ide_umc8672) return; - } - ide_hwifs[0].chipset = ide_unknown; - ide_hwifs[1].chipset = ide_unknown; - ide_hwifs[0].tuneproc = NULL; - ide_hwifs[1].tuneproc = NULL; - ide_hwifs[0].mate = NULL; - ide_hwifs[1].mate = NULL; - ide_hwifs[0].channel = 0; - ide_hwifs[1].channel = 0; - - outb_p(0xa5,0x108); /* disable umc */ - - release_region(0x108, 2); - local_irq_restore(flags); + hwif->chipset = ide_unknown; + hwif->tuneproc = NULL; + hwif->mate = NULL; + hwif->channel = 0; } -#ifndef MODULE -/* - * init_umc8672: - * - * called by ide.c when parsing command line - */ - -void __init init_umc8672 (void) +static void __exit umc8672_exit(void) { - if (probe_umc8672()) - printk(KERN_ERR "init_umc8672: umc8672 controller not found.\n"); -} + unsigned long flags; -#else + umc8672_release_hwif(&ide_hwifs[0]); + umc8672_release_hwif(&ide_hwifs[1]); -MODULE_AUTHOR("Wolfram Podien"); -MODULE_DESCRIPTION("Support for UMC 8672 IDE chipset"); -MODULE_LICENSE("GPL"); + local_irq_save(flags); + outb_p(0xa5, 0x108); /* disable umc */ + local_irq_restore(flags); -static int __init umc8672_mod_init(void) -{ - if (probe_umc8672()) - return -ENODEV; - if (ide_hwifs[0].chipset != ide_umc8672 && - ide_hwifs[1].chipset != ide_umc8672) { - umc8672_release(); - return -ENODEV; - } - return 0; + release_region(0x108, 2); } -module_init(umc8672_mod_init); -static void __exit umc8672_mod_exit(void) -{ - umc8672_release(); -} -module_exit(umc8672_mod_exit); +module_init(umc8672_init); +module_exit(umc8672_exit); #endif +MODULE_AUTHOR("Wolfram Podien"); +MODULE_DESCRIPTION("Support for UMC 8672 IDE chipset"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c --- a/drivers/ide/pci/sc1200.c Thu Oct 2 01:28:17 2003 +++ b/drivers/ide/pci/sc1200.c Thu Oct 2 01:28:17 2003 @@ -396,44 +396,44 @@ __u32 regs[4]; } sc1200_saved_state_t; -static int sc1200_save_state (struct pci_dev *dev, u32 state) + +static int sc1200_suspend (struct pci_dev *dev, u32 state) { ide_hwif_t *hwif = NULL; -printk("SC1200: save_state(%u)\n", state); - if (state != 0) - return 0; // we only save state when going from full power to less - // - // Loop over all interfaces that are part of this PCI device: - // - while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { - sc1200_saved_state_t *ss; - unsigned int basereg, r; - // - // allocate a permanent save area, if not already allocated - // - ss = (sc1200_saved_state_t *)hwif->config_data; - if (ss == NULL) { - ss = kmalloc(sizeof(sc1200_saved_state_t), GFP_KERNEL); - if (ss == NULL) - return -ENOMEM; - (sc1200_saved_state_t *)hwif->config_data = ss; - } - ss = (sc1200_saved_state_t *)hwif->config_data; + printk("SC1200: suspend(%u)\n", state); + + if (state == 0) { + // we only save state when going from full power to less + // - // Save timing registers: this may be unnecessary if BIOS also does it + // Loop over all interfaces that are part of this PCI device: // - basereg = hwif->channel ? 0x50 : 0x40; - for (r = 0; r < 4; ++r) { - pci_read_config_dword (hwif->pci_dev, basereg + (r<<2), &ss->regs[r]); + while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { + sc1200_saved_state_t *ss; + unsigned int basereg, r; + // + // allocate a permanent save area, if not already allocated + // + ss = (sc1200_saved_state_t *)hwif->config_data; + if (ss == NULL) { + ss = kmalloc(sizeof(sc1200_saved_state_t), GFP_KERNEL); + if (ss == NULL) + return -ENOMEM; + (sc1200_saved_state_t *)hwif->config_data = ss; + } + ss = (sc1200_saved_state_t *)hwif->config_data; + // + // Save timing registers: this may be unnecessary if + // BIOS also does it + // + basereg = hwif->channel ? 0x50 : 0x40; + for (r = 0; r < 4; ++r) { + pci_read_config_dword (hwif->pci_dev, basereg + (r<<2), &ss->regs[r]); + } } } - return 0; -} -static int sc1200_suspend (struct pci_dev *dev, u32 state) -{ - printk("SC1200: suspend(%u)\n", state); /* You don't need to iterate over disks -- sysfs should have done that for you already */ pci_disable_device(dev); @@ -572,7 +572,6 @@ .name = "SC1200 IDE", .id_table = sc1200_pci_tbl, .probe = sc1200_init_one, - .save_state = sc1200_save_state, .suspend = sc1200_suspend, .resume = sc1200_resume, }; diff -Nru a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c --- a/drivers/input/joystick/analog.c Thu Oct 2 01:28:17 2003 +++ b/drivers/input/joystick/analog.c Thu Oct 2 01:28:17 2003 @@ -159,7 +159,7 @@ #define DELTA(x,y) ((y)-(x)) #define TIME_NAME "TSC" #elif __alpha__ -#define GET_TIME(x) do { x = get_cycles(x); } while (0) +#define GET_TIME(x) do { x = get_cycles(); } while (0) #define DELTA(x,y) ((y)-(x)) #define TIME_NAME "PCC" #else diff -Nru a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig --- a/drivers/input/keyboard/Kconfig Thu Oct 2 01:28:18 2003 +++ b/drivers/input/keyboard/Kconfig Thu Oct 2 01:28:18 2003 @@ -12,10 +12,11 @@ If unsure, say Y. config KEYBOARD_ATKBD - tristate "AT keyboard support" if EMBEDDED || !X86 + tristate "AT keyboard support" if !PC default y depends on INPUT && INPUT_KEYBOARD - select SERIO_I8042 + select SERIO + select SERIO_I8042 if PC help Say Y here if you want to use a standard AT or PS/2 keyboard. Usually you'll need this, unless you have a different type keyboard (USB, ADB diff -Nru a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig --- a/drivers/input/mouse/Kconfig Thu Oct 2 01:28:17 2003 +++ b/drivers/input/mouse/Kconfig Thu Oct 2 01:28:17 2003 @@ -15,7 +15,8 @@ tristate "PS/2 mouse" default y depends on INPUT && INPUT_MOUSE - select SERIO_I8042 + select SERIO + select SERIO_I8042 if PC ---help--- Say Y here if you have a PS/2 mouse connected to your system. This includes the standard 2 or 3-button PS/2 mouse, as well as PS/2 diff -Nru a/drivers/isdn/hardware/eicon/debuglib.h b/drivers/isdn/hardware/eicon/debuglib.h --- a/drivers/isdn/hardware/eicon/debuglib.h Thu Oct 2 01:28:18 2003 +++ b/drivers/isdn/hardware/eicon/debuglib.h Thu Oct 2 01:28:18 2003 @@ -103,28 +103,28 @@ #define DL_TO_KERNEL 0x40000000 #ifdef DIVA_NO_DEBUGLIB -#define myDbgPrint_LOG(x,...) do { } while(0); -#define myDbgPrint_FTL(x,...) do { } while(0); -#define myDbgPrint_ERR(x,...) do { } while(0); -#define myDbgPrint_TRC(x,...) do { } while(0); -#define myDbgPrint_MXLOG(x,...) do { } while(0); -#define myDbgPrint_EVL(x,...) do { } while(0); -#define myDbgPrint_REG(x,...) do { } while(0); -#define myDbgPrint_MEM(x,...) do { } while(0); -#define myDbgPrint_SPL(x,...) do { } while(0); -#define myDbgPrint_IRP(x,...) do { } while(0); -#define myDbgPrint_TIM(x,...) do { } while(0); -#define myDbgPrint_BLK(x,...) do { } while(0); -#define myDbgPrint_TAPI(x,...) do { } while(0); -#define myDbgPrint_NDIS(x,...) do { } while(0); -#define myDbgPrint_CONN(x,...) do { } while(0); -#define myDbgPrint_STAT(x,...) do { } while(0); -#define myDbgPrint_SEND(x,...) do { } while(0); -#define myDbgPrint_RECV(x,...) do { } while(0); -#define myDbgPrint_PRV0(x,...) do { } while(0); -#define myDbgPrint_PRV1(x,...) do { } while(0); -#define myDbgPrint_PRV2(x,...) do { } while(0); -#define myDbgPrint_PRV3(x,...) do { } while(0); +#define myDbgPrint_LOG(x...) do { } while(0); +#define myDbgPrint_FTL(x...) do { } while(0); +#define myDbgPrint_ERR(x...) do { } while(0); +#define myDbgPrint_TRC(x...) do { } while(0); +#define myDbgPrint_MXLOG(x...) do { } while(0); +#define myDbgPrint_EVL(x...) do { } while(0); +#define myDbgPrint_REG(x...) do { } while(0); +#define myDbgPrint_MEM(x...) do { } while(0); +#define myDbgPrint_SPL(x...) do { } while(0); +#define myDbgPrint_IRP(x...) do { } while(0); +#define myDbgPrint_TIM(x...) do { } while(0); +#define myDbgPrint_BLK(x...) do { } while(0); +#define myDbgPrint_TAPI(x...) do { } while(0); +#define myDbgPrint_NDIS(x...) do { } while(0); +#define myDbgPrint_CONN(x...) do { } while(0); +#define myDbgPrint_STAT(x...) do { } while(0); +#define myDbgPrint_SEND(x...) do { } while(0); +#define myDbgPrint_RECV(x...) do { } while(0); +#define myDbgPrint_PRV0(x...) do { } while(0); +#define myDbgPrint_PRV1(x...) do { } while(0); +#define myDbgPrint_PRV2(x...) do { } while(0); +#define myDbgPrint_PRV3(x...) do { } while(0); #define DBG_TEST(func,args) do { } while(0); #define DBG_EVL_ID(args) do { } while(0); diff -Nru a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c --- a/drivers/isdn/hardware/eicon/divamnt.c Thu Oct 2 01:28:17 2003 +++ b/drivers/isdn/hardware/eicon/divamnt.c Thu Oct 2 01:28:17 2003 @@ -1,4 +1,4 @@ -/* $Id: divamnt.c,v 1.27 2003/09/09 06:46:29 schindler Exp $ +/* $Id: divamnt.c,v 1.28 2003/09/18 06:57:18 schindler Exp $ * * Driver for Eicon DIVA Server ISDN cards. * Maint module @@ -24,10 +24,9 @@ #include "platform.h" #include "di_defs.h" #include "divasync.h" -#include "di_defs.h" #include "debug_if.h" -static char *main_revision = "$Revision: 1.27 $"; +static char *main_revision = "$Revision: 1.28 $"; static int major; diff -Nru a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c --- a/drivers/isdn/hardware/eicon/divasmain.c Thu Oct 2 01:28:16 2003 +++ b/drivers/isdn/hardware/eicon/divasmain.c Thu Oct 2 01:28:16 2003 @@ -1,4 +1,4 @@ -/* $Id: divasmain.c,v 1.40 2003/09/10 08:02:33 schindler Exp $ +/* $Id: divasmain.c,v 1.43 2003/09/22 08:57:31 schindler Exp $ * * Low level driver for Eicon DIVA Server ISDN cards. * @@ -9,13 +9,11 @@ * of the GNU General Public License, incorporated herein by reference. */ -#define __KERNEL_SYSCALLS__ #include #include #include #include #include -#include #include #include #include @@ -43,7 +41,7 @@ #include "diva_dma.h" #include "diva_pci.h" -static char *main_revision = "$Revision: 1.40 $"; +static char *main_revision = "$Revision: 1.43 $"; static int major; diff -Nru a/drivers/isdn/hardware/eicon/dqueue.c b/drivers/isdn/hardware/eicon/dqueue.c --- a/drivers/isdn/hardware/eicon/dqueue.c Thu Oct 2 01:28:17 2003 +++ b/drivers/isdn/hardware/eicon/dqueue.c Thu Oct 2 01:28:17 2003 @@ -1,10 +1,10 @@ -/* $Id: dqueue.c,v 1.1.2.2 2001/02/11 14:40:41 armin Exp $ +/* $Id: dqueue.c,v 1.5 2003/04/12 21:40:49 schindler Exp $ * * Driver for Eicon DIVA Server ISDN cards. * User Mode IDI Interface * - * Copyright 2000,2001 by Armin Schindler (mac@melware.de) - * Copyright 2000,2001 Cytronics & Melware (info@melware.de) + * Copyright 2000-2003 by Armin Schindler (mac@melware.de) + * Copyright 2000-2003 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. diff -Nru a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c --- a/drivers/isdn/hardware/eicon/mntfunc.c Thu Oct 2 01:28:15 2003 +++ b/drivers/isdn/hardware/eicon/mntfunc.c Thu Oct 2 01:28:15 2003 @@ -1,4 +1,4 @@ -/* $Id: mntfunc.c,v 1.15 2003/08/25 14:49:53 schindler Exp $ +/* $Id: mntfunc.c,v 1.16 2003/09/18 06:57:17 schindler Exp $ * * Driver for Eicon DIVA Server ISDN cards. * Maint module @@ -14,7 +14,6 @@ #include "platform.h" #include "di_defs.h" #include "divasync.h" -#include "di_defs.h" #include "debug_if.h" extern char *DRIVERRELEASE_MNT; diff -Nru a/drivers/isdn/hardware/eicon/os_capi.h b/drivers/isdn/hardware/eicon/os_capi.h --- a/drivers/isdn/hardware/eicon/os_capi.h Thu Oct 2 01:28:17 2003 +++ b/drivers/isdn/hardware/eicon/os_capi.h Thu Oct 2 01:28:17 2003 @@ -1,10 +1,10 @@ -/* $Id: os_capi.h,v 1.1.2.2 2002/10/02 14:38:38 armin Exp $ +/* $Id: os_capi.h,v 1.7 2003/04/12 21:40:49 schindler Exp $ * * ISDN interface module for Eicon active cards DIVA. * CAPI Interface OS include files * - * Copyright 2000-2002 by Armin Schindler (mac@melware.de) - * Copyright 2000-2002 Cytronics & Melware (info@melware.de) + * Copyright 2000-2003 by Armin Schindler (mac@melware.de) + * Copyright 2000-2003 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. diff -Nru a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h --- a/drivers/isdn/hardware/eicon/platform.h Thu Oct 2 01:28:17 2003 +++ b/drivers/isdn/hardware/eicon/platform.h Thu Oct 2 01:28:17 2003 @@ -1,4 +1,4 @@ -/* $Id: platform.h,v 1.31 2003/09/08 15:15:22 schindler Exp $ +/* $Id: platform.h,v 1.32 2003/09/18 06:59:59 schindler Exp $ * * platform.h * @@ -19,7 +19,6 @@ #endif #include -#include #include #include #include diff -Nru a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c --- a/drivers/isdn/i4l/isdn_common.c Thu Oct 2 01:28:16 2003 +++ b/drivers/isdn/i4l/isdn_common.c Thu Oct 2 01:28:16 2003 @@ -2229,8 +2229,10 @@ isdn_info_update(); return 0; -/* err_tty_modem:*/ +#ifdef CONFIG_ISDN_PPP + err_tty_modem: isdn_tty_exit(); +#endif err_cleanup_devfs: isdn_cleanup_devfs(); unregister_chrdev(ISDN_MAJOR, "isdn"); diff -Nru a/drivers/mca/mca-legacy.c b/drivers/mca/mca-legacy.c --- a/drivers/mca/mca-legacy.c Thu Oct 2 01:28:18 2003 +++ b/drivers/mca/mca-legacy.c Thu Oct 2 01:28:18 2003 @@ -28,7 +28,7 @@ #include #include -#include +#include #include /* NOTE: This structure is stack allocated */ diff -Nru a/drivers/mca/mca-proc.c b/drivers/mca/mca-proc.c --- a/drivers/mca/mca-proc.c Thu Oct 2 01:28:17 2003 +++ b/drivers/mca/mca-proc.c Thu Oct 2 01:28:17 2003 @@ -120,12 +120,13 @@ len += sprintf(buf+len, "Id: %02x%02x\n", mca_dev->pos[1], mca_dev->pos[0]); len += sprintf(buf+len, "Enabled: %s\nPOS: ", - mca_isenabled(slot) ? "Yes" : "No"); + mca_device_status(mca_dev) == MCA_ADAPTER_NORMAL ? + "Yes" : "No"); for(i=0; i<8; i++) { len += sprintf(buf+len, "%02x ", mca_dev->pos[i]); } len += sprintf(buf+len, "\nDriver Installed: %s", - mca_is_adapter_used(slot) ? "Yes" : "No"); + mca_device_claimed(mca_dev) ? "Yes" : "No"); buf[len++] = '\n'; buf[len] = 0; @@ -189,6 +190,7 @@ /* Initialize /proc/mca entries for existing adapters */ for(i = 0; i < MCA_NUMADAPTERS; i++) { + enum MCA_AdapterStatus status; mca_dev = mca_find_device_by_slot(i); if(!mca_dev) continue; @@ -200,7 +202,10 @@ else if(i == MCA_INTEGSCSI) sprintf(mca_dev->procname,"scsi"); else if(i == MCA_MOTHERBOARD) sprintf(mca_dev->procname,"planar"); - if(!mca_isadapter(i)) continue; + status = mca_device_status(mca_dev); + if (status != MCA_ADAPTER_NORMAL && + status != MCA_ADAPTER_DISABLED) + continue; node = create_proc_read_entry(mca_dev->procname, 0, proc_mca, mca_read_proc, (void *)mca_dev); diff -Nru a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c --- a/drivers/media/video/videodev.c Thu Oct 2 01:28:16 2003 +++ b/drivers/media/video/videodev.c Thu Oct 2 01:28:16 2003 @@ -52,7 +52,7 @@ { struct video_device *vfd = container_of(cd, struct video_device, class_dev); dev_t dev = MKDEV(VIDEO_MAJOR, vfd->minor); - return sprintf(buf,"%04x\n",old_encode_dev(dev)); + return print_dev_t(buf,dev); } static CLASS_DEVICE_ATTR(name, S_IRUGO, show_name, NULL); diff -Nru a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c --- a/drivers/mtd/chips/cfi_cmdset_0020.c Thu Oct 2 01:28:16 2003 +++ b/drivers/mtd/chips/cfi_cmdset_0020.c Thu Oct 2 01:28:16 2003 @@ -208,6 +208,7 @@ if (!mtd->eraseregions) { printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n"); kfree(cfi->cmdset_priv); + kfree(mtd); return NULL; } @@ -232,6 +233,7 @@ printk(KERN_WARNING "Sum of regions (%lx) != total size of set of interleaved chips (%lx)\n", offset, devsize); kfree(mtd->eraseregions); kfree(cfi->cmdset_priv); + kfree(mtd); return NULL; } diff -Nru a/drivers/net/3c523.c b/drivers/net/3c523.c --- a/drivers/net/3c523.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/3c523.c Thu Oct 2 01:28:16 2003 @@ -102,7 +102,7 @@ #include #include #include -#include +#include #include #include diff -Nru a/drivers/net/3c527.c b/drivers/net/3c527.c --- a/drivers/net/3c527.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/3c527.c Thu Oct 2 01:28:17 2003 @@ -92,7 +92,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig Thu Oct 2 01:28:17 2003 +++ b/drivers/net/Kconfig Thu Oct 2 01:28:17 2003 @@ -8,32 +8,18 @@ bool "Network device support" ---help--- You can say N here if you don't intend to connect your Linux box to - any other computer at all or if all your connections will be over a - telephone line with a modem either via UUCP (UUCP is a protocol to - forward mail and news between unix hosts over telephone lines; read - the UUCP-HOWTO, available from - ) or dialing up a shell - account or a BBS, even using term (term is a program which gives you - almost full Internet connectivity if you have a regular dial up - shell account on some Internet connected Unix computer. Read - ). + any other computer at all. You'll have to say Y if your computer contains a network card that - you want to use under Linux (make sure you know its name because you - will be asked for it and read the Ethernet-HOWTO (especially if you - plan to use more than one network card under Linux)) or if you want - to use SLIP (Serial Line Internet Protocol is the protocol used to - send Internet traffic over telephone lines or null modem cables) or - CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better - and newer replacement for SLIP) or PLIP (Parallel Line Internet - Protocol is mainly used to create a mini network by connecting the - parallel ports of two local machines) or AX.25/KISS (protocol for - sending Internet traffic over amateur radio links). - - Make sure to read the NET-3-HOWTO. Eventually, you will have to read - Olaf Kirch's excellent and free book "Network Administrator's - Guide", to be found in . If - unsure, say Y. + you want to use under Linux. If you are going to run SLIP or PPP over + telephone line or null modem cable you need say Y here. Connecting + two machines with parallel ports using PLIP needs this, as well as + AX.25/KISS for sending Internet traffic over amateur radio links. + + See also "The Linux Network Administrator's Guide" by Olaf Kirch and + Terry Dawson. Available at . + + If unsure, say Y. if NETDEVICES source "drivers/net/arcnet/Kconfig" @@ -332,7 +318,7 @@ config MAC89x0 tristate "Macintosh CS89x0 based ethernet cards" - depends on NETDEVICES && MAC + depends on NETDEVICES && MAC && BROKEN ---help--- Support for CS89x0 chipset based Ethernet cards. If you have a Nubus or LC-PDS network (Ethernet) card of this type, say Y and @@ -405,7 +391,7 @@ config ATARI_BIONET tristate "BioNet-100 support" - depends on NETDEVICES && ATARI && ATARI_ACSI!=n + depends on NETDEVICES && ATARI && ATARI_ACSI!=n && BROKEN help Say Y to include support for BioData's BioNet-100 Ethernet adapter for the ACSI port. The driver works (has to work...) with a polled @@ -413,7 +399,7 @@ config ATARI_PAMSNET tristate "PAMsNet support" - depends on NETDEVICES && ATARI && ATARI_ACSI!=n + depends on NETDEVICES && ATARI && ATARI_ACSI!=n && BROKEN help Say Y to include support for the PAMsNet Ethernet adapter for the ACSI port ("ACSI node"). The driver works (has to work...) with a @@ -808,7 +794,7 @@ config SMC9194 tristate "SMC 9194 support" - depends on NET_VENDOR_SMC && (ISA || MAC) + depends on NET_VENDOR_SMC && (ISA || MAC && BROKEN) select CRC32 ---help--- This is support for the SMC9xxx based Ethernet cards. Choose this diff -Nru a/drivers/net/Space.c b/drivers/net/Space.c --- a/drivers/net/Space.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/Space.c Thu Oct 2 01:28:16 2003 @@ -67,7 +67,6 @@ extern int ac3200_probe(struct net_device *); extern int es_probe(struct net_device *); extern int lne390_probe(struct net_device *); -extern int ne3210_probe(struct net_device *); extern int e2100_probe(struct net_device *); extern int ni5010_probe(struct net_device *); extern int ni52_probe(struct net_device *); @@ -155,9 +154,6 @@ #ifdef CONFIG_LNE390 {lne390_probe, 0}, #endif -#ifdef CONFIG_NE3210 - {ne3210_probe, 0}, -#endif {NULL, 0}, }; @@ -480,3 +476,5 @@ struct net_device *dev_base; rwlock_t dev_base_lock = RW_LOCK_UNLOCKED; +EXPORT_SYMBOL(dev_base); +EXPORT_SYMBOL(dev_base_lock); diff -Nru a/drivers/net/arcnet/com20020-isa.c b/drivers/net/arcnet/com20020-isa.c --- a/drivers/net/arcnet/com20020-isa.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/arcnet/com20020-isa.c Thu Oct 2 01:28:16 2003 @@ -53,6 +53,7 @@ int ioaddr; unsigned long airqmask; struct arcnet_local *lp = dev->priv; + int err; BUGLVL(D_NORMAL) printk(VERSION); @@ -62,17 +63,20 @@ "must specify the base address!\n"); return -ENODEV; } - if (check_region(ioaddr, ARCNET_TOTAL_SIZE)) { + if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) { BUGMSG(D_NORMAL, "IO region %xh-%xh already allocated.\n", ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1); return -ENXIO; } if (ASTATUS() == 0xFF) { BUGMSG(D_NORMAL, "IO address %x empty\n", ioaddr); - return -ENODEV; + err = -ENODEV; + goto out; + } + if (com20020_check(dev)) { + err = -ENODEV; + goto out; } - if (com20020_check(dev)) - return -ENODEV; if (!dev->irq) { /* if we do this, we're sure to get an IRQ since the @@ -96,13 +100,21 @@ dev->irq = probe_irq_off(airqmask); if (dev->irq <= 0) { BUGMSG(D_NORMAL, "Autoprobe IRQ failed.\n"); - return -ENODEV; + err = -ENODEV; + goto out; } } } lp->card_name = "ISA COM20020"; - return com20020_found(dev, 0); + if ((err = com20020_found(dev, 0)) != 0) + goto out; + + return 0; + +out: + release_region(ioaddr, ARCNET_TOTAL_SIZE); + return err; } @@ -170,6 +182,7 @@ void cleanup_module(void) { com20020_remove(my_dev); + release_region(my_dev->base_addr, ARCNET_TOTAL_SIZE); } #else diff -Nru a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c --- a/drivers/net/arcnet/com20020-pci.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/arcnet/com20020-pci.c Thu Oct 2 01:28:16 2003 @@ -115,20 +115,20 @@ BUGMSG(D_NORMAL, "IO address %Xh was reported by PCI BIOS, " "but seems empty!\n", ioaddr); err = -EIO; - goto out_priv; + goto out_port; } if (com20020_check(dev)) { err = -EIO; - goto out_priv; + goto out_port; } - release_region(ioaddr, ARCNET_TOTAL_SIZE); - if ((err = com20020_found(dev, SA_SHIRQ)) != 0) - goto out_priv; + goto out_port; return 0; +out_port: + release_region(ioaddr, ARCNET_TOTAL_SIZE); out_priv: kfree(dev->priv); out_dev: @@ -138,7 +138,9 @@ static void __devexit com20020pci_remove(struct pci_dev *pdev) { - com20020_remove(pci_get_drvdata(pdev)); + struct net_device *dev = pci_get_drvdata(pdev); + com20020_remove(dev); + release_region(dev->base_addr, ARCNET_TOTAL_SIZE); } static struct pci_device_id com20020pci_id_table[] = { diff -Nru a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c --- a/drivers/net/arcnet/com20020.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/arcnet/com20020.c Thu Oct 2 01:28:16 2003 @@ -180,10 +180,6 @@ if (!dev->dev_addr[0]) dev->dev_addr[0] = inb(ioaddr + 8); /* FIXME: do this some other way! */ - /* reserve the I/O region */ - if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) - return -EBUSY; - SET_SUBADR(SUB_SETUP1); outb(lp->setup, _XREG); @@ -207,7 +203,6 @@ if (request_irq(dev->irq, &arcnet_interrupt, shared, "arcnet (COM20020)", dev)) { BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", dev->irq); - release_region(ioaddr, ARCNET_TOTAL_SIZE); return -ENODEV; } @@ -227,7 +222,6 @@ clockrates[3 - ((lp->setup2 & 0xF0) >> 4) + ((lp->setup & 0x0F) >> 1)]); if (!dev->init && register_netdev(dev)) { - release_region(ioaddr, ARCNET_TOTAL_SIZE); free_irq(dev->irq, dev); return -EIO; } @@ -342,7 +336,6 @@ { unregister_netdev(dev); free_irq(dev->irq, dev); - release_region(dev->base_addr, ARCNET_TOTAL_SIZE); kfree(dev->priv); free_netdev(dev); } diff -Nru a/drivers/net/at1700.c b/drivers/net/at1700.c --- a/drivers/net/at1700.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/at1700.c Thu Oct 2 01:28:16 2003 @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/net/eexpress.c b/drivers/net/eexpress.c --- a/drivers/net/eexpress.c Thu Oct 2 01:28:15 2003 +++ b/drivers/net/eexpress.c Thu Oct 2 01:28:15 2003 @@ -113,7 +113,6 @@ #include #include #include -#include #include #include diff -Nru a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c --- a/drivers/net/ibmlana.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/ibmlana.c Thu Oct 2 01:28:16 2003 @@ -82,7 +82,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c --- a/drivers/net/irda/ali-ircc.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/irda/ali-ircc.c Thu Oct 2 01:28:16 2003 @@ -254,7 +254,7 @@ if ((ali_ircc_setup(info)) == -1) return -1; - dev = alloc_netdev(sizeof(*self), "irda%d", irda_device_setup); + dev = alloc_irdadev(sizeof(*self)); if (dev == NULL) { ERROR("%s(), can't allocate memory for control block!\n", __FUNCTION__); return -ENOMEM; diff -Nru a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c --- a/drivers/net/irda/donauboe.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/irda/donauboe.c Thu Oct 2 01:28:16 2003 @@ -1598,8 +1598,7 @@ if ((err=pci_enable_device(pci_dev))) return err; - dev = alloc_netdev(sizeof (struct toshoboe_cb), "irda%d", - irda_device_setup); + dev = alloc_irdadev(sizeof (struct toshoboe_cb)); if (dev == NULL) { printk (KERN_ERR DRIVER_NAME ": can't allocate memory for " diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/irda/irda-usb.c Thu Oct 2 01:28:17 2003 @@ -1176,7 +1176,7 @@ memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU); /* Create a network device for us */ - netdev = alloc_netdev(0, "irda%d", irda_device_setup); + netdev = alloc_irdadev(0); if (!netdev) { ERROR("%s(), alloc_net_dev() failed!\n", __FUNCTION__); return -ENOMEM; diff -Nru a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c --- a/drivers/net/irda/irport.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/irda/irport.c Thu Oct 2 01:28:17 2003 @@ -78,7 +78,6 @@ static inline int irport_write(int iobase, int fifo_size, __u8 *buf, int len); static inline void irport_receive(struct irport_cb *self); -static int irport_net_init(struct net_device *dev); static int irport_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static inline int irport_is_receiving(struct irport_cb *self); @@ -136,30 +135,27 @@ { struct net_device *dev; struct irport_cb *self; - void *ret; - int err; IRDA_DEBUG(1, "%s()\n", __FUNCTION__); /* Lock the port that we need */ - ret = request_region(iobase, IO_EXTENT, driver_name); - if (!ret) { + if (!request_region(iobase, IO_EXTENT, driver_name)) { IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n", __FUNCTION__, iobase); - return NULL; + goto err_out1; } /* * Allocate new instance of the driver */ - self = kmalloc(sizeof(struct irport_cb), GFP_KERNEL); - if (!self) { + dev = alloc_irdadev(sizeof(struct irport_cb)); + if (!dev) { ERROR("%s(), can't allocate memory for " - "control block!\n", __FUNCTION__); - release_region(iobase, IO_EXTENT); - return NULL; + "irda device!\n", __FUNCTION__); + goto err_out2; } - memset(self, 0, sizeof(struct irport_cb)); + + self = dev->priv; spin_lock_init(&self->lock); /* Need to store self somewhere */ @@ -189,8 +185,11 @@ self->rx_buff.truesize = IRDA_SKB_MAX_MTU; self->rx_buff.skb = __dev_alloc_skb(self->rx_buff.truesize, GFP_KERNEL); - if (self->rx_buff.skb == NULL) - return NULL; + if (self->rx_buff.skb == NULL) { + ERROR("%s(), can't allocate memory for " + "receive buffer!\n", __FUNCTION__); + goto err_out3; + } skb_reserve(self->rx_buff.skb, 1); self->rx_buff.head = self->rx_buff.skb->data; /* No need to memset the buffer, unless you are really pedantic */ @@ -208,30 +207,23 @@ self->tx_buff.head = (__u8 *) kmalloc(self->tx_buff.truesize, GFP_KERNEL); if (self->tx_buff.head == NULL) { - kfree_skb(self->rx_buff.skb); - self->rx_buff.skb = NULL; - self->rx_buff.head = NULL; - return NULL; + ERROR("%s(), can't allocate memory for " + "transmit buffer!\n", __FUNCTION__); + goto err_out4; } memset(self->tx_buff.head, 0, self->tx_buff.truesize); } self->tx_buff.data = self->tx_buff.head; - if (!(dev = dev_alloc("irda%d", &err))) { - ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__); - return NULL; - } self->netdev = dev; /* Keep track of module usage */ SET_MODULE_OWNER(dev); /* May be overridden by piggyback drivers */ - dev->priv = (void *) self; self->interrupt = irport_interrupt; self->change_speed = irport_change_speed; /* Override the network functions we need to use */ - dev->init = irport_net_init; dev->hard_start_xmit = irport_hard_xmit; dev->tx_timeout = irport_timeout; dev->watchdog_timeo = HZ; /* Allow time enough for speed change */ @@ -244,17 +236,25 @@ dev->base_addr = iobase; dev->irq = irq; - rtnl_lock(); - err = register_netdevice(dev); - rtnl_unlock(); - if (err) { + if (register_netdev(dev)) { ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); - return NULL; + goto err_out5; } MESSAGE("IrDA: Registered device %s (irport io=0x%X irq=%d)\n", dev->name, iobase, irq); return self; + err_out5: + kfree(self->tx_buff.head); + err_out4: + kfree_skb(self->rx_buff.skb); + err_out3: + free_netdev(dev); + dev_self[i] = NULL; + err_out2: + release_region(iobase, IO_EXTENT); + err_out1: + return NULL; } int irport_close(struct irport_cb *self) @@ -267,8 +267,7 @@ self->dongle = NULL; /* Remove netdevice */ - if (self->netdev) - unregister_netdev(self->netdev); + unregister_netdev(self->netdev); /* Release the IO-port that this driver is using */ IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n", @@ -284,7 +283,7 @@ /* Remove ourselves */ dev_self[self->index] = NULL; - kfree(self); + free_netdev(self->netdev); return 0; } @@ -884,16 +883,6 @@ spin_unlock(&self->lock); return IRQ_RETVAL(handled); -} - -static int irport_net_init(struct net_device *dev) -{ - /* Set up to be a normal IrDA network device driver */ - irda_device_setup(dev); - - /* Insert overrides below this line! */ - - return 0; } /* diff -Nru a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c --- a/drivers/net/irda/nsc-ircc.c Thu Oct 2 01:28:15 2003 +++ b/drivers/net/irda/nsc-ircc.c Thu Oct 2 01:28:15 2003 @@ -260,8 +260,7 @@ MESSAGE("%s, driver loaded (Dag Brattli)\n", driver_name); - dev = alloc_netdev(sizeof(struct nsc_ircc_cb), "irda%d", - irda_device_setup); + dev = alloc_irdadev(sizeof(struct nsc_ircc_cb)); if (dev == NULL) { ERROR("%s(), can't allocate memory for " "control block!\n", __FUNCTION__); diff -Nru a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c --- a/drivers/net/irda/sir_dev.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/irda/sir_dev.c Thu Oct 2 01:28:17 2003 @@ -538,28 +538,6 @@ /* ----------------------------------------------------------------------------- */ -static int sirdev_init(struct net_device *ndev) -{ - struct sir_dev *dev = ndev->priv; - - SET_MODULE_OWNER(ndev); - - /* Set up to be a normal IrDA network device driver */ - irda_device_setup(ndev); - - dev->flags = IFF_SIR | IFF_PIO; - - /* Override the network functions we need to use */ - ndev->hard_start_xmit = sirdev_hard_xmit; - ndev->open = sirdev_open; - ndev->stop = sirdev_close; - ndev->get_stats = sirdev_get_stats; - ndev->do_ioctl = sirdev_ioctl; - - return 0; -} - - struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name) { struct net_device *ndev; @@ -577,12 +555,12 @@ /* * Allocate new instance of the device */ - dev = kmalloc(sizeof(*dev), GFP_KERNEL); - if (dev == NULL) { + ndev = alloc_irdadev(sizeof(*dev)); + if (ndev == NULL) { ERROR("%s - Can't allocate memory for IrDA control block!\n", __FUNCTION__); goto out; } - memset(dev, 0, sizeof(*dev)); + dev = ndev->priv; irda_init_max_qos_capabilies(&dev->qos); dev->qos.baud_rate.bits = IR_9600|IR_19200|IR_38400|IR_57600|IR_115200; @@ -591,11 +569,6 @@ strncpy(dev->hwname, name, sizeof(dev->hwname)-1); - ndev = kmalloc(sizeof(*ndev), GFP_KERNEL); - if (ndev == NULL) - goto out_freedev; - memset(ndev, 0, sizeof(*ndev)); - atomic_set(&dev->enable_rx, 0); dev->tx_skb = NULL; @@ -609,10 +582,17 @@ dev->drv = drv; dev->netdev = ndev; - ndev->priv = (void *) dev; - ndev->init = sirdev_init; + SET_MODULE_OWNER(ndev); + + dev->flags = IFF_SIR | IFF_PIO; + + /* Override the network functions we need to use */ + ndev->hard_start_xmit = sirdev_hard_xmit; + ndev->open = sirdev_open; + ndev->stop = sirdev_close; + ndev->get_stats = sirdev_get_stats; + ndev->do_ioctl = sirdev_ioctl; - strcpy(ndev->name, "irda%d"); if (register_netdev(ndev)) { ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); goto out_freenetdev; @@ -621,9 +601,7 @@ return dev; out_freenetdev: - kfree(ndev); -out_freedev: - kfree(dev); + free_netdev(ndev); out: return NULL; } @@ -653,10 +631,9 @@ up(&dev->fsm.sem); /* Remove netdevice */ - if (dev->netdev) - unregister_netdev(dev->netdev); + unregister_netdev(dev->netdev); - kfree(dev); + free_netdev(dev->netdev); return 0; } diff -Nru a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c --- a/drivers/net/irda/smsc-ircc2.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/irda/smsc-ircc2.c Thu Oct 2 01:28:17 2003 @@ -140,10 +140,8 @@ static int smsc_ircc_open(unsigned int firbase, unsigned int sirbase, u8 dma, u8 irq); static int smsc_ircc_present(unsigned int fir_base, unsigned int sir_base); -static int smsc_ircc_setup_io(struct smsc_ircc_cb *self, unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq); -static int smsc_ircc_setup_buffers(struct smsc_ircc_cb *self); +static void smsc_ircc_setup_io(struct smsc_ircc_cb *self, unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq); static void smsc_ircc_setup_qos(struct smsc_ircc_cb *self); -static int smsc_ircc_setup_netdev(struct smsc_ircc_cb *self); static void smsc_ircc_init_chip(struct smsc_ircc_cb *self); static int __exit smsc_ircc_close(struct smsc_ircc_cb *self); static int smsc_ircc_dma_receive(struct smsc_ircc_cb *self, int iobase); @@ -163,7 +161,6 @@ #endif static void smsc_ircc_sir_write_wakeup(struct smsc_ircc_cb *self); static int smsc_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len); -static int smsc_ircc_net_init(struct net_device *dev); static int smsc_ircc_net_open(struct net_device *dev); static int smsc_ircc_net_close(struct net_device *dev); static int smsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); @@ -366,38 +363,81 @@ static int __init smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq) { struct smsc_ircc_cb *self; + struct net_device *dev; int err; IRDA_DEBUG(1, "%s\n", __FUNCTION__); - err= smsc_ircc_present(fir_base, sir_base); - if(err) return -ENODEV; + err = smsc_ircc_present(fir_base, sir_base); + if(err) + goto err_out; - if (dev_count>DIM(dev_self)) { + err = -ENOMEM; + if (dev_count > DIM(dev_self)) { WARNING("%s(), too many devices!\n", __FUNCTION__); - return -ENOMEM; + goto err_out1; } /* * Allocate new instance of the driver */ - self = kmalloc(sizeof(struct smsc_ircc_cb), GFP_KERNEL); - if (self == NULL) { - ERROR("%s, Can't allocate memory for control block!\n", - driver_name); - return -ENOMEM; + dev = alloc_irdadev(sizeof(struct smsc_ircc_cb)); + if (!dev) { + WARNING("%s() can't allocate net device\n", __FUNCTION__); + goto err_out1; } - memset(self, 0, sizeof(struct smsc_ircc_cb)); + + SET_MODULE_OWNER(dev); + + dev->hard_start_xmit = smsc_ircc_hard_xmit_sir; +#if SMSC_IRCC2_C_NET_TIMEOUT + dev->tx_timeout = smsc_ircc_timeout; + dev->watchdog_timeo = HZ*2; /* Allow enough time for speed change */ +#endif + dev->open = smsc_ircc_net_open; + dev->stop = smsc_ircc_net_close; + dev->do_ioctl = smsc_ircc_net_ioctl; + dev->get_stats = smsc_ircc_net_get_stats; + + self = dev->priv; + self->netdev = dev; + + /* Make ifconfig display some details */ + dev->base_addr = self->io.fir_base = fir_base; + dev->irq = self->io.irq = irq; /* Need to store self somewhere */ dev_self[dev_count++] = self; spin_lock_init(&self->lock); - err = smsc_ircc_setup_buffers(self); - if(err) return err; + self->rx_buff.truesize = SMSC_IRCC2_RX_BUFF_TRUESIZE; + self->tx_buff.truesize = SMSC_IRCC2_TX_BUFF_TRUESIZE; + + self->rx_buff.head = (u8 *) kmalloc(self->rx_buff.truesize, + GFP_KERNEL|GFP_DMA); + if (self->rx_buff.head == NULL) { + ERROR("%s, Can't allocate memory for receive buffer!\n", + driver_name); + goto err_out2; + } + + self->tx_buff.head = (u8 *) kmalloc(self->tx_buff.truesize, + GFP_KERNEL|GFP_DMA); + if (self->tx_buff.head == NULL) { + ERROR("%s, Can't allocate memory for transmit buffer!\n", + driver_name); + goto err_out3; + } + + memset(self->rx_buff.head, 0, self->rx_buff.truesize); + memset(self->tx_buff.head, 0, self->tx_buff.truesize); + + self->rx_buff.in_frame = FALSE; + self->rx_buff.state = OUTSIDE_FRAME; + self->tx_buff.data = self->tx_buff.head; + self->rx_buff.data = self->rx_buff.head; - err= smsc_ircc_setup_io(self, fir_base, sir_base, dma, irq); - if(err) return err; + smsc_ircc_setup_io(self, fir_base, sir_base, dma, irq); smsc_ircc_setup_qos(self); @@ -405,17 +445,38 @@ smsc_ircc_init_chip(self); - if(ircc_transceiver > 0 && ircc_transceiver < SMSC_IRCC2_C_NUMBER_OF_TRANSCEIVERS) self->transceiver = ircc_transceiver; - else smsc_ircc_probe_transceiver(self); + if(ircc_transceiver > 0 && + ircc_transceiver < SMSC_IRCC2_C_NUMBER_OF_TRANSCEIVERS) + self->transceiver = ircc_transceiver; + else + smsc_ircc_probe_transceiver(self); - err = smsc_ircc_setup_netdev(self); - if(err) return err; + err = register_netdev(self->netdev); + if(err) { + ERROR("%s, Network device registration failed!\n", + driver_name); + goto err_out4; + } self->pmdev = pm_register(PM_SYS_DEV, PM_SYS_IRDA, smsc_ircc_pmproc); if (self->pmdev) self->pmdev->data = self; + MESSAGE("IrDA: Registered device %s\n", dev->name); + return 0; + err_out4: + kfree(self->tx_buff.head); + err_out3: + kfree(self->rx_buff.head); + err_out2: + free_netdev(self->netdev); + dev_self[--dev_count] = NULL; + err_out1: + release_region(fir_base, SMSC_IRCC2_FIR_CHIP_IO_EXTENT); + release_region(sir_base, SMSC_IRCC2_SIR_CHIP_IO_EXTENT); + err_out: + return err; } /* @@ -428,18 +489,19 @@ { unsigned char low, high, chip, config, dma, irq, version; - if (check_region(fir_base, SMSC_IRCC2_FIR_CHIP_IO_EXTENT) < 0) { + if (!request_region(fir_base, SMSC_IRCC2_FIR_CHIP_IO_EXTENT, + driver_name)) { WARNING("%s: can't get fir_base of 0x%03x\n", __FUNCTION__, fir_base); - return -ENODEV; + goto out1; } -#if POSSIBLE_USED_BY_SERIAL_DRIVER - if (check_region(sir_base, SMSC_IRCC2_SIR_CHIP_IO_EXTENT) < 0) { + + if (!request_region(sir_base, SMSC_IRCC2_SIR_CHIP_IO_EXTENT, + driver_name)) { WARNING("%s: can't get sir_base of 0x%03x\n", __FUNCTION__, sir_base); - return -ENODEV; + goto out2; } -#endif register_bank(fir_base, 3); @@ -454,54 +516,19 @@ if (high != 0x10 || low != 0xb8 || (chip != 0xf1 && chip != 0xf2)) { WARNING("%s(), addr 0x%04x - no device found!\n", __FUNCTION__, fir_base); - return -ENODEV; + goto out3; } MESSAGE("SMsC IrDA Controller found\n IrCC version %d.%d, " "firport 0x%03x, sirport 0x%03x dma=%d, irq=%d\n", chip & 0x0f, version, fir_base, sir_base, dma, irq); return 0; -} - -/* - * Function smsc_ircc_setup_buffers(self) - * - * Setup RX/TX buffers - * - */ -static int smsc_ircc_setup_buffers(struct smsc_ircc_cb *self) -{ - self->rx_buff.truesize = SMSC_IRCC2_RX_BUFF_TRUESIZE; - self->tx_buff.truesize = SMSC_IRCC2_TX_BUFF_TRUESIZE; - - self->rx_buff.head = (u8 *) kmalloc(self->rx_buff.truesize, - GFP_KERNEL|GFP_DMA); - if (self->rx_buff.head == NULL) { - ERROR("%s, Can't allocate memory for receive buffer!\n", - driver_name); - kfree(self); - return -ENOMEM; - } - - self->tx_buff.head = (u8 *) kmalloc(self->tx_buff.truesize, - GFP_KERNEL|GFP_DMA); - if (self->tx_buff.head == NULL) { - ERROR("%s, Can't allocate memory for transmit buffer!\n", - driver_name); - kfree(self->rx_buff.head); - kfree(self); - return -ENOMEM; - } - - memset(self->rx_buff.head, 0, self->rx_buff.truesize); - memset(self->tx_buff.head, 0, self->tx_buff.truesize); - - self->rx_buff.in_frame = FALSE; - self->rx_buff.state = OUTSIDE_FRAME; - self->tx_buff.data = self->tx_buff.head; - self->rx_buff.data = self->rx_buff.head; - - return 0; + out3: + release_region(fir_base, SMSC_IRCC2_FIR_CHIP_IO_EXTENT); + out2: + release_region(fir_base, SMSC_IRCC2_FIR_CHIP_IO_EXTENT); + out1: + return -ENODEV; } /* @@ -510,10 +537,11 @@ * Setup I/O * */ -static int smsc_ircc_setup_io(struct smsc_ircc_cb *self, unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq) +static void smsc_ircc_setup_io(struct smsc_ircc_cb *self, + unsigned int fir_base, unsigned int sir_base, + u8 dma, u8 irq) { unsigned char config, chip_dma, chip_irq; - void *ret; register_bank(fir_base, 3); config = inb(fir_base+IRCC_INTERFACE); @@ -545,27 +573,6 @@ else self->io.dma = chip_dma; - ret = request_region(self->io.fir_base, self->io.fir_ext, driver_name); - if (!ret) { - WARNING("%s(), can't get iobase of 0x%03x\n", - __FUNCTION__, self->io.fir_base); - kfree(self->tx_buff.head); - kfree(self->rx_buff.head); - kfree(self); - return -ENODEV; - } - ret = request_region(self->io.sir_base, self->io.sir_ext, driver_name); - if (!ret) { - WARNING("%s(), can't get iobase of 0x%03x\n", - __FUNCTION__, self->io.sir_base); - release_region(self->io.fir_base, self->io.fir_ext); - kfree(self->tx_buff.head); - kfree(self->rx_buff.head); - kfree(self); - return -ENODEV; - } - - return 0; } /* @@ -635,59 +642,6 @@ } /* - * Function smsc_ircc_setup_netdev(self) - * - * Alloc and setup network device - * - */ -static int smsc_ircc_setup_netdev(struct smsc_ircc_cb *self) -{ - struct net_device *dev; - int err; - /* Alloc netdev */ - - if (!(dev = dev_alloc("irda%d", &err))) { - ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__); - kfree(self->tx_buff.head); - kfree(self->rx_buff.head); - kfree(self); - return -ENOMEM; - } - - dev->priv = (void *) self; - self->netdev = dev; - - dev->init = smsc_ircc_net_init; - dev->hard_start_xmit = smsc_ircc_hard_xmit_sir; - #if SMSC_IRCC2_C_NET_TIMEOUT - dev->tx_timeout = smsc_ircc_timeout; - dev->watchdog_timeo = HZ*2; /* Allow enough time for speed change */ - #endif - dev->open = smsc_ircc_net_open; - dev->stop = smsc_ircc_net_close; - dev->do_ioctl = smsc_ircc_net_ioctl; - dev->get_stats = smsc_ircc_net_get_stats; - - /* Make ifconfig display some details */ - dev->base_addr = self->io.fir_base; - dev->irq = self->io.irq; - - rtnl_lock(); - err = register_netdevice(dev); - rtnl_unlock(); - if (err) { - ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); - kfree(self->tx_buff.head); - kfree(self->rx_buff.head); - kfree(self); - return -ENODEV; - } - MESSAGE("IrDA: Registered device %s\n", dev->name); - - return 0; -} - -/* * Function smsc_ircc_net_ioctl (dev, rq, cmd) * * Process IOCTL commands for this device @@ -1571,18 +1525,6 @@ } #endif /* unused */ -static int smsc_ircc_net_init(struct net_device *dev) -{ - /* Keep track of module usage */ - SET_MODULE_OWNER(dev); - - /* Set up to be a normal IrDA network device driver */ - irda_device_setup(dev); - - /* Insert overrides below this line! */ - - return 0; -} /* * Function smsc_ircc_net_open (dev) @@ -1745,11 +1687,7 @@ pm_unregister(self->pmdev); /* Remove netdevice */ - if (self->netdev) { - rtnl_lock(); - unregister_netdevice(self->netdev); - rtnl_unlock(); - } + unregister_netdev(self->netdev); /* Make sure the irq handler is not exectuting */ spin_lock_irqsave(&self->lock, flags); @@ -1784,7 +1722,7 @@ if (self->rx_buff.head) kfree(self->rx_buff.head); - kfree(self); + free_netdev(self->netdev); return 0; } @@ -2269,32 +2207,36 @@ static int __init smsc_superio_fdc(unsigned short cfg_base) { - if (check_region(cfg_base, 2) < 0) { + int ret = -1; + + if (!request_region(cfg_base, 2, driver_name)) { WARNING("%s: can't get cfg_base of 0x%03x\n", __FUNCTION__, cfg_base); - return -1; - } + } else { + if (!smsc_superio_flat(fdc_chips_flat,cfg_base,"FDC") + ||!smsc_superio_paged(fdc_chips_paged,cfg_base,"FDC")) + ret = 0; - if (!smsc_superio_flat(fdc_chips_flat,cfg_base,"FDC")||!smsc_superio_paged(fdc_chips_paged,cfg_base,"FDC")) - return 0; + release_region(cfg_base, 2); + } - return -1; + return ret; } static int __init smsc_superio_lpc(unsigned short cfg_base) { -#if 0 - if (check_region(cfg_base, 2) < 0) { - IRDA_DEBUG(0, __FUNCTION__ ": can't get cfg_base of 0x%03x\n", - cfg_base); - return -1; - } -#endif - - if (!smsc_superio_flat(lpc_chips_flat,cfg_base,"LPC")||!smsc_superio_paged(lpc_chips_paged,cfg_base,"LPC")) - return 0; + int ret = -1; - return -1; + if (!request_region(cfg_base, 2, driver_name)) { + WARNING("%s: can't get cfg_base of 0x%03x\n", + __FUNCTION__, cfg_base); + } else { + if (!smsc_superio_flat(lpc_chips_flat,cfg_base,"LPC") + ||!smsc_superio_paged(lpc_chips_paged,cfg_base,"LPC")) + ret = 0; + release_region(cfg_base, 2); + } + return ret; } /************************************************ diff -Nru a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c --- a/drivers/net/irda/via-ircc.c Thu Oct 2 01:28:15 2003 +++ b/drivers/net/irda/via-ircc.c Thu Oct 2 01:28:15 2003 @@ -335,8 +335,7 @@ return -1; /* Allocate new instance of the driver */ - dev = alloc_netdev(sizeof(struct via_ircc_cb), "irda%d", - irda_device_setup); + dev = alloc_irdadev(sizeof(struct via_ircc_cb)); if (dev == NULL) return -ENOMEM; diff -Nru a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c --- a/drivers/net/irda/vlsi_ir.c Thu Oct 2 01:28:15 2003 +++ b/drivers/net/irda/vlsi_ir.c Thu Oct 2 01:28:15 2003 @@ -1859,15 +1859,6 @@ * otherwise we might get cheated by pci-pm. */ -static int vlsi_irda_save_state(struct pci_dev *pdev, u32 state) -{ - if (state < 1 || state > 3 ) { - ERROR("%s - %s: invalid pm state request: %u\n", - __FUNCTION__, PCIDEV_NAME(pdev), state); - return -1; - } - return 0; -} static int vlsi_irda_suspend(struct pci_dev *pdev, u32 state) { @@ -1970,7 +1961,6 @@ .probe = vlsi_irda_probe, .remove = __devexit_p(vlsi_irda_remove), #ifdef CONFIG_PM - .save_state = vlsi_irda_save_state, .suspend = vlsi_irda_suspend, .resume = vlsi_irda_resume, #endif diff -Nru a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c --- a/drivers/net/irda/w83977af_ir.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/irda/w83977af_ir.c Thu Oct 2 01:28:16 2003 @@ -170,8 +170,7 @@ /* * Allocate new instance of the driver */ - dev = alloc_netdev(sizeof(struct w83977af_ir), "irda%d", - irda_device_setup); + dev = alloc_irdadev(sizeof(struct w83977af_ir)); if (dev == NULL) { printk( KERN_ERR "IrDA: Can't allocate memory for " "IrDA control block!\n"); diff -Nru a/drivers/net/loopback.c b/drivers/net/loopback.c --- a/drivers/net/loopback.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/loopback.c Thu Oct 2 01:28:16 2003 @@ -30,6 +30,7 @@ */ #include #include +#include #include #include #include @@ -202,3 +203,5 @@ return register_netdev(&loopback_dev); }; + +EXPORT_SYMBOL(loopback_dev); diff -Nru a/drivers/net/mac8390.c b/drivers/net/mac8390.c --- a/drivers/net/mac8390.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/mac8390.c Thu Oct 2 01:28:17 2003 @@ -442,14 +442,14 @@ ei_status.tx_start_page = CABLETRON_TX_START_PG; ei_status.rx_start_page = CABLETRON_RX_START_PG; ei_status.stop_page = CABLETRON_RX_STOP_PG; - dev->rmem_start = dev->mem_start; - dev->rmem_end = dev->mem_start + CABLETRON_RX_STOP_PG*256; + ei_status.rmem_start = dev->mem_start; + ei_status.rmem_end = dev->mem_start + CABLETRON_RX_STOP_PG*256; } else { ei_status.tx_start_page = WD_START_PG; ei_status.rx_start_page = WD_START_PG + TX_PAGES; ei_status.stop_page = (dev->mem_end - dev->mem_start)/256; - dev->rmem_start = dev->mem_start + TX_PAGES*256; - dev->rmem_end = dev->mem_end; + ei_status.rmem_start = dev->mem_start + TX_PAGES*256; + ei_status.rmem_end = dev->mem_end; } /* Fill in model-specific information and functions */ @@ -621,12 +621,12 @@ unsigned long xfer_base = ring_offset - (WD_START_PG<<8); unsigned long xfer_start = xfer_base + dev->mem_start; - if (xfer_start + count > dev->rmem_end) { + if (xfer_start + count > ei_status.rmem_end) { /* We must wrap the input move. */ - int semi_count = dev->rmem_end - xfer_start; + int semi_count = ei_status.rmem_end - xfer_start; memcpy_fromio(skb->data, (char *)dev->mem_start + xfer_base, semi_count); count -= semi_count; - memcpy_toio(skb->data + semi_count, (char *)dev->rmem_start, count); + memcpy_toio(skb->data + semi_count, (char *)ei_status.rmem_start, count); } else { memcpy_fromio(skb->data, (char *)dev->mem_start + xfer_base, count); } @@ -657,15 +657,16 @@ /* Note the offset math is done in card memory space which is word per long onto our space. */ - - if (xfer_start + count > dev->rmem_end) + + if (xfer_start + count > ei_status.rmem_end) { /* We must wrap the input move. */ - int semi_count = dev->rmem_end - xfer_start; + int semi_count = ei_status.rmem_end - xfer_start; dayna_memcpy_fromcard(dev, skb->data, xfer_base, semi_count); count -= semi_count; - dayna_memcpy_fromcard(dev, skb->data + semi_count, - dev->rmem_start - dev->mem_start, count); + dayna_memcpy_fromcard(dev, skb->data + semi_count, + ei_status.rmem_start - dev->mem_start, + count); } else { @@ -697,15 +698,15 @@ unsigned long xfer_base = ring_offset - (WD_START_PG<<8); unsigned long xfer_start = xfer_base+dev->mem_start; - if (xfer_start + count > dev->rmem_end) + if (xfer_start + count > ei_status.rmem_end) { /* We must wrap the input move. */ - int semi_count = dev->rmem_end - xfer_start; + int semi_count = ei_status.rmem_end - xfer_start; word_memcpy_fromcard(skb->data, (char *)dev->mem_start + xfer_base, semi_count); count -= semi_count; word_memcpy_fromcard(skb->data + semi_count, - (char *)dev->rmem_start, count); + (char *)ei_status.rmem_start, count); } else { diff -Nru a/drivers/net/ne2.c b/drivers/net/ne2.c --- a/drivers/net/ne2.c Thu Oct 2 01:28:18 2003 +++ b/drivers/net/ne2.c Thu Oct 2 01:28:18 2003 @@ -70,7 +70,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/net/ne3210.c b/drivers/net/ne3210.c --- a/drivers/net/ne3210.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/ne3210.c Thu Oct 2 01:28:16 2003 @@ -23,6 +23,7 @@ This driver WILL NOT WORK FOR THE NE3200 - it is completely different and does not use an 8390 at all. + Updated to EISA probing API 5/2003 by Marc Zyngier. */ static const char *version = @@ -44,9 +45,6 @@ #include "8390.h" -int ne3210_probe(struct net_device *dev); -static int ne3210_probe1(struct net_device *dev, int ioaddr); - static int ne3210_open(struct net_device *dev); static int ne3210_close(struct net_device *dev); @@ -59,7 +57,6 @@ #define NE3210_START_PG 0x00 /* First page of TX buffer */ #define NE3210_STOP_PG 0x80 /* Last page +1 of RX ring */ -#define NE3210_ID_PORT 0xc80 /* Same for all EISA cards */ #define NE3210_IO_EXTENT 0x20 #define NE3210_SA_PROM 0x16 /* Start of e'net addr. */ #define NE3210_RESET_PORT 0xc84 @@ -69,10 +66,9 @@ #define NE3210_ADDR1 0x00 #define NE3210_ADDR2 0x1b -#define NE3210_ID 0x0118cc3a /* 0x3acc = 1110 10110 01100 = nvl */ - #define NE3210_CFG1 0xc84 /* NB: 0xc84 is also "reset" port. */ #define NE3210_CFG2 0xc90 +#define NE3210_CFG_EXTENT (NE3210_CFG2 - NE3210_CFG1 + 1) /* * You can OR any of the following bits together and assign it @@ -89,152 +85,108 @@ static unsigned char irq_map[] __initdata = {15, 12, 11, 10, 9, 7, 5, 3}; static unsigned int shmem_map[] __initdata = {0xff0, 0xfe0, 0xfff0, 0xd8, 0xffe0, 0xffc0, 0xd0, 0x0}; +static const char *ifmap[] __initdata = {"UTP", "?", "BNC", "AUI"}; +static int ifmap_val[] __initdata = { + IF_PORT_10BASET, + IF_PORT_UNKNOWN, + IF_PORT_10BASE2, + IF_PORT_AUI, +}; -/* - * Probe for the card. The best way is to read the EISA ID if it - * is known. Then we can check the prefix of the station address - * PROM for a match against the value assigned to Novell. - */ - -int __init ne3210_probe(struct net_device *dev) +static int __init ne3210_eisa_probe (struct device *device) { - unsigned short ioaddr = dev->base_addr; - - SET_MODULE_OWNER(dev); + unsigned long ioaddr, phys_mem; + int i, retval, port_index; + struct eisa_device *edev = to_eisa_device (device); + struct net_device *dev; - if (ioaddr > 0x1ff) /* Check a single specified location. */ - return ne3210_probe1(dev, ioaddr); - else if (ioaddr > 0) /* Don't probe at all. */ - return -ENXIO; - - if (!EISA_bus) { -#if NE3210_DEBUG & NE3210_D_PROBE - printk("ne3210-debug: Not an EISA bus. Not probing high ports.\n"); -#endif - return -ENXIO; + /* Allocate dev->priv and fill in 8390 specific dev fields. */ + if (!(dev = alloc_ei_netdev ())) { + printk ("ne3210.c: unable to allocate memory for dev!\n"); + return -ENOMEM; } - /* EISA spec allows for up to 16 slots, but 8 is typical. */ - for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) - if (ne3210_probe1(dev, ioaddr) == 0) - return 0; - - return -ENODEV; -} - -static int __init ne3210_probe1(struct net_device *dev, int ioaddr) -{ - int i, retval; - unsigned long eisa_id; - const char *ifmap[] = {"UTP", "?", "BNC", "AUI"}; - - if (!request_region(dev->base_addr, NE3210_IO_EXTENT, dev->name)) - return -EBUSY; + SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, device); + device->driver_data = dev; + ioaddr = edev->base_addr; - if (inb_p(ioaddr + NE3210_ID_PORT) == 0xff) { - retval = -ENODEV; + if (ethdev_init (dev)) { + printk ("ne3210.c: unable to allocate memory for dev->priv!\n"); + retval = -ENOMEM; goto out; } -#if NE3210_DEBUG & NE3210_D_PROBE - printk("ne3210-debug: probe at %#x, ID %#8x\n", ioaddr, inl(ioaddr + NE3210_ID_PORT)); - printk("ne3210-debug: config regs: %#x %#x\n", - inb(ioaddr + NE3210_CFG1), inb(ioaddr + NE3210_CFG2)); -#endif - - -/* Check the EISA ID of the card. */ - eisa_id = inl(ioaddr + NE3210_ID_PORT); - if (eisa_id != NE3210_ID) { - retval = -ENODEV; + if (!request_region(ioaddr, NE3210_IO_EXTENT, dev->name)) { + retval = -EBUSY; goto out; } - -#if 0 -/* Check the vendor ID as well. Not really required. */ - if (inb(ioaddr + NE3210_SA_PROM + 0) != NE3210_ADDR0 - || inb(ioaddr + NE3210_SA_PROM + 1) != NE3210_ADDR1 - || inb(ioaddr + NE3210_SA_PROM + 2) != NE3210_ADDR2 ) { - printk("ne3210.c: card not found"); - for(i = 0; i < ETHER_ADDR_LEN; i++) - printk(" %02x", inb(ioaddr + NE3210_SA_PROM + i)); - printk(" (invalid prefix).\n"); - retval = -ENODEV; - goto out; + if (!request_region(ioaddr + NE3210_CFG1, + NE3210_CFG_EXTENT, dev->name)) { + retval = -EBUSY; + goto out1; } + +#if NE3210_DEBUG & NE3210_D_PROBE + printk("ne3210-debug: probe at %#x, ID %s\n", ioaddr, edev->id.sig); + printk("ne3210-debug: config regs: %#x %#x\n", + inb(ioaddr + NE3210_CFG1), inb(ioaddr + NE3210_CFG2)); #endif - /* Allocate dev->priv and fill in 8390 specific dev fields. */ - if (ethdev_init(dev)) { - printk ("ne3210.c: unable to allocate memory for dev->priv!\n"); - retval = -ENOMEM; - goto out; - } + port_index = inb(ioaddr + NE3210_CFG2) >> 6; printk("ne3210.c: NE3210 in EISA slot %d, media: %s, addr:", - ioaddr/0x1000, ifmap[inb(ioaddr + NE3210_CFG2) >> 6]); + edev->slot, ifmap[port_index]); for(i = 0; i < ETHER_ADDR_LEN; i++) printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i))); - printk(".\nne3210.c: "); + /* Snarf the interrupt now. CFG file has them all listed as `edge' with share=NO */ - if (dev->irq == 0) { - unsigned char irq_reg = inb(ioaddr + NE3210_CFG2) >> 3; - dev->irq = irq_map[irq_reg & 0x07]; - printk("using"); - } else { - /* This is useless unless we reprogram the card here too */ - if (dev->irq == 2) dev->irq = 9; /* Doh! */ - printk("assigning"); - } - printk(" IRQ %d,", dev->irq); + dev->irq = irq_map[(inb(ioaddr + NE3210_CFG2) >> 3) & 0x07]; + printk(".\nne3210.c: using IRQ %d, ", dev->irq); retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev); if (retval) { printk (" unable to get IRQ %d.\n", dev->irq); - goto out1; - } - - if (dev->mem_start == 0) { - unsigned char mem_reg = inb(ioaddr + NE3210_CFG2) & 0x07; - dev->mem_start = shmem_map[mem_reg] * 0x1000; - printk(" using "); - } else { - /* Should check for value in shmem_map and reprogram the card to use it */ - dev->mem_start &= 0xfff8000; - printk(" assigning "); + goto out2; } - printk("%dkB memory at physical address %#lx\n", - NE3210_STOP_PG/4, dev->mem_start); + phys_mem = shmem_map[inb(ioaddr + NE3210_CFG2) & 0x07] * 0x1000; /* BEWARE!! Some dain-bramaged EISA SCUs will allow you to put the card mem within the region covered by `normal' RAM !!! */ - if (dev->mem_start > 1024*1024) { /* phys addr > 1MB */ - if (dev->mem_start < virt_to_phys(high_memory)) { + if (phys_mem > 1024*1024) { /* phys addr > 1MB */ + if (phys_mem < virt_to_phys(high_memory)) { printk(KERN_CRIT "ne3210.c: Card RAM overlaps with normal memory!!!\n"); printk(KERN_CRIT "ne3210.c: Use EISA SCU to set card memory below 1MB,\n"); printk(KERN_CRIT "ne3210.c: or to an address above 0x%lx.\n", virt_to_phys(high_memory)); printk(KERN_CRIT "ne3210.c: Driver NOT installed.\n"); retval = -EINVAL; - goto out2; + goto out3; } - dev->mem_start = (unsigned long)ioremap(dev->mem_start, NE3210_STOP_PG*0x100); - if (dev->mem_start == 0) { - printk(KERN_ERR "ne3210.c: Unable to remap card memory above 1MB !!\n"); - printk(KERN_ERR "ne3210.c: Try using EISA SCU to set memory below 1MB.\n"); - printk(KERN_ERR "ne3210.c: Driver NOT installed.\n"); - retval = -EAGAIN; - goto out2; - } - ei_status.reg0 = 1; /* Use as remap flag */ - printk("ne3210.c: remapped %dkB card memory to virtual address %#lx\n", - NE3210_STOP_PG/4, dev->mem_start); } + + if (!request_mem_region (phys_mem, NE3210_STOP_PG*0x100, dev->name)) { + printk ("ne3210.c: Unable to request shared memory at physical address %#lx\n", + phys_mem); + goto out3; + } + + printk("%dkB memory at physical address %#lx\n", + NE3210_STOP_PG/4, phys_mem); + dev->mem_start = (unsigned long)ioremap(phys_mem, NE3210_STOP_PG*0x100); + if (dev->mem_start == 0) { + printk(KERN_ERR "ne3210.c: Unable to remap card memory !!\n"); + printk(KERN_ERR "ne3210.c: Driver NOT installed.\n"); + retval = -EAGAIN; + goto out4; + } + printk("ne3210.c: remapped %dkB card memory to virtual address %#lx\n", + NE3210_STOP_PG/4, dev->mem_start); dev->mem_end = ei_status.rmem_end = dev->mem_start + (NE3210_STOP_PG - NE3210_START_PG)*256; ei_status.rmem_start = dev->mem_start + TX_PAGES*256; @@ -247,6 +199,7 @@ ei_status.rx_start_page = NE3210_START_PG + TX_PAGES; ei_status.stop_page = NE3210_STOP_PG; ei_status.word16 = 1; + ei_status.priv = phys_mem; if (ei_debug > 0) printk(version); @@ -258,18 +211,46 @@ dev->open = &ne3210_open; dev->stop = &ne3210_close; + dev->if_port = ifmap_val[port_index]; + + if ((retval = register_netdev (dev))) + goto out5; + NS8390_init(dev, 0); return 0; -out2: - free_irq(dev->irq, dev); -out1: - kfree(dev->priv); - dev->priv = NULL; -out: - release_region(ioaddr, NE3210_IO_EXTENT); + + out5: + iounmap((void *)dev->mem_start); + out4: + release_mem_region (phys_mem, NE3210_STOP_PG*0x100); + out3: + free_irq (dev->irq, dev); + out2: + release_region (ioaddr + NE3210_CFG1, NE3210_CFG_EXTENT); + out1: + release_region (ioaddr, NE3210_IO_EXTENT); + out: + free_netdev (dev); + return retval; } +static int __devexit ne3210_eisa_remove (struct device *device) +{ + struct net_device *dev = device->driver_data; + unsigned long ioaddr = to_eisa_device (device)->base_addr; + + unregister_netdev (dev); + iounmap((void *)dev->mem_start); + release_mem_region (ei_status.priv, NE3210_STOP_PG*0x100); + free_irq (dev->irq, dev); + release_region (ioaddr + NE3210_CFG1, NE3210_CFG_EXTENT); + release_region (ioaddr, NE3210_IO_EXTENT); + free_netdev (dev); + + return 0; +} + /* * Reset by toggling the "Board Enable" bits (bit 2 and 0). */ @@ -309,7 +290,7 @@ ne3210_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page) { unsigned long hdr_start = dev->mem_start + ((ring_page - NE3210_START_PG)<<8); - isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr)); + memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr)); hdr->count = (hdr->count + 3) & ~3; /* Round up allocation. */ } @@ -327,12 +308,12 @@ if (xfer_start + count > ei_status.rmem_end) { /* Packet wraps over end of ring buffer. */ int semi_count = ei_status.rmem_end - xfer_start; - isa_memcpy_fromio(skb->data, xfer_start, semi_count); + memcpy_fromio(skb->data, xfer_start, semi_count); count -= semi_count; - isa_memcpy_fromio(skb->data + semi_count, ei_status.rmem_start, count); + memcpy_fromio(skb->data + semi_count, ei_status.rmem_start, count); } else { /* Packet is in one chunk. */ - isa_memcpy_fromio(skb->data, xfer_start, count); + memcpy_fromio(skb->data, xfer_start, count); } } @@ -342,7 +323,7 @@ unsigned long shmem = dev->mem_start + ((start_page - NE3210_START_PG)<<8); count = (count + 3) & ~3; /* Round up to doubleword */ - isa_memcpy_toio(shmem, buf, count); + memcpy_toio(shmem, buf, count); } static int ne3210_open(struct net_device *dev) @@ -361,7 +342,23 @@ return 0; } +static struct eisa_device_id ne3210_ids[] = { + { "EGL0101" }, + { "NVL1801" }, + { "" }, +}; + +static struct eisa_driver ne3210_eisa_driver = { + .id_table = ne3210_ids, + .driver = { + .name = "ne3210", + .probe = ne3210_eisa_probe, + .remove = __devexit_p (ne3210_eisa_remove), + }, +}; + #ifdef MODULE +#if 0 #define MAX_NE3210_CARDS 4 /* Max number of NE3210 cards per module */ static struct net_device dev_ne3210[MAX_NE3210_CARDS]; static int io[MAX_NE3210_CARDS]; @@ -374,50 +371,22 @@ MODULE_PARM_DESC(io, "I/O base address(es)"); MODULE_PARM_DESC(irq, "IRQ number(s)"); MODULE_PARM_DESC(mem, "memory base address(es)"); +#endif +#endif /* MODULE */ + + MODULE_DESCRIPTION("NE3210 EISA Ethernet driver"); MODULE_LICENSE("GPL"); -int init_module(void) +int ne3210_init(void) { - int this_dev, found = 0; - - for (this_dev = 0; this_dev < MAX_NE3210_CARDS; this_dev++) { - struct net_device *dev = &dev_ne3210[this_dev]; - dev->irq = irq[this_dev]; - dev->base_addr = io[this_dev]; - dev->mem_start = mem[this_dev]; - dev->init = ne3210_probe; - /* Default is to only install one card. */ - if (io[this_dev] == 0 && this_dev != 0) break; - if (register_netdev(dev) != 0) { - printk(KERN_WARNING "ne3210.c: No NE3210 card found (i/o = 0x%x).\n", io[this_dev]); - if (found != 0) { /* Got at least one. */ - return 0; - } - return -ENXIO; - } - found++; - } - return 0; + return eisa_driver_register (&ne3210_eisa_driver); } -void cleanup_module(void) +void ne3210_cleanup(void) { - int this_dev; - - for (this_dev = 0; this_dev < MAX_NE3210_CARDS; this_dev++) { - struct net_device *dev = &dev_ne3210[this_dev]; - if (dev->priv != NULL) { - free_irq(dev->irq, dev); - release_region(dev->base_addr, NE3210_IO_EXTENT); - if (ei_status.reg0) - iounmap((void *)dev->mem_start); - unregister_netdev(dev); - kfree(dev->priv); - dev->priv = NULL; - } - } + eisa_driver_unregister (&ne3210_eisa_driver); } -#endif /* MODULE */ - +module_init (ne3210_init); +module_exit (ne3210_cleanup); diff -Nru a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c --- a/drivers/net/sk_mca.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/sk_mca.c Thu Oct 2 01:28:17 2003 @@ -89,7 +89,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c --- a/drivers/net/tokenring/madgemc.c Thu Oct 2 01:28:18 2003 +++ b/drivers/net/tokenring/madgemc.c Thu Oct 2 01:28:18 2003 @@ -20,7 +20,7 @@ static const char version[] = "madgemc.c: v0.91 23/01/2000 by Adam Fritzler\n"; #include -#include +#include #include #include #include diff -Nru a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c --- a/drivers/net/tokenring/smctr.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/tokenring/smctr.c Thu Oct 2 01:28:17 2003 @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru a/drivers/net/wan/comx-hw-munich.c b/drivers/net/wan/comx-hw-munich.c --- a/drivers/net/wan/comx-hw-munich.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/wan/comx-hw-munich.c Thu Oct 2 01:28:16 2003 @@ -1849,7 +1849,7 @@ if (board->isx21) { init_timer(&board->modemline_timer); - board->modemline_timer.data = (unsigned int)board; + board->modemline_timer.data = (unsigned long)board; board->modemline_timer.function = pcicom_modemline; board->modemline_timer.expires = jiffies + HZ; add_timer((struct timer_list *)&board->modemline_timer); diff -Nru a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c --- a/drivers/net/wan/dscc4.c Thu Oct 2 01:28:16 2003 +++ b/drivers/net/wan/dscc4.c Thu Oct 2 01:28:16 2003 @@ -592,6 +592,7 @@ return (i >= 0 ) ? i : -EAGAIN; } +#if 0 static void dscc4_rx_reset(struct dscc4_dev_priv *dpriv, struct net_device *dev) { unsigned long flags; @@ -606,6 +607,9 @@ spin_unlock_irqrestore(&dpriv->pci_priv->lock, flags); } +#endif + +#if 0 static void dscc4_tx_reset(struct dscc4_dev_priv *dpriv, struct net_device *dev) { u16 i = 0; @@ -625,6 +629,7 @@ if (dscc4_do_action(dev, "Rdt") < 0) printk(KERN_ERR "%s: Tx reset failed\n", dev->name); } +#endif /* TODO: (ab)use this function to refill a completely depleted RX ring. */ static inline void dscc4_rx_skb(struct dscc4_dev_priv *dpriv, @@ -1092,7 +1097,6 @@ err_disable_scc_events: scc_writel(0xffffffff, dpriv, dev, IMR); -err_free_ring: scc_patchl(PowerUp | Vis, 0, dpriv, dev, CCR0); dscc4_release_ring(dpriv); err_out: @@ -2006,6 +2010,7 @@ return 0; } +#ifndef MODULE static int __init dscc4_setup(char *str) { int *args[] = { &debug, &quartz, NULL }, **p = args; @@ -2016,6 +2021,7 @@ } __setup("dscc4.setup=", dscc4_setup); +#endif static struct pci_device_id dscc4_pci_tbl[] = { { PCI_VENDOR_ID_SIEMENS, PCI_DEVICE_ID_SIEMENS_DSCC4, diff -Nru a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c --- a/drivers/net/wireless/arlan-main.c Thu Oct 2 01:28:17 2003 +++ b/drivers/net/wireless/arlan-main.c Thu Oct 2 01:28:17 2003 @@ -721,9 +721,9 @@ else { netif_stop_queue (dev); - return -1; IFDEBUG(ARLAN_DEBUG_TX_CHAIN) printk(KERN_ERR "TX TAIL & HEAD full, return, tailStart %d headEnd %d\n", tailStarts, headEnds); + return -1; } priv->out_bytes += length; priv->out_bytes10 += length; @@ -1880,6 +1880,8 @@ } #ifdef MODULE + +static int probe = probeUNKNOWN; static int __init arlan_find_devices(void) { diff -Nru a/drivers/parisc/superio.c b/drivers/parisc/superio.c --- a/drivers/parisc/superio.c Thu Oct 2 01:28:17 2003 +++ b/drivers/parisc/superio.c Thu Oct 2 01:28:17 2003 @@ -530,11 +530,6 @@ static int __init superio_modinit(void) { -#ifdef CONFIG_SERIAL_8250 - extern int serial8250_init(void); - serial8250_init(); -#endif - return pci_module_init(&superio_driver); } @@ -543,5 +538,10 @@ pci_unregister_driver(&superio_driver); } -module_init(superio_modinit); +/* Make late initcall to ensure the serial and tty layers are initialised + * before we start superio. + * + * FIXME: does this break the superio console? + */ +late_initcall(superio_modinit); module_exit(superio_exit); diff -Nru a/drivers/pci/Makefile b/drivers/pci/Makefile --- a/drivers/pci/Makefile Thu Oct 2 01:28:17 2003 +++ b/drivers/pci/Makefile Thu Oct 2 01:28:17 2003 @@ -4,7 +4,6 @@ obj-y += access.o bus.o probe.o remove.o pci.o pool.o quirks.o \ names.o pci-driver.o search.o pci-sysfs.o -obj-$(CONFIG_PM) += power.o obj-$(CONFIG_PROC_FS) += proc.o ifndef CONFIG_SPARC64 diff -Nru a/drivers/pci/hotplug/cpqphp.h b/drivers/pci/hotplug/cpqphp.h --- a/drivers/pci/hotplug/cpqphp.h Thu Oct 2 01:28:17 2003 +++ b/drivers/pci/hotplug/cpqphp.h Thu Oct 2 01:28:17 2003 @@ -766,7 +766,6 @@ set_current_state(TASK_INTERRUPTIBLE); /* Sleep for up to 1 second to wait for the LED to change. */ schedule_timeout(1*HZ); - set_current_state(TASK_RUNNING); remove_wait_queue(&ctrl->queue, &wait); if (signal_pending(current)) retval = -EINTR; diff -Nru a/drivers/pci/hotplug/pci_hotplug.h b/drivers/pci/hotplug/pci_hotplug.h --- a/drivers/pci/hotplug/pci_hotplug.h Thu Oct 2 01:28:16 2003 +++ b/drivers/pci/hotplug/pci_hotplug.h Thu Oct 2 01:28:16 2003 @@ -145,6 +145,7 @@ extern int pci_hp_deregister (struct hotplug_slot *slot); extern int pci_hp_change_slot_info (struct hotplug_slot *slot, struct hotplug_slot_info *info); +extern struct subsystem pci_hotplug_slots_subsys; #endif diff -Nru a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c --- a/drivers/pci/hotplug/pci_hotplug_core.c Thu Oct 2 01:28:17 2003 +++ b/drivers/pci/hotplug/pci_hotplug_core.c Thu Oct 2 01:28:17 2003 @@ -69,7 +69,7 @@ static LIST_HEAD(pci_hotplug_slot_list); -static struct subsystem hotplug_slots_subsys; +struct subsystem pci_hotplug_slots_subsys; static ssize_t hotplug_slot_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) @@ -104,7 +104,7 @@ .release = &hotplug_slot_release, }; -static decl_subsys(hotplug_slots, &hotplug_slot_ktype, NULL); +decl_subsys(pci_hotplug_slots, &hotplug_slot_ktype, NULL); /* these strings match up with the values in pci_bus_speed */ @@ -534,7 +534,7 @@ return -EINVAL; strlcpy(slot->kobj.name, slot->name, KOBJ_NAME_LEN); - kobj_set_kset_s(slot, hotplug_slots_subsys); + kobj_set_kset_s(slot, pci_hotplug_slots_subsys); /* this can fail if we have already registered a slot with the same name */ if (kobject_register(&slot->kobj)) { @@ -629,8 +629,8 @@ { int result; - kset_set_kset_s(&hotplug_slots_subsys, pci_bus_type.subsys); - result = subsystem_register(&hotplug_slots_subsys); + kset_set_kset_s(&pci_hotplug_slots_subsys, pci_bus_type.subsys); + result = subsystem_register(&pci_hotplug_slots_subsys); if (result) { err("Register subsys with error %d\n", result); goto exit; @@ -645,7 +645,7 @@ goto exit; err_subsys: - subsystem_unregister(&hotplug_slots_subsys); + subsystem_unregister(&pci_hotplug_slots_subsys); exit: return result; } @@ -653,7 +653,7 @@ static void __exit pci_hotplug_exit (void) { cpci_hotplug_exit(); - subsystem_unregister(&hotplug_slots_subsys); + subsystem_unregister(&pci_hotplug_slots_subsys); } module_init(pci_hotplug_init); @@ -665,6 +665,7 @@ MODULE_PARM(debug, "i"); MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); +EXPORT_SYMBOL_GPL(pci_hotplug_slots_subsys); EXPORT_SYMBOL_GPL(pci_hp_register); EXPORT_SYMBOL_GPL(pci_hp_deregister); EXPORT_SYMBOL_GPL(pci_hp_change_slot_info); diff -Nru a/drivers/pci/pool.c b/drivers/pci/pool.c --- a/drivers/pci/pool.c Thu Oct 2 01:28:18 2003 +++ b/drivers/pci/pool.c Thu Oct 2 01:28:18 2003 @@ -296,7 +296,6 @@ schedule_timeout (POOL_TIMEOUT_JIFFIES); - current->state = TASK_RUNNING; remove_wait_queue (&pool->waitq, &wait); goto restart; } diff -Nru a/drivers/pci/power.c b/drivers/pci/power.c --- a/drivers/pci/power.c Thu Oct 2 01:28:17 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,159 +0,0 @@ -#include -#include -#include - -/* - * PCI Power management.. - * - * This needs to be done centralized, so that we power manage PCI - * devices in the right order: we should not shut down PCI bridges - * before we've shut down the devices behind them, and we should - * not wake up devices before we've woken up the bridge to the - * device.. Eh? - * - * We do not touch devices that don't have a driver that exports - * a suspend/resume function. That is just too dangerous. If the default - * PCI suspend/resume functions work for a device, the driver can - * easily implement them (ie just have a suspend function that calls - * the pci_set_power_state() function). - */ - -static int pci_pm_save_state_device(struct pci_dev *dev, u32 state) -{ - int error = 0; - if (dev) { - struct pci_driver *driver = dev->driver; - if (driver && driver->save_state) - error = driver->save_state(dev,state); - } - return error; -} - -static int pci_pm_suspend_device(struct pci_dev *dev, u32 state) -{ - int error = 0; - if (dev) { - struct pci_driver *driver = dev->driver; - if (driver && driver->suspend) - error = driver->suspend(dev,state); - } - return error; -} - -static int pci_pm_resume_device(struct pci_dev *dev) -{ - int error = 0; - if (dev) { - struct pci_driver *driver = dev->driver; - if (driver && driver->resume) - error = driver->resume(dev); - } - return error; -} - -static int pci_pm_save_state_bus(struct pci_bus *bus, u32 state) -{ - struct list_head *list; - int error = 0; - - list_for_each(list, &bus->children) { - error = pci_pm_save_state_bus(pci_bus_b(list),state); - if (error) return error; - } - list_for_each(list, &bus->devices) { - error = pci_pm_save_state_device(pci_dev_b(list),state); - if (error) return error; - } - return 0; -} - -static int pci_pm_suspend_bus(struct pci_bus *bus, u32 state) -{ - struct list_head *list; - - /* Walk the bus children list */ - list_for_each(list, &bus->children) - pci_pm_suspend_bus(pci_bus_b(list),state); - - /* Walk the device children list */ - list_for_each(list, &bus->devices) - pci_pm_suspend_device(pci_dev_b(list),state); - return 0; -} - -static int pci_pm_resume_bus(struct pci_bus *bus) -{ - struct list_head *list; - - /* Walk the device children list */ - list_for_each(list, &bus->devices) - pci_pm_resume_device(pci_dev_b(list)); - - /* And then walk the bus children */ - list_for_each(list, &bus->children) - pci_pm_resume_bus(pci_bus_b(list)); - return 0; -} - -static int pci_pm_save_state(u32 state) -{ - struct pci_bus *bus = NULL; - int error = 0; - - while ((bus = pci_find_next_bus(bus)) != NULL) { - error = pci_pm_save_state_bus(bus,state); - if (!error) - error = pci_pm_save_state_device(bus->self,state); - } - return error; -} - -static int pci_pm_suspend(u32 state) -{ - struct pci_bus *bus = NULL; - - while ((bus = pci_find_next_bus(bus)) != NULL) { - pci_pm_suspend_bus(bus,state); - pci_pm_suspend_device(bus->self,state); - } - return 0; -} - -static int pci_pm_resume(void) -{ - struct pci_bus *bus = NULL; - - while ((bus = pci_find_next_bus(bus)) != NULL) { - pci_pm_resume_device(bus->self); - pci_pm_resume_bus(bus); - } - return 0; -} - -static int -pci_pm_callback(struct pm_dev *pm_device, pm_request_t rqst, void *data) -{ - int error = 0; - - switch (rqst) { - case PM_SAVE_STATE: - error = pci_pm_save_state((unsigned long)data); - break; - case PM_SUSPEND: - error = pci_pm_suspend((unsigned long)data); - break; - case PM_RESUME: - error = pci_pm_resume(); - break; - default: break; - } - return error; -} - -static int __init pci_pm_init(void) -{ - pm_register(PM_PCI_DEV, 0, pci_pm_callback); - return 0; -} - -subsys_initcall(pci_pm_init); diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c Thu Oct 2 01:28:15 2003 +++ b/drivers/pci/quirks.c Thu Oct 2 01:28:15 2003 @@ -750,6 +750,9 @@ /* * The main table of quirks. + * + * Note: any hooks for hotpluggable devices in this table must _NOT_ + * be declared __init. */ static struct pci_fixup pci_fixups[] __devinitdata = { diff -Nru a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c --- a/drivers/sbus/char/jsflash.c Thu Oct 2 01:28:16 2003 +++ b/drivers/sbus/char/jsflash.c Thu Oct 2 01:28:16 2003 @@ -37,6 +37,7 @@ #include #include #include +#include #define MAJOR_NR JSFD_MAJOR @@ -187,7 +188,7 @@ static void jsfd_do_request(request_queue_t *q) { struct request *req; - + while ((req = elv_next_request(q)) != NULL) { struct jsfd_part *jdp = req->rq_disk->private_data; unsigned long offset = req->sector << 9; @@ -198,16 +199,11 @@ continue; } - if (req->cmd == WRITE) { + if (rq_data_dir(req) != READ) { printk(KERN_ERR "jsfd: write\n"); end_request(req, 0); continue; } - if (req->cmd != READ) { - printk(KERN_ERR "jsfd: bad req->cmd %d\n", req->cmd); - end_request(req, 0); - continue; - } if ((jdp->dbase & 0xff000000) != 0x20000000) { printk(KERN_ERR "jsfd: bad base %x\n", (int)jdp->dbase); @@ -215,7 +211,6 @@ continue; } -/* printk("%s: read buf %p off %x len %x\n", req->rq_disk->disk_name, req->buffer, (int)offset, (int)len); */ /* P3 */ jsfd_read(req->buffer, jdp->dbase + offset, len); end_request(req, 1); @@ -265,9 +260,6 @@ unsigned int n; } b; - if (verify_area(VERIFY_WRITE, buf, togo)) - return -EFAULT; - if (p < JSF_BASE_ALL || p >= JSF_BASE_TOP) { return 0; } @@ -298,7 +290,8 @@ while (togo >= 4) { togo -= 4; b.n = jsf_inl(p); - copy_to_user(tmp, b.s, 4); + if (copy_to_user(tmp, b.s, 4)) + return -EFAULT; tmp += 4; p += 4; } @@ -374,19 +367,17 @@ char s[4]; } b; - if (verify_area(VERIFY_READ, (void *)arg, JSFPRGSZ)) + if (copy_from_user(&abuf, (char *)arg, JSFPRGSZ)) return -EFAULT; - copy_from_user(&abuf, (char *)arg, JSFPRGSZ); p = abuf.off; togo = abuf.size; if ((togo & 3) || (p & 3)) return -EINVAL; uptr = (char *) (unsigned long) abuf.data; - if (verify_area(VERIFY_READ, uptr, togo)) - return -EFAULT; while (togo != 0) { togo -= 4; - copy_from_user(&b.s[0], uptr, 4); + if (copy_from_user(&b.s[0], uptr, 4)) + return -EFAULT; jsf_write4(p, b.n); p += 4; uptr += 4; @@ -404,10 +395,8 @@ return -EPERM; switch (cmd) { case JSFLASH_IDENT: - if (verify_area(VERIFY_WRITE, (void *)arg, JSFIDSZ)) - return -EFAULT; - copy_to_user(arg, &jsf0.id, JSFIDSZ); - error = 0; + if (copy_to_user((void *)arg, &jsf0.id, JSFIDSZ)) + return -EFAULT; break; case JSFLASH_ERASE: error = jsf_ioctl_erase(arg); diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig Thu Oct 2 01:28:17 2003 +++ b/drivers/scsi/Kconfig Thu Oct 2 01:28:17 2003 @@ -1148,16 +1148,6 @@ To compile this driver as a module, choose M here: the module will be called qla1280. -config SCSI_QLOGIC_1280_PIO - bool "Use PIO instead of MMIO" if !X86_VISWS - depends on SCSI_QLOGIC_1280 - default y if X86_VISWS - help - This instructs the driver to use programmed I/O ports (PIO) instead - of PCI shared memory (MMIO). This can possibly solve some problems - in case your mainboard has memory consistency issues. If unsure, - say N. - config SCSI_QLOGICPTI tristate "PTI Qlogic, ISP Driver" depends on SBUS && SCSI @@ -1435,7 +1425,7 @@ config A4000T_SCSI bool "A4000T SCSI support (EXPERIMENTAL)" - depends on AMIGA && SCSI && EXPERIMENTAL + depends on AMIGA && SCSI && EXPERIMENTAL && BROKEN help Support for the NCR53C710 SCSI controller on the Amiga 4000T. @@ -1503,7 +1493,7 @@ config A4091_SCSI bool "A4091 SCSI support (EXPERIMENTAL)" - depends on ZORRO && SCSI && EXPERIMENTAL + depends on ZORRO && SCSI && EXPERIMENTAL && BROKEN help Support for the NCR53C710 chip on the Amiga 4091 Z3 SCSI2 controller (1993). Very obscure -- the 4091 was part of an Amiga 4000 upgrade @@ -1511,7 +1501,7 @@ config WARPENGINE_SCSI bool "WarpEngine SCSI support (EXPERIMENTAL)" - depends on ZORRO && SCSI && EXPERIMENTAL + depends on ZORRO && SCSI && EXPERIMENTAL && BROKEN help Support for MacroSystem Development's WarpEngine Amiga SCSI-2 controller. Info at @@ -1519,7 +1509,7 @@ config BLZ603EPLUS_SCSI bool "Blizzard PowerUP 603e+ SCSI (EXPERIMENTAL)" - depends on ZORRO && SCSI && EXPERIMENTAL + depends on ZORRO && SCSI && EXPERIMENTAL && BROKEN help If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+ accelerator, say Y. Otherwise, say N. @@ -1535,7 +1525,7 @@ config ATARI_SCSI tristate "Atari native SCSI support" - depends on ATARI && SCSI + depends on ATARI && SCSI && BROKEN ---help--- If you have an Atari with built-in NCR5380 SCSI controller (TT, Falcon, ...) say Y to get it supported. Of course also, if you have @@ -1604,7 +1594,7 @@ config MVME16x_SCSI bool "NCR53C710 SCSI driver for MVME16x" - depends on MVME16x && SCSI + depends on MVME16x && SCSI && BROKEN help The Motorola MVME162, 166, 167, 172 and 177 boards use the NCR53C710 SCSI controller chip. Almost everyone using one of these boards @@ -1612,7 +1602,7 @@ config BVME6000_SCSI bool "NCR53C710 SCSI driver for BVME6000" - depends on BVME6000 && SCSI + depends on BVME6000 && SCSI && BROKEN help The BVME4000 and BVME6000 boards from BVM Ltd use the NCR53C710 SCSI controller chip. Almost everyone using one of these boards diff -Nru a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c --- a/drivers/scsi/a2091.c Thu Oct 2 01:28:17 2003 +++ b/drivers/scsi/a2091.c Thu Oct 2 01:28:17 2003 @@ -25,31 +25,20 @@ #define DMA(ptr) ((a2091_scsiregs *)((ptr)->base)) #define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata)) -static struct Scsi_Host *first_instance = NULL; -static Scsi_Host_Template *a2091_template; - -static irqreturn_t a2091_intr (int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t a2091_intr (int irq, void *_instance, struct pt_regs *fp) { unsigned long flags; unsigned int status; - struct Scsi_Host *instance; - int handled = 0; + struct Scsi_Host *instance = (struct Scsi_Host *)_instance; - for (instance = first_instance; instance && - instance->hostt == a2091_template; instance = instance->next) - { - status = DMA(instance)->ISTR; - if (!(status & (ISTR_INT_F|ISTR_INT_P))) - continue; - - if (status & ISTR_INTS) { - spin_lock_irqsave(instance->host_lock, flags); - wd33c93_intr (instance); - spin_unlock_irqrestore(instance->host_lock, flags); - handled = 1; - } - } - return IRQ_RETVAL(handled); + status = DMA(instance)->ISTR; + if (!(status & (ISTR_INT_F|ISTR_INT_P)) || !(status & ISTR_INTS)) + return IRQ_NONE; + + spin_lock_irqsave(instance->host_lock, flags); + wd33c93_intr(instance); + spin_unlock_irqrestore(instance->host_lock, flags); + return IRQ_HANDLED; } static int dma_setup (Scsi_Cmnd *cmd, int dir_in) @@ -184,8 +173,6 @@ } } -static int num_a2091 = 0; - int __init a2091_detect(Scsi_Host_Template *tpnt) { static unsigned char called = 0; @@ -193,6 +180,7 @@ unsigned long address; struct zorro_dev *z = NULL; wd33c93_regs regs; + int num_a2091 = 0; if (!MACH_IS_AMIGA || called) return 0; @@ -221,13 +209,10 @@ regs.SASR = &(DMA(instance)->SASR); regs.SCMD = &(DMA(instance)->SCMD); wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); - if (num_a2091++ == 0) { - first_instance = instance; - a2091_template = instance->hostt; - request_irq(IRQ_AMIGA_PORTS, a2091_intr, SA_SHIRQ, "A2091 SCSI", - a2091_intr); - } + request_irq(IRQ_AMIGA_PORTS, a2091_intr, SA_SHIRQ, "A2091 SCSI", + instance); DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN; + num_a2091++; } return num_a2091; @@ -266,8 +251,7 @@ #ifdef MODULE DMA(instance)->CNTR = 0; release_mem_region(ZTWO_PADDR(instance->base), 256); - if (--num_a2091 == 0) - free_irq(IRQ_AMIGA_PORTS, a2091_intr); + free_irq(IRQ_AMIGA_PORTS, instance); wd33c93_release(); #endif return 1; diff -Nru a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c --- a/drivers/scsi/g_NCR5380.c Thu Oct 2 01:28:16 2003 +++ b/drivers/scsi/g_NCR5380.c Thu Oct 2 01:28:16 2003 @@ -527,8 +527,9 @@ * Locks: none */ -int generic_NCR5380_biosparam(struct scsi_device *sdev, - struct block_device *bdev, sector_t capacity, int *ip) +static int +generic_NCR5380_biosparam(struct scsi_device *sdev, struct block_device *bdev, + sector_t capacity, int *ip) { ip[0] = 64; ip[1] = 32; diff -Nru a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h --- a/drivers/scsi/g_NCR5380.h Thu Oct 2 01:28:15 2003 +++ b/drivers/scsi/g_NCR5380.h Thu Oct 2 01:28:15 2003 @@ -52,7 +52,6 @@ static int generic_NCR5380_host_reset(Scsi_Cmnd *); static int generic_NCR5380_device_reset(Scsi_Cmnd *); static const char* generic_NCR5380_info(struct Scsi_Host *); -static int generic_NCR5380_biosparam(struct scsi_device *, struct block_device *, sector_t, int *); #ifndef CMD_PER_LUN #define CMD_PER_LUN 2 diff -Nru a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c --- a/drivers/scsi/gvp11.c Thu Oct 2 01:28:17 2003 +++ b/drivers/scsi/gvp11.c Thu Oct 2 01:28:18 2003 @@ -25,29 +25,20 @@ #define DMA(ptr) ((gvp11_scsiregs *)((ptr)->base)) #define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata)) -static struct Scsi_Host *first_instance = NULL; -static Scsi_Host_Template *gvp11_template; - -static irqreturn_t gvp11_intr (int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t gvp11_intr (int irq, void *_instance, struct pt_regs *fp) { unsigned long flags; unsigned int status; - struct Scsi_Host *instance; - int handled = 0; - - for (instance = first_instance; instance && - instance->hostt == gvp11_template; instance = instance->next) - { - status = DMA(instance)->CNTR; - if (!(status & GVP11_DMAC_INT_PENDING)) - continue; + struct Scsi_Host *instance = (struct Scsi_Host *)_instance; - spin_lock_irqsave(instance->host_lock, flags); - wd33c93_intr (instance); - spin_unlock_irqrestore(instance->host_lock, flags); - handled = 1; - } - return IRQ_RETVAL(handled); + status = DMA(instance)->CNTR; + if (!(status & GVP11_DMAC_INT_PENDING)) + return IRQ_NONE; + + spin_lock_irqsave(instance->host_lock, flags); + wd33c93_intr(instance); + spin_unlock_irqrestore(instance->host_lock, flags); + return IRQ_HANDLED; } static int gvp11_xfer_mask = 0; @@ -177,8 +168,6 @@ } } -static int num_gvp11 = 0; - #define CHECK_WD33C93 int __init gvp11_detect(Scsi_Host_Template *tpnt) @@ -190,6 +179,7 @@ struct zorro_dev *z = NULL; unsigned int default_dma_xfer_mask; wd33c93_regs regs; + int num_gvp11 = 0; #ifdef CHECK_WD33C93 volatile unsigned char *sasr_3393, *scmd_3393; unsigned char save_sasr; @@ -339,13 +329,10 @@ (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10 : WD33C93_FS_12_15); - if (num_gvp11++ == 0) { - first_instance = instance; - gvp11_template = instance->hostt; - request_irq(IRQ_AMIGA_PORTS, gvp11_intr, SA_SHIRQ, - "GVP11 SCSI", gvp11_intr); - } + request_irq(IRQ_AMIGA_PORTS, gvp11_intr, SA_SHIRQ, "GVP11 SCSI", + instance); DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE; + num_gvp11++; continue; release: @@ -391,8 +378,7 @@ #ifdef MODULE DMA(instance)->CNTR = 0; release_mem_region(ZTWO_PADDR(instance->base), 256); - if (--num_gvp11 == 0) - free_irq(IRQ_AMIGA_PORTS, gvp11_intr); + free_irq(IRQ_AMIGA_PORTS, instance); wd33c93_release(); #endif return 1; diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c Thu Oct 2 01:28:15 2003 +++ b/drivers/scsi/megaraid.c Thu Oct 2 01:28:15 2003 @@ -586,7 +586,7 @@ /* Set the Mode of addressing to 64 bit if we can */ if((adapter->flag & BOARD_64BIT)&&(sizeof(dma_addr_t) == 8)) { - pci_set_dma_mask(pdev, 0xffffffffffffffff); + pci_set_dma_mask(pdev, 0xffffffffffffffffULL); adapter->has_64bit_addr = 1; } else { diff -Nru a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c --- a/drivers/scsi/ncr53c8xx.c Thu Oct 2 01:28:16 2003 +++ b/drivers/scsi/ncr53c8xx.c Thu Oct 2 01:28:16 2003 @@ -7757,7 +7757,7 @@ cp->start.schedule.l_cmd = cpu_to_scr(SCR_JUMP); cp->start.p_phys = cpu_to_scr(CCB_PHYS(cp, phys)); - bcopy(&cp->start, &cp->restart, sizeof(cp->restart)); + memcpy(&cp->restart, &cp->start, sizeof(cp->restart)); cp->start.schedule.l_paddr = cpu_to_scr(NCB_SCRIPT_PHYS (np, idle)); cp->restart.schedule.l_paddr = cpu_to_scr(NCB_SCRIPTH_PHYS (np, abort)); diff -Nru a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c --- a/drivers/scsi/nsp32.c Thu Oct 2 01:28:16 2003 +++ b/drivers/scsi/nsp32.c Thu Oct 2 01:28:16 2003 @@ -3435,15 +3435,6 @@ * Power Management */ #ifdef CONFIG_PM -/* Save Device Context */ -static int nsp32_save_state(struct pci_dev *pdev, u32 state) -{ - struct Scsi_Host *host = pci_get_drvdata(pdev); - - nsp32_msg(KERN_INFO, "pci-save_state: stub, pdev=0x%p, state=%ld, slot=%s, host=0x%p", pdev, state, pci_name(pdev), host); - - return 0; -} /* Device suspended */ static int nsp32_suspend(struct pci_dev *pdev, u32 state) @@ -3573,7 +3564,6 @@ .probe = nsp32_probe, .remove = __devexit_p(nsp32_remove), #ifdef CONFIG_PM - .save_state = nsp32_save_state, .suspend = nsp32_suspend, .resume = nsp32_resume, .enable_wake = nsp32_enable_wake, diff -Nru a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c --- a/drivers/scsi/qla1280.c Thu Oct 2 01:28:18 2003 +++ b/drivers/scsi/qla1280.c Thu Oct 2 01:28:18 2003 @@ -16,10 +16,15 @@ * General Public License for more details. * ******************************************************************************/ -#define QLA1280_VERSION "3.23.36" +#define QLA1280_VERSION "3.23.37" /***************************************************************************** Revision History: - Rev 3.23.36 September 19, 2003, Christoph Hellwig + Rev 3.23.37 October 1, 2003, Jes Sorensen + - Make MMIO depend on CONFIG_X86_VISWS instead of yet another + random CONFIG option + - Clean up locking in probe path + Rev 3.23.36 October 1, 2003, Christoph Hellwig + - queuecommand only ever receives new commands - clear flags - Reintegrate lost fixes from Linux 2.5 Rev 3.23.35 August 14, 2003, Jes Sorensen - Build against 2.6 @@ -315,14 +320,14 @@ #if LINUX_VERSION_CODE >= 0x020545 #include +#include "scsi.h" #else #include +#include "scsi.h" #include "hosts.h" #include "sd.h" #endif -#include "scsi.h" - #if LINUX_VERSION_CODE < 0x020407 #error "Kernels older than 2.4.7 are no longer supported" #endif @@ -339,7 +344,10 @@ #define DEBUG_PRINT_NVRAM 0 #define DEBUG_QLA1280 0 -#ifdef CONFIG_SCSI_QLOGIC_1280_PIO +/* + * The SGI VISWS is broken and doesn't support MMIO ;-( + */ +#ifdef CONFIG_X86_VISWS #define MEMORY_MAPPED_IO 0 #else #define MEMORY_MAPPED_IO 1 @@ -414,6 +422,11 @@ #else #define HOST_LOCK ha->host->host_lock #endif +#if LINUX_VERSION_CODE < 0x020600 +#define DEV_SIMPLE_TAGS(device) device->tagged_queue +#else +#define DEV_SIMPLE_TAGS(device) device->simple_tags +#endif #if defined(__ia64__) && !defined(ia64_platform_is) #define ia64_platform_is(foo) (!strcmp(x, platform_name)) #endif @@ -647,11 +660,11 @@ #define PROC_BUF &qla1280_buffer[len] #if LINUX_VERSION_CODE < 0x020600 -static int qla1280_proc_info(char *buffer, char **start, off_t offset, int length, - int hostno, int inout) +static int qla1280_proc_info(char *buffer, char **start, off_t offset, + int length, int hostno, int inout) #else -static int qla1280_proc_info(struct Scsi_Host *host, char *buffer, char **start, - off_t offset, int length, int inout) +static int qla1280_proc_info(struct Scsi_Host *host, char *buffer, + char **start, off_t offset, int length, int inout) #endif { struct scsi_qla_host *ha; @@ -955,8 +968,8 @@ host->io_port, host->io_port + 0xff); goto error_free_irq; } - #endif + /* load the F/W, read paramaters, and init the H/W */ if (qla1280_initialize_adapter(ha)) { printk(KERN_INFO "qla1x160: Failed to initialize adapter\n"); @@ -1598,6 +1611,7 @@ return IRQ_RETVAL(handled); } + static int qla12160_set_target_parameters(struct scsi_qla_host *ha, int bus, int target) { @@ -1666,9 +1680,7 @@ int target = device->id; int status = 0; struct nvram *nv; -#if LINUX_VERSION_CODE < 0x020500 unsigned long flags; -#endif ha = (struct scsi_qla_host *)device->host->hostdata; nv = &ha->nvram; @@ -1706,17 +1718,13 @@ nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr = 0; } -#if LINUX_VERSION_CODE < 0x020500 spin_lock_irqsave(HOST_LOCK, flags); -#endif if (nv->bus[bus].target[target].parameter.f.enable_sync) { status = qla12160_set_target_parameters(ha, bus, target); } qla12160_get_target_parameters(ha, device); -#if LINUX_VERSION_CODE < 0x020500 spin_unlock_irqrestore(HOST_LOCK, flags); -#endif return status; } @@ -1995,7 +2003,7 @@ if (ha->request_ring) pci_free_consistent(ha->pdev, ((REQUEST_ENTRY_CNT + 1) * - (sizeof(request_t))), + (sizeof(request_t))), ha->request_ring, ha->request_dma); finish: LEAVE("qla1280_mem_alloc"); @@ -2088,6 +2096,9 @@ struct device_reg *reg; int status; int bus; +#if LINUX_VERSION_CODE > 0x020500 + unsigned long flags; +#endif ENTER("qla1280_initialize_adapter"); @@ -2131,6 +2142,15 @@ "NVRAM\n"); } +#if LINUX_VERSION_CODE >= 0x020500 + /* + * It's necessary to grab the spin here as qla1280_mailbox_command + * needs to be able to drop the lock unconditionally to wait + * for completion. + * In 2.4 ->detect is called with the io_request_lock held. + */ + spin_lock_irqsave(HOST_LOCK, flags); +#endif /* If firmware needs to be loaded */ if (qla1280_isp_firmware(ha)) { if (!(status = qla1280_chip_diag (ha))) { @@ -2183,6 +2203,9 @@ status = 1; out: +#if LINUX_VERSION_CODE >= 0x020500 + spin_unlock_irqrestore(HOST_LOCK, flags); +#endif if (status) dprintk(2, "qla1280_initialize_adapter: **** FAILED ****\n"); @@ -3208,18 +3231,14 @@ timer.function = qla1280_mailbox_timeout; add_timer(&timer); -#if LINUX_VERSION_CODE < 0x020500 spin_unlock_irq(HOST_LOCK); -#endif WRT_REG_WORD(®->host_cmd, HC_SET_HOST_INT); data = qla1280_debounce_register(®->istatus); wait_for_completion(&wait); del_timer_sync(&timer); -#if LINUX_VERSION_CODE < 0x020500 spin_lock_irq(HOST_LOCK); -#endif ha->mailbox_wait = NULL; @@ -3636,7 +3655,7 @@ (SCSI_TCN_32(cmd) | BIT_7) : SCSI_TCN_32(cmd); /* Enable simple tag queuing if device supports it. */ - if (cmd->device->simple_tags) + if (DEV_SIMPLE_TAGS(cmd->device)) pkt->control_flags |= cpu_to_le16(BIT_3); /* Load SCSI command packet. */ @@ -3936,7 +3955,7 @@ (SCSI_TCN_32(cmd) | BIT_7) : SCSI_TCN_32(cmd); /* Enable simple tag queuing if device supports it. */ - if (cmd->device->simple_tags) + if (DEV_SIMPLE_TAGS(cmd->device)) pkt->control_flags |= cpu_to_le16(BIT_3); /* Load SCSI command packet. */ @@ -4823,6 +4842,7 @@ return ret; } + /************************************************************************ * qla1280_check_for_dead_scsi_bus * * * @@ -4891,7 +4911,7 @@ } else printk(" Async"); - if (device->simple_tags) + if (DEV_SIMPLE_TAGS(device)) printk(", Tagged queuing: depth %d", device->queue_depth); printk("\n"); } @@ -5105,6 +5125,7 @@ return ret; } + static Scsi_Host_Template driver_template = { .proc_info = qla1280_proc_info, .name = "Qlogic ISP 1280/12160", @@ -5131,6 +5152,7 @@ }; #include "scsi_module.c" + /* * Overrides for Emacs so that we almost follow Linus's tabbing style. diff -Nru a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c --- a/drivers/scsi/qlogicfc.c Thu Oct 2 01:28:17 2003 +++ b/drivers/scsi/qlogicfc.c Thu Oct 2 01:28:17 2003 @@ -718,8 +718,8 @@ continue; /* Try to configure DMA attributes. */ - if (pci_set_dma_mask(pdev, (u64) 0xffffffffffffffff) && - pci_set_dma_mask(pdev, (u64) 0xffffffff)) + if (pci_set_dma_mask(pdev, 0xffffffffffffffffULL) && + pci_set_dma_mask(pdev, 0xffffffffULL)) continue; host = scsi_register(tmpt, sizeof(struct isp2x00_hostdata)); diff -Nru a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c --- a/drivers/scsi/sun3_scsi.c Thu Oct 2 01:28:16 2003 +++ b/drivers/scsi/sun3_scsi.c Thu Oct 2 01:28:16 2003 @@ -308,7 +308,6 @@ return 1; } -#ifdef MODULE int sun3scsi_release (struct Scsi_Host *shpnt) { if (shpnt->irq != SCSI_IRQ_NONE) @@ -318,7 +317,6 @@ return 0; } -#endif #ifdef RESET_BOOT /* diff -Nru a/drivers/scsi/sun3_scsi.h b/drivers/scsi/sun3_scsi.h --- a/drivers/scsi/sun3_scsi.h Thu Oct 2 01:28:15 2003 +++ b/drivers/scsi/sun3_scsi.h Thu Oct 2 01:28:15 2003 @@ -52,11 +52,7 @@ static const char *sun3scsi_info (struct Scsi_Host *); static int sun3scsi_bus_reset(Scsi_Cmnd *); static int sun3scsi_queue_command (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); -#ifdef MODULE static int sun3scsi_release (struct Scsi_Host *); -#else -#define sun3scsi_release NULL -#endif #ifndef CMD_PER_LUN #define CMD_PER_LUN 2 diff -Nru a/drivers/scsi/sun3_scsi_vme.c b/drivers/scsi/sun3_scsi_vme.c --- a/drivers/scsi/sun3_scsi_vme.c Thu Oct 2 01:28:18 2003 +++ b/drivers/scsi/sun3_scsi_vme.c Thu Oct 2 01:28:18 2003 @@ -140,7 +140,7 @@ static int sun3scsi_detect(Scsi_Host_Template * tpnt) { - unsigned long ioaddr, irq; + unsigned long ioaddr, irq = 0; static int called = 0; struct Scsi_Host *instance; int i; @@ -277,17 +277,15 @@ return 1; } -#ifdef MODULE int sun3scsi_release (struct Scsi_Host *shpnt) { if (shpnt->irq != SCSI_IRQ_NONE) free_irq (shpnt->irq, NULL); - iounmap(sun3_scsi_regp); + iounmap((void *)sun3_scsi_regp); return 0; } -#endif #ifdef RESET_BOOT /* diff -Nru a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h --- a/drivers/scsi/sym53c8xx_2/sym_glue.h Thu Oct 2 01:28:18 2003 +++ b/drivers/scsi/sym53c8xx_2/sym_glue.h Thu Oct 2 01:28:18 2003 @@ -70,10 +70,6 @@ #include #include "../scsi.h" /* XXX: DID_* */ -#ifndef bcopy -#define bcopy(s, d, n) memcpy((d), (s), (n)) -#endif - #ifndef bzero #define bzero(d, n) memset((d), 0, (n)) #endif diff -Nru a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c Thu Oct 2 01:28:15 2003 +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c Thu Oct 2 01:28:15 2003 @@ -5889,9 +5889,9 @@ /* * Copy scripts to controller instance. */ - bcopy(fw->a_base, np->scripta0, np->scripta_sz); - bcopy(fw->b_base, np->scriptb0, np->scriptb_sz); - bcopy(fw->z_base, np->scriptz0, np->scriptz_sz); + memcpy(np->scripta0, fw->a_base, np->scripta_sz); + memcpy(np->scriptb0, fw->b_base, np->scriptb_sz); + memcpy(np->scriptz0, fw->z_base, np->scriptz_sz); /* * Setup variable parts in scripts and compute diff -Nru a/drivers/scsi/sym53c8xx_2/sym_misc.c b/drivers/scsi/sym53c8xx_2/sym_misc.c --- a/drivers/scsi/sym53c8xx_2/sym_misc.c Thu Oct 2 01:28:17 2003 +++ b/drivers/scsi/sym53c8xx_2/sym_misc.c Thu Oct 2 01:28:17 2003 @@ -225,7 +225,7 @@ */ void sym_update_trans_settings(hcb_p np, tcb_p tp) { - bcopy(&tp->tinfo.user, &tp->tinfo.goal, sizeof(tp->tinfo.goal)); + memcpy(&tp->tinfo.goal, &tp->tinfo.user, sizeof(tp->tinfo.goal)); if (tp->inq_version >= 4) { switch(tp->inq_byte56 & INQ56_CLOCKING) { diff -Nru a/drivers/scsi/sym53c8xx_comm.h b/drivers/scsi/sym53c8xx_comm.h --- a/drivers/scsi/sym53c8xx_comm.h Thu Oct 2 01:28:17 2003 +++ b/drivers/scsi/sym53c8xx_comm.h Thu Oct 2 01:28:17 2003 @@ -88,10 +88,6 @@ #define u_int unsigned int #define u_long unsigned long -#ifndef bcopy -#define bcopy(s, d, n) memcpy((d), (s), (n)) -#endif - #ifndef bcmp #define bcmp(s, d, n) memcmp((d), (s), (n)) #endif diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c --- a/drivers/serial/8250.c Thu Oct 2 01:28:15 2003 +++ b/drivers/serial/8250.c Thu Oct 2 01:28:15 2003 @@ -469,8 +469,14 @@ */ serial_outp(up, UART_LCR, UART_LCR_DLAB); if (serial_in(up, UART_EFR) == 0) { - DEBUG_AUTOCONF("EFRv1 "); - up->port.type = PORT_16650; + serial_outp(up, UART_EFR, 0xA8); + if (serial_in(up, UART_EFR) != 0) { + DEBUG_AUTOCONF("EFRv1 "); + up->port.type = PORT_16650; + } else { + DEBUG_AUTOCONF("Motorola 8xxx DUART "); + } + serial_outp(up, UART_EFR, 0); return; } @@ -490,7 +496,9 @@ * Attempt to switch to bank 2, read the value of the LOOP bit * from EXCR1. Switch back to bank 0, change it in MCR. Then * switch back to bank 2, read it from EXCR1 again and check - * it's changed. If so, set baud_base in EXCR2 to 921600. + * it's changed. If so, set baud_base in EXCR2 to 921600. -- dwmw2 + * On PowerPC we don't want to change baud_base, as we have + * a number of different divisors. -- Tom Rini */ serial_outp(up, UART_LCR, 0); status1 = serial_in(up, UART_MCR); @@ -506,12 +514,14 @@ serial_outp(up, UART_MCR, status1); if ((status2 ^ status1) & UART_MCR_LOOP) { +#ifndef CONFIG_PPC serial_outp(up, UART_LCR, 0xE0); status1 = serial_in(up, 0x04); /* EXCR1 */ status1 &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */ status1 |= 0x10; /* 1.625 divisor for baud_base --> 921600 */ serial_outp(up, 0x04, status1); serial_outp(up, UART_LCR, 0); +#endif up->port.type = PORT_NS16550A; up->port.uartclk = 921600*16; diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig --- a/drivers/video/Kconfig Thu Oct 2 01:28:15 2003 +++ b/drivers/video/Kconfig Thu Oct 2 01:28:15 2003 @@ -188,19 +188,19 @@ otherwise say N. config FB_CYBER - tristate "Amiga CyberVision support" - depends on FB && ZORRO + tristate "Amiga CyberVision 64 support" + depends on FB && ZORRO && BROKEN help This enables support for the Cybervision 64 graphics card from Phase5. Please note that its use is not all that intuitive (i.e. if you have any questions, be sure to ask!). Say N unless you have a Cybervision 64 or plan to get one before you next recompile the kernel. Please note that this driver DOES NOT support the - Cybervision 64 3D card, as they use incompatible video chips. + Cybervision 64/3D card, as they use incompatible video chips. config FB_VIRGE - bool "Amiga CyberVision3D support " - depends on FB && ZORRO + bool "Amiga CyberVision 64/3D support " + depends on FB && ZORRO && BROKEN help This enables support for the Cybervision 64/3D graphics card from Phase5. Please note that its use is not all that intuitive (i.e. if @@ -210,8 +210,8 @@ Cybervision 64 card, as they use incompatible video chips. config FB_RETINAZ3 - tristate "Amiga RetinaZ3 support" - depends on FB && ZORRO + tristate "Amiga Retina Z3 support" + depends on FB && ZORRO && BROKEN help This enables support for the Retina Z3 graphics card. Say N unless you have a Retina Z3 or plan to get one before you next recompile @@ -226,7 +226,7 @@ config FB_ATARI bool "Atari native chipset support" - depends on FB && ATARI + depends on FB && ATARI && BROKEN help This is the frame buffer device driver for the builtin graphics chipset found in Ataris. @@ -367,7 +367,7 @@ config FB_SUN3 bool "Sun3 framebuffer support" - depends on FB && (SUN3 || SUN3X) + depends on FB && (SUN3 || SUN3X) && BROKEN config FB_BW2 bool "BWtwo support" diff -Nru a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c --- a/drivers/video/console/sticore.c Thu Oct 2 01:28:16 2003 +++ b/drivers/video/console/sticore.c Thu Oct 2 01:28:16 2003 @@ -988,7 +988,7 @@ if (!sti) { printk(KERN_WARNING "Unable to handle STI device '%s'\n", - pd->dev.name); + pci_name(pd)); return -ENODEV; } #endif /* CONFIG_PCI */ diff -Nru a/drivers/video/stifb.c b/drivers/video/stifb.c --- a/drivers/video/stifb.c Thu Oct 2 01:28:18 2003 +++ b/drivers/video/stifb.c Thu Oct 2 01:28:18 2003 @@ -1238,7 +1238,7 @@ /* get framebuffer physical and virtual base addr & len (64bit ready) */ - fix->smem_start = fb->sti->regions_phys[1] | 0xffffffff00000000; + fix->smem_start = F_EXTEND(fb->sti->regions_phys[1]); fix->smem_len = fb->sti->regions[1].region_desc.length * 4096; fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8; diff -Nru a/fs/Kconfig b/fs/Kconfig --- a/fs/Kconfig Thu Oct 2 01:28:17 2003 +++ b/fs/Kconfig Thu Oct 2 01:28:17 2003 @@ -874,6 +874,7 @@ config HUGETLBFS bool "HugeTLB file system support" + depends X86 || IA64 || PPC64 || SPARC64 || X86_64 || BROKEN config HUGETLB_PAGE def_bool HUGETLBFS @@ -1254,6 +1255,8 @@ config NFS_FS tristate "NFS file system support" depends on INET + select LOCKD + select SUNRPC help If you are connected to some other (usually local) Unix computer (using SLIP, PLIP, PPP or Ethernet) and want to mount files residing @@ -1309,6 +1312,8 @@ config NFSD tristate "NFS server support" depends on INET + select LOCKD + select SUNRPC help If you want your Linux box to act as an NFS *server*, so that other computers on your local network which support NFS can access certain @@ -1371,8 +1376,6 @@ config LOCKD tristate - default m if NFS_FS!=y && NFSD!=y && (NFS_FS=m || NFSD=m) - default y if NFS_FS=y || NFSD=y config LOCKD_V4 bool @@ -1385,8 +1388,6 @@ config SUNRPC tristate - default m if NFS_FS!=y && NFSD!=y && (NFS_FS=m || NFSD=m) - default y if NFS_FS=y || NFSD=y config SUNRPC_GSS tristate "Provide RPCSEC_GSS authentication (EXPERIMENTAL)" @@ -1565,6 +1566,7 @@ # for fs/nls/Config.in tristate "Andrew File System support (AFS) (Experimental)" depends on INET && EXPERIMENTAL + select RXRPC help If you say Y here, you will get an experimental Andrew File System driver. It currently only supports unsecured read-only AFS access. @@ -1575,8 +1577,6 @@ config RXRPC tristate - default m if AFS_FS=m - default y if AFS_FS=y endmenu diff -Nru a/fs/adfs/super.c b/fs/adfs/super.c --- a/fs/adfs/super.c Thu Oct 2 01:28:15 2003 +++ b/fs/adfs/super.c Thu Oct 2 01:28:15 2003 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -133,50 +134,56 @@ sb->s_fs_info = NULL; } +enum {Opt_uid, Opt_gid, Opt_ownmask, Opt_othmask, Opt_err}; + +static match_table_t tokens = { + {Opt_uid, "uid=%u"}, + {Opt_gid, "gid=%u"}, + {Opt_ownmask, "ownmask=%o"}, + {Opt_othmask, "othmask=%o"}, + {Opt_err, NULL} +}; + static int parse_options(struct super_block *sb, char *options) { - char *value, *opt; + char *p; struct adfs_sb_info *asb = ADFS_SB(sb); + int option; if (!options) return 0; - while ((opt = strsep(&options, ",")) != NULL) { - if (!*opt) + while ((p = strsep(&options, ",")) != NULL) { + substring_t args[MAX_OPT_ARGS]; + int token; + if (!*p) continue; - value = strchr(opt, '='); - if (value) - *value++ = '\0'; - if (!strcmp(opt, "uid")) { /* owner of all files */ - if (!value || !*value) - return -EINVAL; - asb->s_uid = simple_strtoul(value, &value, 0); - if (*value) - return -EINVAL; - } else - if (!strcmp(opt, "gid")) { /* group owner of all files */ - if (!value || !*value) - return -EINVAL; - asb->s_gid = simple_strtoul(value, &value, 0); - if (*value) - return -EINVAL; - } else - if (!strcmp(opt, "ownmask")) { /* owner permission mask */ - if (!value || !*value) - return -EINVAL; - asb->s_owner_mask = simple_strtoul(value, &value, 8); - if (*value) - return -EINVAL; - } else - if (!strcmp(opt, "othmask")) { /* others permission mask */ - if (!value || !*value) - return -EINVAL; - asb->s_other_mask = simple_strtoul(value, &value, 8); - if (*value) - return -EINVAL; - } else { /* eh? say again. */ - printk("ADFS-fs: unrecognised mount option %s\n", opt); + token = match_token(p, tokens, args); + switch (token) { + case Opt_uid: + if (match_int(args, &option)) + return -EINVAL; + asb->s_uid = option; + break; + case Opt_gid: + if (match_int(args, &option)) + return -EINVAL; + asb->s_gid = option; + break; + case Opt_ownmask: + if (match_octal(args, &option)) + return -EINVAL; + asb->s_owner_mask = option; + break; + case Opt_othmask: + if (match_octal(args, &option)) + return -EINVAL; + asb->s_other_mask = option; + break; + default: + printk("ADFS-fs: unrecognised mount option \"%s\" " + "or missing value\n", p); return -EINVAL; } } diff -Nru a/fs/affs/file.c b/fs/affs/file.c --- a/fs/affs/file.c Thu Oct 2 01:28:16 2003 +++ b/fs/affs/file.c Thu Oct 2 01:28:16 2003 @@ -39,7 +39,7 @@ static struct buffer_head *affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext); static inline struct buffer_head *affs_get_extblock(struct inode *inode, u32 ext); static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext); -static ssize_t affs_file_write(struct file *filp, const char *buf, size_t count, loff_t *ppos); +static ssize_t affs_file_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos); static int affs_file_open(struct inode *inode, struct file *filp); static int affs_file_release(struct inode *inode, struct file *filp); @@ -491,7 +491,8 @@ } static ssize_t -affs_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos) +affs_file_write(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) { ssize_t retval; diff -Nru a/fs/affs/super.c b/fs/affs/super.c --- a/fs/affs/super.c Thu Oct 2 01:28:17 2003 +++ b/fs/affs/super.c Thu Oct 2 01:28:17 2003 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -142,12 +143,37 @@ .remount_fs = affs_remount, }; +enum { + Opt_bs, Opt_mode, Opt_mufs, Opt_prefix, Opt_protect, + Opt_reserved, Opt_root, Opt_setgid, Opt_setuid, + Opt_verbose, Opt_volume, Opt_ignore, Opt_err, +}; + +static match_table_t tokens = { + {Opt_bs, "bs=%d"}, + {Opt_mode, "mode=%o"}, + {Opt_mufs, "mufs"}, + {Opt_prefix, "prefix=%s"}, + {Opt_protect, "protect"}, + {Opt_reserved, "reserved=%d"}, + {Opt_root, "root=%d"}, + {Opt_setgid, "setgid=%d"}, + {Opt_setuid, "setuid=%d"}, + {Opt_verbose, "verbose"}, + {Opt_volume, "volume=%s"}, + {Opt_ignore, "grpquota"}, + {Opt_ignore, "noquota"}, + {Opt_ignore, "quota"}, + {Opt_ignore, "usrquota"}, + {Opt_err, NULL}, +}; + static int parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s32 *root, int *blocksize, char **prefix, char *volume, unsigned long *mount_opts) { - char *this_char, *value, *optn; - int f; + char *p; + substring_t args[MAX_OPT_ARGS]; /* Fill in defaults */ @@ -161,109 +187,85 @@ *mount_opts = 0; if (!options) return 1; - while ((this_char = strsep(&options, ",")) != NULL) { - if (!*this_char) + + while ((p = strsep(&options, ",")) != NULL) { + int token, n, option; + if (!*p) continue; - f = 0; - if ((value = strchr(this_char,'=')) != NULL) - *value++ = 0; - if ((optn = "protect") && !strcmp(this_char, optn)) { - if (value) - goto out_inv_arg; - *mount_opts |= SF_IMMUTABLE; - } else if ((optn = "verbose") && !strcmp(this_char, optn)) { - if (value) - goto out_inv_arg; - *mount_opts |= SF_VERBOSE; - } else if ((optn = "mufs") && !strcmp(this_char, optn)) { - if (value) - goto out_inv_arg; - *mount_opts |= SF_MUFS; - } else if ((f = !strcmp(this_char,"setuid")) || !strcmp(this_char,"setgid")) { - if (value) { - if (!*value) { - printk("AFFS: Argument for set[ug]id option missing\n"); - return 0; - } else { - (f ? *uid : *gid) = simple_strtoul(value,&value,0); - if (*value) { - printk("AFFS: Bad set[ug]id argument\n"); - return 0; - } - *mount_opts |= f ? SF_SETUID : SF_SETGID; - } + + token = match_token(p, tokens, args); + switch (token) { + case Opt_bs: + if (match_int(&args[0], &n)) + return -EINVAL; + if (n != 512 && n != 1024 && n != 2048 + && n != 4096) { + printk ("AFFS: Invalid blocksize (512, 1024, 2048, 4096 allowed)\n"); + return 0; } - } else if (!strcmp(this_char,"prefix")) { - optn = "prefix"; - if (!value || !*value) - goto out_no_arg; + *blocksize = n; + break; + case Opt_mode: + if (match_octal(&args[0], &option)) + return 1; + *mode = option & 0777; + *mount_opts |= SF_SETMODE; + break; + case Opt_mufs: + *mount_opts |= SF_MUFS; + break; + case Opt_prefix: if (*prefix) { /* Free any previous prefix */ kfree(*prefix); *prefix = NULL; } - *prefix = kmalloc(strlen(value) + 1,GFP_KERNEL); + *prefix = match_strdup(&args[0]); if (!*prefix) return 0; - strcpy(*prefix,value); *mount_opts |= SF_PREFIX; - } else if (!strcmp(this_char,"volume")) { - optn = "volume"; - if (!value || !*value) - goto out_no_arg; - strlcpy(volume,value,31); - } else if (!strcmp(this_char,"mode")) { - optn = "mode"; - if (!value || !*value) - goto out_no_arg; - *mode = simple_strtoul(value,&value,8) & 0777; - if (*value) - return 0; - *mount_opts |= SF_SETMODE; - } else if (!strcmp(this_char,"reserved")) { - optn = "reserved"; - if (!value || !*value) - goto out_no_arg; - *reserved = simple_strtoul(value,&value,0); - if (*value) - return 0; - } else if (!strcmp(this_char,"root")) { - optn = "root"; - if (!value || !*value) - goto out_no_arg; - *root = simple_strtoul(value,&value,0); - if (*value) - return 0; - } else if (!strcmp(this_char,"bs")) { - optn = "bs"; - if (!value || !*value) - goto out_no_arg; - *blocksize = simple_strtoul(value,&value,0); - if (*value) - return 0; - if (*blocksize != 512 && *blocksize != 1024 && *blocksize != 2048 - && *blocksize != 4096) { - printk ("AFFS: Invalid blocksize (512, 1024, 2048, 4096 allowed)\n"); - return 0; - } - } else if (!strcmp (this_char, "grpquota") - || !strcmp (this_char, "noquota") - || !strcmp (this_char, "quota") - || !strcmp (this_char, "usrquota")) - /* Silently ignore the quota options */ - ; - else { - printk("AFFS: Unrecognized mount option %s\n", this_char); + break; + case Opt_protect: + *mount_opts |= SF_IMMUTABLE; + break; + case Opt_reserved: + if (match_int(&args[0], reserved)) + return 1; + break; + case Opt_root: + if (match_int(&args[0], root)) + return 1; + break; + case Opt_setgid: + if (match_int(&args[0], &option)) + return 1; + *gid = option; + *mount_opts |= SF_SETGID; + break; + case Opt_setuid: + if (match_int(&args[0], &option)) + return -EINVAL; + *uid = option; + *mount_opts |= SF_SETUID; + break; + case Opt_verbose: + *mount_opts |= SF_VERBOSE; + break; + case Opt_volume: { + char *vol = match_strdup(&args[0]); + strlcpy(volume, vol, 32); + kfree(vol); + break; + } + case Opt_ignore: + /* Silently ignore the quota options */ + break; + default: + printk("AFFS: Unrecognized mount option \"%s\" " + "or missing value\n", p); return 0; } } return 1; - -out_no_arg: - printk("AFFS: The %s option requires an argument\n", optn); - return 0; -out_inv_arg: - printk("AFFS: Option %s does not take an argument\n", optn); - return 0; } /* This function definitely needs to be split up. Some fine day I'll diff -Nru a/fs/autofs/inode.c b/fs/autofs/inode.c --- a/fs/autofs/inode.c Thu Oct 2 01:28:17 2003 +++ b/fs/autofs/inode.c Thu Oct 2 01:28:17 2003 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "autofs_i.h" #include @@ -45,10 +46,24 @@ .statfs = simple_statfs, }; +enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto}; + +static match_table_t autofs_tokens = { + {Opt_fd, "fd=%d"}, + {Opt_uid, "uid=%d"}, + {Opt_gid, "gid=%d"}, + {Opt_pgrp, "pgrp=%d"}, + {Opt_minproto, "minproto=%d"}, + {Opt_maxproto, "maxproto=%d"}, + {Opt_err, NULL} +}; + static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid, pid_t *pgrp, int *minproto, int *maxproto) { - char *this_char, *value; - + char *p; + substring_t args[MAX_OPT_ARGS]; + int option; + *uid = current->uid; *gid = current->gid; *pgrp = process_group(current); @@ -57,55 +72,49 @@ *pipefd = -1; - if ( !options ) return 1; - while ((this_char = strsep(&options,",")) != NULL) { - if (!*this_char) + if (!options) + return 1; + + while ((p = strsep(&options, ",")) != NULL) { + int token; + if (!*p) continue; - if ((value = strchr(this_char,'=')) != NULL) - *value++ = 0; - if (!strcmp(this_char,"fd")) { - if (!value || !*value) - return 1; - *pipefd = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"uid")) { - if (!value || !*value) - return 1; - *uid = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"gid")) { - if (!value || !*value) - return 1; - *gid = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"pgrp")) { - if (!value || !*value) - return 1; - *pgrp = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"minproto")) { - if (!value || !*value) - return 1; - *minproto = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"maxproto")) { - if (!value || !*value) - return 1; - *maxproto = simple_strtoul(value,&value,0); - if (*value) - return 1; + + token = match_token(p, autofs_tokens, args); + switch (token) { + case Opt_fd: + if (match_int(&args[0], &option)) + return 1; + *pipefd = option; + break; + case Opt_uid: + if (match_int(&args[0], &option)) + return 1; + *uid = option; + break; + case Opt_gid: + if (match_int(&args[0], &option)) + return 1; + *gid = option; + break; + case Opt_pgrp: + if (match_int(&args[0], &option)) + return 1; + *pgrp = option; + break; + case Opt_minproto: + if (match_int(&args[0], &option)) + return 1; + *minproto = option; + break; + case Opt_maxproto: + if (match_int(&args[0], &option)) + return 1; + *maxproto = option; + break; + default: + return 1; } - else break; } return (*pipefd < 0); } diff -Nru a/fs/autofs4/inode.c b/fs/autofs4/inode.c --- a/fs/autofs4/inode.c Thu Oct 2 01:28:17 2003 +++ b/fs/autofs4/inode.c Thu Oct 2 01:28:17 2003 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "autofs_i.h" #include @@ -94,11 +95,25 @@ .statfs = simple_statfs, }; +enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto}; + +static match_table_t tokens = { + {Opt_fd, "fd=%d"}, + {Opt_uid, "uid=%d"}, + {Opt_gid, "gid=%d"}, + {Opt_pgrp, "pgrp=%d"}, + {Opt_minproto, "minproto=%d"}, + {Opt_maxproto, "maxproto=%d"}, + {Opt_err, NULL} +}; + static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid, pid_t *pgrp, int *minproto, int *maxproto) { - char *this_char, *value; - + char *p; + substring_t args[MAX_OPT_ARGS]; + int option; + *uid = current->uid; *gid = current->gid; *pgrp = process_group(current); @@ -108,55 +123,48 @@ *pipefd = -1; - if ( !options ) return 1; - while ((this_char = strsep(&options,",")) != NULL) { - if (!*this_char) + if (!options) + return 1; + + while ((p = strsep(&options, ",")) != NULL) { + int token; + if (!*p) continue; - if ((value = strchr(this_char,'=')) != NULL) - *value++ = 0; - if (!strcmp(this_char,"fd")) { - if (!value || !*value) - return 1; - *pipefd = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"uid")) { - if (!value || !*value) - return 1; - *uid = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"gid")) { - if (!value || !*value) - return 1; - *gid = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"pgrp")) { - if (!value || !*value) - return 1; - *pgrp = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"minproto")) { - if (!value || !*value) - return 1; - *minproto = simple_strtoul(value,&value,0); - if (*value) - return 1; - } - else if (!strcmp(this_char,"maxproto")) { - if (!value || !*value) - return 1; - *maxproto = simple_strtoul(value,&value,0); - if (*value) - return 1; + + token = match_token(p, tokens, args); + switch (token) { + case Opt_fd: + if (match_int(args, pipefd)) + return 1; + break; + case Opt_uid: + if (match_int(args, &option)) + return 1; + *uid = option; + break; + case Opt_gid: + if (match_int(args, &option)) + return 1; + *gid = option; + break; + case Opt_pgrp: + if (match_int(args, &option)) + return 1; + *pgrp = option; + break; + case Opt_minproto: + if (match_int(args, &option)) + return 1; + *minproto = option; + break; + case Opt_maxproto: + if (match_int(args, &option)) + return 1; + *maxproto = option; + break; + default: + return 1; } - else break; } return (*pipefd < 0); } diff -Nru a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c --- a/fs/befs/linuxvfs.c Thu Oct 2 01:28:16 2003 +++ b/fs/befs/linuxvfs.c Thu Oct 2 01:28:16 2003 @@ -13,6 +13,7 @@ #include #include #include +#include #include "befs.h" #include "btree.h" @@ -39,7 +40,7 @@ static void befs_destroy_inode(struct inode *inode); static int befs_init_inodecache(void); static void befs_destroy_inodecache(void); -static int befs_readlink(struct dentry *, char *, int); +static int befs_readlink(struct dentry *, char __user *, int); static int befs_follow_link(struct dentry *, struct nameidata *nd); static int befs_utf2nls(struct super_block *sb, const char *in, int in_len, char **out, int *out_len); @@ -494,7 +495,7 @@ } static int -befs_readlink(struct dentry *dentry, char *buffer, int buflen) +befs_readlink(struct dentry *dentry, char __user *buffer, int buflen) { struct super_block *sb = dentry->d_sb; befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); @@ -667,12 +668,27 @@ return -EILSEQ; } +/** + * Use the + * + */ +enum { + Opt_uid, Opt_gid, Opt_charset, Opt_debug, +}; + +static match_table_t befs_tokens = { + {Opt_uid, "uid=%d"}, + {Opt_gid, "gid=%d"}, + {Opt_charset, "iocharset=%s"}, + {Opt_debug, "debug"} +}; + static int parse_options(char *options, befs_mount_options * opts) { - char *this_char; - char *value; - int ret = 1; + char *p; + substring_t args[MAX_OPT_ARGS]; + int option; /* Initialize options */ opts->uid = 0; @@ -683,64 +699,56 @@ opts->debug = 0; if (!options) - return ret; - - while ((this_char = strsep(&options, ",")) != NULL) { + return 1; - if ((value = strchr(this_char, '=')) != NULL) - *value++ = 0; - - if (!strcmp(this_char, "uid")) { - if (!value || !*value) { - ret = 0; - } else { - opts->uid = simple_strtoul(value, &value, 0); - opts->use_uid = 1; - if (*value) { - printk(KERN_ERR "BEFS: Invalid uid " - "option: %s\n", value); - ret = 0; - } + while ((p = strsep(&options, ",")) != NULL) { + int token; + if (!*p) + continue; + + token = match_token(p, befs_tokens, args); + switch (token) { + case Opt_uid: + if (match_int(&args[0], &option)) + return 0; + if (option < 0) { + printk(KERN_ERR "BeFS: Invalid uid %d, " + "using default\n", option); + break; } - } else if (!strcmp(this_char, "gid")) { - if (!value || !*value) - ret = 0; - else { - opts->gid = simple_strtoul(value, &value, 0); - opts->use_gid = 1; - if (*value) { - printk(KERN_ERR - "BEFS: Invalid gid option: " - "%s\n", value); - ret = 0; - } + opts->uid = option; + opts->use_uid = 1; + break; + case Opt_gid: + if (match_int(&args[0], &option)) + return 0; + if (option < 0) { + printk(KERN_ERR "BeFS: Invalid gid %d, " + "using default\n", option); + break; } - } else if (!strcmp(this_char, "iocharset") && value) { - char *p = value; - int len; - - while (*value && *value != ',') - value++; - len = value - p; - if (len) { - char *buffer = kmalloc(len + 1, GFP_NOFS); - if (buffer) { - opts->iocharset = buffer; - memcpy(buffer, p, len); - buffer[len] = 0; - - } else { - printk(KERN_ERR "BEFS: " - "cannot allocate memory\n"); - ret = 0; - } + opts->gid = option; + opts->use_gid = 1; + break; + case Opt_charset: + kfree(opts->iocharset); + opts->iocharset = match_strdup(&args[0]); + if (!opts->iocharset) { + printk(KERN_ERR "BeFS: allocation failure for " + "iocharset string\n"); + return 0; } - } else if (!strcmp(this_char, "debug")) { + break; + case Opt_debug: opts->debug = 1; + break; + default: + printk(KERN_ERR "BeFS: Unrecognized mount option \"%s\" " + "or missing value\n", p); + return 0; } } - - return ret; + return 1; } /* This function has the responsibiltiy of getting the @@ -939,9 +947,19 @@ err = befs_init_inodecache(); if (err) - return err; + goto unaquire_none; + + err = register_filesystem(&befs_fs_type); + if (err) + goto unaquire_inodecache; + + return 0; + +unaquire_inodecache: + befs_destroy_inodecache(); - return register_filesystem(&befs_fs_type); +unaquire_none: + return err; } static void __exit diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c --- a/fs/binfmt_elf.c Thu Oct 2 01:28:16 2003 +++ b/fs/binfmt_elf.c Thu Oct 2 01:28:16 2003 @@ -134,7 +134,7 @@ elf_addr_t *sp, *u_platform; const char *k_platform = ELF_PLATFORM; int items; - elf_addr_t elf_info[40]; + elf_addr_t *elf_info; int ei_index = 0; struct task_struct *tsk = current; @@ -169,6 +169,7 @@ } /* Create the ELF interpreter info */ + elf_info = current->mm->saved_auxv; #define NEW_AUX_ENT(id, val) \ do { elf_info[ei_index++] = id; elf_info[ei_index++] = val; } while (0) @@ -1186,7 +1187,7 @@ */ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file) { -#define NUM_NOTES 5 +#define NUM_NOTES 6 int has_dumped = 0; mm_segment_t fs; int segs; @@ -1196,7 +1197,7 @@ struct elfhdr *elf = NULL; off_t offset = 0, dataoff; unsigned long limit = current->rlim[RLIMIT_CORE].rlim_cur; - int numnote = NUM_NOTES; + int numnote; struct memelfnote *notes = NULL; struct elf_prstatus *prstatus = NULL; /* NT_PRSTATUS */ struct elf_prpsinfo *psinfo = NULL; /* NT_PRPSINFO */ @@ -1287,18 +1288,24 @@ fill_note(notes +2, "CORE", NT_TASKSTRUCT, sizeof(*current), current); + numnote = 3; + + i = 0; + do + i += 2; + while (current->mm->saved_auxv[i - 2] != AT_NULL); + fill_note(¬es[numnote++], "CORE", NT_AUXV, + i * sizeof current->mm->saved_auxv[0], + current->mm->saved_auxv); + /* Try to dump the FPU. */ if ((prstatus->pr_fpvalid = elf_core_copy_task_fpregs(current, regs, fpu))) - fill_note(notes +3, "CORE", NT_PRFPREG, sizeof(*fpu), fpu); - else - --numnote; + fill_note(notes + numnote++, + "CORE", NT_PRFPREG, sizeof(*fpu), fpu); #ifdef ELF_CORE_COPY_XFPREGS if (elf_core_copy_task_xfpregs(current, xfpu)) - fill_note(notes +4, "LINUX", NT_PRXFPREG, sizeof(*xfpu), xfpu); - else - --numnote; -#else - numnote--; + fill_note(notes + numnote++, + "LINUX", NT_PRXFPREG, sizeof(*xfpu), xfpu); #endif fs = get_fs(); diff -Nru a/fs/block_dev.c b/fs/block_dev.c --- a/fs/block_dev.c Thu Oct 2 01:28:18 2003 +++ b/fs/block_dev.c Thu Oct 2 01:28:18 2003 @@ -70,6 +70,8 @@ return 0; } +EXPORT_SYMBOL(set_blocksize); + int sb_set_blocksize(struct super_block *sb, int size) { int bits; @@ -82,6 +84,8 @@ return sb->s_blocksize; } +EXPORT_SYMBOL(sb_set_blocksize); + int sb_min_blocksize(struct super_block *sb, int size) { int minsize = bdev_hardsect_size(sb->s_bdev); @@ -90,6 +94,8 @@ return sb_set_blocksize(sb, size); } +EXPORT_SYMBOL(sb_min_blocksize); + static int blkdev_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh, int create) @@ -358,6 +364,8 @@ return bdev; } +EXPORT_SYMBOL(bdget); + long nr_blockdev_pages(void) { struct list_head *p; @@ -376,6 +384,8 @@ { iput(bdev->bd_inode); } + +EXPORT_SYMBOL(bdput); int bd_acquire(struct inode *inode) { @@ -444,6 +454,8 @@ return res; } +EXPORT_SYMBOL(bd_claim); + void bd_release(struct block_device *bdev) { spin_lock(&bdev_lock); @@ -454,6 +466,8 @@ spin_unlock(&bdev_lock); } +EXPORT_SYMBOL(bd_release); + /* * Tries to open block device by device number. Use it ONLY if you * really do not have anything better - i.e. when you are behind a @@ -471,6 +485,8 @@ return err ? ERR_PTR(err) : bdev; } +EXPORT_SYMBOL(open_by_devnum); + /* * This routine checks whether a removable media has been changed, * and invalidates all buffer-cache-entries in that case. This @@ -500,6 +516,8 @@ return 1; } +EXPORT_SYMBOL(check_disk_change); + static void bd_set_size(struct block_device *bdev, loff_t size) { unsigned bsize = bdev_hardsect_size(bdev); @@ -632,6 +650,8 @@ return do_open(bdev, bdev->bd_inode, &fake_file); } +EXPORT_SYMBOL(blkdev_get); + int blkdev_open(struct inode * inode, struct file * filp) { struct block_device *bdev; @@ -662,6 +682,8 @@ return res; } +EXPORT_SYMBOL(blkdev_open); + int blkdev_put(struct block_device *bdev, int kind) { int ret = 0; @@ -710,6 +732,8 @@ return ret; } +EXPORT_SYMBOL(blkdev_put); + int blkdev_close(struct inode * inode, struct file * filp) { if (inode->i_bdev->bd_holder == filp) @@ -760,6 +784,8 @@ .sendfile = generic_file_sendfile, }; +EXPORT_SYMBOL(def_blk_fops); + int ioctl_by_bdev(struct block_device *bdev, unsigned cmd, unsigned long arg) { int res; @@ -770,6 +796,8 @@ return res; } +EXPORT_SYMBOL(ioctl_by_bdev); + /** * lookup_bdev - lookup a struct block_device by name * @@ -854,6 +882,8 @@ return ERR_PTR(error); } +EXPORT_SYMBOL(open_bdev_excl); + /** * close_bdev_excl - release a blockdevice openen by open_bdev_excl() * @@ -867,3 +897,5 @@ bd_release(bdev); blkdev_put(bdev, kind); } + +EXPORT_SYMBOL(close_bdev_excl); diff -Nru a/fs/buffer.c b/fs/buffer.c --- a/fs/buffer.c Thu Oct 2 01:28:17 2003 +++ b/fs/buffer.c Thu Oct 2 01:28:17 2003 @@ -3035,3 +3035,31 @@ (void *)(long)smp_processor_id()); register_cpu_notifier(&buffer_nb); } + +EXPORT_SYMBOL(__bforget); +EXPORT_SYMBOL(__brelse); +EXPORT_SYMBOL(__wait_on_buffer); +EXPORT_SYMBOL(block_commit_write); +EXPORT_SYMBOL(block_prepare_write); +EXPORT_SYMBOL(block_read_full_page); +EXPORT_SYMBOL(block_sync_page); +EXPORT_SYMBOL(block_truncate_page); +EXPORT_SYMBOL(block_write_full_page); +EXPORT_SYMBOL(buffer_insert_list); +EXPORT_SYMBOL(cont_prepare_write); +EXPORT_SYMBOL(end_buffer_async_write); +EXPORT_SYMBOL(end_buffer_read_sync); +EXPORT_SYMBOL(end_buffer_write_sync); +EXPORT_SYMBOL(file_fsync); +EXPORT_SYMBOL(fsync_bdev); +EXPORT_SYMBOL(fsync_buffers_list); +EXPORT_SYMBOL(generic_block_bmap); +EXPORT_SYMBOL(generic_commit_write); +EXPORT_SYMBOL(generic_cont_expand); +EXPORT_SYMBOL(init_buffer); +EXPORT_SYMBOL(invalidate_bdev); +EXPORT_SYMBOL(ll_rw_block); +EXPORT_SYMBOL(mark_buffer_dirty); +EXPORT_SYMBOL(submit_bh); +EXPORT_SYMBOL(sync_dirty_buffer); +EXPORT_SYMBOL(unlock_buffer); diff -Nru a/fs/compat_ioctl.c b/fs/compat_ioctl.c --- a/fs/compat_ioctl.c Thu Oct 2 01:28:18 2003 +++ b/fs/compat_ioctl.c Thu Oct 2 01:28:18 2003 @@ -1035,6 +1035,7 @@ return -EFAULT; } + sgio->dxferp = iov; return 0; } diff -Nru a/fs/dcache.c b/fs/dcache.c --- a/fs/dcache.c Thu Oct 2 01:28:16 2003 +++ b/fs/dcache.c Thu Oct 2 01:28:16 2003 @@ -1639,3 +1639,27 @@ bdev_cache_init(); chrdev_init(); } + +EXPORT_SYMBOL(d_alloc); +EXPORT_SYMBOL(d_alloc_anon); +EXPORT_SYMBOL(d_alloc_root); +EXPORT_SYMBOL(d_delete); +EXPORT_SYMBOL(d_find_alias); +EXPORT_SYMBOL(d_instantiate); +EXPORT_SYMBOL(d_invalidate); +EXPORT_SYMBOL(d_lookup); +EXPORT_SYMBOL(d_move); +EXPORT_SYMBOL(d_path); +EXPORT_SYMBOL(d_prune_aliases); +EXPORT_SYMBOL(d_rehash); +EXPORT_SYMBOL(d_splice_alias); +EXPORT_SYMBOL(d_validate); +EXPORT_SYMBOL(dget_locked); +EXPORT_SYMBOL(dput); +EXPORT_SYMBOL(find_inode_number); +EXPORT_SYMBOL(have_submounts); +EXPORT_SYMBOL(is_subdir); +EXPORT_SYMBOL(names_cachep); +EXPORT_SYMBOL(shrink_dcache_anon); +EXPORT_SYMBOL(shrink_dcache_parent); +EXPORT_SYMBOL(shrink_dcache_sb); diff -Nru a/fs/efs/super.c b/fs/efs/super.c --- a/fs/efs/super.c Thu Oct 2 01:28:17 2003 +++ b/fs/efs/super.c Thu Oct 2 01:28:17 2003 @@ -218,7 +218,11 @@ memset(sb, 0, sizeof(struct efs_sb_info)); s->s_magic = EFS_SUPER_MAGIC; - sb_set_blocksize(s, EFS_BLOCKSIZE); + if (!sb_set_blocksize(s, EFS_BLOCKSIZE)) { + printk(KERN_ERR "EFS: device does not support %d byte blocks\n", + EFS_BLOCKSIZE); + goto out_no_fs_ul; + } /* read the vh (volume header) block */ bh = sb_bread(s, 0); diff -Nru a/fs/exec.c b/fs/exec.c --- a/fs/exec.c Thu Oct 2 01:28:16 2003 +++ b/fs/exec.c Thu Oct 2 01:28:16 2003 @@ -83,6 +83,8 @@ return 0; } +EXPORT_SYMBOL(register_binfmt); + int unregister_binfmt(struct linux_binfmt * fmt) { struct linux_binfmt ** tmp = &formats; @@ -100,6 +102,8 @@ return -EINVAL; } +EXPORT_SYMBOL(unregister_binfmt); + static inline void put_binfmt(struct linux_binfmt * fmt) { module_put(fmt->module); @@ -281,6 +285,8 @@ return r; } +EXPORT_SYMBOL(copy_strings_kernel); + #ifdef CONFIG_MMU /* * This routine is used to map in a page into an address space: needed by @@ -443,6 +449,8 @@ return 0; } +EXPORT_SYMBOL(setup_arg_pages); + #define free_arg_pages(bprm) do { } while (0) #else @@ -493,6 +501,8 @@ goto out; } +EXPORT_SYMBOL(open_exec); + int kernel_read(struct file *file, unsigned long offset, char *addr, unsigned long count) { @@ -508,6 +518,8 @@ return result; } +EXPORT_SYMBOL(kernel_read); + static int exec_mmap(struct mm_struct *mm) { struct task_struct *tsk; @@ -822,6 +834,8 @@ return retval; } +EXPORT_SYMBOL(flush_old_exec); + /* * We mustn't allow tracing of suid binaries, unless * the tracer has the capability to trace anything.. @@ -878,6 +892,8 @@ return kernel_read(bprm->file,0,bprm->buf,BINPRM_BUF_SIZE); } +EXPORT_SYMBOL(prepare_binprm); + /* * This function is used to produce the new IDs and capabilities * from the old ones and the file's capabilities. @@ -918,6 +934,8 @@ security_bprm_compute_creds(bprm); } +EXPORT_SYMBOL(compute_creds); + void remove_arg_zero(struct linux_binprm *bprm) { if (bprm->argc) { @@ -942,6 +960,8 @@ } } +EXPORT_SYMBOL(remove_arg_zero); + /* * cycle the list of binary formats handler, until one recognizes the image */ @@ -1037,6 +1057,8 @@ return retval; } +EXPORT_SYMBOL(search_binary_handler); + /* * sys_execve() executes a new program. */ @@ -1133,6 +1155,8 @@ return retval; } +EXPORT_SYMBOL(do_execve); + int set_binfmt(struct linux_binfmt *new) { struct linux_binfmt *old = current->binfmt; @@ -1146,6 +1170,8 @@ module_put(old->module); return 0; } + +EXPORT_SYMBOL(set_binfmt); #define CORENAME_MAX_SIZE 64 diff -Nru a/fs/ext2/inode.c b/fs/ext2/inode.c --- a/fs/ext2/inode.c Thu Oct 2 01:28:15 2003 +++ b/fs/ext2/inode.c Thu Oct 2 01:28:15 2003 @@ -1228,6 +1228,7 @@ raw_inode->i_block[0] = 0; raw_inode->i_block[1] = cpu_to_le32(new_encode_dev(inode->i_rdev)); + raw_inode->i_block[2] = 0; } } else for (n = 0; n < EXT2_N_BLOCKS; n++) raw_inode->i_block[n] = ei->i_data[n]; diff -Nru a/fs/ext2/super.c b/fs/ext2/super.c --- a/fs/ext2/super.c Thu Oct 2 01:28:17 2003 +++ b/fs/ext2/super.c Thu Oct 2 01:28:17 2003 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -265,149 +266,157 @@ return sb_block; } -static int want_value(char *value, char *option) -{ - if (!value || !*value) { - printk(KERN_NOTICE "EXT2-fs: the %s option needs an argument\n", - option); - return -1; - } - return 0; -} - -static int want_null_value(char *value, char *option) -{ - if (*value) { - printk(KERN_NOTICE "EXT2-fs: Invalid %s argument: %s\n", - option, value); - return -1; - } - return 0; -} +enum { + Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid, + Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro, + Opt_nouid32, Opt_check, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov, Opt_nobh, + Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, + Opt_ignore, Opt_err, +}; -static int want_numeric(char *value, char *option, unsigned long *number) -{ - if (want_value(value, option)) - return -1; - *number = simple_strtoul(value, &value, 0); - if (want_null_value(value, option)) - return -1; - return 0; -} +static match_table_t tokens = { + {Opt_bsd_df, "bsddf"}, + {Opt_minix_df, "minixdf"}, + {Opt_grpid, "grpid"}, + {Opt_grpid, "bsdgroups"}, + {Opt_nogrpid, "nogrpid"}, + {Opt_nogrpid, "sysvgroups"}, + {Opt_resgid, "resgid=%d"}, + {Opt_resuid, "resuid=%d"}, + {Opt_sb, "sb=%d"}, + {Opt_err_cont, "errors=continue"}, + {Opt_err_panic, "errors=panic"}, + {Opt_err_ro, "errors=remount-ro"}, + {Opt_nouid32, "nouid32"}, + {Opt_nocheck, "check=none"}, + {Opt_nocheck, "nocheck"}, + {Opt_check, "check"}, + {Opt_debug, "debug"}, + {Opt_oldalloc, "oldalloc"}, + {Opt_orlov, "orlov"}, + {Opt_nobh, "nobh"}, + {Opt_user_xattr, "user_xattr"}, + {Opt_nouser_xattr, "nouser_xattr"}, + {Opt_acl, "acl"}, + {Opt_noacl, "noacl"}, + {Opt_ignore, "grpquota"}, + {Opt_ignore, "noquota"}, + {Opt_ignore, "quota"}, + {Opt_ignore, "usrquota"}, + {Opt_err, NULL} +}; -/* - * This function has been shamelessly adapted from the msdos fs - */ static int parse_options (char * options, struct ext2_sb_info *sbi) { - char * this_char; - char * value; + char * p; + substring_t args[MAX_OPT_ARGS]; + unsigned long kind = EXT2_MOUNT_ERRORS_CONT; + int option; if (!options) return 1; - while ((this_char = strsep (&options, ",")) != NULL) { - if (!*this_char) + + while ((p = strsep (&options, ",")) != NULL) { + int token; + if (!*p) continue; - if ((value = strchr (this_char, '=')) != NULL) - *value++ = 0; + + token = match_token(p, tokens, args); + switch (token) { + case Opt_bsd_df: + clear_opt (sbi->s_mount_opt, MINIX_DF); + break; + case Opt_minix_df: + set_opt (sbi->s_mount_opt, MINIX_DF); + break; + case Opt_grpid: + set_opt (sbi->s_mount_opt, GRPID); + break; + case Opt_nogrpid: + clear_opt (sbi->s_mount_opt, GRPID); + break; + case Opt_resuid: + if (match_int(&args[0], &option)) + return 0; + sbi->s_resuid = option; + break; + case Opt_resgid: + if (match_int(&args[0], &option)) + return 0; + sbi->s_resgid = option; + break; + case Opt_sb: + /* handled by get_sb_block() instead of here */ + /* *sb_block = match_int(&args[0]); */ + break; + case Opt_err_panic: + kind = EXT2_MOUNT_ERRORS_PANIC; + break; + case Opt_err_ro: + kind = EXT2_MOUNT_ERRORS_RO; + break; + case Opt_err_cont: + kind = EXT2_MOUNT_ERRORS_CONT; + break; + case Opt_nouid32: + set_opt (sbi->s_mount_opt, NO_UID32); + break; + case Opt_check: +#ifdef CONFIG_EXT2_CHECK + set_opt (sbi->s_mount_opt, CHECK); +#else + printk("EXT2 Check option not supported\n"); +#endif + break; + case Opt_nocheck: + clear_opt (sbi->s_mount_opt, CHECK); + break; + case Opt_debug: + set_opt (sbi->s_mount_opt, DEBUG); + break; + case Opt_oldalloc: + set_opt (sbi->s_mount_opt, OLDALLOC); + break; + case Opt_orlov: + clear_opt (sbi->s_mount_opt, OLDALLOC); + break; + case Opt_nobh: + set_opt (sbi->s_mount_opt, NOBH); + break; #ifdef CONFIG_EXT2_FS_XATTR - if (!strcmp (this_char, "user_xattr")) + case Opt_user_xattr: set_opt (sbi->s_mount_opt, XATTR_USER); - else if (!strcmp (this_char, "nouser_xattr")) + break; + case Opt_nouser_xattr: clear_opt (sbi->s_mount_opt, XATTR_USER); - else + break; +#else + case Opt_user_xattr: + case Opt_nouser_xattr: + printk("EXT2 (no)user_xattr options not supported\n"); + break; #endif #ifdef CONFIG_EXT2_FS_POSIX_ACL - if (!strcmp(this_char, "acl")) + case Opt_acl: set_opt(sbi->s_mount_opt, POSIX_ACL); - else if (!strcmp(this_char, "noacl")) + break; + case Opt_noacl: clear_opt(sbi->s_mount_opt, POSIX_ACL); - else -#endif - if (!strcmp (this_char, "bsddf")) - clear_opt (sbi->s_mount_opt, MINIX_DF); - else if (!strcmp (this_char, "nouid32")) { - set_opt (sbi->s_mount_opt, NO_UID32); - } - else if (!strcmp (this_char, "check")) { - if (!value || !*value || !strcmp (value, "none")) - clear_opt (sbi->s_mount_opt, CHECK); - else -#ifdef CONFIG_EXT2_CHECK - set_opt (sbi->s_mount_opt, CHECK); + break; #else - printk("EXT2 Check option not supported\n"); + case Opt_acl: + case Opt_noacl: + printk("EXT2 (no)acl options not supported\n"); + break; #endif - } - else if (!strcmp (this_char, "debug")) - set_opt (sbi->s_mount_opt, DEBUG); - else if (!strcmp (this_char, "errors")) { - if (!value || !*value) { - printk ("EXT2-fs: the errors option requires " - "an argument\n"); - return 0; - } - if (!strcmp (value, "continue")) { - clear_opt (sbi->s_mount_opt, ERRORS_RO); - clear_opt (sbi->s_mount_opt, ERRORS_PANIC); - set_opt (sbi->s_mount_opt, ERRORS_CONT); - } - else if (!strcmp (value, "remount-ro")) { - clear_opt (sbi->s_mount_opt, ERRORS_CONT); - clear_opt (sbi->s_mount_opt, ERRORS_PANIC); - set_opt (sbi->s_mount_opt, ERRORS_RO); - } - else if (!strcmp (value, "panic")) { - clear_opt (sbi->s_mount_opt, ERRORS_CONT); - clear_opt (sbi->s_mount_opt, ERRORS_RO); - set_opt (sbi->s_mount_opt, ERRORS_PANIC); - } - else { - printk ("EXT2-fs: Invalid errors option: %s\n", - value); - return 0; - } - } - else if (!strcmp (this_char, "grpid") || - !strcmp (this_char, "bsdgroups")) - set_opt (sbi->s_mount_opt, GRPID); - else if (!strcmp (this_char, "minixdf")) - set_opt (sbi->s_mount_opt, MINIX_DF); - else if (!strcmp (this_char, "nocheck")) - clear_opt (sbi->s_mount_opt, CHECK); - else if (!strcmp (this_char, "nogrpid") || - !strcmp (this_char, "sysvgroups")) - clear_opt (sbi->s_mount_opt, GRPID); - else if (!strcmp (this_char, "resgid")) { - unsigned long v; - if (want_numeric(value, "resgid", &v)) - return 0; - sbi->s_resgid = v; - } - else if (!strcmp (this_char, "resuid")) { - unsigned long v; - if (want_numeric(value, "resuid", &v)) - return 0; - sbi->s_resuid = v; - } - else if (!strcmp (this_char, "oldalloc")) - set_opt (sbi->s_mount_opt, OLDALLOC); - else if (!strcmp (this_char, "orlov")) - clear_opt (sbi->s_mount_opt, OLDALLOC); - else if (!strcmp (this_char, "nobh")) - set_opt(sbi->s_mount_opt, NOBH); - /* Silently ignore the quota options */ - else if (!strcmp (this_char, "grpquota") - || !strcmp (this_char, "noquota") - || !strcmp (this_char, "quota") - || !strcmp (this_char, "usrquota")) - /* Don't do anything ;-) */ ; - else { - printk ("EXT2-fs: Unrecognized mount option %s\n", this_char); + case Opt_ignore: + break; + default: return 0; } } + sbi->s_mount_opt |= kind; return 1; } diff -Nru a/fs/ext3/file.c b/fs/ext3/file.c --- a/fs/ext3/file.c Thu Oct 2 01:28:18 2003 +++ b/fs/ext3/file.c Thu Oct 2 01:28:18 2003 @@ -47,7 +47,7 @@ * the caller didn't specify O_LARGEFILE. On 64bit systems we force * on this flag in sys_open. */ -static int ext3_open_file (struct inode * inode, struct file * filp) +static int ext3_open_file (struct inode *inode, struct file *filp) { if (!(filp->f_flags & O_LARGEFILE) && inode->i_size > 0x7FFFFFFFLL) @@ -56,7 +56,7 @@ } static ssize_t -ext3_file_write(struct kiocb *iocb, const char *buf, size_t count, loff_t pos) +ext3_file_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t pos) { struct file *file = iocb->ki_filp; struct inode *inode = file->f_dentry->d_inode; @@ -117,8 +117,8 @@ .llseek = generic_file_llseek, .read = do_sync_read, .write = do_sync_write, - .aio_read = generic_file_aio_read, - .aio_write = ext3_file_write, + .aio_read = generic_file_aio_read, + .aio_write = ext3_file_write, .readv = generic_file_readv, .writev = generic_file_writev, .ioctl = ext3_ioctl, diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c --- a/fs/ext3/inode.c Thu Oct 2 01:28:17 2003 +++ b/fs/ext3/inode.c Thu Oct 2 01:28:17 2003 @@ -2679,6 +2679,7 @@ raw_inode->i_block[0] = 0; raw_inode->i_block[1] = cpu_to_le32(new_encode_dev(inode->i_rdev)); + raw_inode->i_block[2] = 0; } } else for (block = 0; block < EXT3_N_BLOCKS; block++) raw_inode->i_block[block] = ei->i_data[block]; diff -Nru a/fs/ext3/super.c b/fs/ext3/super.c --- a/fs/ext3/super.c Thu Oct 2 01:28:17 2003 +++ b/fs/ext3/super.c Thu Oct 2 01:28:17 2003 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -526,36 +527,54 @@ .get_parent = ext3_get_parent, }; +enum { + Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid, + Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro, + Opt_nouid32, Opt_check, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov, + Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, Opt_noload, + Opt_commit, Opt_journal_update, Opt_journal_inum, + Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, + Opt_ignore, Opt_err, +}; -static int want_value(char *value, char *option) -{ - if (!value || !*value) { - printk(KERN_NOTICE "EXT3-fs: the %s option needs an argument\n", - option); - return -1; - } - return 0; -} - -static int want_null_value(char *value, char *option) -{ - if (*value) { - printk(KERN_NOTICE "EXT3-fs: Invalid %s argument: %s\n", - option, value); - return -1; - } - return 0; -} - -static int want_numeric(char *value, char *option, unsigned long *number) -{ - if (want_value(value, option)) - return -1; - *number = simple_strtoul(value, &value, 0); - if (want_null_value(value, option)) - return -1; - return 0; -} +static match_table_t tokens = { + {Opt_bsd_df, "bsddf"}, + {Opt_minix_df, "minixdf"}, + {Opt_grpid, "grpid"}, + {Opt_grpid, "bsdgroups"}, + {Opt_nogrpid, "nogrpid"}, + {Opt_nogrpid, "sysvgroups"}, + {Opt_resgid, "resgid=%d"}, + {Opt_resuid, "resuid=%d"}, + {Opt_sb, "sb=%d"}, + {Opt_err_cont, "errors=continue"}, + {Opt_err_panic, "errors=panic"}, + {Opt_err_ro, "errors=remount-ro"}, + {Opt_nouid32, "nouid32"}, + {Opt_nocheck, "nocheck"}, + {Opt_nocheck, "check=none"}, + {Opt_check, "check"}, + {Opt_debug, "debug"}, + {Opt_oldalloc, "oldalloc"}, + {Opt_orlov, "orlov"}, + {Opt_user_xattr, "user_xattr"}, + {Opt_nouser_xattr, "nouser_xattr"}, + {Opt_acl, "acl"}, + {Opt_noacl, "noacl"}, + {Opt_noload, "noload"}, + {Opt_commit, "commit=%u"}, + {Opt_journal_update, "journal=update"}, + {Opt_journal_inum, "journal=%u"}, + {Opt_abort, "abort"}, + {Opt_data_journal, "data=journal"}, + {Opt_data_ordered, "data=ordered"}, + {Opt_data_writeback, "data=writeback"}, + {Opt_ignore, "grpquota"}, + {Opt_ignore, "noquota"}, + {Opt_ignore, "quota"}, + {Opt_ignore, "usrquota"}, + {Opt_err, NULL} +}; static unsigned long get_sb_block(void **data) { @@ -577,175 +596,180 @@ return sb_block; } -/* - * This function has been shamelessly adapted from the msdos fs - */ static int parse_options (char * options, struct ext3_sb_info *sbi, unsigned long * inum, int is_remount) { - char * this_char; - char * value; + char * p; + substring_t args[MAX_OPT_ARGS]; + int data_opt = 0; + int option; if (!options) return 1; - while ((this_char = strsep (&options, ",")) != NULL) { - if (!*this_char) + + while ((p = strsep (&options, ",")) != NULL) { + int token; + if (!*p) continue; - if ((value = strchr (this_char, '=')) != NULL) - *value++ = 0; -#ifdef CONFIG_EXT3_FS_XATTR - if (!strcmp (this_char, "user_xattr")) - set_opt (sbi->s_mount_opt, XATTR_USER); - else if (!strcmp (this_char, "nouser_xattr")) - clear_opt (sbi->s_mount_opt, XATTR_USER); - else -#endif -#ifdef CONFIG_EXT3_FS_POSIX_ACL - if (!strcmp(this_char, "acl")) - set_opt (sbi->s_mount_opt, POSIX_ACL); - else if (!strcmp(this_char, "noacl")) - clear_opt (sbi->s_mount_opt, POSIX_ACL); - else -#endif - if (!strcmp (this_char, "bsddf")) + + token = match_token(p, tokens, args); + switch (token) { + case Opt_bsd_df: clear_opt (sbi->s_mount_opt, MINIX_DF); - else if (!strcmp (this_char, "nouid32")) { + break; + case Opt_minix_df: + set_opt (sbi->s_mount_opt, MINIX_DF); + break; + case Opt_grpid: + set_opt (sbi->s_mount_opt, GRPID); + break; + case Opt_nogrpid: + clear_opt (sbi->s_mount_opt, GRPID); + break; + case Opt_resuid: + if (match_int(&args[0], &option)) + return 0; + sbi->s_resuid = option; + break; + case Opt_resgid: + if (match_int(&args[0], &option)) + return 0; + sbi->s_resgid = option; + break; + case Opt_sb: + /* handled by get_sb_block() instead of here */ + /* *sb_block = match_int(&args[0]); */ + break; + case Opt_err_panic: + clear_opt (sbi->s_mount_opt, ERRORS_CONT); + clear_opt (sbi->s_mount_opt, ERRORS_RO); + set_opt (sbi->s_mount_opt, ERRORS_PANIC); + break; + case Opt_err_ro: + clear_opt (sbi->s_mount_opt, ERRORS_CONT); + clear_opt (sbi->s_mount_opt, ERRORS_PANIC); + set_opt (sbi->s_mount_opt, ERRORS_RO); + break; + case Opt_err_cont: + clear_opt (sbi->s_mount_opt, ERRORS_RO); + clear_opt (sbi->s_mount_opt, ERRORS_PANIC); + set_opt (sbi->s_mount_opt, ERRORS_CONT); + break; + case Opt_nouid32: set_opt (sbi->s_mount_opt, NO_UID32); - } - else if (!strcmp (this_char, "abort")) - set_opt (sbi->s_mount_opt, ABORT); - else if (!strcmp (this_char, "check")) { - if (!value || !*value || !strcmp (value, "none")) - clear_opt (sbi->s_mount_opt, CHECK); - else + break; + case Opt_check: #ifdef CONFIG_EXT3_CHECK - set_opt (sbi->s_mount_opt, CHECK); + set_opt (sbi->s_mount_opt, CHECK); #else - printk(KERN_ERR - "EXT3 Check option not supported\n"); + printk(KERN_ERR + "EXT3 Check option not supported\n"); #endif - } - else if (!strcmp (this_char, "debug")) - set_opt (sbi->s_mount_opt, DEBUG); - else if (!strcmp (this_char, "errors")) { - if (want_value(value, "errors")) - return 0; - if (!strcmp (value, "continue")) { - clear_opt (sbi->s_mount_opt, ERRORS_RO); - clear_opt (sbi->s_mount_opt, ERRORS_PANIC); - set_opt (sbi->s_mount_opt, ERRORS_CONT); - } - else if (!strcmp (value, "remount-ro")) { - clear_opt (sbi->s_mount_opt, ERRORS_CONT); - clear_opt (sbi->s_mount_opt, ERRORS_PANIC); - set_opt (sbi->s_mount_opt, ERRORS_RO); - } - else if (!strcmp (value, "panic")) { - clear_opt (sbi->s_mount_opt, ERRORS_CONT); - clear_opt (sbi->s_mount_opt, ERRORS_RO); - set_opt (sbi->s_mount_opt, ERRORS_PANIC); - } - else { - printk (KERN_ERR - "EXT3-fs: Invalid errors option: %s\n", - value); - return 0; - } - } - else if (!strcmp (this_char, "grpid") || - !strcmp (this_char, "bsdgroups")) - set_opt (sbi->s_mount_opt, GRPID); - else if (!strcmp (this_char, "minixdf")) - set_opt (sbi->s_mount_opt, MINIX_DF); - else if (!strcmp (this_char, "nocheck")) + break; + case Opt_nocheck: clear_opt (sbi->s_mount_opt, CHECK); - else if (!strcmp (this_char, "nogrpid") || - !strcmp (this_char, "sysvgroups")) - clear_opt (sbi->s_mount_opt, GRPID); - else if (!strcmp (this_char, "resgid")) { - unsigned long v; - if (want_numeric(value, "resgid", &v)) - return 0; - sbi->s_resgid = v; - } - else if (!strcmp (this_char, "resuid")) { - unsigned long v; - if (want_numeric(value, "resuid", &v)) - return 0; - sbi->s_resuid = v; - } - else if (!strcmp (this_char, "oldalloc")) + break; + case Opt_debug: + set_opt (sbi->s_mount_opt, DEBUG); + break; + case Opt_oldalloc: set_opt (sbi->s_mount_opt, OLDALLOC); - else if (!strcmp (this_char, "orlov")) + break; + case Opt_orlov: clear_opt (sbi->s_mount_opt, OLDALLOC); - /* Silently ignore the quota options */ - else if (!strcmp (this_char, "grpquota") - || !strcmp (this_char, "noquota") - || !strcmp (this_char, "quota") - || !strcmp (this_char, "usrquota")) - /* Don't do anything ;-) */ ; - else if (!strcmp (this_char, "journal")) { + break; +#ifdef CONFIG_EXT3_FS_XATTR + case Opt_user_xattr: + set_opt (sbi->s_mount_opt, XATTR_USER); + break; + case Opt_nouser_xattr: + clear_opt (sbi->s_mount_opt, XATTR_USER); + break; +#else + case Opt_user_xattr: + case Opt_nouser_xattr: + printk("EXT3 (no)user_xattr options not supported\n"); + break; +#endif +#ifdef CONFIG_EXT3_FS_POSIX_ACL + case Opt_acl: + set_opt(sbi->s_mount_opt, POSIX_ACL); + break; + case Opt_noacl: + clear_opt(sbi->s_mount_opt, POSIX_ACL); + break; +#else + case Opt_acl: + case Opt_noacl: + printk("EXT3 (no)acl options not supported\n"); + break; +#endif + case Opt_journal_update: /* @@@ FIXME */ /* Eventually we will want to be able to create - a journal file here. For now, only allow the - user to specify an existing inode to be the - journal file. */ + a journal file here. For now, only allow the + user to specify an existing inode to be the + journal file. */ if (is_remount) { printk(KERN_ERR "EXT3-fs: cannot specify " "journal on remount\n"); return 0; } - - if (want_value(value, "journal")) + set_opt (sbi->s_mount_opt, UPDATE_JOURNAL); + break; + case Opt_journal_inum: + if (is_remount) { + printk(KERN_ERR "EXT3-fs: cannot specify " + "journal on remount\n"); return 0; - if (!strcmp (value, "update")) - set_opt (sbi->s_mount_opt, UPDATE_JOURNAL); - else if (want_numeric(value, "journal", inum)) + } + if (match_int(&args[0], &option)) return 0; - } - else if (!strcmp (this_char, "noload")) + *inum = option; + break; + case Opt_noload: set_opt (sbi->s_mount_opt, NOLOAD); - else if (!strcmp (this_char, "data")) { - int data_opt = 0; - - if (want_value(value, "data")) + break; + case Opt_commit: + if (match_int(&args[0], &option)) return 0; - if (!strcmp (value, "journal")) - data_opt = EXT3_MOUNT_JOURNAL_DATA; - else if (!strcmp (value, "ordered")) - data_opt = EXT3_MOUNT_ORDERED_DATA; - else if (!strcmp (value, "writeback")) - data_opt = EXT3_MOUNT_WRITEBACK_DATA; - else { - printk (KERN_ERR - "EXT3-fs: Invalid data option: %s\n", - value); - return 0; - } + sbi->s_commit_interval = HZ * option; + break; + case Opt_data_journal: + data_opt = EXT3_MOUNT_JOURNAL_DATA; + goto datacheck; + case Opt_data_ordered: + data_opt = EXT3_MOUNT_ORDERED_DATA; + goto datacheck; + case Opt_data_writeback: + data_opt = EXT3_MOUNT_WRITEBACK_DATA; + datacheck: if (is_remount) { - if ((sbi->s_mount_opt & EXT3_MOUNT_DATA_FLAGS) != - data_opt) { + if ((sbi->s_mount_opt & EXT3_MOUNT_DATA_FLAGS) + != data_opt) { printk(KERN_ERR - "EXT3-fs: cannot change data " - "mode on remount\n"); + "EXT3-fs: cannot change data " + "mode on remount\n"); return 0; } } else { sbi->s_mount_opt &= ~EXT3_MOUNT_DATA_FLAGS; sbi->s_mount_opt |= data_opt; } - } else if (!strcmp (this_char, "commit")) { - unsigned long v; - if (want_numeric(value, "commit", &v)) - return 0; - sbi->s_commit_interval = (HZ * v); - } else { - printk (KERN_ERR - "EXT3-fs: Unrecognized mount option %s\n", - this_char); + break; + case Opt_abort: + set_opt(sbi->s_mount_opt, ABORT); + break; + case Opt_ignore: + break; + default: + printk (KERN_ERR + "EXT3-fs: Unrecognized mount option \"%s\" " + "or missing value\n", p); return 0; } } + return 1; } diff -Nru a/fs/ext3/symlink.c b/fs/ext3/symlink.c --- a/fs/ext3/symlink.c Thu Oct 2 01:28:17 2003 +++ b/fs/ext3/symlink.c Thu Oct 2 01:28:17 2003 @@ -22,7 +22,8 @@ #include #include "xattr.h" -static int ext3_readlink(struct dentry *dentry, char *buffer, int buflen) +static int +ext3_readlink(struct dentry *dentry, char __user *buffer, int buflen) { struct ext3_inode_info *ei = EXT3_I(dentry->d_inode); return vfs_readlink(dentry, buffer, buflen, (char*)ei->i_data); diff -Nru a/fs/fat/dir.c b/fs/fat/dir.c --- a/fs/fat/dir.c Thu Oct 2 01:28:15 2003 +++ b/fs/fat/dir.c Thu Oct 2 01:28:15 2003 @@ -663,7 +663,7 @@ return -EINVAL; } - d1 = (struct dirent *)arg; + d1 = (struct dirent __user *)arg; if (!access_ok(VERIFY_WRITE, d1, sizeof(struct dirent[2]))) return -EFAULT; /* diff -Nru a/fs/fat/inode.c b/fs/fat/inode.c --- a/fs/fat/inode.c Thu Oct 2 01:28:16 2003 +++ b/fs/fat/inode.c Thu Oct 2 01:28:16 2003 @@ -20,6 +20,7 @@ #include #include #include +#include #include /* @@ -183,20 +184,6 @@ kfree(sbi); } -static int simple_getbool(char *s, int *setval) -{ - if (s) { - if (!strcmp(s,"1") || !strcmp(s,"yes") || !strcmp(s,"true")) - *setval = 1; - else if (!strcmp(s,"0") || !strcmp(s,"no") || !strcmp(s,"false")) - *setval = 0; - else - return 0; - } else - *setval = 1; - return 1; -} - static int fat_show_options(struct seq_file *m, struct vfsmount *mnt) { struct msdos_sb_info *sbi = MSDOS_SB(mnt->mnt_sb); @@ -259,11 +246,95 @@ return 0; } +static void print_obsolete_option(char *optname) +{ + printk(KERN_INFO "FAT: %s option is obsolete, " + "not supported now\n", optname); +} + +enum { + Opt_blocksize, Opt_charset, Opt_check_n, Opt_check_r, Opt_check_s, + Opt_fat, Opt_codepage, Opt_conv_a, Opt_conv_b, Opt_conv_t, + Opt_debug, Opt_dots, Opt_err, Opt_gid, Opt_immutable, + Opt_nocase, Opt_nodots, Opt_quiet, Opt_showexec, Opt_uid, + Opt_shortname_lower, Opt_shortname_win95, Opt_shortname_winnt, Opt_shortname_mixed, + Opt_umask, Opt_dmask, Opt_fmask, Opt_posix, Opt_cvf_format, Opt_cvf_options, + Opt_utf8_off, Opt_utf8_no, Opt_utf8_false, + Opt_utf8_on, Opt_utf8_yes, Opt_utf8_true, Opt_utf8_opt, + Opt_uni_xl_off, Opt_uni_xl_no, Opt_uni_xl_false, + Opt_uni_xl_on, Opt_uni_xl_yes, Opt_uni_xl_true, Opt_uni_xl_opt, + Opt_nonumtail_off, Opt_nonumtail_no, Opt_nonumtail_false, + Opt_nonumtail_on, Opt_nonumtail_yes, Opt_nonumtail_true, Opt_nonumtail_opt, +}; + +static match_table_t FAT_tokens = { + {Opt_check_r, "check=relaxed"}, + {Opt_check_s, "check=strict"}, + {Opt_check_n, "check=normal"}, + {Opt_check_r, "check=r"}, + {Opt_check_s, "check=s"}, + {Opt_check_n, "check=n"}, + {Opt_conv_b, "conv=binary"}, + {Opt_conv_t, "conv=text"}, + {Opt_conv_a, "conv=auto"}, + {Opt_conv_b, "conv=b"}, + {Opt_conv_t, "conv=t"}, + {Opt_conv_a, "conv=a"}, + {Opt_nodots, "nodots"}, + {Opt_nodots, "dotsOK=no"}, + {Opt_dots, "dotsOK=yes"}, + {Opt_dots, "dots"}, + {Opt_uid, "uid=%d"}, + {Opt_gid, "gid=%d"}, + {Opt_umask, "umask=%o"}, + {Opt_dmask, "dmask=%o"}, + {Opt_fmask, "fmask=%o"}, + {Opt_fat, "fat=%d"}, + {Opt_codepage, "codepage=%d"}, + {Opt_charset, "iocharset=%s"}, + {Opt_blocksize, "blocksize=%d"}, + {Opt_nocase, "nocase"}, + {Opt_cvf_format, "cvf_format=%20s"}, + {Opt_cvf_options, "cvf_options=%100s"}, + {Opt_shortname_lower, "shortname=lower"}, + {Opt_shortname_win95, "shortname=win95"}, + {Opt_shortname_winnt, "shortname=winnt"}, + {Opt_shortname_mixed, "shortname=mixed"}, + {Opt_utf8_off, "utf8=0"}, /* 0 or no or false */ + {Opt_utf8_no, "utf8=no"}, + {Opt_utf8_false, "utf8=false"}, + {Opt_utf8_on, "utf8=1"}, /* empty or 1 or yes or true */ + {Opt_utf8_yes, "utf8=yes"}, + {Opt_utf8_true, "utf8=true"}, + {Opt_utf8_opt, "utf8"}, + {Opt_uni_xl_off, "uni_xlate=0"}, /* 0 or no or false */ + {Opt_uni_xl_no, "uni_xlate=no"}, + {Opt_uni_xl_false, "uni_xlate=false"}, + {Opt_uni_xl_on, "uni_xlate=1"}, /* empty or 1 or yes or true */ + {Opt_uni_xl_yes, "uni_xlate=yes"}, + {Opt_uni_xl_true, "uni_xlate=true"}, + {Opt_uni_xl_opt, "uni_xlate"}, + {Opt_nonumtail_off, "nonumtail=0"}, /* 0 or no or false */ + {Opt_nonumtail_no, "nonumtail=no"}, + {Opt_nonumtail_false, "nonumtail=false"}, + {Opt_nonumtail_on, "nonumtail=1"}, /* empty or 1 or yes or true */ + {Opt_nonumtail_yes, "nonumtail=yes"}, + {Opt_nonumtail_true, "nonumtail=true"}, + {Opt_nonumtail_opt, "nonumtail"}, + {Opt_quiet, "quiet"}, + {Opt_showexec, "showexec"}, + {Opt_debug, "debug"}, + {Opt_immutable, "sys_immutable"}, + {Opt_posix, "posix"}, + {Opt_err, NULL} +}; + static int parse_options(char *options, int is_vfat, int *debug, struct fat_mount_options *opts) { - char *this_char, *value, *p; - int ret = 1, val, len; + char *p; + substring_t args[MAX_OPT_ARGS]; + int option; opts->isvfat = is_vfat; @@ -284,183 +355,198 @@ *debug = 0; if (!options) - goto out; - while ((this_char = strsep(&options,",")) != NULL) { - if (!*this_char) + return 1; + + while ((p = strsep(&options, ",")) != NULL) { + int token; + if (!*p) continue; - if ((value = strchr(this_char,'=')) != NULL) - *value++ = 0; - if (!strcmp(this_char,"check") && value) { - if (value[0] && !value[1] && strchr("rns",*value)) - opts->name_check = *value; - else if (!strcmp(value,"relaxed")) - opts->name_check = 'r'; - else if (!strcmp(value,"normal")) - opts->name_check = 'n'; - else if (!strcmp(value,"strict")) - opts->name_check = 's'; - else ret = 0; - } - else if (!strcmp(this_char,"conv") && value) { - printk(KERN_INFO "FAT: conv option is obsolete, " - "not supported now\n"); - } - else if (!strcmp(this_char,"nocase")) { + token = match_token(p, FAT_tokens, args); + switch (token) { + case Opt_check_s: + opts->name_check = 's'; + break; + case Opt_check_r: + opts->name_check = 'r'; + break; + case Opt_check_n: + opts->name_check = 'n'; + break; + case Opt_dots: /* msdos specific */ + if (!is_vfat) + opts->dotsOK = 1; + break; + case Opt_nodots: /* msdos specific */ + if (!is_vfat) + opts->dotsOK = 0; + break; + case Opt_nocase: if (!is_vfat) opts->nocase = 1; else { - /* for backward compatible */ + /* for backward compatibility */ opts->shortname = VFAT_SFN_DISPLAY_WIN95 | VFAT_SFN_CREATE_WIN95; } - } - else if (!strcmp(this_char,"showexec")) { + break; + case Opt_quiet: + opts->quiet = 1; + break; + case Opt_showexec: opts->showexec = 1; - } - else if (!strcmp(this_char,"uid")) { - if (!value || !*value) ret = 0; - else { - opts->fs_uid = simple_strtoul(value,&value,0); - if (*value) ret = 0; - } - } - else if (!strcmp(this_char,"gid")) { - if (!value || !*value) ret= 0; - else { - opts->fs_gid = simple_strtoul(value,&value,0); - if (*value) ret = 0; - } - } - else if (!strcmp(this_char,"umask")) { - if (!value || !*value) ret = 0; - else { - opts->fs_fmask = opts->fs_dmask = - simple_strtoul(value,&value,8); - if (*value) ret = 0; - } - } - else if (!strcmp(this_char,"fmask")) { - if (!value || !*value) ret = 0; - else { - opts->fs_fmask = simple_strtoul(value,&value,8); - if (*value) ret = 0; - } - } - else if (!strcmp(this_char,"dmask")) { - if (!value || !*value) ret = 0; - else { - opts->fs_dmask = simple_strtoul(value,&value,8); - if (*value) ret = 0; - } - } - else if (!strcmp(this_char,"debug")) { - if (value) ret = 0; - else *debug = 1; - } - else if (!strcmp(this_char,"fat")) { - printk(KERN_INFO "FAT: fat option is obsolete, " - "not supported now\n"); - } - else if (!strcmp(this_char,"quiet")) { - if (value) ret = 0; - else opts->quiet = 1; - } - else if (!strcmp(this_char,"blocksize")) { - printk(KERN_INFO "FAT: blocksize option is obsolete, " - "not supported now\n"); - } - else if (!strcmp(this_char,"sys_immutable")) { - if (value) ret = 0; - else opts->sys_immutable = 1; - } - else if (!strcmp(this_char,"codepage") && value) { - opts->codepage = simple_strtoul(value,&value,0); - if (*value) ret = 0; - } - - /* msdos specific */ - else if (!is_vfat && !strcmp(this_char,"dots")) { - opts->dotsOK = 1; - } - else if (!is_vfat && !strcmp(this_char,"nodots")) { - opts->dotsOK = 0; - } - else if (!is_vfat && !strcmp(this_char,"dotsOK") && value) { - if (!strcmp(value,"yes")) opts->dotsOK = 1; - else if (!strcmp(value,"no")) opts->dotsOK = 0; - else ret = 0; - } + break; + case Opt_debug: + *debug = 1; + break; + case Opt_immutable: + opts->sys_immutable = 1; + break; + case Opt_uid: + if (match_int(&args[0], &option)) + return 0; + opts->fs_uid = option; + break; + case Opt_gid: + if (match_int(&args[0], &option)) + return 0; + opts->fs_gid = option; + break; + case Opt_umask: + if (match_octal(&args[0], &option)) + return 0; + opts->fs_fmask = opts->fs_dmask = option; + break; + case Opt_dmask: + if (match_octal(&args[0], &option)) + return 0; + opts->fs_dmask = option; + break; + case Opt_fmask: + if (match_octal(&args[0], &option)) + return 0; + opts->fs_fmask = option; + break; + case Opt_codepage: + if (match_int(&args[0], &option)) + return 0; + opts->codepage = option; + printk("MSDOS FS: Using codepage %d\n", + opts->codepage); + break; /* vfat specific */ - else if (is_vfat && !strcmp(this_char,"iocharset") && value) { - p = value; - while (*value && *value != ',') - value++; - len = value - p; - if (len) { - char *buffer; - - if (opts->iocharset != NULL) { - kfree(opts->iocharset); - opts->iocharset = NULL; - } - buffer = kmalloc(len + 1, GFP_KERNEL); - if (buffer != NULL) { - opts->iocharset = buffer; - memcpy(buffer, p, len); - buffer[len] = 0; - } else - ret = 0; - } - } - else if (is_vfat && !strcmp(this_char,"utf8")) { - ret = simple_getbool(value, &val); - if (ret) opts->utf8 = val; - } - else if (is_vfat && !strcmp(this_char,"uni_xlate")) { - ret = simple_getbool(value, &val); - if (ret) opts->unicode_xlate = val; - } - else if (is_vfat && !strcmp(this_char,"posix")) { - printk(KERN_INFO "FAT: posix option is obsolete, " - "not supported now\n"); - } - else if (is_vfat && !strcmp(this_char,"nonumtail")) { - ret = simple_getbool(value, &val); - if (ret) { - opts->numtail = !val; + case Opt_charset: + if (is_vfat) { + kfree(opts->iocharset); + opts->iocharset = match_strdup(&args[0]); + if (!opts->iocharset) + return 0; + printk("MSDOS FS: IO charset %s\n", + opts->iocharset); } - } - else if (is_vfat && !strcmp(this_char, "shortname")) { - if (!strcmp(value, "lower")) + break; + case Opt_shortname_lower: + if (is_vfat) { opts->shortname = VFAT_SFN_DISPLAY_LOWER | VFAT_SFN_CREATE_WIN95; - else if (!strcmp(value, "win95")) + } + break; + case Opt_shortname_win95: + if (is_vfat) { opts->shortname = VFAT_SFN_DISPLAY_WIN95 | VFAT_SFN_CREATE_WIN95; - else if (!strcmp(value, "winnt")) + } + break; + case Opt_shortname_winnt: + if (is_vfat) { opts->shortname = VFAT_SFN_DISPLAY_WINNT | VFAT_SFN_CREATE_WINNT; - else if (!strcmp(value, "mixed")) + } + break; + case Opt_shortname_mixed: + if (is_vfat) { opts->shortname = VFAT_SFN_DISPLAY_WINNT | VFAT_SFN_CREATE_WIN95; - else - ret = 0; - } else { - printk(KERN_ERR "FAT: Unrecognized mount option %s\n", - this_char); - ret = 0; - } + } + break; + case Opt_utf8_off: /* 0 or no or false */ + case Opt_utf8_no: + case Opt_utf8_false: + if (is_vfat) { + opts->utf8 = 0; + } + break; + case Opt_utf8_on: /* empty or 1 or yes or true */ + case Opt_utf8_opt: + case Opt_utf8_yes: + case Opt_utf8_true: + if (is_vfat) { + opts->utf8 = 1; + } + break; + case Opt_uni_xl_off: /* 0 or no or false */ + case Opt_uni_xl_no: + case Opt_uni_xl_false: + if (is_vfat) { + opts->unicode_xlate = 0; + } + break; + case Opt_uni_xl_on: /* empty or 1 or yes or true */ + case Opt_uni_xl_yes: + case Opt_uni_xl_true: + case Opt_uni_xl_opt: + if (is_vfat) { + opts->unicode_xlate = 1; + } + break; + case Opt_nonumtail_off: /* 0 or no or false */ + case Opt_nonumtail_no: + case Opt_nonumtail_false: + if (is_vfat) { + opts->numtail = 1; /* negated option */ + } + break; + case Opt_nonumtail_on: /* empty or 1 or yes or true */ + case Opt_nonumtail_yes: + case Opt_nonumtail_true: + case Opt_nonumtail_opt: + if (is_vfat) { + opts->numtail = 0; /* negated option */ + } + break; - if (ret == 0) + /* obsolete mount options */ + case Opt_conv_b: + case Opt_conv_t: + case Opt_conv_a: + print_obsolete_option("conv"); + break; + case Opt_blocksize: + print_obsolete_option("blocksize"); + break; + case Opt_posix: + print_obsolete_option("posix"); + break; + case Opt_fat: + print_obsolete_option("fat"); + break; + case Opt_cvf_format: + case Opt_cvf_options: + print_obsolete_option("cvf"); break; + /* unknown option */ + default: + printk(KERN_ERR "FAT: Unrecognized mount option \"%s\" " + "or missing value\n", p); + return 0; + } } -out: + if (opts->unicode_xlate) opts->utf8 = 0; - return ret; + return 1; } static int fat_calc_dir_size(struct inode *inode) diff -Nru a/fs/fcntl.c b/fs/fcntl.c --- a/fs/fcntl.c Thu Oct 2 01:28:17 2003 +++ b/fs/fcntl.c Thu Oct 2 01:28:17 2003 @@ -619,3 +619,6 @@ EXPORT_SYMBOL(f_setown); EXPORT_SYMBOL(f_delown); +#ifdef CONFIG_NET +EXPORT_SYMBOL(__kill_fasync); +#endif diff -Nru a/fs/file_table.c b/fs/file_table.c --- a/fs/file_table.c Thu Oct 2 01:28:15 2003 +++ b/fs/file_table.c Thu Oct 2 01:28:15 2003 @@ -285,3 +285,5 @@ files_stat.max_files = NR_FILE; } +/* Needed by unix.o */ +EXPORT_SYMBOL(files_stat); diff -Nru a/fs/freevxfs/vxfs_immed.c b/fs/freevxfs/vxfs_immed.c --- a/fs/freevxfs/vxfs_immed.c Thu Oct 2 01:28:17 2003 +++ b/fs/freevxfs/vxfs_immed.c Thu Oct 2 01:28:17 2003 @@ -39,7 +39,7 @@ #include "vxfs_inode.h" -static int vxfs_immed_readlink(struct dentry *, char *, int); +static int vxfs_immed_readlink(struct dentry *, char __user *, int); static int vxfs_immed_follow_link(struct dentry *, struct nameidata *); static int vxfs_immed_readpage(struct file *, struct page *); @@ -77,7 +77,7 @@ * Number of bytes successfully copied to userspace. */ static int -vxfs_immed_readlink(struct dentry *dp, char *bp, int buflen) +vxfs_immed_readlink(struct dentry *dp, char __user *bp, int buflen) { struct vxfs_inode_info *vip = VXFS_INO(dp->d_inode); diff -Nru a/fs/hfs/file.c b/fs/hfs/file.c --- a/fs/hfs/file.c Thu Oct 2 01:28:16 2003 +++ b/fs/hfs/file.c Thu Oct 2 01:28:16 2003 @@ -25,10 +25,10 @@ /*================ Forward declarations ================*/ -static hfs_rwret_t hfs_file_read(struct file *, char *, hfs_rwarg_t, +static hfs_rwret_t hfs_file_read(struct file *, char __user *, hfs_rwarg_t, loff_t *); -static hfs_rwret_t hfs_file_write(struct file *, const char *, hfs_rwarg_t, - loff_t *); +static hfs_rwret_t hfs_file_write(struct file *, const char __user *, + hfs_rwarg_t, loff_t *); static void hfs_file_truncate(struct inode *); /*================ Global variables ================*/ @@ -139,7 +139,7 @@ * user-space at the address 'buf'. Returns the number of bytes * successfully transferred. This function checks the arguments, does * some setup and then calls hfs_do_read() to do the actual transfer. */ -static hfs_rwret_t hfs_file_read(struct file * filp, char * buf, +static hfs_rwret_t hfs_file_read(struct file *filp, char __user *buf, hfs_rwarg_t count, loff_t *ppos) { struct inode *inode = filp->f_dentry->d_inode; @@ -181,7 +181,7 @@ * 'file->f_pos' from user-space at the address 'buf'. The return * value is the number of bytes actually transferred. */ -static hfs_rwret_t hfs_file_write(struct file * filp, const char * buf, +static hfs_rwret_t hfs_file_write(struct file *filp, const char __user *buf, hfs_rwarg_t count, loff_t *ppos) { struct inode *inode = filp->f_dentry->d_inode; @@ -242,7 +242,7 @@ * * Like copy_to_user() while translating CR->NL. */ -static inline void xlate_to_user(char *buf, const char *data, int count) +static inline void xlate_to_user(char __user *buf, const char *data, int count) { char ch; @@ -257,7 +257,8 @@ * * Like copy_from_user() while translating NL->CR; */ -static inline int xlate_from_user(char *data, const char *buf, int count) +static inline +int xlate_from_user(char *data, const char __user *buf, int count) { int i; @@ -290,8 +291,8 @@ * This is based on Linus's minix_file_read(). * It has been changed to take into account that HFS files have no holes. */ -hfs_s32 hfs_do_read(struct inode *inode, struct hfs_fork * fork, hfs_u32 pos, - char * buf, hfs_u32 count) +hfs_s32 hfs_do_read(struct inode *inode, struct hfs_fork *fork, hfs_u32 pos, + char __user *buf, hfs_u32 count) { hfs_s32 size, chars, offset, block, blocks, read = 0; int bhrequest, uptodate; @@ -436,8 +437,8 @@ * * This is just a minor edit of Linus's minix_file_write(). */ -hfs_s32 hfs_do_write(struct inode *inode, struct hfs_fork * fork, hfs_u32 pos, - const char * buf, hfs_u32 count) +hfs_s32 hfs_do_write(struct inode *inode, struct hfs_fork *fork, hfs_u32 pos, + const char __user *buf, hfs_u32 count) { hfs_s32 written, c; struct buffer_head * bh; diff -Nru a/fs/hfs/file_cap.c b/fs/hfs/file_cap.c --- a/fs/hfs/file_cap.c Thu Oct 2 01:28:17 2003 +++ b/fs/hfs/file_cap.c Thu Oct 2 01:28:17 2003 @@ -29,9 +29,9 @@ /*================ Forward declarations ================*/ static loff_t cap_info_llseek(struct file *, loff_t, int); -static hfs_rwret_t cap_info_read(struct file *, char *, +static hfs_rwret_t cap_info_read(struct file *, char __user *, hfs_rwarg_t, loff_t *); -static hfs_rwret_t cap_info_write(struct file *, const char *, +static hfs_rwret_t cap_info_write(struct file *, const char __user *, hfs_rwarg_t, loff_t *); /*================ Function-like macros ================*/ @@ -121,7 +121,7 @@ * 'file->f_pos' to user-space at the address 'buf'. The return value * is the number of bytes actually transferred. */ -static hfs_rwret_t cap_info_read(struct file *filp, char *buf, +static hfs_rwret_t cap_info_read(struct file *filp, char __user *buf, hfs_rwarg_t count, loff_t *ppos) { struct inode *inode = filp->f_dentry->d_inode; @@ -189,7 +189,7 @@ * '*ppos' from user-space at the address 'buf'. * The return value is the number of bytes actually transferred. */ -static hfs_rwret_t cap_info_write(struct file *filp, const char *buf, +static hfs_rwret_t cap_info_write(struct file *filp, const char __user *buf, hfs_rwarg_t count, loff_t *ppos) { struct inode *inode = filp->f_dentry->d_inode; diff -Nru a/fs/hfs/file_hdr.c b/fs/hfs/file_hdr.c --- a/fs/hfs/file_hdr.c Thu Oct 2 01:28:17 2003 +++ b/fs/hfs/file_hdr.c Thu Oct 2 01:28:17 2003 @@ -41,8 +41,9 @@ /*================ Forward declarations ================*/ static loff_t hdr_llseek(struct file *, loff_t, int); -static hfs_rwret_t hdr_read(struct file *, char *, hfs_rwarg_t, loff_t *); -static hfs_rwret_t hdr_write(struct file *, const char *, +static hfs_rwret_t hdr_read(struct file *, char __user *, + hfs_rwarg_t, loff_t *); +static hfs_rwret_t hdr_write(struct file *, const char __user *, hfs_rwarg_t, loff_t *); /*================ Global variables ================*/ @@ -382,7 +383,7 @@ * successfully transferred. */ /* XXX: what about the entry count changing on us? */ -static hfs_rwret_t hdr_read(struct file * filp, char * buf, +static hfs_rwret_t hdr_read(struct file *filp, char __user *buf, hfs_rwarg_t count, loff_t *ppos) { struct inode *inode = filp->f_dentry->d_inode; @@ -633,7 +634,7 @@ * '*ppos' from user-space at the address 'buf'. * The return value is the number of bytes actually transferred. */ -static hfs_rwret_t hdr_write(struct file *filp, const char *buf, +static hfs_rwret_t hdr_write(struct file *filp, const char __user *buf, hfs_rwarg_t count, loff_t *ppos) { struct inode *inode = filp->f_dentry->d_inode; diff -Nru a/fs/hfs/super.c b/fs/hfs/super.c --- a/fs/hfs/super.c Thu Oct 2 01:28:16 2003 +++ b/fs/hfs/super.c Thu Oct 2 01:28:16 2003 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -211,6 +212,60 @@ return 0; } +enum { + Opt_version, Opt_uid, Opt_gid, Opt_umask, Opt_part, + Opt_type, Opt_creator, Opt_quiet, Opt_afpd, + Opt_names_netatalk, Opt_names_trivial, Opt_names_alpha, Opt_names_latin, + Opt_names_7bit, Opt_names_8bit, Opt_names_cap, + Opt_fork_netatalk, Opt_fork_single, Opt_fork_double, Opt_fork_cap, + Opt_case_lower, Opt_case_asis, + Opt_conv_binary, Opt_conv_text, Opt_conv_auto, +}; + +static match_table_t tokens = { + {Opt_version, "version=%u"}, + {Opt_uid, "uid=%u"}, + {Opt_gid, "gid=%u"}, + {Opt_umask, "umask=%o"}, + {Opt_part, "part=%u"}, + {Opt_type, "type=%s"}, + {Opt_creator, "creator=%s"}, + {Opt_quiet, "quiet"}, + {Opt_afpd, "afpd"}, + {Opt_names_netatalk, "names=netatalk"}, + {Opt_names_trivial, "names=trivial"}, + {Opt_names_alpha, "names=alpha"}, + {Opt_names_latin, "names=latin"}, + {Opt_names_7bit, "names=7bit"}, + {Opt_names_8bit, "names=8bit"}, + {Opt_names_cap, "names=cap"}, + {Opt_names_netatalk, "names=n"}, + {Opt_names_trivial, "names=t"}, + {Opt_names_alpha, "names=a"}, + {Opt_names_latin, "names=l"}, + {Opt_names_7bit, "names=7"}, + {Opt_names_8bit, "names=8"}, + {Opt_names_cap, "names=c"}, + {Opt_fork_netatalk, "fork=netatalk"}, + {Opt_fork_single, "fork=single"}, + {Opt_fork_double, "fork=double"}, + {Opt_fork_cap, "fork=cap"}, + {Opt_fork_netatalk, "fork=n"}, + {Opt_fork_single, "fork=s"}, + {Opt_fork_double, "fork=d"}, + {Opt_fork_cap, "fork=c"}, + {Opt_case_lower, "case=lower"}, + {Opt_case_asis, "case=asis"}, + {Opt_case_lower, "case=l"}, + {Opt_case_asis, "case=a"}, + {Opt_conv_binary, "conv=binary"}, + {Opt_conv_text, "conv=text"}, + {Opt_conv_auto, "conv=auto"}, + {Opt_conv_binary, "conv=b"}, + {Opt_conv_text, "conv=t"}, + {Opt_conv_auto, "conv=a"}, +}; + /* * parse_options() * @@ -219,8 +274,10 @@ */ static int parse_options(char *options, struct hfs_sb_info *hsb, int *part) { - char *this_char, *value; + char *p; char names, fork; + substring_t args[MAX_OPT_ARGS]; + int option; /* initialize the sb with defaults */ memset(hsb, 0, sizeof(*hsb)); @@ -243,117 +300,109 @@ if (!options) { goto done; } - while ((this_char = strsep(&options,",")) != NULL) { - if (!*this_char) + while ((p = strsep(&options,",")) != NULL) { + int token; + if (!*p) continue; - if ((value = strchr(this_char,'=')) != NULL) { - *value++ = 0; - } - /* Numeric-valued options */ - if (!strcmp(this_char, "version")) { - if (!value || !*value) { - return 0; - } - hsb->s_version = simple_strtoul(value,&value,0); - if (*value) { - return 0; - } - } else if (!strcmp(this_char,"uid")) { - if (!value || !*value) { - return 0; - } - hsb->s_uid = simple_strtoul(value,&value,0); - if (*value) { - return 0; - } - } else if (!strcmp(this_char,"gid")) { - if (!value || !*value) { - return 0; - } - hsb->s_gid = simple_strtoul(value,&value,0); - if (*value) { - return 0; - } - } else if (!strcmp(this_char,"umask")) { - if (!value || !*value) { - return 0; - } - hsb->s_umask = simple_strtoul(value,&value,8); - if (*value) { - return 0; - } - } else if (!strcmp(this_char,"part")) { - if (!value || !*value) { - return 0; - } - *part = simple_strtoul(value,&value,0); - if (*value) { - return 0; - } - /* String-valued options */ - } else if (!strcmp(this_char,"type") && value) { - if (strlen(value) != 4) { - return 0; - } - hsb->s_type = hfs_get_nl(value); - } else if (!strcmp(this_char,"creator") && value) { - if (strlen(value) != 4) { - return 0; - } - hsb->s_creator = hfs_get_nl(value); - /* Boolean-valued options */ - } else if (!strcmp(this_char,"quiet")) { - if (value) { - return 0; - } + + token = match_token(p, tokens, args); + switch (token) { + /* Numeric-valued options */ + case Opt_version: + if (match_int(&args[0], &option)) + return 0; + hsb->s_version = option; + break; + case Opt_uid: + if (match_int(&args[0], &option)) + return 0; + hsb->s_uid = option; + break; + case Opt_gid: + if (match_int(&args[0], &option)) + return 0; + hsb->s_gid = option; + break; + case Opt_umask: + if (match_octal(&args[0], &option)) + return 0; + hsb->s_umask = option; + break; + case Opt_part: + if (match_int(&args[0], &option)) + return 0; + *part = option; + break; + /* String-valued options */ + case Opt_type: + if (strlen(args[0].from) != 4) { + return 0; + } + hsb->s_type = hfs_get_nl(args[0].from); + break; + case Opt_creator: + if (strlen(args[0].from) != 4) { + return 0; + } + hsb->s_creator = hfs_get_nl(args[0].from); + break; + /* Boolean-valued options */ + case Opt_quiet: hsb->s_quiet = 1; - } else if (!strcmp(this_char,"afpd")) { - if (value) { - return 0; - } + break; + case Opt_afpd: hsb->s_afpd = 1; - /* Multiple choice options */ - } else if (!strcmp(this_char,"names") && value) { - if ((*value && !value[1] && strchr("ntal78c",*value)) || - !strcmp(value,"netatalk") || - !strcmp(value,"trivial") || - !strcmp(value,"alpha") || - !strcmp(value,"latin") || - !strcmp(value,"7bit") || - !strcmp(value,"8bit") || - !strcmp(value,"cap")) { - names = *value; - } else { - return 0; - } - } else if (!strcmp(this_char,"fork") && value) { - if ((*value && !value[1] && strchr("nsdc",*value)) || - !strcmp(value,"netatalk") || - !strcmp(value,"single") || - !strcmp(value,"double") || - !strcmp(value,"cap")) { - fork = *value; - } else { - return 0; - } - } else if (!strcmp(this_char,"case") && value) { - if ((*value && !value[1] && strchr("la",*value)) || - !strcmp(value,"lower") || - !strcmp(value,"asis")) { - hsb->s_lowercase = (*value == 'l'); - } else { - return 0; - } - } else if (!strcmp(this_char,"conv") && value) { - if ((*value && !value[1] && strchr("bta",*value)) || - !strcmp(value,"binary") || - !strcmp(value,"text") || - !strcmp(value,"auto")) { - hsb->s_conv = *value; - } else { - return 0; - } - } else { + break; + /* Multiple choice options */ + case Opt_names_netatalk: + names = 'n'; + break; + case Opt_names_trivial: + names = 't'; + break; + case Opt_names_alpha: + names = 'a'; + break; + case Opt_names_latin: + names = 'l'; + break; + case Opt_names_7bit: + names = '7'; + break; + case Opt_names_8bit: + names = '8'; + break; + case Opt_names_cap: + names = 'c'; + break; + case Opt_fork_netatalk: + fork = 'n'; + break; + case Opt_fork_single: + fork = 's'; + break; + case Opt_fork_double: + fork = 'd'; + break; + case Opt_fork_cap: + fork = 'c'; + break; + case Opt_case_lower: + hsb->s_lowercase = 1; + break; + case Opt_case_asis: + hsb->s_lowercase = 0; + break; + case Opt_conv_binary: + hsb->s_conv = 'b'; + break; + case Opt_conv_text: + hsb->s_conv = 't'; + break; + case Opt_conv_auto: + hsb->s_conv = 'a'; + break; + default: return 0; } } diff -Nru a/fs/hpfs/file.c b/fs/hpfs/file.c --- a/fs/hpfs/file.c Thu Oct 2 01:28:18 2003 +++ b/fs/hpfs/file.c Thu Oct 2 01:28:18 2003 @@ -124,7 +124,8 @@ .bmap = _hpfs_bmap }; -ssize_t hpfs_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos) +ssize_t hpfs_file_write(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) { ssize_t retval; diff -Nru a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h --- a/fs/hpfs/hpfs_fn.h Thu Oct 2 01:28:17 2003 +++ b/fs/hpfs/hpfs_fn.h Thu Oct 2 01:28:17 2003 @@ -249,7 +249,7 @@ secno hpfs_bmap(struct inode *, unsigned); void hpfs_truncate(struct inode *); int hpfs_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create); -ssize_t hpfs_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos); +ssize_t hpfs_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos); /* inode.c */ diff -Nru a/fs/hpfs/super.c b/fs/hpfs/super.c --- a/fs/hpfs/super.c Thu Oct 2 01:28:17 2003 +++ b/fs/hpfs/super.c Thu Oct 2 01:28:17 2003 @@ -10,6 +10,7 @@ #include #include "hpfs_fn.h" #include +#include #include #include @@ -219,15 +220,52 @@ /* * A tiny parser for option strings, stolen from dosfs. - * * Stolen again from read-only hpfs. + * And updated for table-driven option parsing. */ +enum { + Opt_help, Opt_uid, Opt_gid, Opt_umask, Opt_case_lower, Opt_case_asis, + Opt_conv_binary, Opt_conv_text, Opt_conv_auto, + Opt_check_none, Opt_check_normal, Opt_check_strict, + Opt_err_cont, Opt_err_ro, Opt_err_panic, + Opt_eas_no, Opt_eas_ro, Opt_eas_rw, + Opt_chkdsk_no, Opt_chkdsk_errors, Opt_chkdsk_always, + Opt_timeshift, Opt_err, +}; + +static match_table_t tokens = { + {Opt_help, "help"}, + {Opt_uid, "uid=%u"}, + {Opt_gid, "gid=%u"}, + {Opt_umask, "umask=%o"}, + {Opt_case_lower, "case=lower"}, + {Opt_case_asis, "case=asis"}, + {Opt_conv_binary, "conv=binary"}, + {Opt_conv_text, "conv=text"}, + {Opt_conv_auto, "conv=auto"}, + {Opt_check_none, "check=none"}, + {Opt_check_normal, "check=normal"}, + {Opt_check_strict, "check=strict"}, + {Opt_err_cont, "errors=continue"}, + {Opt_err_ro, "errors=remount-ro"}, + {Opt_err_panic, "errors=panic"}, + {Opt_eas_no, "eas=no"}, + {Opt_eas_ro, "eas=ro"}, + {Opt_eas_rw, "eas=rw"}, + {Opt_chkdsk_no, "chkdsk=no"}, + {Opt_chkdsk_errors, "chkdsk=errors"}, + {Opt_chkdsk_always, "chkdsk=always"}, + {Opt_timeshift, "timeshift=%d"}, + {Opt_err, NULL}, +}; + int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask, int *lowercase, int *conv, int *eas, int *chk, int *errs, int *chkdsk, int *timeshift) { - char *p, *rhs; + char *p; + int option; if (!opts) return 1; @@ -235,34 +273,85 @@ /*printk("Parsing opts: '%s'\n",opts);*/ while ((p = strsep(&opts, ",")) != NULL) { + substring_t args[MAX_OPT_ARGS]; + int token; if (!*p) continue; - if ((rhs = strchr(p, '=')) != 0) - *rhs++ = '\0'; - if (!strcmp(p, "help")) return 2; - if (!strcmp(p, "uid")) { - if (!rhs || !*rhs) - return 0; - *uid = simple_strtoul(rhs, &rhs, 0); - if (*rhs) - return 0; - } - else if (!strcmp(p, "gid")) { - if (!rhs || !*rhs) - return 0; - *gid = simple_strtoul(rhs, &rhs, 0); - if (*rhs) - return 0; - } - else if (!strcmp(p, "umask")) { - if (!rhs || !*rhs) - return 0; - *umask = simple_strtoul(rhs, &rhs, 8); - if (*rhs) - return 0; - } - else if (!strcmp(p, "timeshift")) { + + token = match_token(p, tokens, args); + switch (token) { + case Opt_help: + return 2; + case Opt_uid: + if (match_int(args, &option)) + return 0; + *uid = option; + break; + case Opt_gid: + if (match_int(args, &option)) + return 0; + *gid = option; + break; + case Opt_umask: + if (match_octal(args, &option)) + return 0; + *umask = option; + break; + case Opt_case_lower: + *lowercase = 1; + break; + case Opt_case_asis: + *lowercase = 0; + break; + case Opt_conv_binary: + *conv = CONV_BINARY; + break; + case Opt_conv_text: + *conv = CONV_TEXT; + break; + case Opt_conv_auto: + *conv = CONV_AUTO; + break; + case Opt_check_none: + *chk = 0; + break; + case Opt_check_normal: + *chk = 1; + break; + case Opt_check_strict: + *chk = 2; + break; + case Opt_err_cont: + *errs = 0; + break; + case Opt_err_ro: + *errs = 1; + break; + case Opt_err_panic: + *errs = 2; + break; + case Opt_eas_no: + *eas = 0; + break; + case Opt_eas_ro: + *eas = 1; + break; + case Opt_eas_rw: + *eas = 2; + break; + case Opt_chkdsk_no: + *chkdsk = 0; + break; + case Opt_chkdsk_errors: + *chkdsk = 1; + break; + case Opt_chkdsk_always: + *chkdsk = 2; + break; + case Opt_timeshift: + { int m = 1; + char *rhs = args[0].from; if (!rhs || !*rhs) return 0; if (*rhs == '-') m = -1; @@ -270,79 +359,11 @@ *timeshift = simple_strtoul(rhs, &rhs, 0) * m; if (*rhs) return 0; + break; } - else if (!strcmp(p, "case")) { - if (!rhs || !*rhs) - return 0; - if (!strcmp(rhs, "lower")) - *lowercase = 1; - else if (!strcmp(rhs, "asis")) - *lowercase = 0; - else - return 0; - } - else if (!strcmp(p, "conv")) { - if (!rhs || !*rhs) - return 0; - if (!strcmp(rhs, "binary")) - *conv = CONV_BINARY; - else if (!strcmp(rhs, "text")) - *conv = CONV_TEXT; - else if (!strcmp(rhs, "auto")) - *conv = CONV_AUTO; - else - return 0; - } - else if (!strcmp(p, "check")) { - if (!rhs || !*rhs) - return 0; - if (!strcmp(rhs, "none")) - *chk = 0; - else if (!strcmp(rhs, "normal")) - *chk = 1; - else if (!strcmp(rhs, "strict")) - *chk = 2; - else - return 0; - } - else if (!strcmp(p, "errors")) { - if (!rhs || !*rhs) - return 0; - if (!strcmp(rhs, "continue")) - *errs = 0; - else if (!strcmp(rhs, "remount-ro")) - *errs = 1; - else if (!strcmp(rhs, "panic")) - *errs = 2; - else - return 0; - } - else if (!strcmp(p, "eas")) { - if (!rhs || !*rhs) - return 0; - if (!strcmp(rhs, "no")) - *eas = 0; - else if (!strcmp(rhs, "ro")) - *eas = 1; - else if (!strcmp(rhs, "rw")) - *eas = 2; - else - return 0; - } - else if (!strcmp(p, "chkdsk")) { - if (!rhs || !*rhs) - return 0; - if (!strcmp(rhs, "no")) - *chkdsk = 0; - else if (!strcmp(rhs, "errors")) - *chkdsk = 1; - else if (!strcmp(rhs, "always")) - *chkdsk = 2; - else - return 0; - } - else + default: return 0; + } } return 1; } diff -Nru a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c --- a/fs/hugetlbfs/inode.c Thu Oct 2 01:28:17 2003 +++ b/fs/hugetlbfs/inode.c Thu Oct 2 01:28:17 2003 @@ -648,11 +648,6 @@ struct hugetlbfs_config config; struct hugetlbfs_sb_info *sbinfo; - sbinfo = kmalloc(sizeof(struct hugetlbfs_sb_info), GFP_KERNEL); - if (!sbinfo) - return -ENOMEM; - sb->s_fs_info = sbinfo; - config.nr_blocks = -1; /* No limit on size by default */ config.nr_inodes = -1; /* No limit on number of inodes by default */ config.uid = current->fsuid; @@ -663,6 +658,10 @@ if (ret) return ret; + sbinfo = kmalloc(sizeof(struct hugetlbfs_sb_info), GFP_KERNEL); + if (!sbinfo) + return -ENOMEM; + sb->s_fs_info = sbinfo; spin_lock_init(&sbinfo->stat_lock); sbinfo->max_blocks = config.nr_blocks; sbinfo->free_blocks = config.nr_blocks; @@ -675,15 +674,18 @@ inode = hugetlbfs_get_inode(sb, config.uid, config.gid, S_IFDIR | config.mode, 0); if (!inode) - return -ENOMEM; + goto out_free; root = d_alloc_root(inode); if (!root) { iput(inode); - return -ENOMEM; + goto out_free; } sb->s_root = root; return 0; +out_free: + kfree(sbinfo); + return -ENOMEM; } int hugetlb_get_quota(struct address_space *mapping) diff -Nru a/fs/inode.c b/fs/inode.c --- a/fs/inode.c Thu Oct 2 01:28:18 2003 +++ b/fs/inode.c Thu Oct 2 01:28:18 2003 @@ -195,6 +195,8 @@ i_size_ordered_init(inode); } +EXPORT_SYMBOL(inode_init_once); + static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) { struct inode * inode = (struct inode *) foo; @@ -229,7 +231,6 @@ * that the inode is no longer useful. We just * terminate it with extreme prejudice. */ - void clear_inode(struct inode *inode) { invalidate_inode_buffers(inode); @@ -251,6 +252,8 @@ inode->i_state = I_CLEAR; } +EXPORT_SYMBOL(clear_inode); + /* * Dispose-list gets a local list with local inodes in it, so it doesn't * need to worry about list corruption and SMP locks. @@ -327,7 +330,6 @@ * fails because there are busy inodes then a non zero value is returned. * If the discard is successful all the inodes have been discarded. */ - int invalidate_inodes(struct super_block * sb) { int busy; @@ -346,6 +348,8 @@ return busy; } + +EXPORT_SYMBOL(invalidate_inodes); int __invalidate_device(struct block_device *bdev, int do_sync) { @@ -372,6 +376,8 @@ return res; } +EXPORT_SYMBOL(__invalidate_device); + static int can_unuse(struct inode *inode) { if (inode->i_state) @@ -532,7 +538,6 @@ * * Allocates a new inode for given superblock. */ - struct inode *new_inode(struct super_block *sb) { static unsigned long last_ino; @@ -552,6 +557,8 @@ return inode; } +EXPORT_SYMBOL(new_inode); + void unlock_new_inode(struct inode *inode) { /* @@ -565,6 +572,7 @@ inode->i_state &= ~(I_LOCK|I_NEW); wake_up_inode(inode); } + EXPORT_SYMBOL(unlock_new_inode); /* @@ -685,7 +693,6 @@ * With a large number of inodes live on the file system this function * currently becomes quite slow. */ - ino_t iunique(struct super_block *sb, ino_t max_reserved) { static ino_t counter; @@ -709,6 +716,8 @@ } +EXPORT_SYMBOL(iunique); + struct inode *igrab(struct inode *inode) { spin_lock(&inode_lock); @@ -725,6 +734,8 @@ return inode; } +EXPORT_SYMBOL(igrab); + /** * ifind - internal function, you want ilookup5() or iget5(). * @sb: super block of file system to search @@ -818,6 +829,7 @@ return ifind(sb, head, test, data); } + EXPORT_SYMBOL(ilookup5); /** @@ -840,6 +852,7 @@ return ifind_fast(sb, head, ino); } + EXPORT_SYMBOL(ilookup); /** @@ -880,6 +893,7 @@ */ return get_new_inode(sb, head, test, set, data); } + EXPORT_SYMBOL(iget5_locked); /** @@ -913,6 +927,7 @@ */ return get_new_inode_fast(sb, head, ino); } + EXPORT_SYMBOL(iget_locked); /** @@ -923,7 +938,6 @@ * * Add an inode to the inode hash for this superblock. */ - void __insert_inode_hash(struct inode *inode, unsigned long hashval) { struct hlist_head *head = inode_hashtable + hash(inode->i_sb, hashval); @@ -932,13 +946,14 @@ spin_unlock(&inode_lock); } +EXPORT_SYMBOL(__insert_inode_hash); + /** * remove_inode_hash - remove an inode from the hash * @inode: inode to unhash * * Remove an inode from the superblock. */ - void remove_inode_hash(struct inode *inode) { spin_lock(&inode_lock); @@ -946,6 +961,8 @@ spin_unlock(&inode_lock); } +EXPORT_SYMBOL(remove_inode_hash); + /* * Tell the filesystem that this inode is no longer of any interest and should * be completely destroyed. @@ -988,6 +1005,7 @@ BUG(); destroy_inode(inode); } + EXPORT_SYMBOL(generic_delete_inode); static void generic_forget_inode(struct inode *inode) @@ -1059,7 +1077,6 @@ * Puts an inode, dropping its usage count. If the inode use count hits * zero the inode is also then freed and may be destroyed. */ - void iput(struct inode *inode) { if (inode) { @@ -1076,6 +1093,8 @@ } } +EXPORT_SYMBOL(iput); + /** * bmap - find a block number in a file * @inode: inode of file @@ -1087,7 +1106,6 @@ * disk block relative to the disk start that holds that block of the * file. */ - sector_t bmap(struct inode * inode, sector_t block) { sector_t res = 0; @@ -1096,6 +1114,8 @@ return res; } +EXPORT_SYMBOL(bmap); + /* * Return true if the filesystem which backs this inode considers the two * passed timespecs to be sufficiently different to warrant flushing the @@ -1117,7 +1137,6 @@ * This function automatically handles read only file systems and media, * as well as the "noatime" flag and inode specific "noatime" markers. */ - void update_atime(struct inode *inode) { struct timespec now; @@ -1139,6 +1158,8 @@ } } +EXPORT_SYMBOL(update_atime); + /** * inode_update_time - update mtime and ctime time * @inode: inode accessed @@ -1170,6 +1191,7 @@ if (sync_it) mark_inode_dirty_sync(inode); } + EXPORT_SYMBOL(inode_update_time); int inode_needs_sync(struct inode *inode) @@ -1180,6 +1202,7 @@ return 1; return 0; } + EXPORT_SYMBOL(inode_needs_sync); /* @@ -1375,3 +1398,5 @@ printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o)\n", mode); } + +EXPORT_SYMBOL(init_special_inode); diff -Nru a/fs/isofs/inode.c b/fs/isofs/inode.c --- a/fs/isofs/inode.c Thu Oct 2 01:28:18 2003 +++ b/fs/isofs/inode.c Thu Oct 2 01:28:18 2003 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -328,9 +329,52 @@ } #endif +enum { + Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore, + Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet, + Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err, + Opt_nocompress, +}; + +static match_table_t tokens = { + {Opt_norock, "norock"}, + {Opt_nojoliet, "nojoliet"}, + {Opt_unhide, "unhide"}, + {Opt_cruft, "cruft"}, + {Opt_utf8, "utf8"}, + {Opt_iocharset, "iocharset=%s"}, + {Opt_map_a, "map=acorn"}, + {Opt_map_a, "map=a"}, + {Opt_map_n, "map=normal"}, + {Opt_map_n, "map=n"}, + {Opt_map_o, "map=off"}, + {Opt_map_o, "map=o"}, + {Opt_session, "session=%u"}, + {Opt_sb, "sbsector=%u"}, + {Opt_check_r, "check=relaxed"}, + {Opt_check_r, "check=r"}, + {Opt_check_s, "check=strict"}, + {Opt_check_s, "check=s"}, + {Opt_uid, "uid=%u"}, + {Opt_gid, "gid=%u"}, + {Opt_mode, "mode=%u"}, + {Opt_block, "block=%u"}, + {Opt_ignore, "conv=binary"}, + {Opt_ignore, "conv=b"}, + {Opt_ignore, "conv=text"}, + {Opt_ignore, "conv=t"}, + {Opt_ignore, "conv=mtext"}, + {Opt_ignore, "conv=m"}, + {Opt_ignore, "conv=auto"}, + {Opt_ignore, "conv=a"}, + {Opt_nocompress, "nocompress"}, + {Opt_err, NULL} +}; + static int parse_options(char *options, struct iso9660_options * popt) { - char *this_char,*value; + char *p; + int option; popt->map = 'n'; popt->rock = 'y'; @@ -350,112 +394,101 @@ popt->utf8 = 0; popt->session=-1; popt->sbsector=-1; - if (!options) return 1; - while ((this_char = strsep(&options,",")) != NULL) { - if (!*this_char) + if (!options) + return 1; + + while ((p = strsep(&options, ",")) != NULL) { + int token; + substring_t args[MAX_OPT_ARGS]; + unsigned n; + + if (!*p) continue; - if (strncmp(this_char,"norock",6) == 0) { - popt->rock = 'n'; - continue; - } - if (strncmp(this_char,"nojoliet",8) == 0) { - popt->joliet = 'n'; - continue; - } - if (strncmp(this_char,"unhide",6) == 0) { - popt->unhide = 'y'; - continue; - } - if (strncmp(this_char,"cruft",5) == 0) { - popt->cruft = 'y'; - continue; - } - if (strncmp(this_char,"utf8",4) == 0) { - popt->utf8 = 1; - continue; - } - if (strncmp(this_char,"nocompress",10) == 0) { - popt->nocompress = 1; - continue; - } - if ((value = strchr(this_char,'=')) != NULL) - *value++ = 0; + token = match_token(p, tokens, args); + switch (token) { + case Opt_norock: + popt->rock = 'n'; + break; + case Opt_nojoliet: + popt->joliet = 'n'; + break; + case Opt_unhide: + popt->unhide = 'y'; + break; + case Opt_cruft: + popt->cruft = 'y'; + break; + case Opt_utf8: + popt->utf8 = 1; + break; #ifdef CONFIG_JOLIET - if (!strcmp(this_char,"iocharset") && value) { - popt->iocharset = value; - while (*value && *value != ',') - value++; - if (value == popt->iocharset) + case Opt_iocharset: + popt->iocharset = match_strdup(&args[0]); + break; +#endif + case Opt_map_a: + popt->map = 'a'; + break; + case Opt_map_o: + popt->map = 'o'; + break; + case Opt_map_n: + popt->map = 'n'; + break; + case Opt_session: + if (match_int(&args[0], &option)) return 0; - *value = 0; - } else -#endif - if (!strcmp(this_char,"map") && value) { - if (value[0] && !value[1] && strchr("ano",*value)) - popt->map = *value; - else if (!strcmp(value,"off")) popt->map = 'o'; - else if (!strcmp(value,"normal")) popt->map = 'n'; - else if (!strcmp(value,"acorn")) popt->map = 'a'; - else return 0; - } - if (!strcmp(this_char,"session") && value) { - char * vpnt = value; - unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0); - if(ivalue < 0 || ivalue >99) return 0; - popt->session=ivalue+1; - } - if (!strcmp(this_char,"sbsector") && value) { - char * vpnt = value; - unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0); - if(ivalue < 0 || ivalue >660*512) return 0; - popt->sbsector=ivalue; - } - else if (!strcmp(this_char,"check") && value) { - if (value[0] && !value[1] && strchr("rs",*value)) - popt->check = *value; - else if (!strcmp(value,"relaxed")) popt->check = 'r'; - else if (!strcmp(value,"strict")) popt->check = 's'; - else return 0; - } - else if (!strcmp(this_char,"conv") && value) { - /* no conversion is done anymore; - we still accept the same mount options, - but ignore them */ - if (value[0] && !value[1] && strchr("btma",*value)) ; - else if (!strcmp(value,"binary")) ; - else if (!strcmp(value,"text")) ; - else if (!strcmp(value,"mtext")) ; - else if (!strcmp(value,"auto")) ; - else return 0; - } - else if (value && - (!strcmp(this_char,"block") || - !strcmp(this_char,"mode") || - !strcmp(this_char,"uid") || - !strcmp(this_char,"gid"))) { - char * vpnt = value; - unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0); - if (*vpnt) return 0; - switch(*this_char) { - case 'b': - if ( ivalue != 512 - && ivalue != 1024 - && ivalue != 2048) return 0; - popt->blocksize = ivalue; - break; - case 'u': - popt->uid = ivalue; - break; - case 'g': - popt->gid = ivalue; - break; - case 'm': - popt->mode = ivalue; - break; - } + n = option; + if (n > 99) + return 0; + popt->session = n + 1; + break; + case Opt_sb: + if (match_int(&args[0], &option)) + return 0; + n = option; + if (n > 660 * 512) + return 0; + popt->sbsector = n; + break; + case Opt_check_r: + popt->check = 'r'; + break; + case Opt_check_s: + popt->check = 's'; + break; + case Opt_ignore: + break; + case Opt_uid: + if (match_int(&args[0], &option)) + return 0; + popt->uid = option; + break; + case Opt_gid: + if (match_int(&args[0], &option)) + return 0; + popt->gid = option; + break; + case Opt_mode: + if (match_int(&args[0], &option)) + return 0; + popt->mode = option; + break; + case Opt_block: + if (match_int(&args[0], &option)) + return 0; + n = option; + if (n != 512 && n != 1024 && n != 2048) + return 0; + popt->blocksize = n; + break; + case Opt_nocompress: + popt->nocompress = 1; + break; + default: + return 0; } - else return 1; } return 1; } @@ -842,6 +875,9 @@ if (opt.check == 'r') table++; s->s_root->d_op = &isofs_dentry_ops[table]; + if (opt.iocharset) + kfree(opt.iocharset); + return 0; /* @@ -879,6 +915,8 @@ out_freebh: brelse(bh); out_freesbi: + if (opt.iocharset) + kfree(opt.iocharset); kfree(sbi); s->s_fs_info = NULL; return -EINVAL; diff -Nru a/fs/jbd/journal.c b/fs/jbd/journal.c --- a/fs/jbd/journal.c Thu Oct 2 01:28:16 2003 +++ b/fs/jbd/journal.c Thu Oct 2 01:28:16 2003 @@ -1800,7 +1800,7 @@ return ret; } -int write_jbd_debug(struct file *file, const char *buffer, +int write_jbd_debug(struct file *file, const char __user *buffer, unsigned long count, void *data) { char buf[32]; diff -Nru a/fs/jfs/jfs_debug.c b/fs/jfs/jfs_debug.c --- a/fs/jfs/jfs_debug.c Thu Oct 2 01:28:17 2003 +++ b/fs/jfs/jfs_debug.c Thu Oct 2 01:28:17 2003 @@ -81,7 +81,7 @@ return len; } -static int loglevel_write(struct file *file, const char *buffer, +static int loglevel_write(struct file *file, const char __user *buffer, unsigned long count, void *data) { char c; diff -Nru a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c --- a/fs/jfs/jfs_imap.c Thu Oct 2 01:28:16 2003 +++ b/fs/jfs/jfs_imap.c Thu Oct 2 01:28:16 2003 @@ -838,7 +838,7 @@ */ if (S_ISDIR(ip->i_mode) && (ip->i_ipmnt->i_mntflag & JFS_DASD_ENABLED)) - bcopy(&ip->i_DASD, &dp->di_DASD, sizeof(struct dasd)); + memcpy(&dp->di_DASD, &ip->i_DASD, sizeof(struct dasd)); #endif /* _JFS_FASTDASD */ /* release the buffer holding the updated on-disk inode. diff -Nru a/fs/jfs/super.c b/fs/jfs/super.c --- a/fs/jfs/super.c Thu Oct 2 01:28:16 2003 +++ b/fs/jfs/super.c Thu Oct 2 01:28:16 2003 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -164,59 +165,82 @@ kfree(sbi); } +enum { + Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize, + Opt_ignore, Opt_err, +}; + +static match_table_t tokens = { + {Opt_integrity, "integrity"}, + {Opt_nointegrity, "nointegrity"}, + {Opt_iocharset, "iocharset=%s"}, + {Opt_resize, "resize=%u"}, + {Opt_ignore, "noquota"}, + {Opt_ignore, "quota"}, + {Opt_ignore, "usrquota"}, + {Opt_ignore, "grpquota"}, + {Opt_err, NULL} +}; + static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, int *flag) { void *nls_map = NULL; - char *this_char; - char *value; + char *p; struct jfs_sb_info *sbi = JFS_SBI(sb); *newLVSize = 0; if (!options) return 1; - while ((this_char = strsep(&options, ",")) != NULL) { - if (!*this_char) + + while ((p = strsep(&options, ",")) != NULL) { + substring_t args[MAX_OPT_ARGS]; + int token; + if (!*p) continue; - if ((value = strchr(this_char, '=')) != NULL) - *value++ = 0; - if (!strcmp(this_char, "integrity")) { + + token = match_token(p, tokens, args); + switch (token) { + case Opt_integrity: *flag &= ~JFS_NOINTEGRITY; - } else if (!strcmp(this_char, "nointegrity")) { + break; + case Opt_nointegrity: *flag |= JFS_NOINTEGRITY; - } else if (!strcmp(this_char, "iocharset")) { - if (!value || !*value) - goto needs_arg; + break; + case Opt_ignore: + /* Silently ignore the quota options */ + /* Don't do anything ;-) */ + break; + case Opt_iocharset: if (nls_map) /* specified iocharset twice! */ unload_nls(nls_map); - nls_map = load_nls(value); + nls_map = load_nls(args[0].from); if (!nls_map) { printk(KERN_ERR "JFS: charset not found\n"); goto cleanup; } - } else if (!strcmp(this_char, "resize")) { - if (!value || !*value) { + break; + case Opt_resize: + { + char *resize = args[0].from; + if (!resize || !*resize) { *newLVSize = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits; if (*newLVSize == 0) printk(KERN_ERR - "JFS: Cannot determine volume size\n"); + "JFS: Cannot determine volume size\n"); } else - *newLVSize = simple_strtoull(value, &value, 0); - - /* Silently ignore the quota options */ - } else if (!strcmp(this_char, "grpquota") - || !strcmp(this_char, "noquota") - || !strcmp(this_char, "quota") - || !strcmp(this_char, "usrquota")) - /* Don't do anything ;-) */ ; - else { - printk("jfs: Unrecognized mount option %s\n", - this_char); + *newLVSize = simple_strtoull(resize, &resize, 0); + break; + } + default: + printk("jfs: Unrecognized mount option \"%s\" " + " or missing value\n", p); goto cleanup; } } + if (nls_map) { /* Discard old (if remount) */ if (sbi->nls_tab) @@ -224,8 +248,7 @@ sbi->nls_tab = nls_map; } return 1; -needs_arg: - printk(KERN_ERR "JFS: %s needs an argument\n", this_char); + cleanup: if (nls_map) unload_nls(nls_map); diff -Nru a/fs/jfs/symlink.c b/fs/jfs/symlink.c --- a/fs/jfs/symlink.c Thu Oct 2 01:28:18 2003 +++ b/fs/jfs/symlink.c Thu Oct 2 01:28:18 2003 @@ -26,7 +26,7 @@ return vfs_follow_link(nd, s); } -static int jfs_readlink(struct dentry *dentry, char *buffer, int buflen) +static int jfs_readlink(struct dentry *dentry, char __user *buffer, int buflen) { char *s = JFS_IP(dentry->d_inode)->i_inline; return vfs_readlink(dentry, buffer, buflen, s); diff -Nru a/fs/libfs.c b/fs/libfs.c --- a/fs/libfs.c Thu Oct 2 01:28:15 2003 +++ b/fs/libfs.c Thu Oct 2 01:28:15 2003 @@ -429,3 +429,26 @@ spin_unlock(&pin_fs_lock); mntput(mnt); } + +EXPORT_SYMBOL(dcache_dir_close); +EXPORT_SYMBOL(dcache_dir_lseek); +EXPORT_SYMBOL(dcache_dir_open); +EXPORT_SYMBOL(dcache_readdir); +EXPORT_SYMBOL(generic_read_dir); +EXPORT_SYMBOL(simple_commit_write); +EXPORT_SYMBOL(simple_dir_inode_operations); +EXPORT_SYMBOL(simple_dir_operations); +EXPORT_SYMBOL(simple_empty); +EXPORT_SYMBOL(simple_fill_super); +EXPORT_SYMBOL(simple_getattr); +EXPORT_SYMBOL(simple_link); +EXPORT_SYMBOL(simple_lookup); +EXPORT_SYMBOL(simple_pin_fs); +EXPORT_SYMBOL(simple_prepare_write); +EXPORT_SYMBOL(simple_readpage); +EXPORT_SYMBOL(simple_release_fs); +EXPORT_SYMBOL(simple_rename); +EXPORT_SYMBOL(simple_rmdir); +EXPORT_SYMBOL(simple_statfs); +EXPORT_SYMBOL(simple_sync_file); +EXPORT_SYMBOL(simple_unlink); diff -Nru a/fs/namei.c b/fs/namei.c --- a/fs/namei.c Thu Oct 2 01:28:16 2003 +++ b/fs/namei.c Thu Oct 2 01:28:16 2003 @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -218,7 +219,7 @@ if (retval) return retval; - return security_inode_permission(inode, mask); + return security_inode_permission(inode, mask, nd); } /* @@ -302,7 +303,8 @@ * short-cut DAC fails, then call permission() to do more * complete permission check. */ -static inline int exec_permission_lite(struct inode *inode) +static inline int exec_permission_lite(struct inode *inode, + struct nameidata *nd) { umode_t mode = inode->i_mode; @@ -325,7 +327,7 @@ return -EACCES; ok: - return security_inode_permission(inode, MAY_EXEC); + return security_inode_permission(inode, MAY_EXEC, nd); } /* @@ -584,7 +586,7 @@ struct qstr this; unsigned int c; - err = exec_permission_lite(inode); + err = exec_permission_lite(inode, nd); if (err == -EAGAIN) { err = permission(inode, MAY_EXEC, nd); } @@ -2275,3 +2277,33 @@ .readlink = page_readlink, .follow_link = page_follow_link, }; + +EXPORT_SYMBOL(__user_walk); +EXPORT_SYMBOL(follow_down); +EXPORT_SYMBOL(follow_up); +EXPORT_SYMBOL(get_write_access); /* binfmt_aout */ +EXPORT_SYMBOL(getname); +EXPORT_SYMBOL(lock_rename); +EXPORT_SYMBOL(lookup_create); +EXPORT_SYMBOL(lookup_hash); +EXPORT_SYMBOL(lookup_one_len); +EXPORT_SYMBOL(page_follow_link); +EXPORT_SYMBOL(page_readlink); +EXPORT_SYMBOL(page_symlink); +EXPORT_SYMBOL(page_symlink_inode_operations); +EXPORT_SYMBOL(path_lookup); +EXPORT_SYMBOL(path_release); +EXPORT_SYMBOL(path_walk); +EXPORT_SYMBOL(permission); +EXPORT_SYMBOL(unlock_rename); +EXPORT_SYMBOL(vfs_create); +EXPORT_SYMBOL(vfs_follow_link); +EXPORT_SYMBOL(vfs_link); +EXPORT_SYMBOL(vfs_mkdir); +EXPORT_SYMBOL(vfs_mknod); +EXPORT_SYMBOL(vfs_permission); +EXPORT_SYMBOL(vfs_readlink); +EXPORT_SYMBOL(vfs_rename); +EXPORT_SYMBOL(vfs_rmdir); +EXPORT_SYMBOL(vfs_symlink); +EXPORT_SYMBOL(vfs_unlink); diff -Nru a/fs/proc/inode.c b/fs/proc/inode.c --- a/fs/proc/inode.c Thu Oct 2 01:28:17 2003 +++ b/fs/proc/inode.c Thu Oct 2 01:28:17 2003 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -135,34 +136,47 @@ .statfs = simple_statfs, }; +enum { + Opt_uid, Opt_gid, Opt_err +}; + +static match_table_t tokens = { + {Opt_uid, "uid=%u"}, + {Opt_gid, "gid=%u"}, + {Opt_err, NULL} +}; + static int parse_options(char *options,uid_t *uid,gid_t *gid) { - char *this_char,*value; + char *p; + int option; *uid = current->uid; *gid = current->gid; if (!options) return 1; - while ((this_char = strsep(&options,",")) != NULL) { - if (!*this_char) + + while ((p = strsep(&options, ",")) != NULL) { + substring_t args[MAX_OPT_ARGS]; + int token; + if (!*p) continue; - if ((value = strchr(this_char,'=')) != NULL) - *value++ = 0; - if (!strcmp(this_char,"uid")) { - if (!value || !*value) - return 0; - *uid = simple_strtoul(value,&value,0); - if (*value) - return 0; - } - else if (!strcmp(this_char,"gid")) { - if (!value || !*value) + + token = match_token(p, tokens, args); + switch (token) { + case Opt_uid: + if (match_int(args, &option)) return 0; - *gid = simple_strtoul(value,&value,0); - if (*value) + *uid = option; + break; + case Opt_gid: + if (match_int(args, &option)) return 0; + *gid = option; + break; + default: + return 0; } - else return 1; } return 1; } diff -Nru a/fs/seq_file.c b/fs/seq_file.c --- a/fs/seq_file.c Thu Oct 2 01:28:17 2003 +++ b/fs/seq_file.c Thu Oct 2 01:28:17 2003 @@ -6,6 +6,7 @@ */ #include +#include #include #include @@ -37,6 +38,8 @@ return 0; } +EXPORT_SYMBOL(seq_open); + /** * seq_read - ->read() method for sequential files. * @file, @buf, @size, @ppos: see file_operations method @@ -144,6 +147,8 @@ goto Done; } +EXPORT_SYMBOL(seq_read); + static int traverse(struct seq_file *m, loff_t offset) { loff_t pos = 0; @@ -228,6 +233,8 @@ return retval; } +EXPORT_SYMBOL(seq_lseek); + /** * seq_release - free the structures associated with sequential file. * @file: file in question @@ -244,6 +251,8 @@ return 0; } +EXPORT_SYMBOL(seq_release); + /** * seq_escape - print string into buffer, escaping some characters * @m: target buffer @@ -279,6 +288,8 @@ return 0; } +EXPORT_SYMBOL(seq_escape); + int seq_printf(struct seq_file *m, const char *f, ...) { va_list args; @@ -297,9 +308,11 @@ return -1; } +EXPORT_SYMBOL(seq_printf); + int seq_path(struct seq_file *m, - struct vfsmount *mnt, struct dentry *dentry, - char *esc) + struct vfsmount *mnt, struct dentry *dentry, + char *esc) { if (m->count < m->size) { char *s = m->buf + m->count; @@ -328,6 +341,8 @@ return -1; } +EXPORT_SYMBOL(seq_path); + static void *single_start(struct seq_file *p, loff_t *pos) { return NULL + (*pos == 0); @@ -343,7 +358,8 @@ { } -int single_open(struct file *file, int (*show)(struct seq_file *, void*), void *data) +int single_open(struct file *file, int (*show)(struct seq_file *, void *), + void *data) { struct seq_operations *op = kmalloc(sizeof(*op), GFP_KERNEL); int res = -ENOMEM; @@ -362,6 +378,8 @@ return res; } +EXPORT_SYMBOL(single_open); + int single_release(struct inode *inode, struct file *file) { struct seq_operations *op = ((struct seq_file *)file->private_data)->op; @@ -370,6 +388,8 @@ return res; } +EXPORT_SYMBOL(single_release); + int seq_release_private(struct inode *inode, struct file *file) { struct seq_file *seq = file->private_data; @@ -379,3 +399,4 @@ return seq_release(inode, file); } +EXPORT_SYMBOL(seq_release_private); diff -Nru a/fs/smbfs/inode.c b/fs/smbfs/inode.c --- a/fs/smbfs/inode.c Thu Oct 2 01:28:16 2003 +++ b/fs/smbfs/inode.c Thu Oct 2 01:28:16 2003 @@ -551,8 +551,8 @@ if (ver == SMB_MOUNT_OLDVERSION) { mnt->version = oldmnt->version; - mnt->uid = low2highuid(oldmnt->uid); - mnt->gid = low2highuid(oldmnt->gid); + mnt->uid = OLD_TO_NEW_UID(oldmnt->uid); + mnt->gid = OLD_TO_NEW_GID(oldmnt->gid); mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG; mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR; diff -Nru a/fs/super.c b/fs/super.c --- a/fs/super.c Thu Oct 2 01:28:16 2003 +++ b/fs/super.c Thu Oct 2 01:28:16 2003 @@ -21,6 +21,7 @@ */ #include +#include #include #include #include @@ -134,6 +135,8 @@ } } +EXPORT_SYMBOL(deactivate_super); + /** * grab_super - acquire an active reference * @s - reference we are trying to make active @@ -214,6 +217,8 @@ up_write(&sb->s_umount); } +EXPORT_SYMBOL(generic_shutdown_super); + /** * sget - find or create a superblock * @type: filesystem type superblock should belong to @@ -259,12 +264,16 @@ return s; } +EXPORT_SYMBOL(sget); + void drop_super(struct super_block *sb) { up_read(&sb->s_umount); put_super(sb); } +EXPORT_SYMBOL(drop_super); + static inline void write_super(struct super_block *sb) { lock_super(sb); @@ -382,6 +391,8 @@ spin_unlock(&sb_lock); return NULL; } + +EXPORT_SYMBOL(get_super); struct super_block * user_get_super(dev_t dev) { @@ -405,6 +416,8 @@ return NULL; } +EXPORT_SYMBOL(user_get_super); + asmlinkage long sys_ustat(unsigned dev, struct ustat __user * ubuf) { struct super_block *s; @@ -534,6 +547,8 @@ return 0; } +EXPORT_SYMBOL(set_anon_super); + void kill_anon_super(struct super_block *sb) { int slot = MINOR(sb->s_dev); @@ -543,6 +558,8 @@ spin_unlock(&unnamed_dev_lock); } +EXPORT_SYMBOL(kill_anon_super); + void kill_litter_super(struct super_block *sb) { if (sb->s_root) @@ -550,6 +567,8 @@ kill_anon_super(sb); } +EXPORT_SYMBOL(kill_litter_super); + static int set_bdev_super(struct super_block *s, void *data) { s->s_bdev = data; @@ -608,6 +627,8 @@ return s; } +EXPORT_SYMBOL(get_sb_bdev); + void kill_block_super(struct super_block *sb) { struct block_device *bdev = sb->s_bdev; @@ -616,6 +637,8 @@ close_bdev_excl(bdev, BDEV_FS); } +EXPORT_SYMBOL(kill_block_super); + struct super_block *get_sb_nodev(struct file_system_type *fs_type, int flags, void *data, int (*fill_super)(struct super_block *, void *, int)) @@ -638,6 +661,8 @@ return s; } +EXPORT_SYMBOL(get_sb_nodev); + static int compare_single(struct super_block *s, void *p) { return 1; @@ -667,6 +692,8 @@ return s; } +EXPORT_SYMBOL(get_sb_single); + struct vfsmount * do_kern_mount(const char *fstype, int flags, const char *name, void *data) { @@ -709,3 +736,5 @@ { return do_kern_mount(type->name, 0, type->name, NULL); } + +EXPORT_SYMBOL(kern_mount); diff -Nru a/fs/udf/inode.c b/fs/udf/inode.c --- a/fs/udf/inode.c Thu Oct 2 01:28:18 2003 +++ b/fs/udf/inode.c Thu Oct 2 01:28:18 2003 @@ -126,7 +126,8 @@ void udf_clear_inode(struct inode *inode) { - kfree(UDF_I_DATA(inode)); + if (!is_bad_inode(inode)) + kfree(UDF_I_DATA(inode)); } void udf_discard_prealloc(struct inode * inode) diff -Nru a/fs/udf/super.c b/fs/udf/super.c --- a/fs/udf/super.c Thu Oct 2 01:28:17 2003 +++ b/fs/udf/super.c Thu Oct 2 01:28:17 2003 @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -225,7 +226,7 @@ * gid= Set the default group. * umask= Set the default umask. * uid= Set the default user. - * bs= Set the block size. + * bs= Set the block size. * unhide Show otherwise hidden files. * undelete Show deleted files in lists. * adinicb Embed data in the inode (default) @@ -259,18 +260,53 @@ * uopts Pointer to mount options variable. * * POST-CONDITIONS - * 0 Mount options parsed okay. - * -1 Error parsing mount options. + * 1 Mount options parsed okay. + * 0 Error parsing mount options. * * HISTORY * July 1, 1997 - Andrew E. Mileski * Written, tested, and released. */ +enum { + Opt_novrs, Opt_nostrict, Opt_bs, Opt_unhide, Opt_undelete, + Opt_noadinicb, Opt_adinicb, Opt_shortad, Opt_longad, + Opt_gid, Opt_uid, Opt_umask, Opt_session, Opt_lastblock, + Opt_anchor, Opt_volume, Opt_partition, Opt_fileset, + Opt_rootdir, Opt_utf8, Opt_iocharset, + Opt_err +}; + +static match_table_t tokens = { + {Opt_novrs, "novrs"}, + {Opt_nostrict, "nostrict"}, + {Opt_bs, "bs=%u"}, + {Opt_unhide, "unhide"}, + {Opt_undelete, "undelete"}, + {Opt_noadinicb, "noadinicb"}, + {Opt_adinicb, "adinicb"}, + {Opt_shortad, "shortad"}, + {Opt_longad, "longad"}, + {Opt_gid, "gid=%u"}, + {Opt_uid, "uid=%u"}, + {Opt_umask, "umask=%o"}, + {Opt_session, "session=%u"}, + {Opt_lastblock, "lastblock=%u"}, + {Opt_anchor, "anchor=%u"}, + {Opt_volume, "volume=%u"}, + {Opt_partition, "partition=%u"}, + {Opt_fileset, "fileset=%u"}, + {Opt_rootdir, "rootdir=%u"}, + {Opt_utf8, "utf8"}, + {Opt_iocharset, "iocharset=%s"}, + {Opt_err, NULL} +}; + static int udf_parse_options(char *options, struct udf_options *uopt) { - char *opt, *val; + char *p; + int option; uopt->novrs = 0; uopt->blocksize = 2048; @@ -286,71 +322,106 @@ if (!options) return 1; - while ((opt = strsep(&options, ",")) != NULL) - { - if (!*opt) + while ((p = strsep(&options, ",")) != NULL) { + substring_t args[MAX_OPT_ARGS]; + int token; + if (!*p) continue; - /* Make "opt=val" into two strings */ - val = strchr(opt, '='); - if (val) - *(val++) = 0; - if (!strcmp(opt, "novrs") && !val) + + token = match_token(p, tokens, args); + switch (token) { + case Opt_novrs: uopt->novrs = 1; - else if (!strcmp(opt, "bs") && val) - uopt->blocksize = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "unhide") && !val) + break; + case Opt_bs: + if (match_int(&args[0], &option)) + return 0; + uopt->blocksize = option; + break; + case Opt_unhide: uopt->flags |= (1 << UDF_FLAG_UNHIDE); - else if (!strcmp(opt, "undelete") && !val) + break; + case Opt_undelete: uopt->flags |= (1 << UDF_FLAG_UNDELETE); - else if (!strcmp(opt, "noadinicb") && !val) + break; + case Opt_noadinicb: uopt->flags &= ~(1 << UDF_FLAG_USE_AD_IN_ICB); - else if (!strcmp(opt, "adinicb") && !val) + break; + case Opt_adinicb: uopt->flags |= (1 << UDF_FLAG_USE_AD_IN_ICB); - else if (!strcmp(opt, "shortad") && !val) + break; + case Opt_shortad: uopt->flags |= (1 << UDF_FLAG_USE_SHORT_AD); - else if (!strcmp(opt, "longad") && !val) + break; + case Opt_longad: uopt->flags &= ~(1 << UDF_FLAG_USE_SHORT_AD); - else if (!strcmp(opt, "gid") && val) - uopt->gid = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "umask") && val) - uopt->umask = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "nostrict") && !val) + break; + case Opt_gid: + if (match_int(args, &option)) + return 0; + uopt->gid = option; + break; + case Opt_uid: + if (match_int(args, &option)) + return 0; + uopt->uid = option; + break; + case Opt_umask: + if (match_octal(args, &option)) + return 0; + uopt->umask = option; + break; + case Opt_nostrict: uopt->flags &= ~(1 << UDF_FLAG_STRICT); - else if (!strcmp(opt, "uid") && val) - uopt->uid = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "session") && val) - uopt->session = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "lastblock") && val) - uopt->lastblock = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "anchor") && val) - uopt->anchor = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "volume") && val) - uopt->volume = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "partition") && val) - uopt->partition = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "fileset") && val) - uopt->fileset = simple_strtoul(val, NULL, 0); - else if (!strcmp(opt, "rootdir") && val) - uopt->rootdir = simple_strtoul(val, NULL, 0); + break; + case Opt_session: + if (match_int(args, &option)) + return 0; + uopt->session = option; + break; + case Opt_lastblock: + if (match_int(args, &option)) + return 0; + uopt->lastblock = option; + break; + case Opt_anchor: + if (match_int(args, &option)) + return 0; + uopt->anchor = option; + break; + case Opt_volume: + if (match_int(args, &option)) + return 0; + uopt->volume = option; + break; + case Opt_partition: + if (match_int(args, &option)) + return 0; + uopt->partition = option; + break; + case Opt_fileset: + if (match_int(args, &option)) + return 0; + uopt->fileset = option; + break; + case Opt_rootdir: + if (match_int(args, &option)) + return 0; + uopt->rootdir = option; + break; + case Opt_utf8: + uopt->flags |= (1 << UDF_FLAG_UTF8); + break; #ifdef CONFIG_NLS - else if (!strcmp(opt, "iocharset") && val) - { - uopt->nls_map = load_nls(val); + case Opt_iocharset: + uopt->nls_map = load_nls(args[0].from); uopt->flags |= (1 << UDF_FLAG_NLS_MAP); - } + break; #endif - else if (!strcmp(opt, "utf8") && !val) - uopt->flags |= (1 << UDF_FLAG_UTF8); - else if (val) - { - printk(KERN_ERR "udf: bad mount option \"%s=%s\"\n", - opt, val); - return 0; - } - else - { - printk(KERN_ERR "udf: bad mount option \"%s\"\n", - opt); + default: + printk(KERN_ERR "udf: bad mount option \"%s\" " + "or missing value\n", + p); return 0; } } diff -Nru a/fs/ufs/super.c b/fs/ufs/super.c --- a/fs/ufs/super.c Thu Oct 2 01:28:15 2003 +++ b/fs/ufs/super.c Thu Oct 2 01:28:15 2003 @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -250,64 +251,99 @@ sb->s_id, function, error_buf); } +enum { + Opt_type_old, Opt_type_sunx86, Opt_type_sun, Opt_type_44bsd, + Opt_type_hp, Opt_type_nextstepcd, Opt_type_nextstep, + Opt_type_openstep, Opt_onerror_panic, Opt_onerror_lock, + Opt_onerror_umount, Opt_onerror_repair, Opt_err +}; + +static match_table_t tokens = { + {Opt_type_old, "ufstype=old"}, + {Opt_type_sunx86, "ufstype=sunx86"}, + {Opt_type_sun, "ufstype=sun"}, + {Opt_type_44bsd, "ufstype=44bsd"}, + {Opt_type_hp, "ufstype=hp"}, + {Opt_type_nextstepcd, "ufstype=nextstep-cd"}, + {Opt_type_nextstep, "ufstype=nextstep"}, + {Opt_type_openstep, "ufstype=openstep"}, + {Opt_onerror_panic, "onerror=panic"}, + {Opt_onerror_lock, "onerror=lock"}, + {Opt_onerror_umount, "onerror=umount"}, + {Opt_onerror_repair, "onerror=repair"}, + {Opt_err, NULL} +}; + static int ufs_parse_options (char * options, unsigned * mount_options) { - char * this_char; - char * value; + char * p; UFSD(("ENTER\n")) if (!options) return 1; - while ((this_char = strsep (&options, ",")) != NULL) { - if (!*this_char) + while ((p = strsep(&options, ",")) != NULL) { + substring_t args[MAX_OPT_ARGS]; + int token; + if (!*p) continue; - if ((value = strchr (this_char, '=')) != NULL) - *value++ = 0; - if (!strcmp (this_char, "ufstype")) { - ufs_clear_opt (*mount_options, UFSTYPE); - if (!strcmp (value, "old")) - ufs_set_opt (*mount_options, UFSTYPE_OLD); - else if (!strcmp (value, "sun")) - ufs_set_opt (*mount_options, UFSTYPE_SUN); - else if (!strcmp (value, "44bsd")) - ufs_set_opt (*mount_options, UFSTYPE_44BSD); - else if (!strcmp (value, "nextstep")) - ufs_set_opt (*mount_options, UFSTYPE_NEXTSTEP); - else if (!strcmp (value, "nextstep-cd")) - ufs_set_opt (*mount_options, UFSTYPE_NEXTSTEP_CD); - else if (!strcmp (value, "openstep")) - ufs_set_opt (*mount_options, UFSTYPE_OPENSTEP); - else if (!strcmp (value, "sunx86")) - ufs_set_opt (*mount_options, UFSTYPE_SUNx86); - else if (!strcmp (value, "hp")) - ufs_set_opt (*mount_options, UFSTYPE_HP); - else { - printk ("UFS-fs: Invalid type option: %s\n", value); - return 0; - } - } - else if (!strcmp (this_char, "onerror")) { + + token = match_token(p, tokens, args); + switch (token) { + case Opt_type_old: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_OLD); + break; + case Opt_type_sunx86: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_SUNx86); + break; + case Opt_type_sun: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_SUN); + break; + case Opt_type_44bsd: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_44BSD); + break; + case Opt_type_hp: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_HP); + break; + case Opt_type_nextstepcd: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_NEXTSTEP_CD); + break; + case Opt_type_nextstep: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_NEXTSTEP); + break; + case Opt_type_openstep: + ufs_clear_opt (*mount_options, UFSTYPE); + ufs_set_opt (*mount_options, UFSTYPE_OPENSTEP); + break; + case Opt_onerror_panic: + ufs_clear_opt (*mount_options, ONERROR); + ufs_set_opt (*mount_options, ONERROR_PANIC); + break; + case Opt_onerror_lock: + ufs_clear_opt (*mount_options, ONERROR); + ufs_set_opt (*mount_options, ONERROR_LOCK); + break; + case Opt_onerror_umount: + ufs_clear_opt (*mount_options, ONERROR); + ufs_set_opt (*mount_options, ONERROR_UMOUNT); + break; + case Opt_onerror_repair: + printk("UFS-fs: Unable to do repair on error, " + "will lock lock instead\n"); ufs_clear_opt (*mount_options, ONERROR); - if (!strcmp (value, "panic")) - ufs_set_opt (*mount_options, ONERROR_PANIC); - else if (!strcmp (value, "lock")) - ufs_set_opt (*mount_options, ONERROR_LOCK); - else if (!strcmp (value, "umount")) - ufs_set_opt (*mount_options, ONERROR_UMOUNT); - else if (!strcmp (value, "repair")) { - printk("UFS-fs: Unable to do repair on error, " - "will lock lock instead \n"); - ufs_set_opt (*mount_options, ONERROR_REPAIR); - } - else { - printk ("UFS-fs: Invalid action onerror: %s\n", value); - return 0; - } - } - else { - printk("UFS-fs: Invalid option: %s\n", this_char); + ufs_set_opt (*mount_options, ONERROR_REPAIR); + break; + default: + printk("UFS-fs: Invalid option: \"%s\" " + "or missing value\n", p); return 0; } } diff -Nru a/include/acpi/acconfig.h b/include/acpi/acconfig.h --- a/include/acpi/acconfig.h Thu Oct 2 01:28:17 2003 +++ b/include/acpi/acconfig.h Thu Oct 2 01:28:17 2003 @@ -64,7 +64,7 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20030813 +#define ACPI_CA_VERSION 0x20030918 /* Maximum objects in the various object caches */ diff -Nru a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h --- a/include/acpi/acdisasm.h Thu Oct 2 01:28:17 2003 +++ b/include/acpi/acdisasm.h Thu Oct 2 01:28:17 2003 @@ -152,10 +152,6 @@ acpi_dm_decode_internal_object ( union acpi_operand_object *obj_desc); -void -acpi_dm_decode_node ( - struct acpi_namespace_node *node); - u32 acpi_dm_block_type ( union acpi_parse_object *op); diff -Nru a/include/acpi/acstruct.h b/include/acpi/acstruct.h --- a/include/acpi/acstruct.h Thu Oct 2 01:28:16 2003 +++ b/include/acpi/acstruct.h Thu Oct 2 01:28:16 2003 @@ -91,11 +91,12 @@ struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */ union acpi_operand_object **caller_return_desc; union acpi_generic_state *control_state; /* List of control states (nested IFs) */ + struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */ struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */ struct acpi_namespace_node *method_call_node; /* Called method Node*/ union acpi_parse_object *method_call_op; /* method_call Op if running a method */ union acpi_operand_object *method_desc; /* Method descriptor if running a method */ - struct acpi_namespace_node *method_node; /* Method Node if running a method */ + struct acpi_namespace_node *method_node; /* Method node if running a method. */ union acpi_parse_object *op; /* Current parser op */ union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */ const struct acpi_opcode_info *op_info; /* Info on current opcode */ diff -Nru a/include/asm-alpha/cacheflush.h b/include/asm-alpha/cacheflush.h --- a/include/asm-alpha/cacheflush.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-alpha/cacheflush.h Thu Oct 2 01:28:17 2003 @@ -10,6 +10,8 @@ #define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_dcache_page(page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) /* Note that the following two definitions are _highly_ dependent on the contexts in which they are used in the kernel. I personally @@ -59,5 +61,12 @@ /* This is used only in do_no_page and do_swap_page. */ #define flush_icache_page(vma, page) \ flush_icache_user_range((vma), (page), 0, 0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) #endif /* _ALPHA_CACHEFLUSH_H */ diff -Nru a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h --- a/include/asm-alpha/pgtable.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-alpha/pgtable.h Thu Oct 2 01:28:16 2003 @@ -49,7 +49,6 @@ #else #define VMALLOC_START (-2*PGDIR_SIZE) #endif -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (-PGDIR_SIZE) /* diff -Nru a/include/asm-arm/arch-adifcc/vmalloc.h b/include/asm-arm/arch-adifcc/vmalloc.h --- a/include/asm-arm/arch-adifcc/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-adifcc/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-anakin/vmalloc.h b/include/asm-arm/arch-anakin/vmalloc.h --- a/include/asm-arm/arch-anakin/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-anakin/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -19,8 +19,7 @@ * linux/arch/arm/kernel/traps.c) */ #define VMALLOC_ARCH_OFFSET (8 * 1024 * 1024) -#define VMALLOC_VMADDR(a) ((unsigned int) (a)) -#define VMALLOC_START ((VMALLOC_VMADDR(high_memory) + VMALLOC_ARCH_OFFSET) & ~(VMALLOC_ARCH_OFFSET - 1)) +#define VMALLOC_START (((unsigned long) (high_memory) + VMALLOC_ARCH_OFFSET) & ~(VMALLOC_ARCH_OFFSET - 1)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-cl7500/vmalloc.h b/include/asm-arm/arch-cl7500/vmalloc.h --- a/include/asm-arm/arch-cl7500/vmalloc.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-arm/arch-cl7500/vmalloc.h Thu Oct 2 01:28:17 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x1c000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-clps711x/vmalloc.h b/include/asm-arm/arch-clps711x/vmalloc.h --- a/include/asm-arm/arch-clps711x/vmalloc.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-arm/arch-clps711x/vmalloc.h Thu Oct 2 01:28:15 2003 @@ -28,7 +28,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-ebsa110/vmalloc.h b/include/asm-arm/arch-ebsa110/vmalloc.h --- a/include/asm-arm/arch-ebsa110/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-ebsa110/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -18,7 +18,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x1f000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-ebsa285/vmalloc.h b/include/asm-arm/arch-ebsa285/vmalloc.h --- a/include/asm-arm/arch-ebsa285/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-ebsa285/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -18,7 +18,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_ARCH_FOOTBRIDGE #define VMALLOC_END (PAGE_OFFSET + 0x30000000) diff -Nru a/include/asm-arm/arch-epxa10db/vmalloc.h b/include/asm-arm/arch-epxa10db/vmalloc.h --- a/include/asm-arm/arch-epxa10db/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-epxa10db/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -28,7 +28,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-integrator/vmalloc.h b/include/asm-arm/arch-integrator/vmalloc.h --- a/include/asm-arm/arch-integrator/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-integrator/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -28,7 +28,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-iop3xx/vmalloc.h b/include/asm-arm/arch-iop3xx/vmalloc.h --- a/include/asm-arm/arch-iop3xx/vmalloc.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-arm/arch-iop3xx/vmalloc.h Thu Oct 2 01:28:17 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-l7200/vmalloc.h b/include/asm-arm/arch-l7200/vmalloc.h --- a/include/asm-arm/arch-l7200/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-l7200/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-nexuspci/vmalloc.h b/include/asm-arm/arch-nexuspci/vmalloc.h --- a/include/asm-arm/arch-nexuspci/vmalloc.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-arm/arch-nexuspci/vmalloc.h Thu Oct 2 01:28:17 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x20000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-pxa/vmalloc.h b/include/asm-arm/arch-pxa/vmalloc.h --- a/include/asm-arm/arch-pxa/vmalloc.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-arm/arch-pxa/vmalloc.h Thu Oct 2 01:28:17 2003 @@ -19,7 +19,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-rpc/vmalloc.h b/include/asm-arm/arch-rpc/vmalloc.h --- a/include/asm-arm/arch-rpc/vmalloc.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-arm/arch-rpc/vmalloc.h Thu Oct 2 01:28:17 2003 @@ -18,7 +18,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x1c000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-sa1100/vmalloc.h b/include/asm-arm/arch-sa1100/vmalloc.h --- a/include/asm-arm/arch-sa1100/vmalloc.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-arm/arch-sa1100/vmalloc.h Thu Oct 2 01:28:18 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-shark/vmalloc.h b/include/asm-arm/arch-shark/vmalloc.h --- a/include/asm-arm/arch-shark/vmalloc.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm/arch-shark/vmalloc.h Thu Oct 2 01:28:16 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/arch-tbox/vmalloc.h b/include/asm-arm/arch-tbox/vmalloc.h --- a/include/asm-arm/arch-tbox/vmalloc.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-arm/arch-tbox/vmalloc.h Thu Oct 2 01:28:15 2003 @@ -12,7 +12,6 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (PAGE_OFFSET + 0x10000000) #define MODULE_START (PAGE_OFFSET - 16*1048576) diff -Nru a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h --- a/include/asm-arm/cacheflush.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-arm/cacheflush.h Thu Oct 2 01:28:17 2003 @@ -207,6 +207,15 @@ extern void dmac_clean_range(unsigned long, unsigned long); extern void dmac_flush_range(unsigned long, unsigned long); +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* diff -Nru a/include/asm-arm26/cacheflush.h b/include/asm-arm26/cacheflush.h --- a/include/asm-arm26/cacheflush.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-arm26/cacheflush.h Thu Oct 2 01:28:17 2003 @@ -25,6 +25,8 @@ #define flush_cache_range(vma,start,end) do { } while (0) #define flush_cache_page(vma,vmaddr) do { } while (0) #define flush_page_to_ram(page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) #define invalidate_dcache_range(start,end) do { } while (0) #define clean_dcache_range(start,end) do { } while (0) @@ -36,6 +38,11 @@ #define flush_icache_user_range(start,end, bob, fred) do { } while (0) #define flush_icache_range(start,end) do { } while (0) #define flush_icache_page(vma,page) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) /* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */ /* IM : Yes, it will, but only if setup to do so (we do this). */ diff -Nru a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h --- a/include/asm-arm26/pgtable.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-arm26/pgtable.h Thu Oct 2 01:28:16 2003 @@ -173,7 +173,6 @@ * area for the same reason. ;) FIXME: surely 1 page not 4k ? */ #define VMALLOC_START 0x01a00000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END 0x01c00000 /* Is pmd_page supposed to return a pointer to a page in some arches? ours seems to diff -Nru a/include/asm-cris/arch-v10/pgtable.h b/include/asm-cris/arch-v10/pgtable.h --- a/include/asm-cris/arch-v10/pgtable.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-cris/arch-v10/pgtable.h Thu Oct 2 01:28:18 2003 @@ -7,11 +7,9 @@ #ifdef CONFIG_CRIS_LOW_MAP #define VMALLOC_START KSEG_7 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END KSEG_8 #else #define VMALLOC_START KSEG_D -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END KSEG_E #endif diff -Nru a/include/asm-cris/cacheflush.h b/include/asm-cris/cacheflush.h --- a/include/asm-cris/cacheflush.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-cris/cacheflush.h Thu Oct 2 01:28:15 2003 @@ -16,6 +16,13 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) void global_flush_tlb(void); int change_page_attr(struct page *page, int numpages, pgprot_t prot); diff -Nru a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h --- a/include/asm-h8300/cacheflush.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-h8300/cacheflush.h Thu Oct 2 01:28:16 2003 @@ -11,7 +11,6 @@ */ #define flush_cache_all() -#define flush_cache_all() #define flush_cache_mm(mm) #define flush_cache_range(vma,a,b) #define flush_cache_page(vma,p) @@ -20,6 +19,8 @@ #define flush_icache() #define flush_icache_page(vma,page) #define flush_icache_range(start,len) +#define flush_cache_vmap(start, end) +#define flush_cache_vunmap(start, end) #define cache_push_v(vaddr,len) #define cache_push(paddr,len) #define cache_clear(paddr,len) @@ -27,5 +28,10 @@ #define flush_dcache_range(a,b) #define flush_icache_user_range(vma,page,addr,len) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) #endif /* _ASM_H8300_CACHEFLUSH_H */ diff -Nru a/include/asm-i386/cacheflush.h b/include/asm-i386/cacheflush.h --- a/include/asm-i386/cacheflush.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-i386/cacheflush.h Thu Oct 2 01:28:17 2003 @@ -13,6 +13,13 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) void global_flush_tlb(void); int change_page_attr(struct page *page, int numpages, pgprot_t prot); diff -Nru a/include/asm-i386/elf.h b/include/asm-i386/elf.h --- a/include/asm-i386/elf.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-i386/elf.h Thu Oct 2 01:28:17 2003 @@ -127,11 +127,6 @@ #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) #define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs) -#ifdef CONFIG_SMP -extern void dump_smp_unlazy_fpu(void); -#define ELF_CORE_SYNC dump_smp_unlazy_fpu -#endif - #define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL)) #define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE) #define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall) diff -Nru a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h --- a/include/asm-i386/highmem.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-i386/highmem.h Thu Oct 2 01:28:16 2003 @@ -63,6 +63,8 @@ void kunmap_atomic(void *kvaddr, enum km_type type); struct page *kmap_atomic_to_page(void *ptr); +#define flush_cache_kmaps() do { } while (0) + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff -Nru a/include/asm-i386/mman.h b/include/asm-i386/mman.h --- a/include/asm-i386/mman.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-i386/mman.h Thu Oct 2 01:28:16 2003 @@ -8,8 +8,6 @@ #define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ -#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ -#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ #define MAP_SHARED 0x01 /* Share changes */ #define MAP_PRIVATE 0x02 /* Changes are private */ diff -Nru a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h --- a/include/asm-i386/pgtable.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-i386/pgtable.h Thu Oct 2 01:28:17 2003 @@ -85,7 +85,6 @@ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long) high_memory + 2*VMALLOC_OFFSET-1) & \ ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) #else diff -Nru a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h --- a/include/asm-i386/unistd.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-i386/unistd.h Thu Oct 2 01:28:17 2003 @@ -278,8 +278,9 @@ #define __NR_tgkill 270 #define __NR_utimes 271 #define __NR_fadvise64_64 272 +#define __NR_vserver 273 -#define NR_syscalls 273 +#define NR_syscalls 274 /* user-visible error numbers are in the range -1 - -124: see */ diff -Nru a/include/asm-ia64/cacheflush.h b/include/asm-ia64/cacheflush.h --- a/include/asm-ia64/cacheflush.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-ia64/cacheflush.h Thu Oct 2 01:28:16 2003 @@ -21,6 +21,8 @@ #define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_icache_page(vma,page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) #define flush_dcache_page(page) \ do { \ @@ -34,5 +36,12 @@ unsigned long _addr = (unsigned long) page_address(page) + ((user_addr) & ~PAGE_MASK); \ flush_icache_range(_addr, _addr + (len)); \ } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) #endif /* _ASM_IA64_CACHEFLUSH_H */ diff -Nru a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h --- a/include/asm-ia64/pgtable.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-ia64/pgtable.h Thu Oct 2 01:28:16 2003 @@ -207,7 +207,6 @@ #define RGN_KERNEL 7 #define VMALLOC_START 0xa000000200000000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_VIRTUAL_MEM_MAP # define VMALLOC_END_INIT (0xa000000000000000 + (1UL << (4*PAGE_SHIFT - 9))) # define VMALLOC_END vmalloc_end diff -Nru a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h --- a/include/asm-m68k/bitops.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-m68k/bitops.h Thu Oct 2 01:28:18 2003 @@ -164,9 +164,10 @@ return ((1UL << (nr & 31)) & (((const volatile unsigned long *) vaddr)[nr >> 5])) != 0; } -extern __inline__ int find_first_zero_bit(unsigned long * vaddr, unsigned size) +extern __inline__ int find_first_zero_bit(const unsigned long *vaddr, + unsigned size) { - unsigned long *p = vaddr, *addr = vaddr; + const unsigned long *p = vaddr, *addr = vaddr; unsigned long allones = ~0UL; int res; unsigned long num; @@ -187,11 +188,11 @@ return ((p - addr) << 5) + (res ^ 31); } -extern __inline__ int find_next_zero_bit (unsigned long *vaddr, int size, +extern __inline__ int find_next_zero_bit (const unsigned long *vaddr, int size, int offset) { - unsigned long *addr = vaddr; - unsigned long *p = addr + (offset >> 5); + const unsigned long *addr = vaddr; + const unsigned long *p = addr + (offset >> 5); int set = 0, bit = offset & 31UL, res; if (offset >= size) @@ -263,7 +264,7 @@ * unlikely to be set. It's guaranteed that at least one of the 140 * bits is cleared. */ -static inline int sched_find_first_bit(unsigned long *b) +static inline int sched_find_first_bit(const unsigned long *b) { if (unlikely(b[0])) return __ffs(b[0]); diff -Nru a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h --- a/include/asm-m68k/cacheflush.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-m68k/cacheflush.h Thu Oct 2 01:28:17 2003 @@ -80,6 +80,9 @@ #define flush_cache_all() __flush_cache_all() +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + extern inline void flush_cache_mm(struct mm_struct *mm) { if (mm == current->mm) @@ -127,6 +130,10 @@ #define flush_dcache_page(page) __flush_page_to_ram(page_address(page)) #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) extern void flush_icache_range(unsigned long address, unsigned long endaddr); diff -Nru a/include/asm-m68k/pci.h b/include/asm-m68k/pci.h --- a/include/asm-m68k/pci.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-m68k/pci.h Thu Oct 2 01:28:16 2003 @@ -7,6 +7,8 @@ * Written by Wout Klaren. */ +#include + struct pci_ops; /* diff -Nru a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h --- a/include/asm-m68k/pgtable.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-m68k/pgtable.h Thu Oct 2 01:28:17 2003 @@ -79,12 +79,10 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END KMAP_START #else extern unsigned long vmalloc_end; #define VMALLOC_START 0x0f800000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END vmalloc_end #endif /* CONFIG_SUN3 */ diff -Nru a/include/asm-m68k/zorro.h b/include/asm-m68k/zorro.h --- a/include/asm-m68k/zorro.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-m68k/zorro.h Thu Oct 2 01:28:16 2003 @@ -42,4 +42,4 @@ #define z_iounmap iounmap #define z_ioremap z_remap_nocache_ser -#endif /* _ASM_ZORRO_H */ +#endif /* _ASM_M68K_ZORRO_H */ diff -Nru a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h --- a/include/asm-m68knommu/cacheflush.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-m68knommu/cacheflush.h Thu Oct 2 01:28:18 2003 @@ -15,7 +15,13 @@ #define flush_icache_range(start,len) __flush_cache_all() #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) extern inline void __flush_cache_all(void) { diff -Nru a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h --- a/include/asm-mips/cacheflush.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-mips/cacheflush.h Thu Oct 2 01:28:17 2003 @@ -43,7 +43,15 @@ extern void (*flush_icache_range)(unsigned long start, unsigned long end); #define flush_icache_user_range(vma, page, addr, len) \ flush_icache_page(vma, page) +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) extern void (*flush_cache_sigtramp)(unsigned long addr); extern void (*flush_icache_all)(void); diff -Nru a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h --- a/include/asm-mips/highmem.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-mips/highmem.h Thu Oct 2 01:28:17 2003 @@ -54,6 +54,8 @@ extern void kunmap_atomic(void *kvaddr, enum km_type type); extern struct page *kmap_atomic_to_page(void *ptr); +#define flush_cache_kmaps() flush_cache_all() + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff -Nru a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h --- a/include/asm-mips/pgtable-32.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-mips/pgtable-32.h Thu Oct 2 01:28:17 2003 @@ -79,7 +79,6 @@ #define FIRST_USER_PGD_NR 0 #define VMALLOC_START KSEG2 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #if CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) diff -Nru a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h --- a/include/asm-mips/pgtable-64.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-mips/pgtable-64.h Thu Oct 2 01:28:16 2003 @@ -64,7 +64,6 @@ #define FIRST_USER_PGD_NR 0 #define VMALLOC_START XKSEG -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END \ (VMALLOC_START + ((1 << PGD_ORDER) * PTRS_PER_PTE * PAGE_SIZE)) diff -Nru a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h --- a/include/asm-parisc/atomic.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-parisc/atomic.h Thu Oct 2 01:28:16 2003 @@ -129,8 +129,9 @@ /* It's possible to reduce all atomic operations to either - * __atomic_add_return, __atomic_set and __atomic_ret (the latter - * is there only for consistency). */ + * __atomic_add_return, atomic_set and atomic_read (the latter + * is there only for consistency). + */ static __inline__ int __atomic_add_return(int i, atomic_t *v) { @@ -144,7 +145,7 @@ return ret; } -static __inline__ void __atomic_set(atomic_t *v, int i) +static __inline__ void atomic_set(atomic_t *v, int i) { unsigned long flags; SPIN_LOCK_IRQSAVE(ATOMIC_HASH(v), flags); @@ -154,27 +155,24 @@ SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(v), flags); } -static __inline__ int __atomic_read(atomic_t *v) +static __inline__ int atomic_read(const atomic_t *v) { return v->counter; } /* exported interface */ -#define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v)))) -#define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v)))) -#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) -#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) +#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)i),(v)))) +#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)i),(v)))) +#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) +#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) -#define atomic_add_return(i,v) (__atomic_add_return( (i),(v))) -#define atomic_sub_return(i,v) (__atomic_add_return(-(i),(v))) +#define atomic_add_return(i,v) (__atomic_add_return( ((int)i),(v))) +#define atomic_sub_return(i,v) (__atomic_add_return(-((int)i),(v))) #define atomic_inc_return(v) (__atomic_add_return( 1,(v))) #define atomic_dec_return(v) (__atomic_add_return( -1,(v))) #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) - -#define atomic_set(v,i) (__atomic_set((v),i)) -#define atomic_read(v) (__atomic_read(v)) #define ATOMIC_INIT(i) { (i) } diff -Nru a/include/asm-parisc/bitops.h b/include/asm-parisc/bitops.h --- a/include/asm-parisc/bitops.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-parisc/bitops.h Thu Oct 2 01:28:15 2003 @@ -232,24 +232,24 @@ #if BITS_PER_LONG > 32 " ldi 63,%1\n" " extrd,u,*<> %0,63,32,%%r0\n" - " extrd,u,*TR %0,31,32,%0\n" + " extrd,u,*TR %0,31,32,%0\n" /* move top 32-bits down */ " addi -32,%1,%1\n" #else " ldi 31,%1\n" #endif " extru,<> %0,31,16,%%r0\n" - " extru,TR %0,15,16,%0\n" + " extru,TR %0,15,16,%0\n" /* xxxx0000 -> 0000xxxx */ " addi -16,%1,%1\n" " extru,<> %0,31,8,%%r0\n" - " extru,TR %0,23,8,%0\n" + " extru,TR %0,23,8,%0\n" /* 0000xx00 -> 000000xx */ " addi -8,%1,%1\n" " extru,<> %0,31,4,%%r0\n" - " extru,TR %0,27,4,%0\n" + " extru,TR %0,27,4,%0\n" /* 000000x0 -> 0000000x */ " addi -4,%1,%1\n" " extru,<> %0,31,2,%%r0\n" - " extru,TR %0,29,2,%0\n" + " extru,TR %0,29,2,%0\n" /* 0000000y, 1100b -> 0011b */ " addi -2,%1,%1\n" - " extru,= %0,31,1,%%r0\n" + " extru,= %0,31,1,%%r0\n" /* check last bit */ " addi -1,%1,%1\n" : "+r" (x), "=r" (ret) ); return ret; @@ -291,7 +291,7 @@ " zdep,TR %0,27,28,%0\n" /* x0000000 */ " addi 4,%1,%1\n" " extru,<> %0,1,2,%%r0\n" - " zdep,TR %0,29,30,%0\n" /* y0000000 (y&3 = 0 */ + " zdep,TR %0,29,30,%0\n" /* y0000000 (y&3 = 0) */ " addi 2,%1,%1\n" " extru,= %0,0,1,%%r0\n" " addi 1,%1,%1\n" /* if y & 8, add 1 */ diff -Nru a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h --- a/include/asm-parisc/cacheflush.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-parisc/cacheflush.h Thu Oct 2 01:28:18 2003 @@ -30,6 +30,9 @@ on_each_cpu(cacheflush_h_tmp_function, NULL, 1, 1); } +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + /* The following value needs to be tuned and probably scaled with the * cache size. */ @@ -81,6 +84,13 @@ #define flush_icache_user_range(vma, page, addr, len) do { \ flush_user_dcache_range(addr, addr + len); \ flush_user_icache_range(addr, addr + len); } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) static inline void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) diff -Nru a/include/asm-parisc/dma-mapping.h b/include/asm-parisc/dma-mapping.h --- a/include/asm-parisc/dma-mapping.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-parisc/dma-mapping.h Thu Oct 2 01:28:16 2003 @@ -2,6 +2,7 @@ #define _PARISC_DMA_MAPPING_H #include +#include #include /* diff -Nru a/include/asm-parisc/elf.h b/include/asm-parisc/elf.h --- a/include/asm-parisc/elf.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-parisc/elf.h Thu Oct 2 01:28:17 2003 @@ -144,6 +144,30 @@ #define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */ #define R_PARISC_HIRESERVE 255 +#define PA_PLABEL_FDESC 0x02 /* bit set if PLABEL points to + * a function descriptor, not + * an address */ + +/* The following are PA function descriptors + * + * addr: the absolute address of the function + * gp: either the data pointer (r27) for non-PIC code or the + * the PLT pointer (r19) for PIC code */ + +/* Format for the Elf32 Function descriptor */ +typedef struct elf32_fdesc { + __u32 addr; + __u32 gp; +} Elf32_Fdesc; + +/* Format for the Elf64 Function descriptor */ +typedef struct elf64_fdesc { + __u64 dummy[2]; /* FIXME: nothing uses these, why waste + * the space */ + __u64 addr; + __u64 gp; +} Elf64_Fdesc; + /* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */ #define PT_HP_TLS (PT_LOOS + 0x0) @@ -215,7 +239,10 @@ #ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) \ - current->personality = PER_LINUX + current->personality = PER_LINUX; \ + current->thread.map_base = DEFAULT_MAP_BASE; \ + current->thread.task_size = DEFAULT_TASK_SIZE \ + #endif /* diff -Nru a/include/asm-parisc/ioctl.h b/include/asm-parisc/ioctl.h --- a/include/asm-parisc/ioctl.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-parisc/ioctl.h Thu Oct 2 01:28:15 2003 @@ -44,11 +44,21 @@ ((nr) << _IOC_NRSHIFT) | \ ((size) << _IOC_SIZESHIFT)) +/* provoke compile error for invalid uses of size argument */ +extern int __invalid_size_argument_for_IOC; +#define _IOC_TYPECHECK(t) \ + ((sizeof(t) == sizeof(t[1]) && \ + sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ + sizeof(t) : __invalid_size_argument_for_IOC) + /* used to create numbers */ #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) +#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) +#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) +#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) +#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) +#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) +#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) /* used to decode ioctl numbers.. */ #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) diff -Nru a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h --- a/include/asm-parisc/irq.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-parisc/irq.h Thu Oct 2 01:28:16 2003 @@ -17,6 +17,7 @@ #include #include +#include #define CPU_IRQ_REGION 1 diff -Nru a/include/asm-parisc/keyboard.h b/include/asm-parisc/keyboard.h --- a/include/asm-parisc/keyboard.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-parisc/keyboard.h Thu Oct 2 01:28:16 2003 @@ -25,8 +25,6 @@ #ifndef _PARISC_KEYBOARD_H #define _PARISC_KEYBOARD_H -#include - #ifdef __KERNEL__ #include diff -Nru a/include/asm-parisc/page.h b/include/asm-parisc/page.h --- a/include/asm-parisc/page.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-parisc/page.h Thu Oct 2 01:28:16 2003 @@ -7,6 +7,7 @@ #define PAGE_MASK (~(PAGE_SIZE-1)) #ifdef __KERNEL__ +#include #ifndef __ASSEMBLY__ #include diff -Nru a/include/asm-parisc/param.h b/include/asm-parisc/param.h --- a/include/asm-parisc/param.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-parisc/param.h Thu Oct 2 01:28:16 2003 @@ -2,6 +2,7 @@ #define _ASMPARISC_PARAM_H #ifdef __KERNEL__ +#include # ifdef CONFIG_PA20 # define HZ 1000 /* Faster machines */ # else diff -Nru a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h --- a/include/asm-parisc/pci.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-parisc/pci.h Thu Oct 2 01:28:17 2003 @@ -1,6 +1,7 @@ #ifndef __ASM_PARISC_PCI_H #define __ASM_PARISC_PCI_H +#include #include /* diff -Nru a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h --- a/include/asm-parisc/pdc.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-parisc/pdc.h Thu Oct 2 01:28:15 2003 @@ -1,6 +1,8 @@ #ifndef _PARISC_PDC_H #define _PARISC_PDC_H +#include + /* * PDC return values ... * All PDC calls return a subset of these errors. @@ -191,8 +193,8 @@ #define PDC_IO 135 /* log error info, reset IO system */ #define PDC_IO_READ_AND_CLEAR_ERRORS 0 -#define PDC_IO_READ_AND_LOG_ERRORS 1 -#define PDC_IO_SUSPEND_USB 2 +#define PDC_IO_RESET 1 +#define PDC_IO_RESET_DEVICES 2 /* sets bits 6&7 (little endian) of the HcControl Register */ #define PDC_IO_USB_SUSPEND 0xC000000000000000 #define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5 /* return value */ @@ -951,7 +953,8 @@ int pdc_do_reset(void); int pdc_soft_power_info(unsigned long *power_reg); int pdc_soft_power_button(int sw_control); -void pdc_suspend_usb(void); +void pdc_io_reset(void); +void pdc_io_reset_devices(void); int pdc_iodc_getc(void); void pdc_iodc_putc(unsigned char c); void pdc_iodc_outc(unsigned char c); diff -Nru a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h --- a/include/asm-parisc/pgalloc.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-parisc/pgalloc.h Thu Oct 2 01:28:18 2003 @@ -1,7 +1,6 @@ #ifndef _ASM_PGALLOC_H #define _ASM_PGALLOC_H -#include #include #include #include diff -Nru a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h --- a/include/asm-parisc/pgtable.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-parisc/pgtable.h Thu Oct 2 01:28:17 2003 @@ -1,6 +1,7 @@ #ifndef _PARISC_PGTABLE_H #define _PARISC_PGTABLE_H +#include #include #ifndef __ASSEMBLY__ @@ -108,7 +109,6 @@ extern void *vmalloc_start; #define PCXL_DMA_MAP_SIZE (8*1024*1024) #define VMALLOC_START ((unsigned long)vmalloc_start) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) /* this is a fixmap remnant, see fixmap.h */ #define VMALLOC_END (TMPALIAS_MAP_START) #endif diff -Nru a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h --- a/include/asm-parisc/processor.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-parisc/processor.h Thu Oct 2 01:28:18 2003 @@ -36,10 +36,18 @@ #define current_text_addr() ({ void *pc; __asm__("\n\tblr 0,%0\n\tnop":"=r" (pc)); pc; }) #define TASK_SIZE (current->thread.task_size) -#define DEFAULT_TASK_SIZE (0xFFF00000UL) - #define TASK_UNMAPPED_BASE (current->thread.map_base) -#define DEFAULT_MAP_BASE (0x40000000UL) + +#define DEFAULT_TASK_SIZE32 (0xFFF00000UL) +#define DEFAULT_MAP_BASE32 (0x40000000UL) + +#ifdef __LP64__ +#define DEFAULT_TASK_SIZE (MAX_ADDRESS-0xf000000) +#define DEFAULT_MAP_BASE (0x200000000UL) +#else +#define DEFAULT_TASK_SIZE DEFAULT_TASK_SIZE32 +#define DEFAULT_MAP_BASE DEFAULT_MAP_BASE32 +#endif #ifndef __ASSEMBLY__ @@ -247,8 +255,18 @@ * * Note that the S/390 people took the easy way out and hacked their * GCC to make the stack grow downwards. + * + * Final Note: For entry from syscall, the W (wide) bit of the PSW + * is stuffed into the lowest bit of the user sp (%r30), so we fill + * it in here from the current->personality */ +#ifdef __LP64__ +#define USER_WIDE_MODE (personality(current->personality) == PER_LINUX) +#else +#define USER_WIDE_MODE 0 +#endif + #define start_thread(regs, new_pc, new_sp) do { \ elf_addr_t *sp = (elf_addr_t *)new_sp; \ __u32 spaceid = (__u32)current->mm->context; \ @@ -266,12 +284,12 @@ regs->sr[5] = spaceid; \ regs->sr[6] = spaceid; \ regs->sr[7] = spaceid; \ - regs->gr[ 0] = USER_PSW; \ + regs->gr[ 0] = USER_PSW | (USER_WIDE_MODE ? PSW_W : 0); \ regs->fr[ 0] = 0LL; \ regs->fr[ 1] = 0LL; \ regs->fr[ 2] = 0LL; \ regs->fr[ 3] = 0LL; \ - regs->gr[30] = ((unsigned long)sp + 63) &~ 63; \ + regs->gr[30] = (((unsigned long)sp + 63) &~ 63) | (USER_WIDE_MODE ? 1 : 0); \ regs->gr[31] = pc; \ \ get_user(regs->gr[25], (argv - 1)); \ @@ -299,8 +317,6 @@ #define KSTK_EIP(tsk) ((tsk)->thread.regs.iaoq[0]) #define KSTK_ESP(tsk) ((tsk)->thread.regs.gr[30]) -#endif /* __ASSEMBLY__ */ - #ifdef CONFIG_PA20 #define ARCH_HAS_PREFETCH extern inline void prefetch(const void *addr) @@ -316,5 +332,7 @@ #endif #define cpu_relax() barrier() + +#endif /* __ASSEMBLY__ */ #endif /* __ASM_PARISC_PROCESSOR_H */ diff -Nru a/include/asm-parisc/rt_sigframe.h b/include/asm-parisc/rt_sigframe.h --- a/include/asm-parisc/rt_sigframe.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-parisc/rt_sigframe.h Thu Oct 2 01:28:16 2003 @@ -13,7 +13,20 @@ * which Linux/parisc uses is sp-20 for the saved return pointer...) * Then, the stack pointer must be rounded to a cache line (64 bytes). */ +#define SIGFRAME32 64 +#define FUNCTIONCALLFRAME32 48 +#define PARISC_RT_SIGFRAME_SIZE32 \ + (((sizeof(struct rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32) + +#ifdef __LP64__ +#define SIGFRAME 128 +#define FUNCTIONCALLFRAME 96 #define PARISC_RT_SIGFRAME_SIZE \ - (((sizeof(struct rt_sigframe) + 48) + 63) & -64) + (((sizeof(struct rt_sigframe) + FUNCTIONCALLFRAME) + SIGFRAME) & -SIGFRAME) +#else +#define SIGFRAME SIGFRAME32 +#define FUNCTIONCALLFRAME FUNCTIONCALLFRAME32 +#define PARISC_RT_SIGFRAME_SIZE PARISC_RT_SIGFRAME_SIZE32 +#endif #endif diff -Nru a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h --- a/include/asm-parisc/tlbflush.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-parisc/tlbflush.h Thu Oct 2 01:28:18 2003 @@ -3,6 +3,7 @@ /* TLB flushing routines.... */ +#include #include #include diff -Nru a/include/asm-ppc/cacheflush.h b/include/asm-ppc/cacheflush.h --- a/include/asm-ppc/cacheflush.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-ppc/cacheflush.h Thu Oct 2 01:28:17 2003 @@ -24,11 +24,20 @@ #define flush_cache_range(vma, a, b) do { } while (0) #define flush_cache_page(vma, p) do { } while (0) #define flush_icache_page(vma, page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) extern void flush_dcache_page(struct page *page); extern void flush_icache_range(unsigned long, unsigned long); extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, unsigned long addr, int len); + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) extern void __flush_dcache_icache(void *page_va); extern void __flush_dcache_icache_phys(unsigned long physaddr); diff -Nru a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h --- a/include/asm-ppc/highmem.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-ppc/highmem.h Thu Oct 2 01:28:18 2003 @@ -132,6 +132,8 @@ return pte_page(kmap_pte[idx]); } +#define flush_cache_kmaps() flush_cache_all() + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h --- a/include/asm-ppc/pgtable.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-ppc/pgtable.h Thu Oct 2 01:28:16 2003 @@ -129,7 +129,6 @@ #else #define VMALLOC_START ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))) #endif -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END ioremap_bot /* diff -Nru a/include/asm-ppc/zorro.h b/include/asm-ppc/zorro.h --- a/include/asm-ppc/zorro.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-ppc/zorro.h Thu Oct 2 01:28:17 2003 @@ -27,4 +27,4 @@ #define z_ioremap ioremap #define z_iounmap iounmap -#endif /* _ASM_ZORRO_H */ +#endif /* _ASM_PPC_ZORRO_H */ diff -Nru a/include/asm-ppc64/cacheflush.h b/include/asm-ppc64/cacheflush.h --- a/include/asm-ppc64/cacheflush.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-ppc64/cacheflush.h Thu Oct 2 01:28:15 2003 @@ -14,12 +14,22 @@ #define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_icache_page(vma, page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) extern void flush_dcache_page(struct page *page); extern void flush_icache_range(unsigned long, unsigned long); extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, unsigned long addr, int len); + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + extern void __flush_dcache_icache(void *page_va); #endif /* _PPC64_CACHEFLUSH_H */ diff -Nru a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h --- a/include/asm-ppc64/elf.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-ppc64/elf.h Thu Oct 2 01:28:17 2003 @@ -128,11 +128,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) -#ifdef CONFIG_SMP -extern void dump_smp_unlazy_fpu(void); -#define ELF_CORE_SYNC dump_smp_unlazy_fpu -#endif - #endif /* This yields a mask that user programs can use to figure out what diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h --- a/include/asm-ppc64/pgtable.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-ppc64/pgtable.h Thu Oct 2 01:28:18 2003 @@ -45,7 +45,6 @@ * Define the address range of the vmalloc VM area. */ #define VMALLOC_START (0xD000000000000000) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (VMALLOC_START + VALID_EA_BITS) /* diff -Nru a/include/asm-s390/cacheflush.h b/include/asm-s390/cacheflush.h --- a/include/asm-s390/cacheflush.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-s390/cacheflush.h Thu Oct 2 01:28:18 2003 @@ -13,5 +13,12 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) #endif /* _S390_CACHEFLUSH_H */ diff -Nru a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h --- a/include/asm-s390/pgtable.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-s390/pgtable.h Thu Oct 2 01:28:17 2003 @@ -117,7 +117,6 @@ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) \ & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifndef __s390x__ # define VMALLOC_END (0x7fffffffL) #else /* __s390x__ */ diff -Nru a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h --- a/include/asm-sh/cacheflush.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-sh/cacheflush.h Thu Oct 2 01:28:16 2003 @@ -10,4 +10,14 @@ /* Flush (invalidate only) a region (smaller than a page) */ extern void __flush_invalidate_region(void *start, int size); +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* __ASM_SH_CACHEFLUSH_H */ diff -Nru a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h --- a/include/asm-sh/pgtable.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-sh/pgtable.h Thu Oct 2 01:28:18 2003 @@ -51,7 +51,6 @@ * Currently only 4-enty (16kB) is used (see arch/sh/mm/cache.c) */ #define VMALLOC_START (P3SEG+0x00100000) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END P4SEG /* 0x001 WT-bit on SH-4, 0 on SH-3 */ diff -Nru a/include/asm-sparc/cacheflush.h b/include/asm-sparc/cacheflush.h --- a/include/asm-sparc/cacheflush.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-sparc/cacheflush.h Thu Oct 2 01:28:16 2003 @@ -56,6 +56,11 @@ #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + BTFIXUPDEF_CALL(void, __flush_page_to_ram, unsigned long) BTFIXUPDEF_CALL(void, flush_sig_insns, struct mm_struct *, unsigned long) @@ -65,5 +70,8 @@ extern void sparc_flush_page_to_ram(struct page *page); #define flush_dcache_page(page) sparc_flush_page_to_ram(page) + +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() #endif /* _SPARC_CACHEFLUSH_H */ diff -Nru a/include/asm-sparc/highmem.h b/include/asm-sparc/highmem.h --- a/include/asm-sparc/highmem.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-sparc/highmem.h Thu Oct 2 01:28:18 2003 @@ -89,6 +89,8 @@ return pte_page(*pte); } +#define flush_cache_kmaps() flush_cache_all() + #endif /* __KERNEL__ */ #endif /* _ASM_HIGHMEM_H */ diff -Nru a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h --- a/include/asm-sparc/pgtable.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-sparc/pgtable.h Thu Oct 2 01:28:17 2003 @@ -101,8 +101,6 @@ BTFIXUPDEF_SIMM13(ptrs_per_pgd) BTFIXUPDEF_SIMM13(user_ptrs_per_pgd) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) - #define pte_ERROR(e) __builtin_trap() #define pmd_ERROR(e) __builtin_trap() #define pgd_ERROR(e) __builtin_trap() diff -Nru a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h --- a/include/asm-sparc64/cacheflush.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-sparc64/cacheflush.h Thu Oct 2 01:28:18 2003 @@ -48,6 +48,14 @@ #define flush_icache_page(vma, pg) do { } while(0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + extern void flush_dcache_page(struct page *page); + +#define flush_cache_vmap(start, end) flush_cache_all() +#define flush_cache_vunmap(start, end) flush_cache_all() #endif /* _SPARC64_CACHEFLUSH_H */ diff -Nru a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h --- a/include/asm-sparc64/pgtable.h Thu Oct 2 01:28:15 2003 +++ b/include/asm-sparc64/pgtable.h Thu Oct 2 01:28:15 2003 @@ -30,7 +30,6 @@ #define MODULES_LEN 0x000000007e000000 #define MODULES_END 0x0000000080000000 #define VMALLOC_START 0x0000000140000000 -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END 0x0000000200000000 #define LOW_OBP_ADDRESS 0x00000000f0000000 #define HI_OBP_ADDRESS 0x0000000100000000 diff -Nru a/include/asm-sparc64/visasm.h b/include/asm-sparc64/visasm.h --- a/include/asm-sparc64/visasm.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-sparc64/visasm.h Thu Oct 2 01:28:16 2003 @@ -17,7 +17,8 @@ andcc %o5, (FPRS_FEF|FPRS_DU), %g0; \ be,pt %icc, 297f; \ sethi %hi(297f), %g7; \ - ba,pt %xcc, VISenter; \ + sethi %hi(VISenter), %g1; \ + jmpl %g1 + %lo(VISenter), %g0; \ or %g7, %lo(297f), %g7; \ 297: wr %g0, FPRS_FEF, %fprs; \ @@ -32,7 +33,8 @@ andcc %o5, FPRS_FEF, %g0; \ be,pt %icc, 297f; \ sethi %hi(298f), %g7; \ - ba,pt %xcc, VISenterhalf; \ + sethi %hi(VISenterhalf), %g1; \ + jmpl %g1 + %lo(VISenterhalf), %g0; \ or %g7, %lo(298f), %g7; \ clr %o5; \ 297: wr %o5, FPRS_FEF, %fprs; \ @@ -48,7 +50,8 @@ " andcc %%o5, %0, %%g0\n" " be,pt %%icc, 299f\n" " sethi %%hi(298f), %%g7\n" -" ba VISenter ! Note. This cannot be bp, as it may be too far from VISenter.\n" +" sethi %%hi(VISenter), %%g1\n" +" jmpl %%g1 + %%lo(VISenter), %%g0\n" " or %%g7, %%lo(298f), %%g7\n" " 298: wr %%g0, 0, %%fprs\n" " 299:\n" diff -Nru a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h --- a/include/asm-um/pgtable.h Thu Oct 2 01:28:18 2003 +++ b/include/asm-um/pgtable.h Thu Oct 2 01:28:18 2003 @@ -69,7 +69,6 @@ #define VMALLOC_OFFSET (__va_space) #define VMALLOC_START (((unsigned long) high_physmem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) diff -Nru a/include/asm-v850/cacheflush.h b/include/asm-v850/cacheflush.h --- a/include/asm-v850/cacheflush.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-v850/cacheflush.h Thu Oct 2 01:28:16 2003 @@ -27,6 +27,8 @@ #define flush_cache_range(vma, start, end) ((void)0) #define flush_cache_page(vma, vmaddr) ((void)0) #define flush_dcache_page(page) ((void)0) +#define flush_cache_vmap(start, end) ((void)0) +#define flush_cache_vunmap(start, end) ((void)0) #ifdef CONFIG_NO_CACHE @@ -55,5 +57,11 @@ #endif /* CONFIG_NO_CACHE */ +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) #endif /* __V850_CACHEFLUSH_H__ */ diff -Nru a/include/asm-x86_64/cacheflush.h b/include/asm-x86_64/cacheflush.h --- a/include/asm-x86_64/cacheflush.h Thu Oct 2 01:28:16 2003 +++ b/include/asm-x86_64/cacheflush.h Thu Oct 2 01:28:16 2003 @@ -13,6 +13,13 @@ #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma,pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) + +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) void global_flush_tlb(void); int change_page_attr(struct page *page, int numpages, pgprot_t prot); diff -Nru a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h --- a/include/asm-x86_64/elf.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-x86_64/elf.h Thu Oct 2 01:28:17 2003 @@ -150,11 +150,6 @@ #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs) #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) -#ifdef CONFIG_SMP -extern void dump_smp_unlazy_fpu(void); -#define ELF_CORE_SYNC dump_smp_unlazy_fpu -#endif - #endif #endif diff -Nru a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h --- a/include/asm-x86_64/pgtable.h Thu Oct 2 01:28:17 2003 +++ b/include/asm-x86_64/pgtable.h Thu Oct 2 01:28:17 2003 @@ -126,7 +126,6 @@ #ifndef __ASSEMBLY__ #define VMALLOC_START 0xffffff0000000000 #define VMALLOC_END 0xffffff7fffffffff -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define MODULES_VADDR 0xffffffffa0000000 #define MODULES_END 0xffffffffafffffff #define MODULES_LEN (MODULES_END - MODULES_VADDR) diff -Nru a/include/linux/acpi.h b/include/linux/acpi.h --- a/include/linux/acpi.h Thu Oct 2 01:28:15 2003 +++ b/include/linux/acpi.h Thu Oct 2 01:28:15 2003 @@ -424,17 +424,17 @@ #endif /*CONFIG_ACPI_EC*/ -#ifdef CONFIG_ACPI +#ifdef CONFIG_ACPI_INTERPRETER int acpi_blacklisted(void); -#else +#else /*!CONFIG_ACPI_INTERPRETER*/ static inline int acpi_blacklisted(void) { return 0; } -#endif /*CONFIG_ACPI*/ +#endif /*!CONFIG_ACPI_INTERPRETER*/ #endif /*_LINUX_ACPI_H*/ diff -Nru a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h --- a/include/linux/compat_ioctl.h Thu Oct 2 01:28:18 2003 +++ b/include/linux/compat_ioctl.h Thu Oct 2 01:28:18 2003 @@ -68,7 +68,7 @@ COMPATIBLE_IOCTL(HDIO_DRIVE_CMD) COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE) COMPATIBLE_IOCTL(HDIO_SET_NICE) -#ifndef CONFIG_ARCH_S390 +#ifdef CONFIG_BLK_DEV_FD /* 0x02 -- Floppy ioctls */ COMPATIBLE_IOCTL(FDMSGON) COMPATIBLE_IOCTL(FDMSGOFF) diff -Nru a/include/linux/elf.h b/include/linux/elf.h --- a/include/linux/elf.h Thu Oct 2 01:28:16 2003 +++ b/include/linux/elf.h Thu Oct 2 01:28:16 2003 @@ -395,6 +395,7 @@ #define NT_PRFPREG 2 #define NT_PRPSINFO 3 #define NT_TASKSTRUCT 4 +#define NT_AUXV 6 #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ diff -Nru a/include/linux/hdlcdrv.h b/include/linux/hdlcdrv.h --- a/include/linux/hdlcdrv.h Thu Oct 2 01:28:17 2003 +++ b/include/linux/hdlcdrv.h Thu Oct 2 01:28:17 2003 @@ -359,11 +359,11 @@ void hdlcdrv_receiver(struct net_device *, struct hdlcdrv_state *); void hdlcdrv_transmitter(struct net_device *, struct hdlcdrv_state *); void hdlcdrv_arbitrate(struct net_device *, struct hdlcdrv_state *); -int hdlcdrv_register_hdlcdrv(struct net_device *dev, const struct hdlcdrv_ops *ops, - unsigned int privsize, char *ifname, - unsigned int baseaddr, unsigned int irq, - unsigned int dma); -int hdlcdrv_unregister_hdlcdrv(struct net_device *dev); +struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops, + unsigned int privsize, const char *ifname, + unsigned int baseaddr, unsigned int irq, + unsigned int dma); +void hdlcdrv_unregister(struct net_device *dev); /* -------------------------------------------------------------------- */ diff -Nru a/include/linux/hfs_fs.h b/include/linux/hfs_fs.h --- a/include/linux/hfs_fs.h Thu Oct 2 01:28:17 2003 +++ b/include/linux/hfs_fs.h Thu Oct 2 01:28:17 2003 @@ -267,9 +267,9 @@ /* file.c */ extern hfs_s32 hfs_do_read(struct inode *, struct hfs_fork *, hfs_u32, - char *, hfs_u32); + char __user *, hfs_u32); extern hfs_s32 hfs_do_write(struct inode *, struct hfs_fork *, hfs_u32, - const char *, hfs_u32); + const char __user *, hfs_u32); extern void hfs_file_fix_mode(struct hfs_cat_entry *entry); extern struct inode_operations hfs_file_inode_operations; extern struct file_operations hfs_file_operations; diff -Nru a/include/linux/highuid.h b/include/linux/highuid.h --- a/include/linux/highuid.h Thu Oct 2 01:28:17 2003 +++ b/include/linux/highuid.h Thu Oct 2 01:28:17 2003 @@ -56,6 +56,8 @@ #define SET_GID16(var, gid) var = high2lowgid(gid) #define NEW_TO_OLD_UID(uid) high2lowuid(uid) #define NEW_TO_OLD_GID(gid) high2lowgid(gid) +#define OLD_TO_NEW_UID(uid) low2highuid(uid) +#define OLD_TO_NEW_GID(gid) low2highgid(gid) /* specific to fs/stat.c */ #define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid) @@ -69,6 +71,8 @@ #define SET_GID16(var, gid) do { ; } while (0) #define NEW_TO_OLD_UID(uid) (uid) #define NEW_TO_OLD_GID(gid) (gid) +#define OLD_TO_NEW_UID(uid) (uid) +#define OLD_TO_NEW_GID(gid) (gid) #define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = (uid) #define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = (gid) diff -Nru a/include/linux/list.h b/include/linux/list.h --- a/include/linux/list.h Thu Oct 2 01:28:17 2003 +++ b/include/linux/list.h Thu Oct 2 01:28:17 2003 @@ -325,6 +325,19 @@ pos = list_entry(pos->member.prev, typeof(*pos), member), \ prefetch(pos->member.prev)) +/** + * list_for_each_entry_continue - iterate over list of given type + * continuing after existing point + * @pos: the type * to use as a loop counter. + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry_continue(pos, head, member) \ + for (pos = list_entry(pos->member.next, typeof(*pos), member), \ + prefetch(pos->member.next); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member), \ + prefetch(pos->member.next)) /** * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry diff -Nru a/include/linux/mca-legacy.h b/include/linux/mca-legacy.h --- a/include/linux/mca-legacy.h Thu Oct 2 01:28:18 2003 +++ b/include/linux/mca-legacy.h Thu Oct 2 01:28:18 2003 @@ -7,6 +7,8 @@ #ifndef _LINUX_MCA_LEGACY_H #define _LINUX_MCA_LEGACY_H +#include + #warning "MCA legacy - please move your driver to the new sysfs api" /* MCA_NOTFOUND is an error condition. The other two indicate diff -Nru a/include/linux/mca.h b/include/linux/mca.h --- a/include/linux/mca.h Thu Oct 2 01:28:16 2003 +++ b/include/linux/mca.h Thu Oct 2 01:28:16 2003 @@ -136,10 +136,6 @@ /* WARNING: only called by the boot time device setup */ extern int mca_register_device(int bus, struct mca_device *mca_dev); -#ifdef CONFIG_MCA_LEGACY -#include -#endif - #ifdef CONFIG_MCA_PROC_FS extern void mca_do_proc_init(void); extern void mca_set_adapter_procfn(int slot, MCA_ProcFn, void* dev); diff -Nru a/include/linux/mm.h b/include/linux/mm.h --- a/include/linux/mm.h Thu Oct 2 01:28:15 2003 +++ b/include/linux/mm.h Thu Oct 2 01:28:15 2003 @@ -196,7 +196,7 @@ #if defined(WANT_PAGE_VIRTUAL) void *virtual; /* Kernel virtual address (NULL if not kmapped, ie. highmem) */ -#endif /* CONFIG_HIGMEM || WANT_PAGE_VIRTUAL */ +#endif /* WANT_PAGE_VIRTUAL */ }; /* diff -Nru a/include/linux/moduleparam.h b/include/linux/moduleparam.h --- a/include/linux/moduleparam.h Thu Oct 2 01:28:16 2003 +++ b/include/linux/moduleparam.h Thu Oct 2 01:28:16 2003 @@ -3,6 +3,7 @@ /* (C) Copyright 2001, 2002 Rusty Russell IBM Corporation */ #include #include +#include /* You can override this manually, but generally this should match the module name. */ @@ -33,6 +34,17 @@ char *string; }; +/* Special one for arrays */ +struct kparam_array +{ + unsigned int max; + unsigned int *num; + param_set_fn set; + param_get_fn get; + unsigned int elemsize; + void *elem; +}; + /* This is the fundamental function for registering boot/module parameters. perm sets the visibility in driverfs: 000 means it's not there, read bits mean it's readable, write bits mean it's @@ -112,10 +124,16 @@ extern int param_get_invbool(char *buffer, struct kernel_param *kp); #define param_check_invbool(name, p) __param_check(name, p, int) -/* First two elements are the max and min array length (which don't change) */ -extern int param_set_intarray(const char *val, struct kernel_param *kp); -extern int param_get_intarray(char *buffer, struct kernel_param *kp); -#define param_check_intarray(name, p) __param_check(name, p, int *) +/* Comma-separated array: num is set to number they actually specified. */ +#define module_param_array(name, type, num, perm) \ + static struct kparam_array __param_arr_##name \ + = { ARRAY_SIZE(name), &num, param_set_##type, param_get_##type, \ + sizeof(name[0]), name }; \ + module_param_call(name, param_array_set, param_array_get, \ + &__param_arr_##name, perm) + +extern int param_array_set(const char *val, struct kernel_param *kp); +extern int param_array_get(char *buffer, struct kernel_param *kp); extern int param_set_copystring(const char *val, struct kernel_param *kp); @@ -123,5 +141,6 @@ const char *val, unsigned int min, unsigned int max, void *elem, int elemsize, - int (*set)(const char *, struct kernel_param *kp)); + int (*set)(const char *, struct kernel_param *kp), + int *num); #endif /* _LINUX_MODULE_PARAM_TYPES_H */ diff -Nru a/include/linux/netfilter_bridge/ebt_limit.h b/include/linux/netfilter_bridge/ebt_limit.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/include/linux/netfilter_bridge/ebt_limit.h Thu Oct 2 01:28:18 2003 @@ -0,0 +1,23 @@ +#ifndef __LINUX_BRIDGE_EBT_LIMIT_H +#define __LINUX_BRIDGE_EBT_LIMIT_H + +#define EBT_LIMIT_MATCH "limit" + +/* timings are in milliseconds. */ +#define EBT_LIMIT_SCALE 10000 + +/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 + seconds, or one every 59 hours. */ + +struct ebt_limit_info +{ + u_int32_t avg; /* Average secs between packets * scale */ + u_int32_t burst; /* Period multiplier for upper limit. */ + + /* Used internally by the kernel */ + unsigned long prev; + u_int32_t credit; + u_int32_t credit_cap, cost; +}; + +#endif diff -Nru a/include/linux/parser.h b/include/linux/parser.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/include/linux/parser.h Thu Oct 2 01:28:18 2003 @@ -0,0 +1,21 @@ +struct match_token { + int token; + char *pattern; +}; + +typedef struct match_token match_table_t[]; + +enum {MAX_OPT_ARGS = 3}; + +typedef struct { + char *from; + char *to; +} substring_t; + +int match_token(char *s, match_table_t table, substring_t args[]); + +int match_int(substring_t *, int *result); +int match_octal(substring_t *, int *result); +int match_hex(substring_t *, int *result); +void match_strcpy(char *, substring_t *); +char *match_strdup(substring_t *); diff -Nru a/include/linux/pci.h b/include/linux/pci.h --- a/include/linux/pci.h Thu Oct 2 01:28:16 2003 +++ b/include/linux/pci.h Thu Oct 2 01:28:16 2003 @@ -515,7 +515,6 @@ const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */ int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ - int (*save_state) (struct pci_dev *dev, u32 state); /* Save Device Context */ int (*suspend) (struct pci_dev *dev, u32 state); /* Device suspended */ int (*resume) (struct pci_dev *dev); /* Device woken up */ int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); /* Enable wake event */ diff -Nru a/include/linux/rcupdate.h b/include/linux/rcupdate.h --- a/include/linux/rcupdate.h Thu Oct 2 01:28:16 2003 +++ b/include/linux/rcupdate.h Thu Oct 2 01:28:16 2003 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * Copyright (c) IBM Corporation, 2001 + * Copyright (C) IBM Corporation, 2001 * * Author: Dipankar Sarma * diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h Thu Oct 2 01:28:16 2003 +++ b/include/linux/sched.h Thu Oct 2 01:28:16 2003 @@ -207,6 +207,8 @@ cpumask_t cpu_vm_mask; unsigned long swap_address; + unsigned long saved_auxv[40]; /* for /proc/PID/auxv */ + unsigned dumpable:1; #ifdef CONFIG_HUGETLB_PAGE int used_hugetlb; diff -Nru a/include/linux/security.h b/include/linux/security.h --- a/include/linux/security.h Thu Oct 2 01:28:17 2003 +++ b/include/linux/security.h Thu Oct 2 01:28:17 2003 @@ -334,6 +334,7 @@ * called when the actual read/write operations are performed. * @inode contains the inode structure to check. * @mask contains the permission mask. + * @nd contains the nameidata (may be NULL). * Return 0 if permission is granted. * @inode_setattr: * Check permission before setting file attributes. Note that the kernel @@ -1055,7 +1056,7 @@ struct dentry *new_dentry); int (*inode_readlink) (struct dentry *dentry); int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); - int (*inode_permission) (struct inode *inode, int mask); + int (*inode_permission) (struct inode *inode, int mask, struct nameidata *nd); int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); void (*inode_delete) (struct inode *inode); @@ -1474,9 +1475,10 @@ return security_ops->inode_follow_link (dentry, nd); } -static inline int security_inode_permission (struct inode *inode, int mask) +static inline int security_inode_permission (struct inode *inode, int mask, + struct nameidata *nd) { - return security_ops->inode_permission (inode, mask); + return security_ops->inode_permission (inode, mask, nd); } static inline int security_inode_setattr (struct dentry *dentry, @@ -2110,7 +2112,8 @@ return 0; } -static inline int security_inode_permission (struct inode *inode, int mask) +static inline int security_inode_permission (struct inode *inode, int mask, + struct nameidata *nd) { return 0; } diff -Nru a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h --- a/include/net/irda/irda_device.h Thu Oct 2 01:28:18 2003 +++ b/include/net/irda/irda_device.h Thu Oct 2 01:28:18 2003 @@ -223,6 +223,7 @@ int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts); int irda_device_change_speed(struct net_device *dev, __u32 speed); void irda_device_setup(struct net_device *dev); +struct net_device *alloc_irdadev(int sizeof_priv); /* Dongle interface */ void irda_device_unregister_dongle(struct dongle_reg *dongle); diff -Nru a/include/net/pkt_sched.h b/include/net/pkt_sched.h --- a/include/net/pkt_sched.h Thu Oct 2 01:28:16 2003 +++ b/include/net/pkt_sched.h Thu Oct 2 01:28:16 2003 @@ -8,6 +8,7 @@ #define PSCHED_CLOCK_SOURCE PSCHED_JIFFIES #include +#include #include #include #include diff -Nru a/include/net/scm.h b/include/net/scm.h --- a/include/net/scm.h Thu Oct 2 01:28:16 2003 +++ b/include/net/scm.h Thu Oct 2 01:28:16 2003 @@ -39,7 +39,7 @@ memset(scm, 0, sizeof(*scm)); scm->creds.uid = current->uid; scm->creds.gid = current->gid; - scm->creds.pid = current->pid; + scm->creds.pid = current->tgid; if (msg->msg_controllen <= 0) return 0; return __scm_send(sock, msg, scm); diff -Nru a/include/sound/sndmagic.h b/include/sound/sndmagic.h --- a/include/sound/sndmagic.h Thu Oct 2 01:28:16 2003 +++ b/include/sound/sndmagic.h Thu Oct 2 01:28:16 2003 @@ -198,6 +198,8 @@ #define vx_pipe_t_magic 0xa15a4112 #define azf3328_t_magic 0xa15a4200 +#define snd_card_harmony_t_magic 0xa15a4300 + #else #define snd_magic_kcalloc(type, extra, flags) (type *) snd_kcalloc(sizeof(type) + extra, flags) diff -Nru a/init/do_mounts.h b/init/do_mounts.h --- a/init/do_mounts.h Thu Oct 2 01:28:17 2003 +++ b/init/do_mounts.h Thu Oct 2 01:28:17 2003 @@ -104,4 +104,3 @@ static inline void md_run_setup(void) {} #endif - diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c --- a/kernel/ksyms.c Thu Oct 2 01:28:15 2003 +++ b/kernel/ksyms.c Thu Oct 2 01:28:15 2003 @@ -45,8 +45,6 @@ #include #include #include -#include -#include #include #include #include @@ -139,49 +137,12 @@ EXPORT_SYMBOL(get_user_pages); /* filesystem internal functions */ -EXPORT_SYMBOL(def_blk_fops); -EXPORT_SYMBOL(update_atime); EXPORT_SYMBOL(get_fs_type); -EXPORT_SYMBOL(user_get_super); -EXPORT_SYMBOL(get_super); -EXPORT_SYMBOL(drop_super); -EXPORT_SYMBOL(getname); -EXPORT_SYMBOL(names_cachep); EXPORT_SYMBOL(fput); EXPORT_SYMBOL(fget); -EXPORT_SYMBOL(igrab); -EXPORT_SYMBOL(iunique); -EXPORT_SYMBOL(iput); -EXPORT_SYMBOL(inode_init_once); -EXPORT_SYMBOL(follow_up); -EXPORT_SYMBOL(follow_down); EXPORT_SYMBOL(lookup_mnt); -EXPORT_SYMBOL(lookup_create); -EXPORT_SYMBOL(path_lookup); -EXPORT_SYMBOL(path_walk); -EXPORT_SYMBOL(path_release); -EXPORT_SYMBOL(__user_walk); -EXPORT_SYMBOL(lookup_one_len); -EXPORT_SYMBOL(lookup_hash); EXPORT_SYMBOL(sys_close); EXPORT_SYMBOL(dcache_lock); -EXPORT_SYMBOL(d_alloc_root); -EXPORT_SYMBOL(d_delete); -EXPORT_SYMBOL(dget_locked); -EXPORT_SYMBOL(d_validate); -EXPORT_SYMBOL(d_rehash); -EXPORT_SYMBOL(d_invalidate); /* May be it will be better in dcache.h? */ -EXPORT_SYMBOL(d_move); -EXPORT_SYMBOL(d_instantiate); -EXPORT_SYMBOL(d_alloc); -EXPORT_SYMBOL(d_alloc_anon); -EXPORT_SYMBOL(d_splice_alias); -EXPORT_SYMBOL(d_lookup); -EXPORT_SYMBOL(d_path); -EXPORT_SYMBOL(mark_buffer_dirty); -EXPORT_SYMBOL(end_buffer_read_sync); -EXPORT_SYMBOL(end_buffer_write_sync); -EXPORT_SYMBOL(end_buffer_async_write); EXPORT_SYMBOL(__mark_inode_dirty); EXPORT_SYMBOL(get_empty_filp); EXPORT_SYMBOL(open_private_file); @@ -190,79 +151,21 @@ EXPORT_SYMBOL(filp_close); EXPORT_SYMBOL(put_filp); EXPORT_SYMBOL(files_lock); -EXPORT_SYMBOL(check_disk_change); -EXPORT_SYMBOL(invalidate_bdev); -EXPORT_SYMBOL(invalidate_inodes); -EXPORT_SYMBOL(__invalidate_device); EXPORT_SYMBOL(invalidate_inode_pages); EXPORT_SYMBOL_GPL(invalidate_inode_pages2); EXPORT_SYMBOL(truncate_inode_pages); -EXPORT_SYMBOL(fsync_bdev); -EXPORT_SYMBOL(permission); -EXPORT_SYMBOL(vfs_permission); EXPORT_SYMBOL(inode_setattr); EXPORT_SYMBOL(inode_change_ok); EXPORT_SYMBOL(write_inode_now); EXPORT_SYMBOL(notify_change); -EXPORT_SYMBOL(set_blocksize); -EXPORT_SYMBOL(sb_set_blocksize); -EXPORT_SYMBOL(sb_min_blocksize); -EXPORT_SYMBOL(bdget); -EXPORT_SYMBOL(bdput); -EXPORT_SYMBOL(bd_claim); -EXPORT_SYMBOL(bd_release); -EXPORT_SYMBOL(open_bdev_excl); -EXPORT_SYMBOL(close_bdev_excl); -EXPORT_SYMBOL(open_by_devnum); -EXPORT_SYMBOL(__brelse); -EXPORT_SYMBOL(__bforget); -EXPORT_SYMBOL(ll_rw_block); -EXPORT_SYMBOL(sync_dirty_buffer); -EXPORT_SYMBOL(submit_bh); -EXPORT_SYMBOL(unlock_buffer); -EXPORT_SYMBOL(__wait_on_buffer); EXPORT_SYMBOL(blockdev_direct_IO); -EXPORT_SYMBOL(block_write_full_page); -EXPORT_SYMBOL(block_read_full_page); -EXPORT_SYMBOL(block_prepare_write); -EXPORT_SYMBOL(block_sync_page); -EXPORT_SYMBOL(generic_cont_expand); -EXPORT_SYMBOL(cont_prepare_write); -EXPORT_SYMBOL(generic_commit_write); -EXPORT_SYMBOL(block_commit_write); -EXPORT_SYMBOL(block_truncate_page); -EXPORT_SYMBOL(generic_block_bmap); -EXPORT_SYMBOL(generic_file_read); -EXPORT_SYMBOL(generic_file_sendfile); -EXPORT_SYMBOL(do_generic_mapping_read); EXPORT_SYMBOL(file_ra_state_init); -EXPORT_SYMBOL(generic_file_write); -EXPORT_SYMBOL(generic_file_write_nolock); -EXPORT_SYMBOL(generic_file_mmap); -EXPORT_SYMBOL(generic_file_readonly_mmap); EXPORT_SYMBOL(generic_ro_fops); -EXPORT_SYMBOL(dput); -EXPORT_SYMBOL(have_submounts); -EXPORT_SYMBOL(d_find_alias); -EXPORT_SYMBOL(d_prune_aliases); -EXPORT_SYMBOL(shrink_dcache_sb); -EXPORT_SYMBOL(shrink_dcache_parent); -EXPORT_SYMBOL(shrink_dcache_anon); -EXPORT_SYMBOL(find_inode_number); -EXPORT_SYMBOL(is_subdir); EXPORT_SYMBOL(get_unused_fd); EXPORT_SYMBOL(vfs_read); EXPORT_SYMBOL(vfs_readv); EXPORT_SYMBOL(vfs_write); EXPORT_SYMBOL(vfs_writev); -EXPORT_SYMBOL(vfs_create); -EXPORT_SYMBOL(vfs_mkdir); -EXPORT_SYMBOL(vfs_mknod); -EXPORT_SYMBOL(vfs_symlink); -EXPORT_SYMBOL(vfs_link); -EXPORT_SYMBOL(vfs_rmdir); -EXPORT_SYMBOL(vfs_unlink); -EXPORT_SYMBOL(vfs_rename); EXPORT_SYMBOL(vfs_statfs); EXPORT_SYMBOL(vfs_fstat); EXPORT_SYMBOL(vfs_stat); @@ -272,9 +175,6 @@ EXPORT_SYMBOL(inode_sub_bytes); EXPORT_SYMBOL(inode_get_bytes); EXPORT_SYMBOL(inode_set_bytes); -EXPORT_SYMBOL(lock_rename); -EXPORT_SYMBOL(unlock_rename); -EXPORT_SYMBOL(generic_read_dir); EXPORT_SYMBOL(generic_fillattr); EXPORT_SYMBOL(generic_file_llseek); EXPORT_SYMBOL(remote_llseek); @@ -282,70 +182,21 @@ EXPORT_SYMBOL(poll_initwait); EXPORT_SYMBOL(poll_freewait); EXPORT_SYMBOL(ROOT_DEV); -EXPORT_SYMBOL(find_get_page); -EXPORT_SYMBOL(find_lock_page); -EXPORT_SYMBOL(find_trylock_page); -EXPORT_SYMBOL(find_or_create_page); -EXPORT_SYMBOL(grab_cache_page_nowait); -EXPORT_SYMBOL(read_cache_page); EXPORT_SYMBOL(read_cache_pages); EXPORT_SYMBOL(mark_page_accessed); -EXPORT_SYMBOL(vfs_readlink); -EXPORT_SYMBOL(vfs_follow_link); -EXPORT_SYMBOL(page_readlink); -EXPORT_SYMBOL(page_follow_link); -EXPORT_SYMBOL(page_symlink_inode_operations); -EXPORT_SYMBOL(page_symlink); EXPORT_SYMBOL(vfs_readdir); EXPORT_SYMBOL(__break_lease); EXPORT_SYMBOL(lease_get_mtime); EXPORT_SYMBOL(lock_may_read); EXPORT_SYMBOL(lock_may_write); -EXPORT_SYMBOL(dcache_dir_open); -EXPORT_SYMBOL(dcache_dir_close); -EXPORT_SYMBOL(dcache_dir_lseek); -EXPORT_SYMBOL(dcache_readdir); -EXPORT_SYMBOL(simple_getattr); -EXPORT_SYMBOL(simple_statfs); -EXPORT_SYMBOL(simple_lookup); -EXPORT_SYMBOL(simple_dir_operations); -EXPORT_SYMBOL(simple_dir_inode_operations); -EXPORT_SYMBOL(simple_link); -EXPORT_SYMBOL(simple_unlink); -EXPORT_SYMBOL(simple_rmdir); -EXPORT_SYMBOL(simple_rename); -EXPORT_SYMBOL(simple_sync_file); -EXPORT_SYMBOL(simple_readpage); -EXPORT_SYMBOL(simple_prepare_write); -EXPORT_SYMBOL(simple_commit_write); -EXPORT_SYMBOL(simple_empty); -EXPORT_SYMBOL(simple_fill_super); -EXPORT_SYMBOL(simple_pin_fs); -EXPORT_SYMBOL(simple_release_fs); EXPORT_SYMBOL(fd_install); EXPORT_SYMBOL(put_unused_fd); -EXPORT_SYMBOL(get_sb_bdev); -EXPORT_SYMBOL(kill_block_super); -EXPORT_SYMBOL(get_sb_nodev); -EXPORT_SYMBOL(get_sb_single); -EXPORT_SYMBOL(kill_anon_super); -EXPORT_SYMBOL(kill_litter_super); -EXPORT_SYMBOL(generic_shutdown_super); -EXPORT_SYMBOL(deactivate_super); -EXPORT_SYMBOL(sget); -EXPORT_SYMBOL(set_anon_super); EXPORT_SYMBOL(do_select); /* for stackable file systems (lofs, wrapfs, cryptfs, etc.) */ EXPORT_SYMBOL(default_llseek); EXPORT_SYMBOL(dentry_open); -#ifdef CONFIG_MMU -EXPORT_SYMBOL(filemap_nopage); -#endif -EXPORT_SYMBOL(filemap_fdatawrite); -EXPORT_SYMBOL(filemap_fdatawait); EXPORT_SYMBOL(lock_page); -EXPORT_SYMBOL(unlock_page); /* device registration */ EXPORT_SYMBOL(register_blkdev); @@ -355,16 +206,7 @@ EXPORT_SYMBOL(tty_std_termios); /* block device driver support */ -EXPORT_SYMBOL(bmap); -EXPORT_SYMBOL(blkdev_open); -EXPORT_SYMBOL(blkdev_get); -EXPORT_SYMBOL(blkdev_put); -EXPORT_SYMBOL(ioctl_by_bdev); EXPORT_SYMBOL(read_dev_sector); -EXPORT_SYMBOL(init_buffer); -EXPORT_SYMBOL_GPL(generic_file_direct_IO); -EXPORT_SYMBOL(generic_file_readv); -EXPORT_SYMBOL(generic_file_writev); EXPORT_SYMBOL(iov_shorten); EXPORT_SYMBOL_GPL(default_backing_dev_info); @@ -375,32 +217,9 @@ /* filesystem registration */ EXPORT_SYMBOL(register_filesystem); EXPORT_SYMBOL(unregister_filesystem); -EXPORT_SYMBOL(kern_mount); EXPORT_SYMBOL(__mntput); EXPORT_SYMBOL(may_umount); -/* executable format registration */ -EXPORT_SYMBOL(register_binfmt); -EXPORT_SYMBOL(unregister_binfmt); -EXPORT_SYMBOL(search_binary_handler); -EXPORT_SYMBOL(prepare_binprm); -EXPORT_SYMBOL(compute_creds); -EXPORT_SYMBOL(remove_arg_zero); -EXPORT_SYMBOL(set_binfmt); - -/* sysctl table registration */ -EXPORT_SYMBOL(register_sysctl_table); -EXPORT_SYMBOL(unregister_sysctl_table); -EXPORT_SYMBOL(sysctl_string); -EXPORT_SYMBOL(sysctl_intvec); -EXPORT_SYMBOL(sysctl_jiffies); -EXPORT_SYMBOL(proc_dostring); -EXPORT_SYMBOL(proc_dointvec); -EXPORT_SYMBOL(proc_dointvec_jiffies); -EXPORT_SYMBOL(proc_dointvec_minmax); -EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax); -EXPORT_SYMBOL(proc_doulongvec_minmax); - /* interrupt handling */ EXPORT_SYMBOL(request_irq); EXPORT_SYMBOL(free_irq); @@ -414,10 +233,6 @@ EXPORT_SYMBOL(finish_wait); EXPORT_SYMBOL(autoremove_wake_function); -/* completion handling */ -EXPORT_SYMBOL(wait_for_completion); -EXPORT_SYMBOL(complete); - /* The notion of irq probe/assignment is foreign to S/390 */ #if !defined(CONFIG_ARCH_S390) @@ -449,30 +264,11 @@ /* process management */ EXPORT_SYMBOL(complete_and_exit); -EXPORT_SYMBOL(default_wake_function); -EXPORT_SYMBOL(__wake_up); #ifdef CONFIG_SMP EXPORT_SYMBOL_GPL(__wake_up_sync); /* internal use only */ #endif -EXPORT_SYMBOL(wake_up_process); -EXPORT_SYMBOL(sleep_on); -EXPORT_SYMBOL(sleep_on_timeout); -EXPORT_SYMBOL(interruptible_sleep_on); -EXPORT_SYMBOL(interruptible_sleep_on_timeout); -EXPORT_SYMBOL(schedule); -#ifdef CONFIG_PREEMPT -EXPORT_SYMBOL(preempt_schedule); -#endif EXPORT_SYMBOL(schedule_timeout); -EXPORT_SYMBOL(yield); -EXPORT_SYMBOL(io_schedule); -EXPORT_SYMBOL(__cond_resched); -EXPORT_SYMBOL(set_user_nice); -EXPORT_SYMBOL(task_nice); EXPORT_SYMBOL_GPL(idle_cpu); -#ifdef CONFIG_SMP -EXPORT_SYMBOL_GPL(set_cpus_allowed); -#endif #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) EXPORT_SYMBOL(kernel_flag); #endif @@ -485,18 +281,10 @@ #if (BITS_PER_LONG < 64) EXPORT_SYMBOL(get_jiffies_64); #endif -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP -EXPORT_SYMBOL(__might_sleep); -#endif -#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) -EXPORT_SYMBOL(__preempt_spin_lock); -EXPORT_SYMBOL(__preempt_write_lock); -#endif #if !defined(__ia64__) EXPORT_SYMBOL(loops_per_jiffy); #endif - /* misc */ EXPORT_SYMBOL(panic); EXPORT_SYMBOL(panic_notifier_list); @@ -524,45 +312,16 @@ EXPORT_SYMBOL(cap_bset); EXPORT_SYMBOL(daemonize); EXPORT_SYMBOL(csum_partial); /* for networking and md */ -EXPORT_SYMBOL(seq_escape); -EXPORT_SYMBOL(seq_printf); -EXPORT_SYMBOL(seq_path); -EXPORT_SYMBOL(seq_open); -EXPORT_SYMBOL(seq_release); -EXPORT_SYMBOL(seq_read); -EXPORT_SYMBOL(seq_lseek); -EXPORT_SYMBOL(single_open); -EXPORT_SYMBOL(single_release); -EXPORT_SYMBOL(seq_release_private); - -/* Program loader interfaces */ -#ifdef CONFIG_MMU -EXPORT_SYMBOL(setup_arg_pages); -#endif -EXPORT_SYMBOL(copy_strings_kernel); -EXPORT_SYMBOL(do_execve); -EXPORT_SYMBOL(flush_old_exec); -EXPORT_SYMBOL(kernel_read); -EXPORT_SYMBOL(open_exec); /* Miscellaneous access points */ EXPORT_SYMBOL(si_meminfo); /* Added to make file system as module */ EXPORT_SYMBOL(sys_tz); -EXPORT_SYMBOL(file_fsync); -EXPORT_SYMBOL(fsync_buffers_list); -EXPORT_SYMBOL(clear_inode); -EXPORT_SYMBOL(init_special_inode); -EXPORT_SYMBOL(new_inode); -EXPORT_SYMBOL(__insert_inode_hash); -EXPORT_SYMBOL(remove_inode_hash); -EXPORT_SYMBOL(buffer_insert_list); EXPORT_SYMBOL(make_bad_inode); EXPORT_SYMBOL(is_bad_inode); EXPORT_SYMBOL(__inode_dir_notify); EXPORT_SYMBOL(generic_osync_inode); -EXPORT_SYMBOL(remove_suid); #ifdef CONFIG_UID16 EXPORT_SYMBOL(overflowuid); @@ -574,9 +333,6 @@ /* all busmice */ EXPORT_SYMBOL(fasync_helper); EXPORT_SYMBOL(kill_fasync); - -/* binfmt_aout */ -EXPORT_SYMBOL(get_write_access); /* library functions */ EXPORT_SYMBOL(strnicmp); diff -Nru a/kernel/module.c b/kernel/module.c --- a/kernel/module.c Thu Oct 2 01:28:17 2003 +++ b/kernel/module.c Thu Oct 2 01:28:17 2003 @@ -844,6 +844,7 @@ { unsigned int min, max; unsigned int size, maxsize; + int dummy; char *endp; const char *p; struct obsolete_modparm *obsparm = kp->arg; @@ -866,19 +867,19 @@ switch (*endp) { case 'b': return param_array(kp->name, val, min, max, obsparm->addr, - 1, param_set_byte); + 1, param_set_byte, &dummy); case 'h': return param_array(kp->name, val, min, max, obsparm->addr, - sizeof(short), param_set_short); + sizeof(short), param_set_short, &dummy); case 'i': return param_array(kp->name, val, min, max, obsparm->addr, - sizeof(int), param_set_int); + sizeof(int), param_set_int, &dummy); case 'l': return param_array(kp->name, val, min, max, obsparm->addr, - sizeof(long), param_set_long); + sizeof(long), param_set_long, &dummy); case 's': return param_array(kp->name, val, min, max, obsparm->addr, - sizeof(char *), param_set_charp); + sizeof(char *), param_set_charp, &dummy); case 'c': /* Undocumented: 1-5c50 means 1-5 strings of up to 49 chars, @@ -895,7 +896,7 @@ if (size >= maxsize) goto oversize; return param_array(kp->name, val, min, max, obsparm->addr, - maxsize, obsparm_copy_string); + maxsize, obsparm_copy_string, &dummy); } printk(KERN_ERR "Unknown obsolete parameter type %s\n", obsparm->type); return -EINVAL; diff -Nru a/kernel/params.c b/kernel/params.c --- a/kernel/params.c Thu Oct 2 01:28:17 2003 +++ b/kernel/params.c Thu Oct 2 01:28:17 2003 @@ -242,10 +242,10 @@ const char *val, unsigned int min, unsigned int max, void *elem, int elemsize, - int (*set)(const char *, struct kernel_param *kp)) + int (*set)(const char *, struct kernel_param *kp), + int *num) { int ret; - unsigned int count = 0; struct kernel_param kp; char save; @@ -259,11 +259,12 @@ return -EINVAL; } + *num = 0; /* We expect a comma-separated list of values. */ do { int len; - if (count > max) { + if (*num == max) { printk(KERN_ERR "%s: can only take %i arguments\n", name, max); return -EINVAL; @@ -279,10 +280,10 @@ return ret; kp.arg += elemsize; val += len+1; - count++; + (*num)++; } while (save == ','); - if (count < min) { + if (*num < min) { printk(KERN_ERR "%s: needs at least %i arguments\n", name, min); return -EINVAL; @@ -290,29 +291,32 @@ return 0; } -/* First two elements are the max and min array length (which don't change) */ -int param_set_intarray(const char *val, struct kernel_param *kp) +int param_array_set(const char *val, struct kernel_param *kp) { - int *array; + struct kparam_array *arr = kp->arg; - /* Grab min and max as first two elements */ - array = kp->arg; - return param_array(kp->name, val, array[0], array[1], &array[2], - sizeof(int), param_set_int); + return param_array(kp->name, val, 1, arr->max, arr->elem, + arr->elemsize, arr->set, arr->num); } -int param_get_intarray(char *buffer, struct kernel_param *kp) +int param_array_get(char *buffer, struct kernel_param *kp) { - int max; - int *array; - unsigned int i; - - array = kp->arg; - max = array[1]; - - for (i = 2; i < max + 2; i++) - sprintf(buffer, "%s%i", i > 2 ? "," : "", array[i]); - return strlen(buffer); + int i, off, ret; + struct kparam_array *arr = kp->arg; + struct kernel_param p; + + p = *kp; + for (i = off = 0; i < *arr->num; i++) { + if (i) + buffer[off++] = ','; + p.arg = arr->elem + arr->elemsize * i; + ret = arr->get(buffer + off, &p); + if (ret < 0) + return ret; + off += ret; + } + buffer[off] = '\0'; + return off; } int param_set_copystring(const char *val, struct kernel_param *kp) @@ -346,6 +350,6 @@ EXPORT_SYMBOL(param_get_bool); EXPORT_SYMBOL(param_set_invbool); EXPORT_SYMBOL(param_get_invbool); -EXPORT_SYMBOL(param_set_intarray); -EXPORT_SYMBOL(param_get_intarray); +EXPORT_SYMBOL(param_array_set); +EXPORT_SYMBOL(param_array_get); EXPORT_SYMBOL(param_set_copystring); diff -Nru a/kernel/ptrace.c b/kernel/ptrace.c --- a/kernel/ptrace.c Thu Oct 2 01:28:18 2003 +++ b/kernel/ptrace.c Thu Oct 2 01:28:18 2003 @@ -179,19 +179,14 @@ flush_cache_page(vma, addr); - /* - * FIXME! We used to have flush_page_to_ram() in here, but - * that was wrong. davem says we need a new per-arch primitive - * to handle this correctly. - */ - maddr = kmap(page); if (write) { - memcpy(maddr + offset, buf, bytes); - flush_icache_user_range(vma, page, addr, bytes); + copy_to_user_page(vma, page, addr, + maddr + offset, buf, bytes); set_page_dirty_lock(page); } else { - memcpy(buf, maddr + offset, bytes); + copy_from_user_page(vma, page, addr, + buf, maddr + offset, bytes); } kunmap(page); page_cache_release(page); diff -Nru a/kernel/rcupdate.c b/kernel/rcupdate.c --- a/kernel/rcupdate.c Thu Oct 2 01:28:15 2003 +++ b/kernel/rcupdate.c Thu Oct 2 01:28:15 2003 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * Copyright (c) IBM Corporation, 2001 + * Copyright (C) IBM Corporation, 2001 * * Author: Dipankar Sarma * diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c Thu Oct 2 01:28:17 2003 +++ b/kernel/sched.c Thu Oct 2 01:28:17 2003 @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -642,6 +643,8 @@ return try_to_wake_up(p, TASK_STOPPED | TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, 0, 0); } +EXPORT_SYMBOL(wake_up_process); + int wake_up_process_kick(task_t * p) { return try_to_wake_up(p, TASK_STOPPED | TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, 0, 1); @@ -1585,6 +1588,8 @@ goto need_resched; } +EXPORT_SYMBOL(schedule); + #ifdef CONFIG_PREEMPT /* * this is is the entry point to schedule() from in-kernel preemption @@ -1612,6 +1617,8 @@ if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) goto need_resched; } + +EXPORT_SYMBOL(preempt_schedule); #endif /* CONFIG_PREEMPT */ int default_wake_function(wait_queue_t *curr, unsigned mode, int sync) @@ -1620,6 +1627,8 @@ return try_to_wake_up(p, mode, sync, 0); } +EXPORT_SYMBOL(default_wake_function); + /* * The core wakeup function. Non-exclusive wakeups (nr_exclusive == 0) just * wake everything up. If it's an exclusive wakeup (nr_exclusive == small +ve @@ -1660,6 +1669,8 @@ spin_unlock_irqrestore(&q->lock, flags); } +EXPORT_SYMBOL(__wake_up); + /* * Same as __wake_up but called with the spinlock in wait_queue_head_t held. */ @@ -1696,6 +1707,8 @@ spin_unlock_irqrestore(&q->lock, flags); } +EXPORT_SYMBOL(__wake_up_sync); + void complete(struct completion *x) { unsigned long flags; @@ -1706,6 +1719,8 @@ spin_unlock_irqrestore(&x->wait.lock, flags); } +EXPORT_SYMBOL(complete); + void complete_all(struct completion *x) { unsigned long flags; @@ -1737,6 +1752,8 @@ spin_unlock_irq(&x->wait.lock); } +EXPORT_SYMBOL(wait_for_completion); + #define SLEEP_ON_VAR \ unsigned long flags; \ wait_queue_t wait; \ @@ -1763,6 +1780,8 @@ SLEEP_ON_TAIL } +EXPORT_SYMBOL(interruptible_sleep_on); + long interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout) { SLEEP_ON_VAR @@ -1776,6 +1795,8 @@ return timeout; } +EXPORT_SYMBOL(interruptible_sleep_on_timeout); + void sleep_on(wait_queue_head_t *q) { SLEEP_ON_VAR @@ -1787,6 +1808,8 @@ SLEEP_ON_TAIL } +EXPORT_SYMBOL(sleep_on); + long sleep_on_timeout(wait_queue_head_t *q, long timeout) { SLEEP_ON_VAR @@ -1800,6 +1823,8 @@ return timeout; } +EXPORT_SYMBOL(sleep_on_timeout); + void scheduling_functions_end_here(void) { } void set_user_nice(task_t *p, long nice) @@ -1849,6 +1874,8 @@ task_rq_unlock(rq, &flags); } +EXPORT_SYMBOL(set_user_nice); + #ifndef __alpha__ /* @@ -1915,6 +1942,8 @@ return TASK_NICE(p); } +EXPORT_SYMBOL(task_nice); + /** * task_curr - is this task currently executing on a CPU? * @p: the task in question. @@ -1933,6 +1962,8 @@ return cpu_curr(cpu) == cpu_rq(cpu)->idle; } +EXPORT_SYMBOL(idle_cpu); + /** * find_process_by_pid - find a process with a matching PID value. * @pid: the pid in question. @@ -2260,6 +2291,8 @@ schedule(); } +EXPORT_SYMBOL(__cond_resched); + /** * yield - yield the current processor to other threads. * @@ -2272,6 +2305,8 @@ sys_sched_yield(); } +EXPORT_SYMBOL(yield); + /* * This task is about to go to sleep on IO. Increment rq->nr_iowait so * that process accounting knows that this is a task in IO wait state. @@ -2288,6 +2323,8 @@ atomic_dec(&rq->nr_iowait); } +EXPORT_SYMBOL(io_schedule); + long io_schedule_timeout(long timeout) { struct runqueue *rq = this_rq(); @@ -2574,6 +2611,8 @@ return 0; } +EXPORT_SYMBOL_GPL(set_cpus_allowed); + /* Move (not current) task off this cpu, onto dest cpu. */ static void move_task_away(struct task_struct *p, int dest_cpu) { @@ -2819,6 +2858,7 @@ } #endif } +EXPORT_SYMBOL(__might_sleep); #endif @@ -2847,6 +2887,8 @@ } while (!_raw_spin_trylock(lock)); } +EXPORT_SYMBOL(__preempt_spin_lock); + void __preempt_write_lock(rwlock_t *lock) { if (preempt_count() > 1) { @@ -2861,4 +2903,6 @@ preempt_disable(); } while (!_raw_write_trylock(lock)); } -#endif + +EXPORT_SYMBOL(__preempt_write_lock); +#endif /* defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) */ diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c --- a/kernel/sysctl.c Thu Oct 2 01:28:16 2003 +++ b/kernel/sysctl.c Thu Oct 2 01:28:16 2003 @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -136,17 +137,14 @@ static ssize_t proc_readsys(struct file *, char __user *, size_t, loff_t *); static ssize_t proc_writesys(struct file *, const char __user *, size_t, loff_t *); -static int proc_sys_permission(struct inode *, int, struct nameidata *); +static int proc_opensys(struct inode *, struct file *); struct file_operations proc_sys_file_operations = { + .open = proc_opensys, .read = proc_readsys, .write = proc_writesys, }; -static struct inode_operations proc_sys_inode_operations = { - .permission = proc_sys_permission, -}; - extern struct proc_dir_entry *proc_sys_root; static void register_proc_table(ctl_table *, struct proc_dir_entry *); @@ -1140,10 +1138,8 @@ if (!de) continue; de->data = (void *) table; - if (table->proc_handler) { + if (table->proc_handler) de->proc_fops = &proc_sys_file_operations; - de->proc_iops = &proc_sys_inode_operations; - } } table->de = de; if (de->mode & S_IFDIR) @@ -1212,6 +1208,20 @@ return res; } +static int proc_opensys(struct inode *inode, struct file *file) +{ + if (file->f_mode & FMODE_WRITE) { + /* + * sysctl entries that are not writable, + * are _NOT_ writable, capabilities or not. + */ + if (!(inode->i_mode & S_IWUSR)) + return -EPERM; + } + + return 0; +} + static ssize_t proc_readsys(struct file * file, char __user * buf, size_t count, loff_t *ppos) { @@ -1224,11 +1234,6 @@ return do_rw_proc(1, file, (char __user *) buf, count, ppos); } -static int proc_sys_permission(struct inode *inode, int op, struct nameidata *nd) -{ - return test_perm(inode->i_mode, op); -} - /** * proc_dostring - read a string sysctl * @table: the sysctl table @@ -1994,3 +1999,19 @@ } #endif /* CONFIG_SYSCTL */ + +/* + * No sense putting this after each symbol definition, twice, + * exception granted :-) + */ +EXPORT_SYMBOL(proc_dointvec); +EXPORT_SYMBOL(proc_dointvec_jiffies); +EXPORT_SYMBOL(proc_dointvec_minmax); +EXPORT_SYMBOL(proc_dostring); +EXPORT_SYMBOL(proc_doulongvec_minmax); +EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax); +EXPORT_SYMBOL(register_sysctl_table); +EXPORT_SYMBOL(sysctl_intvec); +EXPORT_SYMBOL(sysctl_jiffies); +EXPORT_SYMBOL(sysctl_string); +EXPORT_SYMBOL(unregister_sysctl_table); diff -Nru a/lib/Makefile b/lib/Makefile --- a/lib/Makefile Thu Oct 2 01:28:15 2003 +++ b/lib/Makefile Thu Oct 2 01:28:15 2003 @@ -5,7 +5,7 @@ lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ - kobject.o idr.o div64.o + kobject.o idr.o div64.o parser.o lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o diff -Nru a/lib/parser.c b/lib/parser.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/lib/parser.c Thu Oct 2 01:28:18 2003 @@ -0,0 +1,138 @@ +/* + * lib/parser.c - simple parser for mount, etc. options. + * + * This source code is licensed under the GNU General Public License, + * Version 2. See the file COPYING for more details. + */ + +#include +#include +#include +#include +#include + +static int match_one(char *s, char *p, substring_t args[]) +{ + char *meta; + int argc = 0; + + if (!p) + return 1; + + while(1) { + int len = -1; + meta = strchr(p, '%'); + if (!meta) + return strcmp(p, s) == 0; + + if (strncmp(p, s, meta-p)) + return 0; + + s += meta - p; + p = meta + 1; + + if (isdigit(*p)) + len = simple_strtoul(p, &p, 10); + else if (*p == '%') { + if (*s++ != '%') + return 0; + continue; + } + + if (argc >= MAX_OPT_ARGS) + return 0; + + args[argc].from = s; + switch (*p++) { + case 's': + if (len == -1 || len > strlen(s)) + len = strlen(s); + args[argc].to = s + len; + break; + case 'd': + simple_strtol(s, &args[argc].to, 0); + goto num; + case 'u': + simple_strtoul(s, &args[argc].to, 0); + goto num; + case 'o': + simple_strtoul(s, &args[argc].to, 8); + goto num; + case 'x': + simple_strtoul(s, &args[argc].to, 16); + num: + if (args[argc].to == args[argc].from) + return 0; + break; + default: + return 0; + } + s = args[argc].to; + argc++; + } +} + +int match_token(char *s, match_table_t table, substring_t args[]) +{ + struct match_token *p; + + for (p = table; !match_one(s, p->pattern, args) ; p++) + ; + + return p->token; +} + +static int match_number(substring_t *s, int *result, int base) +{ + char *endp; + char *buf; + int ret; + + buf = kmalloc(s->to - s->from + 1, GFP_KERNEL); + if (!buf) + return -ENOMEM; + memcpy(buf, s->from, s->to - s->from); + buf[s->to - s->from] = '\0'; + *result = simple_strtol(buf, &endp, base); + ret = 0; + if (endp == buf) + ret = -EINVAL; + kfree(buf); + return ret; +} + +int match_int(substring_t *s, int *result) +{ + return match_number(s, result, 0); +} + +int match_octal(substring_t *s, int *result) +{ + return match_number(s, result, 8); +} + +int match_hex(substring_t *s, int *result) +{ + return match_number(s, result, 16); +} + +void match_strcpy(char *to, substring_t *s) +{ + memcpy(to, s->from, s->to - s->from); + to[s->to - s->from] = '\0'; +} + +char *match_strdup(substring_t *s) +{ + char *p = kmalloc(s->to - s->from + 1, GFP_KERNEL); + if (p) + match_strcpy(p, s); + return p; +} + +EXPORT_SYMBOL(match_token); +EXPORT_SYMBOL(match_int); +EXPORT_SYMBOL(match_octal); +EXPORT_SYMBOL(match_hex); +EXPORT_SYMBOL(match_strcpy); +EXPORT_SYMBOL(match_strdup); diff -Nru a/mm/bootmem.c b/mm/bootmem.c --- a/mm/bootmem.c Thu Oct 2 01:28:16 2003 +++ b/mm/bootmem.c Thu Oct 2 01:28:16 2003 @@ -146,7 +146,7 @@ * We 'merge' subsequent allocations to save space. We might 'lose' * some fraction of a page if allocations cannot be satisfied due to * size constraints on boxes where there is physical RAM space - * fragmentation - in these cases * (mostly large memory boxes) this + * fragmentation - in these cases (mostly large memory boxes) this * is not a problem. * * On low memory boxes we get it right in 100% of the cases. diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c Thu Oct 2 01:28:16 2003 +++ b/mm/filemap.c Thu Oct 2 01:28:16 2003 @@ -151,6 +151,8 @@ return __filemap_fdatawrite(mapping, WB_SYNC_ALL); } +EXPORT_SYMBOL(filemap_fdatawrite); + /* * This is a mostly non-blocking flush. Not suitable for data-integrity * purposes. @@ -216,6 +218,8 @@ return ret; } +EXPORT_SYMBOL(filemap_fdatawait); + /* * This adds a page to the page cache, starting out as locked, unreferenced, * not uptodate and with no errors. @@ -253,6 +257,7 @@ } return error; } + EXPORT_SYMBOL(add_to_page_cache); int add_to_page_cache_lru(struct page *page, struct address_space *mapping, @@ -295,6 +300,7 @@ } while (test_bit(bit_nr, &page->flags)); finish_wait(waitqueue, &wait); } + EXPORT_SYMBOL(wait_on_page_bit); /** @@ -323,6 +329,8 @@ wake_up_all(waitqueue); } +EXPORT_SYMBOL(unlock_page); + /* * End writeback against a page. */ @@ -339,6 +347,7 @@ if (waitqueue_active(waitqueue)) wake_up_all(waitqueue); } + EXPORT_SYMBOL(end_page_writeback); /* @@ -363,6 +372,7 @@ } finish_wait(wqh, &wait); } + EXPORT_SYMBOL(__lock_page); /* @@ -385,6 +395,8 @@ return page; } +EXPORT_SYMBOL(find_get_page); + /* * Same as above, but trylock it instead of incrementing the count. */ @@ -400,6 +412,8 @@ return page; } +EXPORT_SYMBOL(find_trylock_page); + /** * find_lock_page - locate, pin and lock a pagecache page * @@ -438,6 +452,8 @@ return page; } +EXPORT_SYMBOL(find_lock_page); + /** * find_or_create_page - locate or add a pagecache page * @@ -482,6 +498,8 @@ return page; } +EXPORT_SYMBOL(find_or_create_page); + /** * find_get_pages - gang pagecache lookup * @mapping: The address_space to search @@ -543,6 +561,8 @@ return page; } +EXPORT_SYMBOL(grab_cache_page_nowait); + /* * This is a generic file read routine, and uses the * inode->i_op->readpage() function for the actual low-level @@ -699,6 +719,8 @@ update_atime(inode); } +EXPORT_SYMBOL(do_generic_mapping_read); + int file_read_actor(read_descriptor_t *desc, struct page *page, unsigned long offset, unsigned long size) { @@ -816,6 +838,8 @@ return retval; } +EXPORT_SYMBOL(__generic_file_aio_read); + ssize_t generic_file_aio_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t pos) { @@ -824,8 +848,8 @@ BUG_ON(iocb->ki_pos != pos); return __generic_file_aio_read(iocb, &local_iov, 1, &iocb->ki_pos); } + EXPORT_SYMBOL(generic_file_aio_read); -EXPORT_SYMBOL(__generic_file_aio_read); ssize_t generic_file_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos) @@ -841,6 +865,8 @@ return ret; } +EXPORT_SYMBOL(generic_file_read); + int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size) { ssize_t written; @@ -880,6 +906,8 @@ return desc.error; } +EXPORT_SYMBOL(generic_file_sendfile); + static ssize_t do_readahead(struct address_space *mapping, struct file *filp, unsigned long index, unsigned long nr) @@ -1126,6 +1154,8 @@ return NULL; } +EXPORT_SYMBOL(filemap_nopage); + static struct page * filemap_getpage(struct file *file, unsigned long pgoff, int nonblock) { @@ -1330,6 +1360,9 @@ } #endif /* CONFIG_MMU */ +EXPORT_SYMBOL(generic_file_mmap); +EXPORT_SYMBOL(generic_file_readonly_mmap); + static inline struct page *__read_cache_page(struct address_space *mapping, unsigned long index, int (*filler)(void *,struct page*), @@ -1406,6 +1439,8 @@ return page; } +EXPORT_SYMBOL(read_cache_page); + /* * If the page was newly created, increment its refcount and add it to the * caller's lru-buffering pagevec. This function is specifically for @@ -1456,6 +1491,8 @@ } } +EXPORT_SYMBOL(remove_suid); + /* * Copy as much as we can into the page and return the number of bytes which * were sucessfully copied. If a fault is encountered then clear the page @@ -1638,6 +1675,7 @@ } return 0; } + EXPORT_SYMBOL(generic_write_checks); /* @@ -1832,6 +1870,8 @@ return err; } +EXPORT_SYMBOL(generic_file_aio_write_nolock); + ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos) @@ -1846,6 +1886,8 @@ return ret; } +EXPORT_SYMBOL(generic_file_write_nolock); + ssize_t generic_file_aio_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t pos) { @@ -1863,8 +1905,8 @@ return err; } + EXPORT_SYMBOL(generic_file_aio_write); -EXPORT_SYMBOL(generic_file_aio_write_nolock); ssize_t generic_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) @@ -1880,6 +1922,8 @@ return err; } +EXPORT_SYMBOL(generic_file_write); + ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos) { @@ -1893,6 +1937,8 @@ return ret; } +EXPORT_SYMBOL(generic_file_readv); + ssize_t generic_file_writev(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t * ppos) { @@ -1905,6 +1951,8 @@ return ret; } +EXPORT_SYMBOL(generic_file_writev); + ssize_t generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t offset, unsigned long nr_segs) @@ -1927,3 +1975,5 @@ out: return retval; } + +EXPORT_SYMBOL_GPL(generic_file_direct_IO); diff -Nru a/mm/highmem.c b/mm/highmem.c --- a/mm/highmem.c Thu Oct 2 01:28:17 2003 +++ b/mm/highmem.c Thu Oct 2 01:28:17 2003 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -62,7 +63,7 @@ { int i; - flush_cache_all(); + flush_cache_kmaps(); for (i = 0; i < LAST_PKMAP; i++) { struct page *page; diff -Nru a/mm/vmalloc.c b/mm/vmalloc.c --- a/mm/vmalloc.c Thu Oct 2 01:28:17 2003 +++ b/mm/vmalloc.c Thu Oct 2 01:28:17 2003 @@ -135,23 +135,23 @@ void unmap_vm_area(struct vm_struct *area) { - unsigned long address = VMALLOC_VMADDR(area->addr); + unsigned long address = (unsigned long) area->addr; unsigned long end = (address + area->size); pgd_t *dir; dir = pgd_offset_k(address); - flush_cache_all(); + flush_cache_vunmap(address, end); do { unmap_area_pmd(dir, address, end - address); address = (address + PGDIR_SIZE) & PGDIR_MASK; dir++; } while (address && (address < end)); - flush_tlb_kernel_range(VMALLOC_VMADDR(area->addr), end); + flush_tlb_kernel_range((unsigned long) area->addr, end); } int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages) { - unsigned long address = VMALLOC_VMADDR(area->addr); + unsigned long address = (unsigned long) area->addr; unsigned long end = address + (area->size-PAGE_SIZE); pgd_t *dir; int err = 0; @@ -174,7 +174,7 @@ } while (address && (address < end)); spin_unlock(&init_mm.page_table_lock); - flush_cache_all(); + flush_cache_vmap((unsigned long) area->addr, end); return err; } diff -Nru a/net/802/fddi.c b/net/802/fddi.c --- a/net/802/fddi.c Thu Oct 2 01:28:17 2003 +++ b/net/802/fddi.c Thu Oct 2 01:28:17 2003 @@ -27,6 +27,7 @@ */ #include +#include #include #include #include @@ -163,3 +164,5 @@ return(type); } + +EXPORT_SYMBOL(fddi_type_trans); diff -Nru a/net/802/hippi.c b/net/802/hippi.c --- a/net/802/hippi.c Thu Oct 2 01:28:17 2003 +++ b/net/802/hippi.c Thu Oct 2 01:28:17 2003 @@ -20,6 +20,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -151,3 +152,5 @@ return hip->snap.ethertype; } + +EXPORT_SYMBOL(hippi_type_trans); diff -Nru a/net/802/p8023.c b/net/802/p8023.c --- a/net/802/p8023.c Thu Oct 2 01:28:16 2003 +++ b/net/802/p8023.c Thu Oct 2 01:28:16 2003 @@ -12,22 +12,24 @@ * running raw 802.3 on different devices. Thankfully nobody else * has done anything like the old IPX. */ - + +#include +#include +#include #include #include + #include -#include -#include /* * Place an 802.3 header on a packet. The driver will do the mac * addresses, we just need to give it the buffer length. */ - -static int p8023_request(struct datalink_proto *dl, - struct sk_buff *skb, unsigned char *dest_node) +static int p8023_request(struct datalink_proto *dl, + struct sk_buff *skb, unsigned char *dest_node) { - struct net_device *dev = skb->dev; + struct net_device *dev = skb->dev; + dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len); return dev_queue_xmit(skb); } @@ -35,16 +37,13 @@ /* * Create an 802.3 client. Note there can be only one 802.3 client */ - struct datalink_proto *make_8023_client(void) { - struct datalink_proto *proto; + struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC); - proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC); - if (proto != NULL) - { + if (proto) { proto->header_length = 0; - proto->request = p8023_request; + proto->request = p8023_request; } return proto; } @@ -52,10 +51,11 @@ /* * Destroy the 802.3 client. */ - void destroy_8023_client(struct datalink_proto *dl) { if (dl) kfree(dl); } +EXPORT_SYMBOL(destroy_8023_client); +EXPORT_SYMBOL(make_8023_client); diff -Nru a/net/802/tr.c b/net/802/tr.c --- a/net/802/tr.c Thu Oct 2 01:28:16 2003 +++ b/net/802/tr.c Thu Oct 2 01:28:16 2003 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -600,3 +601,6 @@ } module_init(rif_init); + +EXPORT_SYMBOL(tr_source_route); +EXPORT_SYMBOL(tr_type_trans); diff -Nru a/net/Makefile b/net/Makefile --- a/net/Makefile Thu Oct 2 01:28:16 2003 +++ b/net/Makefile Thu Oct 2 01:28:16 2003 @@ -40,6 +40,5 @@ obj-$(CONFIG_IP_SCTP) += sctp/ ifeq ($(CONFIG_NET),y) -obj-$(CONFIG_MODULES) += netsyms.o obj-$(CONFIG_SYSCTL) += sysctl_net.o endif diff -Nru a/net/bridge/netfilter/Kconfig b/net/bridge/netfilter/Kconfig --- a/net/bridge/netfilter/Kconfig Thu Oct 2 01:28:16 2003 +++ b/net/bridge/netfilter/Kconfig Thu Oct 2 01:28:16 2003 @@ -73,6 +73,17 @@ To compile it as a module, choose M here. If unsure, say N. +config BRIDGE_EBT_LIMIT + tristate "ebt: limit match support" + depends on BRIDGE_NF_EBTABLES + help + This option adds the limit match, which allows you to control + the rate at which a rule can be matched. This match is the + equivalent of the iptables limit match. + + If you want to compile it as a module, say M here and read + . If unsure, say `N'. + config BRIDGE_EBT_MARK tristate "ebt: mark filter support" depends on BRIDGE_NF_EBTABLES diff -Nru a/net/bridge/netfilter/Makefile b/net/bridge/netfilter/Makefile --- a/net/bridge/netfilter/Makefile Thu Oct 2 01:28:17 2003 +++ b/net/bridge/netfilter/Makefile Thu Oct 2 01:28:17 2003 @@ -13,6 +13,7 @@ obj-$(CONFIG_BRIDGE_EBT_802_3) += ebt_802_3.o obj-$(CONFIG_BRIDGE_EBT_ARP) += ebt_arp.o obj-$(CONFIG_BRIDGE_EBT_IP) += ebt_ip.o +obj-$(CONFIG_BRIDGE_EBT_LIMIT) += ebt_limit.o obj-$(CONFIG_BRIDGE_EBT_MARK) += ebt_mark_m.o obj-$(CONFIG_BRIDGE_EBT_PKTTYPE) += ebt_pkttype.o obj-$(CONFIG_BRIDGE_EBT_STP) += ebt_stp.o diff -Nru a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/net/bridge/netfilter/ebt_limit.c Thu Oct 2 01:28:18 2003 @@ -0,0 +1,104 @@ +/* + * ebt_limit + * + * Authors: + * Tom Marshall + * + * Mostly copied from netfilter's ipt_limit.c, see that file for + * more explanation + * + * September, 2003 + * + */ + +#include +#include +#include + +#include +#include + +static spinlock_t limit_lock = SPIN_LOCK_UNLOCKED; + +#define CREDITS_PER_JIFFY 128 + +static int ebt_limit_match(const struct sk_buff *skb, + const struct net_device *in, const struct net_device *out, + const void *data, unsigned int datalen) +{ + struct ebt_limit_info *info = (struct ebt_limit_info *)data; + unsigned long now = jiffies; + + spin_lock_bh(&limit_lock); + info->credit += (now - xchg(&info->prev, now)) * CREDITS_PER_JIFFY; + if (info->credit > info->credit_cap) + info->credit = info->credit_cap; + + if (info->credit >= info->cost) { + /* We're not limited. */ + info->credit -= info->cost; + spin_unlock_bh(&limit_lock); + return EBT_MATCH; + } + + spin_unlock_bh(&limit_lock); + return EBT_NOMATCH; +} + +/* Precision saver. */ +static u_int32_t +user2credits(u_int32_t user) +{ + /* If multiplying would overflow... */ + if (user > 0xFFFFFFFF / (HZ*CREDITS_PER_JIFFY)) + /* Divide first. */ + return (user / EBT_LIMIT_SCALE) * HZ * CREDITS_PER_JIFFY; + + return (user * HZ * CREDITS_PER_JIFFY) / EBT_LIMIT_SCALE; +} + +static int ebt_limit_check(const char *tablename, unsigned int hookmask, + const struct ebt_entry *e, void *data, unsigned int datalen) +{ + struct ebt_limit_info *info = (struct ebt_limit_info *)data; + + if (datalen != EBT_ALIGN(sizeof(struct ebt_limit_info))) + return -EINVAL; + + /* Check for overflow. */ + if (info->burst == 0 || + user2credits(info->avg * info->burst) < user2credits(info->avg)) { + printk("Overflow in ebt_limit: %u/%u\n", + info->avg, info->burst); + return -EINVAL; + } + + /* User avg in seconds * EBT_LIMIT_SCALE: convert to jiffies * 128. */ + info->prev = jiffies; + info->credit = user2credits(info->avg * info->burst); + info->credit_cap = user2credits(info->avg * info->burst); + info->cost = user2credits(info->avg); + return 0; +} + +static struct ebt_match ebt_limit_reg = +{ + .name = EBT_LIMIT_MATCH, + .match = ebt_limit_match, + .check = ebt_limit_check, + .me = THIS_MODULE, +}; + +static int __init init(void) +{ + return ebt_register_match(&ebt_limit_reg); +} + +static void __exit fini(void) +{ + ebt_unregister_match(&ebt_limit_reg); +} + +module_init(init); +module_exit(fini); +MODULE_LICENSE("GPL"); diff -Nru a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c --- a/net/bridge/netfilter/ebt_vlan.c Thu Oct 2 01:28:17 2003 +++ b/net/bridge/netfilter/ebt_vlan.c Thu Oct 2 01:28:17 2003 @@ -48,7 +48,7 @@ const void *data, unsigned int datalen) { struct ebt_vlan_info *info = (struct ebt_vlan_info *) data; - struct vlan_ethhdr frame; + struct vlan_hdr frame; unsigned short TCI; /* Whole TCI, given from parsed frame */ unsigned short id; /* VLAN ID, given from frame TCI */ diff -Nru a/net/core/datagram.c b/net/core/datagram.c --- a/net/core/datagram.c Thu Oct 2 01:28:17 2003 +++ b/net/core/datagram.c Thu Oct 2 01:28:17 2003 @@ -33,6 +33,7 @@ * */ +#include #include #include #include @@ -485,3 +486,10 @@ return mask; } + +EXPORT_SYMBOL(datagram_poll); +EXPORT_SYMBOL(skb_copy_and_csum_datagram_iovec); +EXPORT_SYMBOL(skb_copy_datagram); +EXPORT_SYMBOL(skb_copy_datagram_iovec); +EXPORT_SYMBOL(skb_free_datagram); +EXPORT_SYMBOL(skb_recv_datagram); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c Thu Oct 2 01:28:17 2003 +++ b/net/core/dev.c Thu Oct 2 01:28:17 2003 @@ -1637,8 +1637,8 @@ #ifdef CONFIG_NET_HW_FLOWCONTROL if (queue->throttle && queue->input_pkt_queue.qlen < no_cong_thresh ) { + queue->throttle = 0; if (atomic_dec_and_test(&netdev_dropping)) { - queue->throttle = 0; netdev_wakeup(); break; } @@ -3036,3 +3036,63 @@ } subsys_initcall(net_dev_init); + +EXPORT_SYMBOL(__dev_get); +EXPORT_SYMBOL(__dev_get_by_flags); +EXPORT_SYMBOL(__dev_get_by_index); +EXPORT_SYMBOL(__dev_get_by_name); +EXPORT_SYMBOL(__dev_remove_pack); +EXPORT_SYMBOL(__skb_linearize); +EXPORT_SYMBOL(call_netdevice_notifiers); +EXPORT_SYMBOL(dev_add_pack); +EXPORT_SYMBOL(dev_alloc); +EXPORT_SYMBOL(dev_alloc_name); +EXPORT_SYMBOL(dev_close); +EXPORT_SYMBOL(dev_get_by_flags); +EXPORT_SYMBOL(dev_get_by_index); +EXPORT_SYMBOL(dev_get_by_name); +EXPORT_SYMBOL(dev_getbyhwaddr); +EXPORT_SYMBOL(dev_ioctl); +EXPORT_SYMBOL(dev_new_index); +EXPORT_SYMBOL(dev_open); +EXPORT_SYMBOL(dev_queue_xmit); +EXPORT_SYMBOL(dev_queue_xmit_nit); +EXPORT_SYMBOL(dev_remove_pack); +EXPORT_SYMBOL(dev_set_allmulti); +EXPORT_SYMBOL(dev_set_promiscuity); +EXPORT_SYMBOL(free_netdev); +EXPORT_SYMBOL(netdev_boot_setup_check); +EXPORT_SYMBOL(netdev_set_master); +EXPORT_SYMBOL(netdev_state_change); +EXPORT_SYMBOL(netif_receive_skb); +EXPORT_SYMBOL(netif_rx); +EXPORT_SYMBOL(register_gifconf); +EXPORT_SYMBOL(register_netdevice); +EXPORT_SYMBOL(register_netdevice_notifier); +EXPORT_SYMBOL(skb_checksum_help); +EXPORT_SYMBOL(synchronize_net); +EXPORT_SYMBOL(unregister_netdevice); +EXPORT_SYMBOL(unregister_netdevice_notifier); + +#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) +EXPORT_SYMBOL(br_handle_frame_hook); +#endif +/* for 801q VLAN support */ +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +EXPORT_SYMBOL(dev_change_flags); +#endif +#ifdef CONFIG_KMOD +EXPORT_SYMBOL(dev_load); +#endif +#ifdef CONFIG_NET_HW_FLOWCONTROL +EXPORT_SYMBOL(netdev_dropping); +EXPORT_SYMBOL(netdev_fc_xoff); +EXPORT_SYMBOL(netdev_register_fc); +EXPORT_SYMBOL(netdev_unregister_fc); +#endif +#ifdef CONFIG_NET_FASTROUTE +EXPORT_SYMBOL(netdev_fastroute); +EXPORT_SYMBOL(netdev_fastroute_obstacles); +#endif + +EXPORT_PER_CPU_SYMBOL(softnet_data); diff -Nru a/net/core/dev_mcast.c b/net/core/dev_mcast.c --- a/net/core/dev_mcast.c Thu Oct 2 01:28:16 2003 +++ b/net/core/dev_mcast.c Thu Oct 2 01:28:16 2003 @@ -22,6 +22,7 @@ */ #include +#include #include #include #include @@ -273,3 +274,6 @@ #endif } +EXPORT_SYMBOL(dev_mc_add); +EXPORT_SYMBOL(dev_mc_delete); +EXPORT_SYMBOL(dev_mc_upload); diff -Nru a/net/core/dst.c b/net/core/dst.c --- a/net/core/dst.c Thu Oct 2 01:28:17 2003 +++ b/net/core/dst.c Thu Oct 2 01:28:17 2003 @@ -6,15 +6,16 @@ */ #include -#include +#include +#include #include -#include #include -#include -#include +#include #include +#include #include -#include +#include +#include #include @@ -257,3 +258,7 @@ { register_netdevice_notifier(&dst_dev_notifier); } + +EXPORT_SYMBOL(__dst_free); +EXPORT_SYMBOL(dst_alloc); +EXPORT_SYMBOL(dst_destroy); diff -Nru a/net/core/dv.c b/net/core/dv.c --- a/net/core/dv.c Thu Oct 2 01:28:16 2003 +++ b/net/core/dv.c Thu Oct 2 01:28:16 2003 @@ -10,6 +10,7 @@ * Dave Miller: improvement on the code (correctness, performance and source files) * */ +#include #include #include #include @@ -237,7 +238,7 @@ default: return -EINVAL; - }; + } break; @@ -281,7 +282,7 @@ default: return -EINVAL; - }; + } break; @@ -301,7 +302,7 @@ default: return -EINVAL; - }; + } break; @@ -321,7 +322,7 @@ default: return -EINVAL; - }; + } break; @@ -337,7 +338,7 @@ default: return -EINVAL; - }; + } break; @@ -353,7 +354,7 @@ default: return -EINVAL; - }; + } break; @@ -373,7 +374,7 @@ default: return -EINVAL; - }; + } break; @@ -389,7 +390,7 @@ default: return -EINVAL; - }; + } break; @@ -405,7 +406,7 @@ default: return -EINVAL; - }; + } break; @@ -425,19 +426,19 @@ default: return -EINVAL; - }; + } break; default: return -EINVAL; - }; + } break; default: return -EINVAL; - }; + } return 0; } @@ -550,8 +551,8 @@ } } break; - }; - - return; + } } +EXPORT_SYMBOL(alloc_divert_blk); +EXPORT_SYMBOL(free_divert_blk); diff -Nru a/net/core/ethtool.c b/net/core/ethtool.c --- a/net/core/ethtool.c Thu Oct 2 01:28:16 2003 +++ b/net/core/ethtool.c Thu Oct 2 01:28:16 2003 @@ -9,6 +9,7 @@ * It's GPL, stupid. */ +#include #include #include #include @@ -727,3 +728,11 @@ return dev->do_ioctl(dev, ifr, SIOCETHTOOL); return -EOPNOTSUPP; } + +EXPORT_SYMBOL(ethtool_op_get_link); +EXPORT_SYMBOL(ethtool_op_get_sg); +EXPORT_SYMBOL(ethtool_op_get_tso); +EXPORT_SYMBOL(ethtool_op_get_tx_csum); +EXPORT_SYMBOL(ethtool_op_set_sg); +EXPORT_SYMBOL(ethtool_op_set_tso); +EXPORT_SYMBOL(ethtool_op_set_tx_csum); diff -Nru a/net/core/filter.c b/net/core/filter.c --- a/net/core/filter.c Thu Oct 2 01:28:16 2003 +++ b/net/core/filter.c Thu Oct 2 01:28:16 2003 @@ -424,3 +424,6 @@ sk_filter_release(sk, fp); return err; } + +EXPORT_SYMBOL(sk_chk_filter); +EXPORT_SYMBOL(sk_run_filter); diff -Nru a/net/core/flow.c b/net/core/flow.c --- a/net/core/flow.c Thu Oct 2 01:28:15 2003 +++ b/net/core/flow.c Thu Oct 2 01:28:15 2003 @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -401,3 +402,6 @@ } module_init(flow_cache_init); + +EXPORT_SYMBOL(flow_cache_genid); +EXPORT_SYMBOL(flow_cache_lookup); diff -Nru a/net/core/iovec.c b/net/core/iovec.c --- a/net/core/iovec.c Thu Oct 2 01:28:18 2003 +++ b/net/core/iovec.c Thu Oct 2 01:28:18 2003 @@ -16,8 +16,8 @@ * Andi Kleen : Fix csum*fromiovecend for IPv6. */ - #include +#include #include #include #include @@ -254,3 +254,9 @@ err = -EFAULT; goto out; } + +EXPORT_SYMBOL(csum_partial_copy_fromiovecend); +EXPORT_SYMBOL(memcpy_fromiovec); +EXPORT_SYMBOL(memcpy_fromiovecend); +EXPORT_SYMBOL(memcpy_toiovec); +EXPORT_SYMBOL(memcpy_tokerneliovec); diff -Nru a/net/core/link_watch.c b/net/core/link_watch.c --- a/net/core/link_watch.c Thu Oct 2 01:28:15 2003 +++ b/net/core/link_watch.c Thu Oct 2 01:28:15 2003 @@ -1,5 +1,5 @@ /* - * Linux network device link state notifaction + * Linux network device link state notification * * Author: * Stefan Rompf @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -132,3 +133,4 @@ } } +EXPORT_SYMBOL(linkwatch_fire_event); diff -Nru a/net/core/neighbour.c b/net/core/neighbour.c --- a/net/core/neighbour.c Thu Oct 2 01:28:15 2003 +++ b/net/core/neighbour.c Thu Oct 2 01:28:15 2003 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1683,3 +1684,34 @@ } #endif /* CONFIG_SYSCTL */ + +EXPORT_SYMBOL(__neigh_event_send); +EXPORT_SYMBOL(neigh_add); +EXPORT_SYMBOL(neigh_changeaddr); +EXPORT_SYMBOL(neigh_compat_output); +EXPORT_SYMBOL(neigh_connected_output); +EXPORT_SYMBOL(neigh_create); +EXPORT_SYMBOL(neigh_delete); +EXPORT_SYMBOL(neigh_destroy); +EXPORT_SYMBOL(neigh_dump_info); +EXPORT_SYMBOL(neigh_event_ns); +EXPORT_SYMBOL(neigh_ifdown); +EXPORT_SYMBOL(neigh_lookup); +EXPORT_SYMBOL(neigh_parms_alloc); +EXPORT_SYMBOL(neigh_parms_release); +EXPORT_SYMBOL(neigh_rand_reach_time); +EXPORT_SYMBOL(neigh_resolve_output); +EXPORT_SYMBOL(neigh_table_clear); +EXPORT_SYMBOL(neigh_table_init); +EXPORT_SYMBOL(neigh_update); +EXPORT_SYMBOL(neigh_update_hhs); +EXPORT_SYMBOL(pneigh_enqueue); +EXPORT_SYMBOL(pneigh_lookup); + +#ifdef CONFIG_ARPD +EXPORT_SYMBOL(neigh_app_ns); +#endif +#ifdef CONFIG_SYSCTL +EXPORT_SYMBOL(neigh_sysctl_register); +EXPORT_SYMBOL(neigh_sysctl_unregister); +#endif diff -Nru a/net/core/netfilter.c b/net/core/netfilter.c --- a/net/core/netfilter.c Thu Oct 2 01:28:16 2003 +++ b/net/core/netfilter.c Thu Oct 2 01:28:16 2003 @@ -759,3 +759,17 @@ INIT_LIST_HEAD(&nf_hooks[i][h]); } } + +EXPORT_SYMBOL(ip_ct_attach); +EXPORT_SYMBOL(ip_route_me_harder); +EXPORT_SYMBOL(nf_getsockopt); +EXPORT_SYMBOL(nf_hook_slow); +EXPORT_SYMBOL(nf_hooks); +EXPORT_SYMBOL(nf_register_hook); +EXPORT_SYMBOL(nf_register_queue_handler); +EXPORT_SYMBOL(nf_register_sockopt); +EXPORT_SYMBOL(nf_reinject); +EXPORT_SYMBOL(nf_setsockopt); +EXPORT_SYMBOL(nf_unregister_hook); +EXPORT_SYMBOL(nf_unregister_queue_handler); +EXPORT_SYMBOL(nf_unregister_sockopt); diff -Nru a/net/core/rtnetlink.c b/net/core/rtnetlink.c --- a/net/core/rtnetlink.c Thu Oct 2 01:28:18 2003 +++ b/net/core/rtnetlink.c Thu Oct 2 01:28:18 2003 @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -556,7 +557,6 @@ .notifier_call = rtnetlink_event, }; - void __init rtnetlink_init(void) { rtnl = netlink_kernel_create(NETLINK_ROUTE, rtnetlink_rcv); @@ -567,3 +567,13 @@ rtnetlink_links[PF_UNSPEC] = link_rtnetlink_table; rtnetlink_links[PF_PACKET] = link_rtnetlink_table; } + +EXPORT_SYMBOL(__rta_fill); +EXPORT_SYMBOL(rtattr_parse); +EXPORT_SYMBOL(rtnetlink_dump_ifinfo); +EXPORT_SYMBOL(rtnetlink_links); +EXPORT_SYMBOL(rtnetlink_put_metrics); +EXPORT_SYMBOL(rtnl); +EXPORT_SYMBOL(rtnl_lock); +EXPORT_SYMBOL(rtnl_sem); +EXPORT_SYMBOL(rtnl_unlock); diff -Nru a/net/core/scm.c b/net/core/scm.c --- a/net/core/scm.c Thu Oct 2 01:28:16 2003 +++ b/net/core/scm.c Thu Oct 2 01:28:16 2003 @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -282,3 +283,9 @@ } return new_fpl; } + +EXPORT_SYMBOL(__scm_destroy); +EXPORT_SYMBOL(__scm_send); +EXPORT_SYMBOL(put_cmsg); +EXPORT_SYMBOL(scm_detach_fds); +EXPORT_SYMBOL(scm_fp_dup); diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c --- a/net/core/skbuff.c Thu Oct 2 01:28:17 2003 +++ b/net/core/skbuff.c Thu Oct 2 01:28:17 2003 @@ -39,6 +39,7 @@ */ #include +#include #include #include #include @@ -1103,3 +1104,22 @@ if (!skbuff_head_cache) panic("cannot create skbuff cache"); } + +EXPORT_SYMBOL(___pskb_trim); +EXPORT_SYMBOL(__kfree_skb); +EXPORT_SYMBOL(__pskb_pull_tail); +EXPORT_SYMBOL(alloc_skb); +EXPORT_SYMBOL(pskb_copy); +EXPORT_SYMBOL(pskb_expand_head); +EXPORT_SYMBOL(skb_checksum); +EXPORT_SYMBOL(skb_clone); +EXPORT_SYMBOL(skb_clone_fraglist); +EXPORT_SYMBOL(skb_copy); +EXPORT_SYMBOL(skb_copy_and_csum_bits); +EXPORT_SYMBOL(skb_copy_and_csum_dev); +EXPORT_SYMBOL(skb_copy_bits); +EXPORT_SYMBOL(skb_copy_expand); +EXPORT_SYMBOL(skb_over_panic); +EXPORT_SYMBOL(skb_pad); +EXPORT_SYMBOL(skb_realloc_headroom); +EXPORT_SYMBOL(skb_under_panic); diff -Nru a/net/core/sock.c b/net/core/sock.c --- a/net/core/sock.c Thu Oct 2 01:28:17 2003 +++ b/net/core/sock.c Thu Oct 2 01:28:17 2003 @@ -98,6 +98,7 @@ #include #include #include +#include #include #include #include @@ -1111,3 +1112,40 @@ atomic_set(&sk->sk_refcnt, 1); } + +EXPORT_SYMBOL(__lock_sock); +EXPORT_SYMBOL(__release_sock); +EXPORT_SYMBOL(sk_alloc); +EXPORT_SYMBOL(sk_free); +EXPORT_SYMBOL(sk_send_sigurg); +EXPORT_SYMBOL(sock_alloc_send_pskb); +EXPORT_SYMBOL(sock_alloc_send_skb); +EXPORT_SYMBOL(sock_getsockopt); +EXPORT_SYMBOL(sock_init_data); +EXPORT_SYMBOL(sock_kfree_s); +EXPORT_SYMBOL(sock_kmalloc); +EXPORT_SYMBOL(sock_no_accept); +EXPORT_SYMBOL(sock_no_bind); +EXPORT_SYMBOL(sock_no_connect); +EXPORT_SYMBOL(sock_no_getname); +EXPORT_SYMBOL(sock_no_getsockopt); +EXPORT_SYMBOL(sock_no_ioctl); +EXPORT_SYMBOL(sock_no_listen); +EXPORT_SYMBOL(sock_no_mmap); +EXPORT_SYMBOL(sock_no_poll); +EXPORT_SYMBOL(sock_no_recvmsg); +EXPORT_SYMBOL(sock_no_release); +EXPORT_SYMBOL(sock_no_sendmsg); +EXPORT_SYMBOL(sock_no_sendpage); +EXPORT_SYMBOL(sock_no_setsockopt); +EXPORT_SYMBOL(sock_no_shutdown); +EXPORT_SYMBOL(sock_no_socketpair); +EXPORT_SYMBOL(sock_rfree); +EXPORT_SYMBOL(sock_rmalloc); +EXPORT_SYMBOL(sock_setsockopt); +EXPORT_SYMBOL(sock_wfree); +EXPORT_SYMBOL(sock_wmalloc); +#ifdef CONFIG_SYSCTL +EXPORT_SYMBOL(sysctl_rmem_max); +EXPORT_SYMBOL(sysctl_wmem_max); +#endif diff -Nru a/net/core/utils.c b/net/core/utils.c --- a/net/core/utils.c Thu Oct 2 01:28:15 2003 +++ b/net/core/utils.c Thu Oct 2 01:28:15 2003 @@ -13,13 +13,15 @@ * 2 of the License, or (at your option) any later version. */ -#include -#include -#include -#include +#include #include -#include +#include #include +#include +#include + +#include +#include static unsigned long net_rand_seed = 152L; @@ -71,3 +73,7 @@ spin_unlock_irqrestore(&ratelimit_lock, flags); return 0; } + +EXPORT_SYMBOL(net_random); +EXPORT_SYMBOL(net_ratelimit); +EXPORT_SYMBOL(net_srandom); diff -Nru a/net/core/wireless.c b/net/core/wireless.c --- a/net/core/wireless.c Thu Oct 2 01:28:17 2003 +++ b/net/core/wireless.c Thu Oct 2 01:28:17 2003 @@ -1365,3 +1365,10 @@ #endif /* IW_WIRELESS_THRSPY */ #endif /* IW_WIRELESS_SPY */ } + +EXPORT_SYMBOL(iw_handler_get_spy); +EXPORT_SYMBOL(iw_handler_get_thrspy); +EXPORT_SYMBOL(iw_handler_set_spy); +EXPORT_SYMBOL(iw_handler_set_thrspy); +EXPORT_SYMBOL(wireless_send_event); +EXPORT_SYMBOL(wireless_spy_update); diff -Nru a/net/ethernet/eth.c b/net/ethernet/eth.c --- a/net/ethernet/eth.c Thu Oct 2 01:28:17 2003 +++ b/net/ethernet/eth.c Thu Oct 2 01:28:17 2003 @@ -37,6 +37,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -241,3 +242,5 @@ memcpy(((u8*)hh->hh_data) + HH_DATA_OFF(sizeof(struct ethhdr)), haddr, dev->addr_len); } + +EXPORT_SYMBOL(eth_type_trans); diff -Nru a/net/ethernet/pe2.c b/net/ethernet/pe2.c --- a/net/ethernet/pe2.c Thu Oct 2 01:28:18 2003 +++ b/net/ethernet/pe2.c Thu Oct 2 01:28:18 2003 @@ -1,27 +1,28 @@ +#include +#include +#include #include #include + #include -#include -#include -static int pEII_request(struct datalink_proto *dl, - struct sk_buff *skb, unsigned char *dest_node) +static int pEII_request(struct datalink_proto *dl, + struct sk_buff *skb, unsigned char *dest_node) { - struct net_device *dev = skb->dev; + struct net_device *dev = skb->dev; - skb->protocol = htons (ETH_P_IPX); - if(dev->hard_header) - dev->hard_header(skb, dev, ETH_P_IPX, dest_node, NULL, skb->len); + skb->protocol = htons(ETH_P_IPX); + if (dev->hard_header) + dev->hard_header(skb, dev, ETH_P_IPX, + dest_node, NULL, skb->len); return dev_queue_xmit(skb); } -struct datalink_proto * -make_EII_client(void) +struct datalink_proto *make_EII_client(void) { - struct datalink_proto *proto; + struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC); - proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC); - if (proto != NULL) { + if (proto) { proto->header_length = 0; proto->request = pEII_request; } @@ -34,3 +35,6 @@ if (dl) kfree(dl); } + +EXPORT_SYMBOL(destroy_EII_client); +EXPORT_SYMBOL(make_EII_client); diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c --- a/net/ipv4/af_inet.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/af_inet.c Thu Oct 2 01:28:16 2003 @@ -74,6 +74,7 @@ #include #include #include +#include #include #include #include @@ -1246,4 +1247,33 @@ return 0; } #endif /* CONFIG_PROC_FS */ + MODULE_ALIAS_NETPROTO(PF_INET); + +EXPORT_SYMBOL(inet_accept); +EXPORT_SYMBOL(inet_bind); +EXPORT_SYMBOL(inet_dgram_connect); +EXPORT_SYMBOL(inet_dgram_ops); +EXPORT_SYMBOL(inet_family_ops); +EXPORT_SYMBOL(inet_getname); +EXPORT_SYMBOL(inet_getsockopt); +EXPORT_SYMBOL(inet_ioctl); +EXPORT_SYMBOL(inet_listen); +EXPORT_SYMBOL(inet_recvmsg); +EXPORT_SYMBOL(inet_register_protosw); +EXPORT_SYMBOL(inet_release); +EXPORT_SYMBOL(inet_sendmsg); +EXPORT_SYMBOL(inet_setsockopt); +EXPORT_SYMBOL(inet_shutdown); +EXPORT_SYMBOL(inet_sock_destruct); +EXPORT_SYMBOL(inet_sock_release); +EXPORT_SYMBOL(inet_stream_connect); +EXPORT_SYMBOL(inet_stream_ops); +EXPORT_SYMBOL(inet_unregister_protosw); +EXPORT_SYMBOL(net_statistics); +EXPORT_SYMBOL(tcp_protocol); +EXPORT_SYMBOL(udp_protocol); + +#ifdef INET_REFCNT_DEBUG +EXPORT_SYMBOL(inet_sock_nr); +#endif diff -Nru a/net/ipv4/arp.c b/net/ipv4/arp.c --- a/net/ipv4/arp.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/arp.c Thu Oct 2 01:28:17 2003 @@ -69,6 +69,7 @@ * Arnaldo C. Melo : convert /proc/net/arp to seq_file */ +#include #include #include #include @@ -630,12 +631,6 @@ if (in_dev == NULL) goto out; - /* ARP header, plus 2 device addresses, plus 2 IP addresses. */ - if (!pskb_may_pull(skb, (sizeof(struct arphdr) + - (2 * dev->addr_len) + - (2 * sizeof(u32))))) - goto out; - arp = skb->nh.arph; switch (dev_type) { @@ -835,8 +830,15 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) { - struct arphdr *arp = skb->nh.arph; + struct arphdr *arp; + + /* ARP header, plus 2 device addresses, plus 2 IP addresses. */ + if (!pskb_may_pull(skb, (sizeof(struct arphdr) + + (2 * dev->addr_len) + + (2 * sizeof(u32))))) + goto freeskb; + arp = skb->nh.arph; if (arp->ar_hln != dev->addr_len || dev->flags & IFF_NOARP || skb->pkt_type == PACKET_OTHERHOST || @@ -1429,3 +1431,13 @@ } #endif /* CONFIG_PROC_FS */ + +EXPORT_SYMBOL(arp_broken_ops); +EXPORT_SYMBOL(arp_find); +EXPORT_SYMBOL(arp_rcv); +EXPORT_SYMBOL(arp_send); +EXPORT_SYMBOL(arp_tbl); + +#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) +EXPORT_SYMBOL(clip_tbl_hook); +#endif diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c --- a/net/ipv4/devinet.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/devinet.c Thu Oct 2 01:28:16 2003 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -1354,3 +1355,11 @@ devinet_sysctl_register(NULL, &ipv4_devconf_dflt); #endif } + +EXPORT_SYMBOL(devinet_ioctl); +EXPORT_SYMBOL(in_dev_finish_destroy); +EXPORT_SYMBOL(inet_select_addr); +EXPORT_SYMBOL(inetdev_by_index); +EXPORT_SYMBOL(inetdev_lock); +EXPORT_SYMBOL(register_inetaddr_notifier); +EXPORT_SYMBOL(unregister_inetaddr_notifier); diff -Nru a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c --- a/net/ipv4/fib_frontend.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/fib_frontend.c Thu Oct 2 01:28:18 2003 @@ -16,6 +16,7 @@ */ #include +#include #include #include #include @@ -605,3 +606,6 @@ register_inetaddr_notifier(&fib_inetaddr_notifier); } +EXPORT_SYMBOL(inet_addr_type); +EXPORT_SYMBOL(ip_dev_find); +EXPORT_SYMBOL(ip_rt_ioctl); diff -Nru a/net/ipv4/icmp.c b/net/ipv4/icmp.c --- a/net/ipv4/icmp.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/icmp.c Thu Oct 2 01:28:18 2003 @@ -65,6 +65,7 @@ */ #include +#include #include #include #include @@ -1126,3 +1127,8 @@ per_cpu(__icmp_socket, i)->sk->sk_prot->unhash(per_cpu(__icmp_socket, i)->sk); } } + +EXPORT_SYMBOL(icmp_err_convert); +EXPORT_SYMBOL(icmp_send); +EXPORT_SYMBOL(icmp_statistics); +EXPORT_SYMBOL(xrlim_allow); diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c --- a/net/ipv4/igmp.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/igmp.c Thu Oct 2 01:28:18 2003 @@ -72,8 +72,8 @@ * Vinay Kulkarni */ - #include +#include #include #include #include @@ -2438,3 +2438,6 @@ } #endif +EXPORT_SYMBOL(ip_mc_dec_group); +EXPORT_SYMBOL(ip_mc_inc_group); +EXPORT_SYMBOL(ip_mc_join_group); diff -Nru a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c --- a/net/ipv4/inetpeer.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/inetpeer.c Thu Oct 2 01:28:17 2003 @@ -8,6 +8,7 @@ * Authors: Andrey V. Savochkin */ +#include #include #include #include @@ -452,3 +453,5 @@ peer_total / inet_peer_threshold * HZ; add_timer(&peer_periodic_timer); } + +EXPORT_SYMBOL(inet_peer_idlock); diff -Nru a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c --- a/net/ipv4/ip_fragment.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/ip_fragment.c Thu Oct 2 01:28:16 2003 @@ -23,6 +23,7 @@ */ #include +#include #include #include #include @@ -675,3 +676,5 @@ ipfrag_secret_timer.expires = jiffies + sysctl_ipfrag_secret_interval; add_timer(&ipfrag_secret_timer); } + +EXPORT_SYMBOL(ip_defrag); diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c --- a/net/ipv4/ip_input.c Thu Oct 2 01:28:15 2003 +++ b/net/ipv4/ip_input.c Thu Oct 2 01:28:15 2003 @@ -116,6 +116,7 @@ */ #include +#include #include #include #include @@ -432,3 +433,5 @@ return NET_RX_DROP; } +EXPORT_SYMBOL(ip_rcv); +EXPORT_SYMBOL(ip_statistics); diff -Nru a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c --- a/net/ipv4/ip_options.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/ip_options.c Thu Oct 2 01:28:17 2003 @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -617,3 +618,6 @@ } return 0; } + +EXPORT_SYMBOL(ip_options_compile); +EXPORT_SYMBOL(ip_options_undo); diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/ip_output.c Thu Oct 2 01:28:18 2003 @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -1317,3 +1318,13 @@ igmp_mc_proc_init(); #endif } + +EXPORT_SYMBOL(ip_finish_output); +EXPORT_SYMBOL(ip_fragment); +EXPORT_SYMBOL(ip_generic_getfrag); +EXPORT_SYMBOL(ip_queue_xmit); +EXPORT_SYMBOL(ip_send_check); + +#ifdef CONFIG_SYSCTL +EXPORT_SYMBOL(sysctl_ip_default_ttl); +#endif diff -Nru a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c --- a/net/ipv4/ip_sockglue.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/ip_sockglue.c Thu Oct 2 01:28:16 2003 @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -1055,3 +1056,10 @@ } return 0; } + +EXPORT_SYMBOL(ip_cmsg_recv); + +#ifdef CONFIG_IP_SCTP_MODULE +EXPORT_SYMBOL(ip_getsockopt); +EXPORT_SYMBOL(ip_setsockopt); +#endif diff -Nru a/net/ipv4/ipip.c b/net/ipv4/ipip.c --- a/net/ipv4/ipip.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/ipip.c Thu Oct 2 01:28:18 2003 @@ -483,6 +483,11 @@ read_lock(&ipip_lock); if ((tunnel = ipip_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) { + if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { + kfree_skb(skb); + return 0; + } + tunnel->stat.rx_packets++; tunnel->stat.rx_bytes += skb->len; skb->dev = tunnel->dev; diff -Nru a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c --- a/net/ipv4/ipvs/ip_vs_lblc.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/ipvs/ip_vs_lblc.c Thu Oct 2 01:28:17 2003 @@ -458,10 +458,11 @@ * The server with weight=0 is quiesced and will not receive any * new connection. */ - list_for_each_entry(least, &svc->destinations, n_list) { - if (least->flags & IP_VS_DEST_F_OVERLOAD) + list_for_each_entry(dest, &svc->destinations, n_list) { + if (dest->flags & IP_VS_DEST_F_OVERLOAD) continue; - if (atomic_read(&least->weight) > 0) { + if (atomic_read(&dest->weight) > 0) { + least = dest; loh = atomic_read(&least->activeconns) * 50 + atomic_read(&least->inactconns); goto nextstage; @@ -473,7 +474,7 @@ * Find the destination with the least load. */ nextstage: - list_for_each_entry(dest, &svc->destinations, n_list) { + list_for_each_entry_continue(dest, &svc->destinations, n_list) { if (dest->flags & IP_VS_DEST_F_OVERLOAD) continue; diff -Nru a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c --- a/net/ipv4/ipvs/ip_vs_lblcr.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/ipvs/ip_vs_lblcr.c Thu Oct 2 01:28:17 2003 @@ -711,11 +711,12 @@ * The server with weight=0 is quiesced and will not receive any * new connection. */ - list_for_each_entry(least, &svc->destinations, n_list) { - if (least->flags & IP_VS_DEST_F_OVERLOAD) + list_for_each_entry(dest, &svc->destinations, n_list) { + if (dest->flags & IP_VS_DEST_F_OVERLOAD) continue; - if (atomic_read(&least->weight) > 0) { + if (atomic_read(&dest->weight) > 0) { + least = dest; loh = atomic_read(&least->activeconns) * 50 + atomic_read(&least->inactconns); goto nextstage; @@ -727,7 +728,7 @@ * Find the destination with the least load. */ nextstage: - list_for_each_entry(dest, &svc->destinations, n_list) { + list_for_each_entry_continue(dest, &svc->destinations, n_list) { if (dest->flags & IP_VS_DEST_F_OVERLOAD) continue; diff -Nru a/net/ipv4/ipvs/ip_vs_lc.c b/net/ipv4/ipvs/ip_vs_lc.c --- a/net/ipv4/ipvs/ip_vs_lc.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/ipvs/ip_vs_lc.c Thu Oct 2 01:28:18 2003 @@ -65,8 +65,8 @@ static struct ip_vs_dest * ip_vs_lc_schedule(struct ip_vs_service *svc, struct iphdr *iph) { - struct ip_vs_dest *dest, *least; - unsigned int loh, doh; + struct ip_vs_dest *dest, *least = NULL; + unsigned int loh = 0, doh; IP_VS_DBG(6, "ip_vs_lc_schedule(): Scheduling...\n"); @@ -79,31 +79,18 @@ * served, but no new connection is assigned to the server. */ - list_for_each_entry(least, &svc->destinations, n_list) { - if (least->flags & IP_VS_DEST_F_OVERLOAD) - continue; - if (atomic_read(&least->weight) > 0) { - loh = ip_vs_lc_dest_overhead(least); - goto nextstage; - } - } - return NULL; - - /* - * Find the destination with the least load. - */ - nextstage: list_for_each_entry(dest, &svc->destinations, n_list) { if ((dest->flags & IP_VS_DEST_F_OVERLOAD) || atomic_read(&dest->weight) == 0) continue; doh = ip_vs_lc_dest_overhead(dest); - if (doh < loh) { + if (!least || doh < loh) { least = dest; loh = doh; } } + if (least) IP_VS_DBG(6, "LC: server %u.%u.%u.%u:%u activeconns %d inactconns %d\n", NIPQUAD(least->addr), ntohs(least->port), atomic_read(&least->activeconns), diff -Nru a/net/ipv4/ipvs/ip_vs_nq.c b/net/ipv4/ipvs/ip_vs_nq.c --- a/net/ipv4/ipvs/ip_vs_nq.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/ipvs/ip_vs_nq.c Thu Oct 2 01:28:18 2003 @@ -81,8 +81,8 @@ static struct ip_vs_dest * ip_vs_nq_schedule(struct ip_vs_service *svc, struct iphdr *iph) { - struct ip_vs_dest *dest, *least; - unsigned int loh, doh; + struct ip_vs_dest *dest, *least = NULL; + unsigned int loh = 0, doh; IP_VS_DBG(6, "ip_vs_nq_schedule(): Scheduling...\n"); @@ -99,27 +99,10 @@ * new connections. */ - list_for_each_entry(least, &svc->destinations, n_list) { - if (!(least->flags & IP_VS_DEST_F_OVERLOAD) && - atomic_read(&least->weight) > 0) { - loh = ip_vs_nq_dest_overhead(least); - - /* return the server directly if it is idle */ - if (atomic_read(&least->activeconns) == 0) - goto out; - - goto nextstage; - } - } - return NULL; - - /* - * Find the destination with the least load. - */ - nextstage: list_for_each_entry(dest, &svc->destinations, n_list) { - if (dest->flags & IP_VS_DEST_F_OVERLOAD) + if (dest->flags & IP_VS_DEST_F_OVERLOAD || + !atomic_read(&dest->weight)) continue; doh = ip_vs_nq_dest_overhead(dest); @@ -127,15 +110,20 @@ /* return the server directly if it is idle */ if (atomic_read(&dest->activeconns) == 0) { least = dest; + loh = doh; goto out; } - if (loh * atomic_read(&dest->weight) > - doh * atomic_read(&least->weight)) { + if (!least || + (loh * atomic_read(&dest->weight) > + doh * atomic_read(&least->weight))) { least = dest; loh = doh; } } + + if (!least) + return NULL; out: IP_VS_DBG(6, "NQ: server %u.%u.%u.%u:%u " diff -Nru a/net/ipv4/ipvs/ip_vs_sed.c b/net/ipv4/ipvs/ip_vs_sed.c --- a/net/ipv4/ipvs/ip_vs_sed.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/ipvs/ip_vs_sed.c Thu Oct 2 01:28:18 2003 @@ -103,9 +103,10 @@ * new connections. */ - list_for_each_entry(least, &svc->destinations, n_list) { - if (!(least->flags & IP_VS_DEST_F_OVERLOAD) && - atomic_read(&least->weight) > 0) { + list_for_each_entry(dest, &svc->destinations, n_list) { + if (!(dest->flags & IP_VS_DEST_F_OVERLOAD) && + atomic_read(&dest->weight) > 0) { + least = dest; loh = ip_vs_sed_dest_overhead(least); goto nextstage; } @@ -116,7 +117,7 @@ * Find the destination with the least load. */ nextstage: - list_for_each_entry(dest, &svc->destinations, n_list) { + list_for_each_entry_continue(dest, &svc->destinations, n_list) { if (dest->flags & IP_VS_DEST_F_OVERLOAD) continue; doh = ip_vs_sed_dest_overhead(dest); diff -Nru a/net/ipv4/ipvs/ip_vs_wlc.c b/net/ipv4/ipvs/ip_vs_wlc.c --- a/net/ipv4/ipvs/ip_vs_wlc.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/ipvs/ip_vs_wlc.c Thu Oct 2 01:28:17 2003 @@ -91,9 +91,10 @@ * new connections. */ - list_for_each_entry(least, &svc->destinations, n_list) { - if (!(least->flags & IP_VS_DEST_F_OVERLOAD) && - atomic_read(&least->weight) > 0) { + list_for_each_entry(dest, &svc->destinations, n_list) { + if (!(dest->flags & IP_VS_DEST_F_OVERLOAD) && + atomic_read(&dest->weight) > 0) { + least = dest; loh = ip_vs_wlc_dest_overhead(least); goto nextstage; } @@ -104,7 +105,7 @@ * Find the destination with the least load. */ nextstage: - list_for_each_entry(dest, &svc->destinations, n_list) { + list_for_each_entry_continue(dest, &svc->destinations, n_list) { if (dest->flags & IP_VS_DEST_F_OVERLOAD) continue; doh = ip_vs_wlc_dest_overhead(dest); diff -Nru a/net/ipv4/ipvs/ip_vs_wrr.c b/net/ipv4/ipvs/ip_vs_wrr.c --- a/net/ipv4/ipvs/ip_vs_wrr.c Thu Oct 2 01:28:15 2003 +++ b/net/ipv4/ipvs/ip_vs_wrr.c Thu Oct 2 01:28:15 2003 @@ -58,26 +58,18 @@ { struct ip_vs_dest *dest; int weight; - int g = 1; + int g = 0; list_for_each_entry(dest, &svc->destinations, n_list) { weight = atomic_read(&dest->weight); if (weight > 0) { - g = weight; - goto search_gcd; + if (g > 0) + g = gcd(weight, g); + else + g = weight; } } - - return g; - - search_gcd: - list_for_each_entry(dest, &svc->destinations, n_list) { - weight = atomic_read(&dest->weight); - if (weight > 0) - g = gcd(weight, g); - } - - return g; + return g ? g : 1; } diff -Nru a/net/ipv4/protocol.c b/net/ipv4/protocol.c --- a/net/ipv4/protocol.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/protocol.c Thu Oct 2 01:28:16 2003 @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -95,3 +96,6 @@ return ret; } + +EXPORT_SYMBOL(inet_add_protocol); +EXPORT_SYMBOL(inet_del_protocol); diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/route.c Thu Oct 2 01:28:18 2003 @@ -62,6 +62,7 @@ */ #include +#include #include #include #include @@ -2823,3 +2824,7 @@ rc = -ENOMEM; goto out; } + +EXPORT_SYMBOL(__ip_select_ident); +EXPORT_SYMBOL(ip_route_input); +EXPORT_SYMBOL(ip_route_output_key); diff -Nru a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c --- a/net/ipv4/sysctl_net_ipv4.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/sysctl_net_ipv4.c Thu Oct 2 01:28:17 2003 @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -587,3 +588,5 @@ }; #endif /* CONFIG_SYSCTL */ + +EXPORT_SYMBOL(ipv4_config); diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/tcp.c Thu Oct 2 01:28:16 2003 @@ -248,6 +248,7 @@ */ #include +#include #include #include #include @@ -2682,3 +2683,26 @@ tcpdiag_init(); } + +EXPORT_SYMBOL(__tcp_mem_reclaim); +EXPORT_SYMBOL(sysctl_tcp_rmem); +EXPORT_SYMBOL(sysctl_tcp_wmem); +EXPORT_SYMBOL(tcp_accept); +EXPORT_SYMBOL(tcp_close); +EXPORT_SYMBOL(tcp_close_state); +EXPORT_SYMBOL(tcp_destroy_sock); +EXPORT_SYMBOL(tcp_disconnect); +EXPORT_SYMBOL(tcp_getsockopt); +EXPORT_SYMBOL(tcp_ioctl); +EXPORT_SYMBOL(tcp_openreq_cachep); +EXPORT_SYMBOL(tcp_poll); +EXPORT_SYMBOL(tcp_read_sock); +EXPORT_SYMBOL(tcp_recvmsg); +EXPORT_SYMBOL(tcp_sendmsg); +EXPORT_SYMBOL(tcp_sendpage); +EXPORT_SYMBOL(tcp_setsockopt); +EXPORT_SYMBOL(tcp_shutdown); +EXPORT_SYMBOL(tcp_sockets_allocated); +EXPORT_SYMBOL(tcp_statistics); +EXPORT_SYMBOL(tcp_timewait_cachep); +EXPORT_SYMBOL(tcp_write_space); diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/tcp_input.c Thu Oct 2 01:28:17 2003 @@ -65,6 +65,7 @@ #include #include +#include #include #include #include @@ -4089,3 +4090,10 @@ } return 0; } + +EXPORT_SYMBOL(sysctl_tcp_ecn); +EXPORT_SYMBOL(sysctl_tcp_reordering); +EXPORT_SYMBOL(tcp_cwnd_application_limited); +EXPORT_SYMBOL(tcp_parse_options); +EXPORT_SYMBOL(tcp_rcv_established); +EXPORT_SYMBOL(tcp_rcv_state_process); diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/tcp_ipv4.c Thu Oct 2 01:28:16 2003 @@ -56,6 +56,7 @@ #include #include +#include #include #include #include @@ -2644,3 +2645,32 @@ */ tcp_socket->sk->sk_prot->unhash(tcp_socket->sk); } + +EXPORT_SYMBOL(ipv4_specific); +EXPORT_SYMBOL(tcp_bind_hash); +EXPORT_SYMBOL(tcp_bucket_create); +EXPORT_SYMBOL(tcp_hashinfo); +EXPORT_SYMBOL(tcp_inherit_port); +EXPORT_SYMBOL(tcp_listen_wlock); +EXPORT_SYMBOL(tcp_port_rover); +EXPORT_SYMBOL(tcp_prot); +EXPORT_SYMBOL(tcp_put_port); +EXPORT_SYMBOL(tcp_unhash); +EXPORT_SYMBOL(tcp_v4_conn_request); +EXPORT_SYMBOL(tcp_v4_connect); +EXPORT_SYMBOL(tcp_v4_do_rcv); +EXPORT_SYMBOL(tcp_v4_lookup_listener); +EXPORT_SYMBOL(tcp_v4_rebuild_header); +EXPORT_SYMBOL(tcp_v4_remember_stamp); +EXPORT_SYMBOL(tcp_v4_send_check); +EXPORT_SYMBOL(tcp_v4_syn_recv_sock); + +#ifdef CONFIG_PROC_FS +EXPORT_SYMBOL(tcp_proc_register); +EXPORT_SYMBOL(tcp_proc_unregister); +#endif +#ifdef CONFIG_SYSCTL +EXPORT_SYMBOL(sysctl_local_port_range); +EXPORT_SYMBOL(sysctl_max_syn_backlog); +EXPORT_SYMBOL(sysctl_tcp_low_latency); +#endif diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c --- a/net/ipv4/tcp_minisocks.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/tcp_minisocks.c Thu Oct 2 01:28:17 2003 @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -1053,3 +1054,13 @@ sock_put(child); return ret; } + +EXPORT_SYMBOL(tcp_check_req); +EXPORT_SYMBOL(tcp_child_process); +EXPORT_SYMBOL(tcp_create_openreq_child); +EXPORT_SYMBOL(tcp_timewait_state_process); +EXPORT_SYMBOL(tcp_tw_deschedule); + +#ifdef CONFIG_SYSCTL +EXPORT_SYMBOL(sysctl_tcp_tw_recycle); +#endif diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c Thu Oct 2 01:28:17 2003 +++ b/net/ipv4/tcp_output.c Thu Oct 2 01:28:17 2003 @@ -39,6 +39,7 @@ #include #include +#include #include /* People can turn this off for buggy TCP's found in printers etc. */ @@ -1542,3 +1543,14 @@ min(tp->rto << tp->backoff, TCP_RESOURCE_PROBE_INTERVAL)); } } + +EXPORT_SYMBOL(tcp_acceptable_seq); +EXPORT_SYMBOL(tcp_connect); +EXPORT_SYMBOL(tcp_connect_init); +EXPORT_SYMBOL(tcp_make_synack); +EXPORT_SYMBOL(tcp_send_synack); +EXPORT_SYMBOL(tcp_simple_retransmit); +EXPORT_SYMBOL(tcp_sync_mss); +EXPORT_SYMBOL(tcp_transmit_skb); +EXPORT_SYMBOL(tcp_write_wakeup); +EXPORT_SYMBOL(tcp_write_xmit); diff -Nru a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c --- a/net/ipv4/tcp_timer.c Thu Oct 2 01:28:18 2003 +++ b/net/ipv4/tcp_timer.c Thu Oct 2 01:28:18 2003 @@ -20,6 +20,7 @@ * Jorge Cwik, */ +#include #include int sysctl_tcp_syn_retries = TCP_SYN_RETRIES; @@ -656,3 +657,8 @@ bh_unlock_sock(sk); sock_put(sk); } + +EXPORT_SYMBOL(tcp_clear_xmit_timers); +EXPORT_SYMBOL(tcp_delete_keepalive_timer); +EXPORT_SYMBOL(tcp_init_xmit_timers); +EXPORT_SYMBOL(tcp_reset_keepalive_timer); diff -Nru a/net/ipv4/udp.c b/net/ipv4/udp.c --- a/net/ipv4/udp.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/udp.c Thu Oct 2 01:28:16 2003 @@ -83,6 +83,7 @@ #include #include #include +#include #include #include #include @@ -1532,3 +1533,17 @@ udp_proc_unregister(&udp4_seq_afinfo); } #endif /* CONFIG_PROC_FS */ + +EXPORT_SYMBOL(udp_connect); +EXPORT_SYMBOL(udp_disconnect); +EXPORT_SYMBOL(udp_hash); +EXPORT_SYMBOL(udp_hash_lock); +EXPORT_SYMBOL(udp_ioctl); +EXPORT_SYMBOL(udp_port_rover); +EXPORT_SYMBOL(udp_prot); +EXPORT_SYMBOL(udp_sendmsg); + +#ifdef CONFIG_PROC_FS +EXPORT_SYMBOL(udp_proc_register); +EXPORT_SYMBOL(udp_proc_unregister); +#endif diff -Nru a/net/ipv4/utils.c b/net/ipv4/utils.c --- a/net/ipv4/utils.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/utils.c Thu Oct 2 01:28:16 2003 @@ -21,6 +21,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include @@ -55,3 +56,4 @@ return(htonl(l)); } +EXPORT_SYMBOL(in_aton); diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c --- a/net/ipv4/xfrm4_tunnel.c Thu Oct 2 01:28:16 2003 +++ b/net/ipv4/xfrm4_tunnel.c Thu Oct 2 01:28:16 2003 @@ -169,6 +169,7 @@ static struct inet_protocol ipip_protocol = { .handler = ipip_rcv, .err_handler = ipip_err, + .no_policy = 1, }; static int __init ipip_init(void) diff -Nru a/net/irda/irda_device.c b/net/irda/irda_device.c --- a/net/irda/irda_device.c Thu Oct 2 01:28:16 2003 +++ b/net/irda/irda_device.c Thu Oct 2 01:28:16 2003 @@ -378,8 +378,6 @@ dev->hard_header_len = 0; dev->addr_len = 0; - dev->destructor = free_netdev; - dev->type = ARPHRD_IRDA; dev->tx_queue_len = 8; /* Window size + 1 s-frame */ @@ -388,6 +386,17 @@ dev->mtu = 2048; dev->flags = IFF_NOARP; } + +/* + * Funciton alloc_irdadev + * Allocates and sets up an IRDA device in a manner similar to + * alloc_etherdev. + */ +struct net_device *alloc_irdadev(int sizeof_priv) +{ + return alloc_netdev(sizeof_priv, "irda%d", irda_device_setup); +} + /* * Function irda_device_txqueue_empty (dev) diff -Nru a/net/irda/irsyms.c b/net/irda/irsyms.c --- a/net/irda/irsyms.c Thu Oct 2 01:28:17 2003 +++ b/net/irda/irsyms.c Thu Oct 2 01:28:17 2003 @@ -150,6 +150,7 @@ EXPORT_SYMBOL(irda_init_max_qos_capabilies); EXPORT_SYMBOL(irda_qos_bits_to_value); EXPORT_SYMBOL(irda_device_setup); +EXPORT_SYMBOL(alloc_irdadev); EXPORT_SYMBOL(irda_device_set_media_busy); EXPORT_SYMBOL(irda_device_txqueue_empty); diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c --- a/net/netlink/af_netlink.c Thu Oct 2 01:28:17 2003 +++ b/net/netlink/af_netlink.c Thu Oct 2 01:28:17 2003 @@ -1133,4 +1133,22 @@ module_exit(netlink_proto_exit); MODULE_LICENSE("GPL"); + MODULE_ALIAS_NETPROTO(PF_NETLINK); + +EXPORT_SYMBOL(netlink_ack); +EXPORT_SYMBOL(netlink_broadcast); +EXPORT_SYMBOL(netlink_broadcast_deliver); +EXPORT_SYMBOL(netlink_dump_start); +EXPORT_SYMBOL(netlink_kernel_create); +EXPORT_SYMBOL(netlink_register_notifier); +EXPORT_SYMBOL(netlink_set_err); +EXPORT_SYMBOL(netlink_set_nonroot); +EXPORT_SYMBOL(netlink_unicast); +EXPORT_SYMBOL(netlink_unregister_notifier); + +#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE) +EXPORT_SYMBOL(netlink_attach); +EXPORT_SYMBOL(netlink_detach); +EXPORT_SYMBOL(netlink_post); +#endif diff -Nru a/net/netsyms.c b/net/netsyms.c --- a/net/netsyms.c Thu Oct 2 01:28:16 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,640 +0,0 @@ -/* - * linux/net/netsyms.c - * - * Symbol table for the linux networking subsystem. Moved here to - * make life simpler in ksyms.c. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_HIPPI -#include -#endif -#include -#include -#include -#include -#include -#ifdef CONFIG_NET_DIVERT -#include -#endif /* CONFIG_NET_DIVERT */ - -#ifdef CONFIG_NET -extern __u32 sysctl_wmem_max; -extern __u32 sysctl_rmem_max; -#endif - -#ifdef CONFIG_INET -#include -#include -#include -#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#if defined(CONFIG_INET_AH) || defined(CONFIG_INET_AH_MODULE) || defined(CONFIG_INET6_AH) || defined(CONFIG_INET6_AH_MODULE) -#include -#endif -#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE) -#include -#endif - -extern struct net_proto_family inet_family_ops; - -#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) \ - || defined (CONFIG_IP_SCTP_MODULE) -#include -#include -#include -#include -#include -#include - -extern int sysctl_local_port_range[2]; -extern int tcp_port_rover; -extern int udp_port_rover; -#endif - -#endif - -#include - -#ifdef CONFIG_IPX_MODULE -extern struct datalink_proto *make_EII_client(void); -extern struct datalink_proto *make_8023_client(void); -extern void destroy_EII_client(struct datalink_proto *); -extern void destroy_8023_client(struct datalink_proto *); -#endif - -#ifdef CONFIG_ATALK_MODULE -#include -#endif - -#ifdef CONFIG_SYSCTL -extern int sysctl_max_syn_backlog; -#endif - -/* Skbuff symbols. */ -EXPORT_SYMBOL(skb_over_panic); -EXPORT_SYMBOL(skb_under_panic); - -/* Socket layer registration */ -EXPORT_SYMBOL(sock_register); -EXPORT_SYMBOL(sock_unregister); - -/* Socket locking */ -EXPORT_SYMBOL(__lock_sock); -EXPORT_SYMBOL(__release_sock); - -/* Socket layer support routines */ -EXPORT_SYMBOL(memcpy_fromiovec); -EXPORT_SYMBOL(memcpy_tokerneliovec); -EXPORT_SYMBOL(sock_create); -EXPORT_SYMBOL(sock_alloc); -EXPORT_SYMBOL(sock_release); -EXPORT_SYMBOL(sock_setsockopt); -EXPORT_SYMBOL(sock_getsockopt); -EXPORT_SYMBOL(sock_sendmsg); -EXPORT_SYMBOL(sock_recvmsg); -EXPORT_SYMBOL(sk_alloc); -EXPORT_SYMBOL(sk_free); -EXPORT_SYMBOL(sk_send_sigurg); -EXPORT_SYMBOL(sock_wake_async); -EXPORT_SYMBOL(sock_alloc_send_skb); -EXPORT_SYMBOL(sock_alloc_send_pskb); -EXPORT_SYMBOL(sock_init_data); -EXPORT_SYMBOL(sock_no_release); -EXPORT_SYMBOL(sock_no_bind); -EXPORT_SYMBOL(sock_no_connect); -EXPORT_SYMBOL(sock_no_socketpair); -EXPORT_SYMBOL(sock_no_accept); -EXPORT_SYMBOL(sock_no_getname); -EXPORT_SYMBOL(sock_no_poll); -EXPORT_SYMBOL(sock_no_ioctl); -EXPORT_SYMBOL(sock_no_listen); -EXPORT_SYMBOL(sock_no_shutdown); -EXPORT_SYMBOL(sock_no_getsockopt); -EXPORT_SYMBOL(sock_no_setsockopt); -EXPORT_SYMBOL(sock_no_sendmsg); -EXPORT_SYMBOL(sock_no_recvmsg); -EXPORT_SYMBOL(sock_no_mmap); -EXPORT_SYMBOL(sock_no_sendpage); -EXPORT_SYMBOL(sock_rfree); -EXPORT_SYMBOL(sock_wfree); -EXPORT_SYMBOL(sock_wmalloc); -EXPORT_SYMBOL(sock_rmalloc); -EXPORT_SYMBOL(__skb_linearize); -EXPORT_SYMBOL(skb_checksum); -EXPORT_SYMBOL(skb_checksum_help); -EXPORT_SYMBOL(skb_recv_datagram); -EXPORT_SYMBOL(skb_free_datagram); -EXPORT_SYMBOL(skb_copy_datagram); -EXPORT_SYMBOL(skb_copy_datagram_iovec); -EXPORT_SYMBOL(skb_copy_and_csum_datagram_iovec); -EXPORT_SYMBOL(skb_copy_bits); -EXPORT_SYMBOL(skb_copy_and_csum_bits); -EXPORT_SYMBOL(skb_copy_and_csum_dev); -EXPORT_SYMBOL(skb_copy_expand); -EXPORT_SYMBOL(___pskb_trim); -EXPORT_SYMBOL(__pskb_pull_tail); -EXPORT_SYMBOL(pskb_expand_head); -EXPORT_SYMBOL(pskb_copy); -EXPORT_SYMBOL(skb_realloc_headroom); -EXPORT_SYMBOL(datagram_poll); -EXPORT_SYMBOL(put_cmsg); -EXPORT_SYMBOL(sock_kmalloc); -EXPORT_SYMBOL(sock_kfree_s); -EXPORT_SYMBOL(sock_map_fd); -EXPORT_SYMBOL(sockfd_lookup); - -EXPORT_SYMBOL(sk_run_filter); -EXPORT_SYMBOL(sk_chk_filter); - -EXPORT_SYMBOL(neigh_table_init); -EXPORT_SYMBOL(neigh_table_clear); -EXPORT_SYMBOL(neigh_resolve_output); -EXPORT_SYMBOL(neigh_connected_output); -EXPORT_SYMBOL(neigh_update); -EXPORT_SYMBOL(neigh_create); -EXPORT_SYMBOL(neigh_lookup); -EXPORT_SYMBOL(__neigh_event_send); -EXPORT_SYMBOL(neigh_event_ns); -EXPORT_SYMBOL(neigh_ifdown); -#ifdef CONFIG_ARPD -EXPORT_SYMBOL(neigh_app_ns); -#endif -#ifdef CONFIG_SYSCTL -EXPORT_SYMBOL(neigh_sysctl_register); -EXPORT_SYMBOL(neigh_sysctl_unregister); -#endif -EXPORT_SYMBOL(pneigh_lookup); -EXPORT_SYMBOL(pneigh_enqueue); -EXPORT_SYMBOL(neigh_destroy); -EXPORT_SYMBOL(neigh_parms_alloc); -EXPORT_SYMBOL(neigh_parms_release); -EXPORT_SYMBOL(neigh_rand_reach_time); -EXPORT_SYMBOL(neigh_compat_output); -EXPORT_SYMBOL(neigh_changeaddr); - -/* dst_entry */ -EXPORT_SYMBOL(dst_alloc); -EXPORT_SYMBOL(__dst_free); -EXPORT_SYMBOL(dst_destroy); - -/* misc. support routines */ -EXPORT_SYMBOL(net_ratelimit); -EXPORT_SYMBOL(net_random); -EXPORT_SYMBOL(net_srandom); - -/* Needed by smbfs.o */ -EXPORT_SYMBOL(__scm_destroy); -EXPORT_SYMBOL(__scm_send); - -/* Needed by unix.o */ -EXPORT_SYMBOL(scm_fp_dup); -EXPORT_SYMBOL(files_stat); -EXPORT_SYMBOL(memcpy_toiovec); - -#ifdef CONFIG_IPX_MODULE -EXPORT_SYMBOL(make_8023_client); -EXPORT_SYMBOL(destroy_8023_client); -EXPORT_SYMBOL(make_EII_client); -EXPORT_SYMBOL(destroy_EII_client); -#endif - -/* for 801q VLAN support */ -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) -EXPORT_SYMBOL(dev_change_flags); -#endif - -EXPORT_SYMBOL(scm_detach_fds); - -#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) -EXPORT_SYMBOL(br_handle_frame_hook); -#endif - -#ifdef CONFIG_NET_DIVERT -EXPORT_SYMBOL(alloc_divert_blk); -EXPORT_SYMBOL(free_divert_blk); -#endif /* CONFIG_NET_DIVERT */ - -#ifdef CONFIG_INET -/* Internet layer registration */ -EXPORT_SYMBOL(inetdev_lock); -EXPORT_SYMBOL(inet_add_protocol); -EXPORT_SYMBOL(inet_del_protocol); -EXPORT_SYMBOL(inet_register_protosw); -EXPORT_SYMBOL(inet_unregister_protosw); -EXPORT_SYMBOL(ip_route_output_key); -EXPORT_SYMBOL(ip_route_input); -EXPORT_SYMBOL(icmp_send); -EXPORT_SYMBOL(icmp_statistics); -EXPORT_SYMBOL(icmp_err_convert); -EXPORT_SYMBOL(ip_options_compile); -EXPORT_SYMBOL(ip_options_undo); -EXPORT_SYMBOL(arp_send); -EXPORT_SYMBOL(arp_broken_ops); -EXPORT_SYMBOL(__ip_select_ident); -EXPORT_SYMBOL(ip_send_check); -EXPORT_SYMBOL(ip_fragment); -EXPORT_SYMBOL(inet_family_ops); -EXPORT_SYMBOL(in_aton); -EXPORT_SYMBOL(ip_mc_inc_group); -EXPORT_SYMBOL(ip_mc_dec_group); -EXPORT_SYMBOL(ip_mc_join_group); -EXPORT_SYMBOL(ip_finish_output); -EXPORT_SYMBOL(inet_stream_ops); -EXPORT_SYMBOL(inet_dgram_ops); -EXPORT_SYMBOL(ip_cmsg_recv); -EXPORT_SYMBOL(inet_addr_type); -EXPORT_SYMBOL(inet_select_addr); -EXPORT_SYMBOL(ip_dev_find); -EXPORT_SYMBOL(inetdev_by_index); -EXPORT_SYMBOL(in_dev_finish_destroy); -EXPORT_SYMBOL(ip_defrag); -EXPORT_SYMBOL(inet_peer_idlock); - -/* Route manipulation */ -EXPORT_SYMBOL(ip_rt_ioctl); -EXPORT_SYMBOL(devinet_ioctl); -EXPORT_SYMBOL(register_inetaddr_notifier); -EXPORT_SYMBOL(unregister_inetaddr_notifier); - -/* proc */ -#ifdef CONFIG_PROC_FS -EXPORT_SYMBOL(udp_proc_register); -EXPORT_SYMBOL(udp_proc_unregister); -EXPORT_SYMBOL(tcp_proc_register); -EXPORT_SYMBOL(tcp_proc_unregister); -#endif - -/* needed for ip_gre -cw */ -EXPORT_SYMBOL(ip_statistics); -#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE) -EXPORT_SYMBOL_GPL(skb_cow_data); -EXPORT_SYMBOL_GPL(pskb_put); -EXPORT_SYMBOL_GPL(skb_to_sgvec); -#endif - -EXPORT_SYMBOL(flow_cache_lookup); -EXPORT_SYMBOL(flow_cache_genid); - -#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_IP_SCTP_MODULE) -/* inet functions common to v4 and v6 */ -EXPORT_SYMBOL(inet_release); -EXPORT_SYMBOL(inet_stream_connect); -EXPORT_SYMBOL(inet_dgram_connect); -EXPORT_SYMBOL(inet_accept); -EXPORT_SYMBOL(inet_listen); -EXPORT_SYMBOL(inet_shutdown); -EXPORT_SYMBOL(inet_setsockopt); -EXPORT_SYMBOL(inet_getsockopt); -EXPORT_SYMBOL(inet_sendmsg); -EXPORT_SYMBOL(inet_recvmsg); -#ifdef INET_REFCNT_DEBUG -EXPORT_SYMBOL(inet_sock_nr); -#endif -EXPORT_SYMBOL(inet_sock_destruct); -EXPORT_SYMBOL(inet_sock_release); - -/* Socket demultiplexing. */ -EXPORT_SYMBOL(tcp_hashinfo); -EXPORT_SYMBOL(tcp_listen_wlock); -EXPORT_SYMBOL(udp_hash); -EXPORT_SYMBOL(udp_hash_lock); - -EXPORT_SYMBOL(tcp_destroy_sock); -EXPORT_SYMBOL(ip_queue_xmit); -EXPORT_SYMBOL(memcpy_fromiovecend); -EXPORT_SYMBOL(csum_partial_copy_fromiovecend); -EXPORT_SYMBOL(tcp_v4_lookup_listener); -/* UDP/TCP exported functions for TCPv6 */ -EXPORT_SYMBOL(udp_ioctl); -EXPORT_SYMBOL(udp_connect); -EXPORT_SYMBOL(udp_disconnect); -EXPORT_SYMBOL(udp_sendmsg); -EXPORT_SYMBOL(tcp_bind_hash); -EXPORT_SYMBOL(tcp_close); -EXPORT_SYMBOL(tcp_disconnect); -EXPORT_SYMBOL(tcp_accept); -EXPORT_SYMBOL(tcp_write_wakeup); -EXPORT_SYMBOL(tcp_write_space); -EXPORT_SYMBOL(tcp_poll); -EXPORT_SYMBOL(tcp_ioctl); -EXPORT_SYMBOL(tcp_shutdown); -EXPORT_SYMBOL(tcp_setsockopt); -EXPORT_SYMBOL(tcp_getsockopt); -EXPORT_SYMBOL(tcp_recvmsg); -EXPORT_SYMBOL(tcp_send_synack); -EXPORT_SYMBOL(tcp_check_req); -EXPORT_SYMBOL(tcp_child_process); -EXPORT_SYMBOL(tcp_parse_options); -EXPORT_SYMBOL(tcp_rcv_established); -EXPORT_SYMBOL(tcp_init_xmit_timers); -EXPORT_SYMBOL(tcp_clear_xmit_timers); -EXPORT_SYMBOL(tcp_statistics); -EXPORT_SYMBOL(tcp_rcv_state_process); -EXPORT_SYMBOL(tcp_timewait_state_process); -EXPORT_SYMBOL(tcp_timewait_cachep); -EXPORT_SYMBOL(tcp_sendmsg); -EXPORT_SYMBOL(tcp_v4_rebuild_header); -EXPORT_SYMBOL(tcp_v4_send_check); -EXPORT_SYMBOL(tcp_v4_conn_request); -EXPORT_SYMBOL(tcp_create_openreq_child); -EXPORT_SYMBOL(tcp_bucket_create); -EXPORT_SYMBOL(tcp_put_port); -EXPORT_SYMBOL(tcp_inherit_port); -EXPORT_SYMBOL(tcp_v4_syn_recv_sock); -EXPORT_SYMBOL(tcp_v4_do_rcv); -EXPORT_SYMBOL(tcp_v4_connect); -EXPORT_SYMBOL(tcp_unhash); -EXPORT_SYMBOL(udp_prot); -EXPORT_SYMBOL(tcp_prot); -EXPORT_SYMBOL(tcp_openreq_cachep); -EXPORT_SYMBOL(ipv4_specific); -EXPORT_SYMBOL(tcp_simple_retransmit); -EXPORT_SYMBOL(tcp_transmit_skb); -EXPORT_SYMBOL(tcp_connect); -EXPORT_SYMBOL(tcp_make_synack); -EXPORT_SYMBOL(tcp_tw_deschedule); -EXPORT_SYMBOL(tcp_delete_keepalive_timer); -EXPORT_SYMBOL(tcp_reset_keepalive_timer); -EXPORT_SYMBOL(sysctl_local_port_range); -EXPORT_SYMBOL(tcp_port_rover); -EXPORT_SYMBOL(udp_port_rover); -EXPORT_SYMBOL(tcp_sync_mss); -EXPORT_SYMBOL(net_statistics); -EXPORT_SYMBOL(__tcp_mem_reclaim); -EXPORT_SYMBOL(tcp_sockets_allocated); -EXPORT_SYMBOL(sysctl_tcp_reordering); -EXPORT_SYMBOL(sysctl_tcp_rmem); -EXPORT_SYMBOL(sysctl_tcp_wmem); -EXPORT_SYMBOL(sysctl_tcp_ecn); -EXPORT_SYMBOL(tcp_cwnd_application_limited); -EXPORT_SYMBOL(tcp_sendpage); -EXPORT_SYMBOL(sysctl_tcp_low_latency); - -EXPORT_SYMBOL(tcp_write_xmit); - -EXPORT_SYMBOL(tcp_v4_remember_stamp); - -extern int sysctl_tcp_tw_recycle; - -#ifdef CONFIG_SYSCTL -EXPORT_SYMBOL(sysctl_tcp_tw_recycle); -EXPORT_SYMBOL(sysctl_max_syn_backlog); -#endif - -EXPORT_SYMBOL(ip_generic_getfrag); - -#endif - -EXPORT_SYMBOL(tcp_read_sock); - -#ifdef CONFIG_IP_SCTP_MODULE -EXPORT_SYMBOL(ip_setsockopt); -EXPORT_SYMBOL(ip_getsockopt); -EXPORT_SYMBOL(inet_ioctl); -EXPORT_SYMBOL(inet_bind); -EXPORT_SYMBOL(inet_getname); -#endif /* CONFIG_IP_SCTP_MODULE */ - -EXPORT_SYMBOL(netlink_set_err); -EXPORT_SYMBOL(netlink_broadcast); -EXPORT_SYMBOL(netlink_unicast); -EXPORT_SYMBOL(netlink_kernel_create); -EXPORT_SYMBOL(netlink_dump_start); -EXPORT_SYMBOL(netlink_ack); -EXPORT_SYMBOL(netlink_set_nonroot); -EXPORT_SYMBOL(netlink_register_notifier); -EXPORT_SYMBOL(netlink_unregister_notifier); -#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE) -EXPORT_SYMBOL(netlink_attach); -EXPORT_SYMBOL(netlink_detach); -EXPORT_SYMBOL(netlink_post); -#endif - -EXPORT_SYMBOL(rtattr_parse); -EXPORT_SYMBOL(__rta_fill); -EXPORT_SYMBOL(neigh_delete); -EXPORT_SYMBOL(neigh_add); -EXPORT_SYMBOL(neigh_dump_info); - - -/* ABI emulation layers need this */ -EXPORT_SYMBOL(move_addr_to_kernel); -EXPORT_SYMBOL(move_addr_to_user); - -/* Used by at least ipip.c. */ -EXPORT_SYMBOL(ipv4_config); - -/* Used by other modules */ -EXPORT_SYMBOL(xrlim_allow); - -EXPORT_SYMBOL(ip_rcv); -EXPORT_SYMBOL(arp_rcv); -EXPORT_SYMBOL(arp_tbl); -#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) -EXPORT_SYMBOL(clip_tbl_hook); -#endif -EXPORT_SYMBOL(arp_find); - -#endif /* CONFIG_INET */ - -#ifdef CONFIG_TR -EXPORT_SYMBOL(tr_source_route); -EXPORT_SYMBOL(tr_type_trans); -#endif - -/* Device callback registration */ -EXPORT_SYMBOL(register_netdevice_notifier); -EXPORT_SYMBOL(unregister_netdevice_notifier); -EXPORT_SYMBOL(call_netdevice_notifiers); - -/* support for loadable net drivers */ -#ifdef CONFIG_NET -EXPORT_SYMBOL(loopback_dev); -EXPORT_SYMBOL(register_netdevice); -EXPORT_SYMBOL(unregister_netdevice); -EXPORT_SYMBOL(free_netdev); -EXPORT_SYMBOL(synchronize_net); -EXPORT_SYMBOL(netdev_state_change); -EXPORT_SYMBOL(netdev_boot_setup_check); -EXPORT_SYMBOL(dev_new_index); -EXPORT_SYMBOL(dev_get_by_flags); -EXPORT_SYMBOL(__dev_get_by_flags); -EXPORT_SYMBOL(dev_get_by_index); -EXPORT_SYMBOL(__dev_get_by_index); -EXPORT_SYMBOL(dev_get_by_name); -EXPORT_SYMBOL(__dev_get_by_name); -EXPORT_SYMBOL(dev_getbyhwaddr); -EXPORT_SYMBOL(netdev_set_master); -EXPORT_SYMBOL(eth_type_trans); -#ifdef CONFIG_FDDI -EXPORT_SYMBOL(fddi_type_trans); -#endif /* CONFIG_FDDI */ -#if 0 -EXPORT_SYMBOL(eth_copy_and_sum); -#endif -EXPORT_SYMBOL(alloc_skb); -EXPORT_SYMBOL(__kfree_skb); -EXPORT_SYMBOL(skb_clone); -EXPORT_SYMBOL(skb_copy); -EXPORT_SYMBOL(skb_pad); -EXPORT_SYMBOL(netif_rx); -EXPORT_SYMBOL(netif_receive_skb); -EXPORT_SYMBOL(dev_add_pack); -EXPORT_SYMBOL(dev_remove_pack); -EXPORT_SYMBOL(__dev_remove_pack); -EXPORT_SYMBOL(__dev_get); -EXPORT_SYMBOL(dev_alloc); -EXPORT_SYMBOL(dev_alloc_name); -EXPORT_SYMBOL(__netdev_watchdog_up); -#ifdef CONFIG_KMOD -EXPORT_SYMBOL(dev_load); -#endif -EXPORT_SYMBOL(dev_ioctl); -EXPORT_SYMBOL(dev_queue_xmit); -#ifdef CONFIG_NET_HW_FLOWCONTROL -EXPORT_SYMBOL(netdev_dropping); -EXPORT_SYMBOL(netdev_register_fc); -EXPORT_SYMBOL(netdev_unregister_fc); -EXPORT_SYMBOL(netdev_fc_xoff); -#endif -EXPORT_SYMBOL(dev_base); -EXPORT_SYMBOL(dev_base_lock); -EXPORT_SYMBOL(dev_open); -EXPORT_SYMBOL(dev_close); -EXPORT_SYMBOL(dev_mc_add); -EXPORT_SYMBOL(dev_mc_delete); -EXPORT_SYMBOL(dev_mc_upload); -EXPORT_SYMBOL(dev_set_allmulti); -EXPORT_SYMBOL(dev_set_promiscuity); -EXPORT_SYMBOL(__kill_fasync); - -EXPORT_SYMBOL(rtnl); -EXPORT_SYMBOL(rtnetlink_links); -EXPORT_SYMBOL(rtnetlink_dump_ifinfo); -EXPORT_SYMBOL(rtnetlink_put_metrics); -EXPORT_SYMBOL(rtnl_sem); -EXPORT_SYMBOL(rtnl_lock); -EXPORT_SYMBOL(rtnl_unlock); - -#ifdef CONFIG_HIPPI -EXPORT_SYMBOL(hippi_type_trans); -#endif - -#ifdef CONFIG_NET_FASTROUTE -EXPORT_SYMBOL(netdev_fastroute); -#endif - -#ifdef CONFIG_SYSCTL -EXPORT_SYMBOL(sysctl_wmem_max); -EXPORT_SYMBOL(sysctl_rmem_max); -#ifdef CONFIG_INET -EXPORT_SYMBOL(sysctl_ip_default_ttl); -#endif -#endif - -/* Packet scheduler modules want these. */ -EXPORT_SYMBOL(qdisc_destroy); -EXPORT_SYMBOL(qdisc_reset); -EXPORT_SYMBOL(qdisc_restart); -EXPORT_SYMBOL(qdisc_create_dflt); -EXPORT_SYMBOL(noop_qdisc); -EXPORT_SYMBOL(qdisc_tree_lock); -#ifdef CONFIG_NET_SCHED -PSCHED_EXPORTLIST; -EXPORT_SYMBOL(pfifo_qdisc_ops); -EXPORT_SYMBOL(bfifo_qdisc_ops); -EXPORT_SYMBOL(register_qdisc); -EXPORT_SYMBOL(unregister_qdisc); -EXPORT_SYMBOL(qdisc_get_rtab); -EXPORT_SYMBOL(qdisc_put_rtab); -EXPORT_SYMBOL(qdisc_copy_stats); -#ifdef CONFIG_NET_ESTIMATOR -EXPORT_SYMBOL(qdisc_new_estimator); -EXPORT_SYMBOL(qdisc_kill_estimator); -#endif -#ifdef CONFIG_NET_CLS_POLICE -EXPORT_SYMBOL(tcf_police); -EXPORT_SYMBOL(tcf_police_locate); -EXPORT_SYMBOL(tcf_police_destroy); -EXPORT_SYMBOL(tcf_police_dump); -#endif -#endif -#ifdef CONFIG_NET_CLS -EXPORT_SYMBOL(register_tcf_proto_ops); -EXPORT_SYMBOL(unregister_tcf_proto_ops); -#endif -#ifdef CONFIG_NETFILTER -#include -EXPORT_SYMBOL(nf_register_hook); -EXPORT_SYMBOL(nf_unregister_hook); -EXPORT_SYMBOL(nf_register_sockopt); -EXPORT_SYMBOL(nf_unregister_sockopt); -EXPORT_SYMBOL(nf_reinject); -EXPORT_SYMBOL(nf_register_queue_handler); -EXPORT_SYMBOL(nf_unregister_queue_handler); -EXPORT_SYMBOL(nf_hook_slow); -EXPORT_SYMBOL(nf_hooks); -EXPORT_SYMBOL(nf_setsockopt); -EXPORT_SYMBOL(nf_getsockopt); -EXPORT_SYMBOL(ip_ct_attach); -#ifdef CONFIG_INET -#include -EXPORT_SYMBOL(ip_route_me_harder); -#endif -#endif - -EXPORT_SYMBOL(register_gifconf); - -EXPORT_PER_CPU_SYMBOL(softnet_data); - -#ifdef CONFIG_NET_RADIO -#include /* Wireless Extensions driver API */ -EXPORT_SYMBOL(wireless_send_event); -EXPORT_SYMBOL(iw_handler_set_spy); -EXPORT_SYMBOL(iw_handler_get_spy); -EXPORT_SYMBOL(iw_handler_set_thrspy); -EXPORT_SYMBOL(iw_handler_get_thrspy); -EXPORT_SYMBOL(wireless_spy_update); -#endif /* CONFIG_NET_RADIO */ - -EXPORT_SYMBOL(linkwatch_fire_event); - -/* ethtool.c */ -EXPORT_SYMBOL(ethtool_op_get_link); -EXPORT_SYMBOL(ethtool_op_get_tx_csum); -EXPORT_SYMBOL(ethtool_op_set_tx_csum); -EXPORT_SYMBOL(ethtool_op_get_sg); -EXPORT_SYMBOL(ethtool_op_set_sg); -EXPORT_SYMBOL(ethtool_op_get_tso); -EXPORT_SYMBOL(ethtool_op_set_tso); - -#endif /* CONFIG_NET */ diff -Nru a/net/sched/cls_api.c b/net/sched/cls_api.c --- a/net/sched/cls_api.c Thu Oct 2 01:28:16 2003 +++ b/net/sched/cls_api.c Thu Oct 2 01:28:16 2003 @@ -467,3 +467,6 @@ #endif return 0; } + +EXPORT_SYMBOL(register_tcf_proto_ops); +EXPORT_SYMBOL(unregister_tcf_proto_ops); diff -Nru a/net/sched/estimator.c b/net/sched/estimator.c --- a/net/sched/estimator.c Thu Oct 2 01:28:16 2003 +++ b/net/sched/estimator.c Thu Oct 2 01:28:16 2003 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -194,3 +195,5 @@ } } +EXPORT_SYMBOL(qdisc_kill_estimator); +EXPORT_SYMBOL(qdisc_new_estimator); diff -Nru a/net/sched/police.c b/net/sched/police.c --- a/net/sched/police.c Thu Oct 2 01:28:18 2003 +++ b/net/sched/police.c Thu Oct 2 01:28:18 2003 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -248,3 +249,12 @@ skb_trim(skb, b - skb->data); return -1; } + +EXPORT_SYMBOL(tcf_police); +EXPORT_SYMBOL(tcf_police_destroy); +EXPORT_SYMBOL(tcf_police_dump); +EXPORT_SYMBOL(tcf_police_hash); +EXPORT_SYMBOL(tcf_police_ht); +EXPORT_SYMBOL(tcf_police_locate); +EXPORT_SYMBOL(tcf_police_lookup); +EXPORT_SYMBOL(tcf_police_new_index); diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c --- a/net/sched/sch_api.c Thu Oct 2 01:28:16 2003 +++ b/net/sched/sch_api.c Thu Oct 2 01:28:16 2003 @@ -1255,3 +1255,10 @@ return 0; } + +EXPORT_SYMBOL(qdisc_copy_stats); +EXPORT_SYMBOL(qdisc_get_rtab); +EXPORT_SYMBOL(qdisc_put_rtab); +EXPORT_SYMBOL(register_qdisc); +EXPORT_SYMBOL(unregister_qdisc); +PSCHED_EXPORTLIST; diff -Nru a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c --- a/net/sched/sch_fifo.c Thu Oct 2 01:28:16 2003 +++ b/net/sched/sch_fifo.c Thu Oct 2 01:28:16 2003 @@ -203,3 +203,6 @@ .dump = fifo_dump, .owner = THIS_MODULE, }; + +EXPORT_SYMBOL(bfifo_qdisc_ops); +EXPORT_SYMBOL(pfifo_qdisc_ops); diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c Thu Oct 2 01:28:15 2003 +++ b/net/sched/sch_generic.c Thu Oct 2 01:28:15 2003 @@ -531,3 +531,12 @@ spin_unlock_bh(&dev->queue_lock); write_unlock(&qdisc_tree_lock); } + +EXPORT_SYMBOL(__netdev_watchdog_up); +EXPORT_SYMBOL(noop_qdisc); +EXPORT_SYMBOL(noop_qdisc_ops); +EXPORT_SYMBOL(qdisc_create_dflt); +EXPORT_SYMBOL(qdisc_destroy); +EXPORT_SYMBOL(qdisc_reset); +EXPORT_SYMBOL(qdisc_restart); +EXPORT_SYMBOL(qdisc_tree_lock); diff -Nru a/net/socket.c b/net/socket.c --- a/net/socket.c Thu Oct 2 01:28:16 2003 +++ b/net/socket.c Thu Oct 2 01:28:16 2003 @@ -1989,3 +1989,18 @@ seq_printf(seq, "sockets: used %d\n", counter); } #endif /* CONFIG_PROC_FS */ + +/* ABI emulation layers need these two */ +EXPORT_SYMBOL(move_addr_to_kernel); +EXPORT_SYMBOL(move_addr_to_user); +EXPORT_SYMBOL(sock_alloc); +EXPORT_SYMBOL(sock_alloc_inode); +EXPORT_SYMBOL(sock_create); +EXPORT_SYMBOL(sock_map_fd); +EXPORT_SYMBOL(sock_recvmsg); +EXPORT_SYMBOL(sock_register); +EXPORT_SYMBOL(sock_release); +EXPORT_SYMBOL(sock_sendmsg); +EXPORT_SYMBOL(sock_unregister); +EXPORT_SYMBOL(sock_wake_async); +EXPORT_SYMBOL(sockfd_lookup); diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c --- a/net/unix/af_unix.c Thu Oct 2 01:28:17 2003 +++ b/net/unix/af_unix.c Thu Oct 2 01:28:17 2003 @@ -448,7 +448,7 @@ sk->sk_max_ack_backlog = backlog; sk->sk_state = TCP_LISTEN; /* set credentials so connect can copy them */ - sk->sk_peercred.pid = current->pid; + sk->sk_peercred.pid = current->tgid; sk->sk_peercred.uid = current->euid; sk->sk_peercred.gid = current->egid; err = 0; @@ -983,7 +983,7 @@ unix_peer(newsk) = sk; newsk->sk_state = TCP_ESTABLISHED; newsk->sk_type = SOCK_STREAM; - newsk->sk_peercred.pid = current->pid; + newsk->sk_peercred.pid = current->tgid; newsk->sk_peercred.uid = current->euid; newsk->sk_peercred.gid = current->egid; newu = unix_sk(newsk); @@ -1045,7 +1045,7 @@ sock_hold(skb); unix_peer(ska)=skb; unix_peer(skb)=ska; - ska->sk_peercred.pid = skb->sk_peercred.pid = current->pid; + ska->sk_peercred.pid = skb->sk_peercred.pid = current->tgid; ska->sk_peercred.uid = skb->sk_peercred.uid = current->euid; ska->sk_peercred.gid = skb->sk_peercred.gid = current->egid; diff -Nru a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c --- a/net/xfrm/xfrm_algo.c Thu Oct 2 01:28:16 2003 +++ b/net/xfrm/xfrm_algo.c Thu Oct 2 01:28:16 2003 @@ -8,7 +8,9 @@ * Software Foundation; either version 2 of the License, or (at your option) * any later version. */ + #include +#include #include #include #include @@ -617,6 +619,7 @@ BUG(); return elt; } +EXPORT_SYMBOL_GPL(skb_to_sgvec); /* Check that skb data bits are writable. If they are not, copy data * to newly created private area. If "tailbits" is given, make sure that @@ -717,6 +720,7 @@ return elt; } +EXPORT_SYMBOL_GPL(skb_cow_data); void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len) { @@ -726,4 +730,5 @@ } return skb_put(tail, len); } +EXPORT_SYMBOL_GPL(pskb_put); #endif diff -Nru a/scripts/bin2c.c b/scripts/bin2c.c --- a/scripts/bin2c.c Thu Oct 2 01:28:17 2003 +++ b/scripts/bin2c.c Thu Oct 2 01:28:17 2003 @@ -1,3 +1,12 @@ +/* + * Unloved program to convert a binary on stdin to a C include on stdout + * + * Jan 1999 Matt Mackall + * + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. + */ + #include int main(int argc, char *argv[]) diff -Nru a/scripts/pnmtologo.c b/scripts/pnmtologo.c --- a/scripts/pnmtologo.c Thu Oct 2 01:28:15 2003 +++ b/scripts/pnmtologo.c Thu Oct 2 01:28:15 2003 @@ -119,7 +119,8 @@ static void read_image(void) { FILE *fp; - int i, j, magic; + unsigned int i, j; + int magic; unsigned int maxval; /* open image file */ @@ -274,7 +275,7 @@ static void write_logo_mono(void) { - int i, j; + unsigned int i, j; unsigned char val, bit; /* validate image */ @@ -302,7 +303,7 @@ static void write_logo_vga16(void) { - int i, j, k; + unsigned int i, j, k; unsigned char val; /* validate image */ @@ -342,7 +343,7 @@ static void write_logo_clut224(void) { - int i, j, k; + unsigned int i, j, k; /* validate image */ for (i = 0; i < logo_height; i++) @@ -388,7 +389,7 @@ static void write_logo_gray256(void) { - int i, j; + unsigned int i, j; /* validate image */ for (i = 0; i < logo_height; i++) diff -Nru a/security/dummy.c b/security/dummy.c --- a/security/dummy.c Thu Oct 2 01:28:16 2003 +++ b/security/dummy.c Thu Oct 2 01:28:16 2003 @@ -364,7 +364,7 @@ return 0; } -static int dummy_inode_permission (struct inode *inode, int mask) +static int dummy_inode_permission (struct inode *inode, int mask, struct nameidata *nd) { return 0; } diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c --- a/security/selinux/hooks.c Thu Oct 2 01:28:18 2003 +++ b/security/selinux/hooks.c Thu Oct 2 01:28:18 2003 @@ -1730,12 +1730,17 @@ return dentry_has_perm(current, NULL, dentry, FILE__READ); } -static int selinux_inode_permission(struct inode *inode, int mask) +static int selinux_inode_permission(struct inode *inode, int mask, + struct nameidata *nd) { if (!mask) { /* No permission to check. Existence test. */ return 0; } + + if (nd && nd->dentry) + return dentry_has_perm(current, nd->mnt, nd->dentry, + file_mask_to_av(inode->i_mode, mask)); return inode_has_perm(current, inode, file_mask_to_av(inode->i_mode, mask), NULL, NULL); diff -Nru a/security/selinux/ss/services.c b/security/selinux/ss/services.c --- a/security/selinux/ss/services.c Thu Oct 2 01:28:17 2003 +++ b/security/selinux/ss/services.c Thu Oct 2 01:28:17 2003 @@ -896,13 +896,15 @@ struct user_datum *usrdatum; char *s; u32 len; - int rc = -EINVAL; + int rc; args = p; rc = context_cpy(&oldc, c); if (rc) goto out; + + rc = -EINVAL; /* Convert the user. */ usrdatum = hashtab_search(args->newp->p_users.table, diff -Nru a/sound/oss/btaudio.c b/sound/oss/btaudio.c --- a/sound/oss/btaudio.c Thu Oct 2 01:28:16 2003 +++ b/sound/oss/btaudio.c Thu Oct 2 01:28:16 2003 @@ -177,8 +177,11 @@ bta->risc_size = PAGE_SIZE; bta->risc_cpu = pci_alloc_consistent (bta->pci, bta->risc_size, &bta->risc_dma); - if (NULL == bta->risc_cpu) + if (NULL == bta->risc_cpu) { + pci_free_consistent(bta->pci, bta->buf_size, bta->buf_cpu, bta->buf_dma); + bta->buf_cpu = NULL; return -ENOMEM; + } } return 0; } diff -Nru a/sound/oss/dmasound/Kconfig b/sound/oss/dmasound/Kconfig --- a/sound/oss/dmasound/Kconfig Thu Oct 2 01:28:17 2003 +++ b/sound/oss/dmasound/Kconfig Thu Oct 2 01:28:17 2003 @@ -1,7 +1,7 @@ -# drivers/sound/dmasound/Config.in config DMASOUND_ATARI tristate "Atari DMA sound support" depends on ATARI && SOUND + select DMASOUND help If you want to use the internal audio of your Atari in Linux, answer Y to this question. This will provide a Sun-like /dev/audio, @@ -15,6 +15,7 @@ config DMASOUND_PMAC tristate "PowerMac DMA sound support" depends on PPC_PMAC && SOUND && I2C + select DMASOUND help If you want to use the internal audio of your PowerMac in Linux, answer Y to this question. This will provide a Sun-like /dev/audio, @@ -28,6 +29,7 @@ config DMASOUND_PAULA tristate "Amiga DMA sound support" depends on (AMIGA || APUS) && SOUND + select DMASOUND help If you want to use the internal audio of your Amiga in Linux, answer Y to this question. This will provide a Sun-like /dev/audio, @@ -41,6 +43,7 @@ config DMASOUND_Q40 tristate "Q40 sound support" depends on Q40 && SOUND + select DMASOUND help If you want to use the internal audio of your Q40 in Linux, answer Y to this question. This will provide a Sun-like /dev/audio, @@ -53,13 +56,3 @@ config DMASOUND tristate - depends on SOUND!=n - default m if DMASOUND_ATARI!=y && DMASOUND_AWACS!=y && DMASOUND_PAULA!=y && DMASOUND_Q40!=y && (DMASOUND_ATARI=m || DMASOUND_AWACS=m || DMASOUND_PAULA=m || DMASOUND_Q40=m) - default y if DMASOUND_ATARI=y || DMASOUND_AWACS=y || DMASOUND_PAULA=y || DMASOUND_Q40=y - help - Support built-in audio chips accessible by DMA on various machines - that have them. Note that this symbol does not affect the kernel - directly; rather, it controls whether configuration questions - enabling DMA sound drivers for various specific machine - architectures will be used. - diff -Nru a/sound/oss/harmony.c b/sound/oss/harmony.c --- a/sound/oss/harmony.c Thu Oct 2 01:28:17 2003 +++ b/sound/oss/harmony.c Thu Oct 2 01:28:17 2003 @@ -28,14 +28,14 @@ #include #include #include +#include #include #include #include #include -#include +#include #include -#include #include "sound_config.h" diff -Nru a/sound/parisc/harmony.c b/sound/parisc/harmony.c --- a/sound/parisc/harmony.c Thu Oct 2 01:28:16 2003 +++ b/sound/parisc/harmony.c Thu Oct 2 01:28:16 2003 @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -77,8 +78,8 @@ #include #include #include -#include #include +#include MODULE_AUTHOR("Laurent Canet "); MODULE_DESCRIPTION("ALSA Harmony sound driver"); @@ -709,8 +710,8 @@ * harmony is not "real" pci, but we need a pci_dev * to alloc PCI DMA pages */ - substream->dma_private = harmony->fake_pci_dev; - substream->dma_type = SNDRV_PCM_DMA_TYPE_PCI; + substream->runtime->dma_private = harmony->fake_pci_dev; +// substream->dma_type = SNDRV_PCM_DMA_TYPE_PCI; harmony->playback_substream = substream; runtime->hw = snd_card_harmony_playback; @@ -733,8 +734,8 @@ * harmony is not "real" pci, but we need a pci_dev * to alloc PCI DMA pages */ - substream->dma_private = harmony->fake_pci_dev; - substream->dma_type = SNDRV_PCM_DMA_TYPE_PCI; + substream->runtime->dma_private = harmony->fake_pci_dev; +// substream->dma_type = SNDRV_PCM_DMA_TYPE_PCI; harmony->capture_substream = substream; runtime->hw = snd_card_harmony_capture;