# 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.5.64 -> 1.1101 # arch/sparc/Kconfig 1.10 -> 1.11 # drivers/video/fbmem.c 1.58 -> 1.59 # arch/m68knommu/platform/68360/ints.c 1.2 -> 1.3 # arch/i386/kernel/process.c 1.46 -> 1.47 # drivers/char/rio/riointr.c 1.4 -> 1.5 # drivers/video/tcx.c 1.1 -> 1.4 # arch/arm/kernel/irq.c 1.26 -> 1.27 # arch/m68k/vmlinux-sun3.lds 1.11 -> 1.12 # drivers/scsi/inia100.h 1.13 -> 1.14 # net/bridge/netfilter/ebtable_broute.c 1.2 -> 1.3 # arch/sparc64/kernel/smp.c 1.48 -> 1.49 # arch/ia64/kernel/fsys.S 1.5 -> 1.9 # drivers/block/ps2esdi.c 1.61 -> 1.62 # Documentation/scsi/ncr53c8xx.txt 1.5 -> 1.6 # net/irda/ircomm/ircomm_core.c 1.10 -> 1.11 # arch/i386/kernel/cpu/cpufreq/speedstep.c 1.13 -> 1.16 # fs/cifs/file.c 1.9 -> 1.12 # net/ipv4/netfilter/arptable_filter.c 1.2 -> 1.4 # include/linux/kernel.h 1.33 -> 1.34 # Documentation/swsusp.txt 1.4 -> 1.5 # drivers/ide/pci/via82cxxx.c 1.9 -> 1.10 # drivers/ide/legacy/hd.c 1.17 -> 1.18 # drivers/scsi/sym53c8xx_2/sym_hipd.c 1.6 -> 1.7 # Documentation/s390/driver-model.txt 1.2 -> 1.3 # arch/i386/mm/fault.c 1.23 -> 1.24 # drivers/block/cciss.h 1.18 -> 1.19 # drivers/block/swim_iop.c 1.22 -> 1.23 # net/llc/af_llc.c 1.33 -> 1.34 # drivers/pnp/Makefile 1.12 -> 1.13 # drivers/scsi/scsi_error.c 1.38 -> 1.43 # net/bluetooth/rfcomm/core.c 1.13 -> 1.14 # include/asm-ia64/topology.h 1.6 -> 1.7 # include/asm-ppc/processor.h 1.26 -> 1.27 # drivers/isdn/hisax/saphir.c 1.26 -> 1.27 # arch/ia64/kernel/palinfo.c 1.10 -> 1.12 # crypto/digest.c 1.12 -> 1.13 # drivers/char/vme_scc.c 1.10 -> 1.11 # drivers/ide/ide-taskfile.c 1.11 -> 1.12 # arch/x86_64/pci/legacy.c 1.2 -> 1.3 # include/asm-sparc64/processor.h 1.15 -> 1.16 # kernel/ksyms.c 1.185 -> 1.189 # drivers/cdrom/gscd.c 1.30 -> 1.31 # arch/arm/kernel/entry-common.S 1.12 -> 1.13 # arch/sparc64/kernel/us3_cpufreq.c 1.3 -> 1.5 # Documentation/sonypi.txt 1.11 -> 1.12 # drivers/oprofile/cpu_buffer.c 1.5 -> 1.7 # crypto/internal.h 1.14 -> 1.16 # arch/arm/mach-sa1100/cpu-sa1110.c 1.17 -> 1.19 # arch/i386/kernel/cpu/cpufreq/powernow-k7.c 1.4 -> 1.6 # mm/fremap.c 1.3 -> 1.4 # include/asm-sparc64/pgtable.h 1.27 -> 1.28 # drivers/mtd/nftlcore.c 1.40 -> 1.41 # include/linux/jiffies.h 1.7 -> 1.8 # drivers/pci/quirks.c 1.23 -> 1.24 # drivers/isdn/hardware/avm/b1pci.c 1.28 -> 1.29 # net/ipv4/xfrm_input.c 1.4 -> 1.5 # include/asm-mips/processor.h 1.9 -> 1.10 # Documentation/DocBook/journal-api.tmpl 1.5 -> 1.6 # drivers/isdn/i4l/isdn_net_lib.c 1.37 -> 1.38 # net/ipv6/netfilter/ip6t_dst.c 1.1 -> 1.2 # include/net/dn_route.h 1.4 -> 1.5 # arch/ia64/Makefile 1.37 -> 1.39 # drivers/atm/Makefile 1.16 -> 1.17 # include/linux/mm.h 1.108 -> 1.110 # fs/file_table.c 1.17 -> 1.18 # include/asm-i386/processor.h 1.40 -> 1.43 # arch/i386/kernel/cpu/common.c 1.18 -> 1.19 # include/linux/init.h 1.24 -> 1.25 # arch/sparc/kernel/irq.c 1.20 -> 1.21 # drivers/serial/8250.c 1.29 -> 1.31 # arch/x86_64/lib/getuser.S 1.1 -> 1.2 # arch/i386/kernel/cpu/cpufreq/longhaul.c 1.11 -> 1.12 # drivers/net/dgrs.c 1.14 -> 1.15 # arch/x86_64/vmlinux.lds.S 1.13 -> 1.14 # include/linux/i2c-id.h 1.9 -> 1.10 # net/ipv6/ip6_output.c 1.11 -> 1.13 # drivers/usb/serial/io_edgeport.c 1.38 -> 1.39 # drivers/isdn/hisax/hisax_isac.c 1.4 -> 1.5 # net/llc/llc_conn.c 1.23 -> 1.24 # arch/i386/kernel/irq.c 1.26 -> 1.28 # arch/i386/oprofile/op_model_p4.c 1.2 -> 1.4 # arch/m68knommu/platform/68VZ328/Makefile 1.2 -> 1.3 # arch/mips/philips/nino/irq.c 1.4 -> 1.5 # include/asm-i386/hdreg.h 1.2 -> 1.3 # drivers/char/decserial.c 1.2 -> 1.3 # drivers/video/sbuslib.h 1.1 -> 1.3 # arch/alpha/kernel/pci.c 1.24 -> 1.25 # include/asm-ppc64/processor.h 1.26 -> 1.27 # mm/readahead.c 1.28 -> 1.29 # arch/ia64/ia32/ia32_support.c 1.6 -> 1.7 # arch/arm/mach-sa1100/cpu-sa1100.c 1.13 -> 1.15 # drivers/isdn/i4l/isdn_ppp_mp.c 1.7 -> 1.8 # include/asm-arm/posix_types.h 1.1 -> 1.2 # drivers/isdn/hisax/hfc_sx.c 1.36 -> 1.37 # drivers/char/random.c 1.31 -> 1.32 # net/ipv6/netfilter/ip6table_filter.c 1.4 -> 1.5 # arch/sparc/vmlinux.lds.S 1.14 -> 1.15 # include/asm-ia64/spinlock.h 1.6 -> 1.7 # Documentation/cpu-freq/user-guide.txt 1.1 -> 1.3 # net/x25/x25_timer.c 1.9 -> 1.10 # arch/m68knommu/platform/68328/entry.S 1.3 -> 1.4 # drivers/parport/ieee1284.c 1.5 -> 1.6 # Documentation/networking/sis900.txt 1.1 -> 1.2 # arch/alpha/kernel/core_marvel.c 1.7 -> 1.8 # Documentation/sound/alsa/ALSA-Configuration.txt 1.3 -> 1.4 # Documentation/scsi/sym53c8xx_2.txt 1.2 -> 1.3 # arch/mips64/sgi-ip22/ip22-int.c 1.6 -> 1.7 # include/linux/netfilter_bridge/ebt_mark_t.h 1.1 -> 1.2 # Documentation/video4linux/zr36120.txt 1.1 -> 1.2 # drivers/isdn/hisax/avm_a1.c 1.23 -> 1.24 # arch/i386/kernel/cpu/cpufreq/acpi.c 1.4 -> 1.5 # kernel/fork.c 1.111 -> 1.114 # include/linux/sched.h 1.136 -> 1.137 # drivers/isdn/hisax/s0box.c 1.25 -> 1.26 # sound/isa/als100.c 1.7 -> 1.9 # include/asm-ia64/machvec_hpzx1.h 1.4 -> 1.5 # drivers/block/ll_rw_blk.c 1.155 -> 1.157 # arch/i386/kernel/vm86.c 1.20 -> 1.21 # Makefile 1.392 -> 1.394 # drivers/cpufreq/userspace.c 1.1 -> 1.4 # net/bridge/netfilter/ebt_log.c 1.2 -> 1.3 # drivers/media/radio/miropcm20-rds.c 1.6 -> 1.7 # Documentation/sound/oss/cs46xx 1.2 -> 1.3 # drivers/video/Makefile 1.76 -> 1.78 # include/asm-ia64/unistd.h 1.23 -> 1.25 # drivers/isdn/hisax/hisax_fcclassic.c 1.2 -> 1.3 # include/asm-i386/xor.h 1.12 -> 1.13 # drivers/base/platform.c 1.6 -> 1.7 # include/net/tcp.h 1.30 -> 1.32 # arch/x86_64/ia32/socket32.c 1.3 -> (deleted) # include/asm-ia64/page.h 1.14 -> 1.15 # drivers/serial/amba.c 1.16 -> 1.17 # drivers/net/wan/sdla_ft1.c 1.5 -> 1.6 # Documentation/vm/hugetlbpage.txt 1.4 -> 1.5 # drivers/atm/firestream.c 1.16 -> 1.17 # include/asm-i386/thread_info.h 1.10 -> 1.11 # include/asm-arm/system.h 1.13 -> 1.15 # include/linux/if_shaper.h 1.1 -> 1.2 # net/ipv6/netfilter/ip6t_ah.c 1.1 -> 1.2 # arch/i386/kernel/cpu/cpufreq/powernow-k6.c 1.12 -> 1.13 # net/ipv4/af_inet.c 1.38 -> 1.40 # Documentation/pnp.txt 1.2 -> 1.3 # arch/ia64/kernel/setup.c 1.36 -> 1.37 # drivers/serial/sa1100.c 1.18 -> 1.19 # arch/mips/kernel/irq.c 1.8 -> 1.9 # fs/proc/proc_misc.c 1.67 -> 1.68 # drivers/s390/char/sclp_tty.c 1.4 -> 1.5 # Documentation/filesystems/sysfs.txt 1.8 -> 1.9 # arch/m68knommu/platform/5307/config.c 1.1 -> 1.2 # drivers/block/cpqarray.c 1.70 -> 1.71 # drivers/pnp/interface.c 1.13 -> 1.14 # arch/x86_64/kernel/apic.c 1.13 -> 1.14 # drivers/i2c/i2c-core.c 1.18 -> 1.20 # include/asm-i386/bug.h 1.1 -> 1.2 # Documentation/arm/Setup 1.1 -> 1.2 # arch/i386/Kconfig 1.46 -> 1.48 # drivers/isdn/hisax/elsa.c 1.35 -> 1.36 # drivers/block/floppy.c 1.68 -> 1.69 # include/linux/genhd.h 1.46 -> 1.47 # arch/ia64/kernel/ivt.S 1.13 -> 1.14 # drivers/block/ataflop.c 1.33 -> 1.34 # include/linux/elf.h 1.19 -> 1.20 # Documentation/networking/wan-router.txt 1.2 -> 1.3 # drivers/isdn/hisax/sportster.c 1.24 -> 1.25 # net/ax25/ax25_in.c 1.8 -> 1.9 # net/ipx/af_ipx.c 1.23 -> 1.25 # drivers/cdrom/sbpcd.c 1.41 -> 1.42 # arch/ppc/boot/simple/rw4/ppc_40x.h 1.2 -> 1.3 # net/ipv4/udp.c 1.30 -> 1.31 # fs/devfs/base.c 1.71 -> 1.73 # arch/i386/kernel/traps.c 1.46 -> 1.47 # arch/sparc64/kernel/sys32.S 1.4 -> 1.5 # Documentation/networking/ifenslave.c 1.4 -> 1.5 # include/linux/i2c.h 1.12 -> 1.13 # net/bridge/netfilter/ebt_snat.c 1.1 -> 1.2 # Documentation/networking/wanpipe.txt 1.2 -> 1.3 # arch/ia64/sn/kernel/mca.c 1.3 -> 1.4 # scripts/modpost.c 1.9 -> 1.10 # net/bluetooth/af_bluetooth.c 1.13 -> 1.14 # Documentation/s390/Debugging390.txt 1.8 -> 1.9 # arch/i386/vmlinux.lds.S 1.25 -> 1.26 # include/asm-x86_64/fcntl.h 1.1 -> 1.2 # drivers/net/wan/sdla_ppp.c 1.21 -> 1.22 # Documentation/specialix.txt 1.1 -> 1.2 # arch/parisc/vmlinux.lds.S 1.11 -> 1.12 # drivers/serial/anakin.c 1.13 -> 1.14 # Documentation/uml/UserModeLinux-HOWTO.txt 1.1 -> 1.2 # kernel/cpufreq.c 1.21 -> 1.27 # drivers/acorn/block/mfmhd.c 1.48 -> 1.49 # arch/ia64/kernel/time.c 1.13.1.1 -> 1.16 # include/asm-sparc64/termios.h 1.4 -> 1.5 # net/atm/atm_misc.c 1.1 -> 1.2 # net/ipv6/netfilter/ip6t_frag.c 1.1 -> 1.2 # drivers/char/watchdog/amd7xx_tco.c 1.4 -> 1.5 # arch/i386/kernel/srat.c 1.1 -> 1.2 # fs/cifs/cifssmb.c 1.9 -> 1.11 # include/asm-ppc/pgtable.h 1.19 -> 1.20 # include/net/ip6_route.h 1.4 -> 1.5 # Documentation/oops-tracing.txt 1.3 -> 1.4 # arch/i386/kernel/microcode.c 1.16 -> 1.17 # drivers/block/nbd.c 1.50 -> 1.51 # arch/arm/mach-sa1100/pm.c 1.10 -> 1.12 # drivers/serial/core.c 1.38 -> 1.39 # drivers/net/wan/sdladrv.c 1.6 -> 1.7 # drivers/base/bus.c 1.41 -> 1.42 # drivers/usb/core/message.c 1.21 -> 1.22 # drivers/media/video/bw-qcam.c 1.10 -> 1.11 # arch/m68knommu/platform/68VZ328/de2/config.c 1.1 -> 1.2 # drivers/net/wan/comx-hw-munich.c 1.8 -> 1.9 # net/bluetooth/sco.c 1.11 -> 1.13 # kernel/softirq.c 1.33 -> 1.34 # drivers/isdn/hisax/nj_u.c 1.24 -> 1.25 # arch/um/drivers/stdio_console.c 1.7 -> 1.8 # drivers/cdrom/optcd.c 1.24 -> 1.25 # net/x25/x25_subr.c 1.8 -> 1.9 # include/asm-x86_64/uaccess.h 1.7 -> 1.9 # arch/sparc64/kernel/pci_common.c 1.17 -> 1.18 # drivers/scsi/sr.c 1.72 -> 1.74 # arch/s390x/kernel/entry.S 1.28 -> 1.30 # net/key/af_key.c 1.21 -> 1.25 # drivers/char/rio/rioboot.c 1.5 -> 1.6 # arch/ia64/sn/io/Makefile 1.9 -> 1.10 # drivers/scsi/scsi.h 1.65 -> 1.66 # Documentation/cdrom/cdrom-standard.tex 1.1 -> 1.2 # include/linux/fs.h 1.223 -> 1.225 # drivers/video/sa1100fb.c 1.25 -> 1.26 # arch/ia64/sn/kernel/setup.c 1.9 -> 1.10 # arch/i386/mm/ioremap.c 1.16 -> 1.17 # arch/ia64/kernel/entry.S 1.30 -> 1.36 # fs/intermezzo/dir.c 1.11 -> 1.12 # include/asm-arm/pgtable.h 1.14 -> 1.16 # include/asm-ia64/hardirq.h 1.10 -> 1.11 # include/asm-v850/processor.h 1.3 -> 1.4 # Documentation/networking/3c509.txt 1.1 -> 1.2 # arch/i386/kernel/entry.S 1.58 -> 1.59 # Documentation/networking/bonding.txt 1.7 -> 1.8 # Documentation/kobject.txt 1.4 -> 1.5 # fs/cifs/cifs_fs_sb.h 1.1 -> 1.2 # net/ax25/ax25_std_timer.c 1.4 -> 1.5 # drivers/oprofile/buffer_sync.c 1.8 -> 1.9 # drivers/isdn/hisax/nj_s.c 1.25 -> 1.26 # drivers/sgi/char/sgiserial.c 1.7 -> 1.8 # net/ipv6/netfilter/ip6t_rt.c 1.1 -> 1.2 # arch/arm/mach-sa1100/generic.c 1.16 -> 1.18 # net/ipv4/tcp.c 1.34 -> 1.35 # include/asm-i386/srat.h 1.1 -> 1.3 # arch/m68knommu/platform/68VZ328/ucdimm/config.c 1.1 -> 1.2 # include/linux/crypto.h 1.25 -> 1.27 # drivers/video/cg6.c 1.1 -> 1.4 # drivers/eisa/eisa-bus.c 1.3 -> 1.4 # Documentation/filesystems/proc.txt 1.12 -> 1.13 # drivers/isdn/hisax/isdnl1.c 1.15 -> 1.16 # drivers/scsi/fdomain.h 1.6 -> (deleted) # include/asm-ia64/machvec_dig.h 1.2 -> 1.3 # arch/x86_64/kernel/setup64.c 1.10 -> 1.11 # arch/x86_64/ia32/ptrace32.c 1.4 -> 1.5 # drivers/char/rio/rioinit.c 1.4 -> 1.5 # drivers/md/md.c 1.143 -> 1.145 # drivers/serial/clps711x.c 1.13 -> 1.14 # fs/cifs/transport.c 1.5 -> 1.6 # arch/mips64/Kconfig 1.9 -> 1.10 # arch/x86_64/ia32/Makefile 1.11 -> 1.13 # arch/alpha/kernel/core_titan.c 1.13 -> 1.14 # include/asm-x86_64/ptrace.h 1.6 -> 1.7 # include/asm-alpha/pgtable.h 1.16 -> 1.17 # net/atm/proc.c 1.8 -> 1.9 # drivers/video/sbuslib.c 1.1 -> 1.3 # drivers/scsi/ncr53c8xx.c 1.22 -> 1.23 # arch/alpha/mm/fault.c 1.10 -> 1.11 # net/bridge/netfilter/ebt_arp.c 1.1 -> 1.2 # net/bridge/netfilter/ebt_mark_m.c 1.1 -> 1.2 # net/ipv6/icmp.c 1.17 -> 1.18 # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 1.4 -> 1.5 # drivers/scsi/inia100.c 1.18 -> 1.19 # Documentation/usb/hiddev.txt 1.4 -> 1.5 # include/asm-x86_64/socket32.h 1.3 -> (deleted) # arch/m68knommu/platform/5272/config.c 1.1 -> 1.2 # include/asm-ia64/pgtable.h 1.16 -> 1.17 # include/linux/wanrouter.h 1.4 -> 1.5 # arch/mips/au1000/common/serial.c 1.8 -> 1.9 # arch/x86_64/kernel/ptrace.c 1.10 -> 1.11 # drivers/usb/serial/visor.c 1.58 -> 1.59 # drivers/char/rio/riocmd.c 1.6 -> 1.7 # Documentation/usb/URB.txt 1.3 -> 1.4 # arch/arm/kernel/entry-armv.S 1.26 -> 1.27 # include/asm-arm/pci.h 1.17 -> 1.18 # arch/s390x/vmlinux.lds.S 1.9 -> 1.10 # include/asm-ia64/sn/module.h 1.4 -> 1.5 # net/irda/af_irda.c 1.35 -> 1.37 # arch/m68knommu/platform/68328/ints.c 1.1 -> 1.2 # include/asm-ia64/posix_types.h 1.1 -> 1.2 # net/ipv4/tcp_ipv4.c 1.43 -> 1.44 # drivers/isdn/i4l/Kconfig 1.2 -> 1.3 # arch/i386/kernel/io_apic.c 1.52 -> 1.55 # drivers/hotplug/acpiphp_glue.c 1.7 -> 1.8 # fs/char_dev.c 1.7 -> 1.8 # include/asm-sh/processor.h 1.10 -> 1.11 # net/8021q/vlanproc.c 1.8 -> 1.9 # arch/sparc64/defconfig 1.75 -> 1.76 # drivers/acorn/block/fd1772.c 1.32 -> 1.33 # arch/parisc/kernel/sys_parisc32.c 1.8 -> 1.10 # mm/filemap.c 1.181 -> 1.182 # arch/mips/vmlinux.lds.S 1.7 -> 1.8 # drivers/cdrom/sonycd535.c 1.31 -> 1.32 # drivers/scsi/qlogicfas.h 1.7 -> (deleted) # drivers/isdn/hisax/avm_pci.c 1.41 -> 1.42 # drivers/ide/ide-iops.c 1.7 -> 1.8 # fs/namei.c 1.65 -> 1.67 # net/decnet/dn_nsp_in.c 1.7 -> 1.8 # net/bridge/netfilter/ebtables.c 1.4 -> 1.5 # Documentation/kbuild/kconfig-language.txt 1.1 -> 1.2 # arch/m68knommu/platform/5206e/config.c 1.1 -> 1.2 # arch/arm/vmlinux-armv.lds.in 1.21 -> 1.22 # fs/intermezzo/fileset.c 1.2 -> 1.3 # arch/x86_64/pci/pci.h 1.5 -> 1.6 # net/socket.c 1.43 -> 1.44 # arch/sh/kernel/irq.c 1.10 -> 1.11 # arch/i386/Makefile 1.47 -> 1.48 # include/asm-ia64/processor.h 1.30 -> 1.32 # drivers/scsi/ncr53c8xx.h 1.9 -> 1.10 # arch/s390/vmlinux.lds.S 1.9 -> 1.10 # fs/smbfs/sock.c 1.13 -> 1.14 # net/ipv4/netfilter/iptable_filter.c 1.4 -> 1.6 # fs/intermezzo/intermezzo_lib.h 1.2 -> 1.3 # drivers/block/swim3.c 1.22 -> 1.23 # net/netrom/nr_in.c 1.4 -> 1.5 # sound/pci/ac97/ac97_codec.c 1.29 -> 1.30 # net/ipv4/xfrm_algo.c 1.3 -> 1.5 # fs/partitions/ldm.c 1.11 -> 1.12 # Documentation/filesystems/Exporting 1.2 -> 1.3 # init/do_mounts.c 1.46 -> 1.47 # drivers/char/rio/riotty.c 1.5 -> 1.6 # arch/x86_64/boot/Makefile 1.14 -> 1.16 # drivers/mtd/mtdblock.c 1.37 -> 1.38 # drivers/isdn/hisax/amd7930.c 1.11 -> (deleted) # include/asm-ia64/machvec_sn2.h 1.3 -> 1.4 # Documentation/arm/SA1100/serial_UART 1.2 -> 1.3 # net/ipv4/netfilter/ip_fw_compat.c 1.11 -> 1.13 # net/sunrpc/clnt.c 1.32 -> 1.33 # drivers/usb/storage/transport.c 1.63 -> 1.64 # arch/alpha/kernel/sys_nautilus.c 1.10 -> 1.11 # net/core/scm.c 1.5 -> 1.6 # Documentation/arm/mem_alignment 1.1 -> 1.2 # drivers/isdn/hisax/niccy.c 1.27 -> 1.28 # net/ipv6/netfilter/ip6table_mangle.c 1.5 -> 1.6 # Documentation/filesystems/ext3.txt 1.2 -> 1.3 # include/net/snmp.h 1.5 -> 1.6 # Documentation/devices.txt 1.8 -> 1.9 # arch/s390/Kconfig 1.7 -> 1.8 # arch/arm/kernel/bios32.c 1.17 -> 1.18 # drivers/isdn/hisax/bkm_a4t.c 1.24 -> 1.25 # net/ipv6/raw.c 1.18 -> 1.19 # arch/alpha/oprofile/op_model_ev4.c 1.4 -> 1.5 # drivers/serial/uart00.c 1.12 -> 1.13 # arch/i386/boot/Makefile 1.23 -> 1.25 # include/linux/net.h 1.8 -> 1.9 # net/ipv4/netfilter/ip_nat_rule.c 1.7 -> 1.9 # drivers/char/rtc.c 1.22 -> 1.23 # arch/x86_64/kernel/head64.c 1.5 -> 1.6 # arch/um/kernel/mem.c 1.12 -> 1.14 # arch/i386/kernel/cpu/cpufreq/elanfreq.c 1.11 -> 1.12 # net/netsyms.c 1.50 -> 1.52 # include/linux/efs_fs.h 1.8 -> 1.9 # Documentation/networking/tuntap.txt 1.3 -> 1.4 # include/linux/pci_ids.h 1.83 -> 1.84 # drivers/usb/serial/usb-serial.c 1.72 -> 1.73 # arch/sparc/kernel/sys_sunos.c 1.22 -> 1.23 # drivers/char/rio/rioctrl.c 1.7 -> 1.8 # drivers/scsi/sym53c8xx.h 1.11 -> 1.12 # fs/intermezzo/cache.c 1.8 -> 1.9 # drivers/ide/ide-disk.c 1.32 -> 1.33 # include/asm-ia64/system.h 1.31 -> 1.32 # arch/cris/vmlinux.lds.S 1.15 -> 1.16 # include/net/bluetooth/bluetooth.h 1.10 -> 1.11 # Documentation/filesystems/devfs/README 1.12 -> 1.14 # include/asm-s390x/pgtable.h 1.15 -> 1.17 # Documentation/scsi/ChangeLog.sym53c8xx_2 1.5 -> 1.6 # fs/sysfs/dir.c 1.2 -> 1.5 # drivers/isdn/hisax/hfc_pci.c 1.40 -> 1.41 # net/Makefile 1.19 -> 1.20 # arch/x86_64/kernel/irq.c 1.9 -> 1.10 # arch/sparc64/kernel/systbls.S 1.31 -> 1.34 # drivers/serial/mcfserial.c 1.3 -> 1.4 # arch/x86_64/ia32/sys_ia32.c 1.20 -> 1.23 # include/asm-arm/ide.h 1.9 -> 1.10 # net/bridge/netfilter/ebt_ip.c 1.2 -> 1.3 # arch/ia64/kernel/unwind_i.h 1.4 -> 1.5 # include/linux/usb.h 1.72 -> 1.73 # drivers/net/sis900.c 1.33 -> 1.34 # drivers/char/serial167.c 1.14 -> 1.15 # arch/ppc64/kernel/irq.c 1.20 -> 1.21 # drivers/net/wan/pc300_tty.c 1.6 -> 1.7 # net/ipv4/netfilter/ip_conntrack_standalone.c 1.13 -> 1.15 # arch/x86_64/ia32/ia32entry.S 1.12 -> 1.15 # arch/ia64/hp/sim/simscsi.c 1.11 -> 1.12 # arch/ia64/pci/pci.c 1.21 -> 1.22 # fs/binfmt_elf.c 1.37 -> 1.41 # mm/memory.c 1.112 -> 1.114 # drivers/usb/serial/pl2303.c 1.35 -> 1.36 # arch/v850/Kconfig 1.7 -> 1.8 # arch/mips64/vmlinux.lds.S 1.6 -> 1.7 # fs/aio.c 1.28 -> 1.29 # include/linux/usb_ch9.h 1.2 -> 1.3 # drivers/sbus/char/jsflash.c 1.28 -> 1.29 # Documentation/kernel-doc-nano-HOWTO.txt 1.4 -> 1.5 # fs/compat.c 1.4 -> 1.5 # drivers/usb/core/hub.c 1.56 -> 1.57 # include/linux/compat.h 1.7 -> 1.9 # drivers/block/amiflop.c 1.35 -> 1.36 # drivers/cdrom/mcdx.c 1.29 -> 1.30 # drivers/block/genhd.c 1.71 -> 1.74 # include/linux/pci.h 1.64 -> 1.68 # include/linux/profile.h 1.4 -> 1.5 # arch/ia64/kernel/mca.c 1.17 -> 1.18 # arch/ia64/kernel/iosapic.c 1.18 -> 1.23 # include/asm-s390/processor.h 1.10 -> 1.11 # fs/cifs/cifs_debug.c 1.5 -> 1.6 # arch/ia64/kernel/process.c 1.25 -> 1.26 # arch/arm/tools/mach-types 1.24 -> 1.25 # fs/readdir.c 1.17 -> 1.18 # include/asm-sparc/termios.h 1.4 -> 1.5 # arch/i386/kernel/smpboot.c 1.52 -> 1.53 # arch/mips/Kconfig 1.8 -> 1.9 # arch/i386/kernel/cpu/cpufreq/gx-suspmod.c 1.5 -> 1.6 # arch/um/drivers/ubd_kern.c 1.26 -> 1.27 # arch/arm/mach-integrator/cpu.c 1.13 -> 1.15 # include/asm-arm/processor.h 1.12 -> 1.13 # drivers/mtd/mtdblock_ro.c 1.23 -> 1.24 # include/net/scm.h 1.3 -> 1.4 # arch/x86_64/mm/pageattr.c 1.3 -> 1.4 # arch/um/Kconfig 1.8 -> 1.9 # arch/ia64/hp/sim/simserial.c 1.10 -> 1.11 # arch/ia64/kernel/acpi.c 1.27 -> 1.34 # arch/m68knommu/kernel/entry.S 1.1 -> 1.2 # arch/x86_64/kernel/suspend.c 1.1 -> 1.2 # include/linux/netfilter_ipv4/ipchains_core.h 1.1 -> 1.3 # include/linux/hugetlb.h 1.13 -> 1.15 # include/asm-cris/processor.h 1.12 -> 1.13 # arch/ia64/kernel/machvec.c 1.3 -> 1.4 # drivers/net/wan/sdla_chdlc.c 1.19 -> 1.20 # include/asm-s390x/compat.h 1.5 -> 1.6 # drivers/ide/ide-floppy.c 1.25 -> 1.26 # net/econet/af_econet.c 1.13 -> 1.15 # drivers/media/video/zr36120.c 1.17 -> 1.18 # drivers/media/video/video-buf.c 1.7 -> 1.8 # fs/sysfs/bin.c 1.2 -> 1.3 # include/asm-mips64/processor.h 1.7 -> 1.8 # drivers/scsi/scsi_lib.c 1.73 -> 1.74 # drivers/message/fusion/lsi/mpi_raid.h 1.4 -> 1.5 # drivers/isdn/hisax/teles0.c 1.24 -> 1.25 # net/netrom/af_netrom.c 1.21 -> 1.23 # net/rose/af_rose.c 1.18 -> 1.20 # drivers/pnp/Kconfig 1.3 -> 1.4 # include/linux/tty.h 1.8 -> 1.10 # arch/i386/boot/bootsect.S 1.7 -> 1.8 # include/asm-i386/mmzone.h 1.8 -> 1.11 # net/netlink/af_netlink.c 1.18 -> 1.20 # arch/sparc/kernel/systbls.S 1.16 -> 1.17 # include/asm-arm/arch-anakin/time.h 1.3 -> 1.4 # arch/i386/boot/tools/build.c 1.2 -> 1.3 # arch/x86_64/kernel/io_apic.c 1.7 -> 1.8 # drivers/ide/ide-dma.c 1.11 -> 1.12 # net/ipv6/Kconfig 1.2 -> 1.3 # net/ipv4/xfrm_policy.c 1.15 -> 1.17 # drivers/ide/Makefile 1.10 -> 1.11 # arch/m68knommu/kernel/comempci.c 1.2 -> 1.3 # drivers/s390/char/sclp_con.c 1.3 -> 1.4 # drivers/usb/core/usb.c 1.115 -> 1.116 # fs/jfs/jfs_logmgr.c 1.45 -> 1.46 # arch/mips64/sgi-ip27/ip27-irq.c 1.6 -> 1.7 # kernel/posix-timers.c 1.4 -> 1.5 # arch/ia64/mm/hugetlbpage.c 1.9 -> 1.10 # arch/s390x/Kconfig 1.8 -> 1.9 # drivers/scsi/zalon.h 1.2 -> 1.3 # crypto/cipher.c 1.11 -> 1.14 # Documentation/driver-model/driver.txt 1.3 -> 1.4 # drivers/scsi/i91uscsi.h 1.3 -> 1.4 # drivers/i2c/i2c-algo-bit.c 1.12 -> 1.13 # arch/alpha/vmlinux.lds.S 1.18 -> 1.20 # net/decnet/af_decnet.c 1.20 -> 1.21 # Documentation/cpqarray.txt 1.1 -> 1.2 # drivers/scsi/pcmcia/qlogic_stub.c 1.11 -> 1.12 # net/bridge/netfilter/ebt_vlan.c 1.2 -> 1.3 # drivers/char/serial_tx3912.c 1.7 -> 1.8 # include/asm-arm/proc-fns.h 1.7 -> 1.8 # fs/ext3/dir.c 1.8 -> 1.9 # arch/mips/kernel/old-irq.c 1.5 -> 1.6 # drivers/media/video/video-buf.h 1.5 -> 1.6 # include/asm-x86_64/suspend.h 1.2 -> 1.3 # include/asm-alpha/core_cia.h 1.5 -> 1.6 # sound/oss/sb_card.h 1.1 -> 1.2 # arch/arm/Kconfig 1.9 -> 1.12 # drivers/isdn/hisax/gazel.c 1.31 -> 1.32 # fs/ext2/dir.c 1.19 -> 1.20 # drivers/isdn/hisax/isurf.c 1.22 -> 1.23 # include/asm-ia64/intrinsics.h 1.3 -> 1.4 # include/asm-ia64/machvec.h 1.8 -> 1.10 # include/asm-ia64/unwind.h 1.3 -> 1.4 # include/asm-i386/numaq.h 1.7 -> 1.10 # net/sunrpc/sched.c 1.22 -> 1.23 # drivers/net/mac8390.c 1.10 -> 1.11 # drivers/usb/serial/pl2303.h 1.7 -> 1.8 # arch/mips/ite-boards/generic/irq.c 1.6 -> 1.7 # include/asm-ia64/machvec_hpsim.h 1.2 -> 1.3 # fs/cifs/cifsfs.c 1.7 -> 1.9 # drivers/pnp/isapnp/core.c 1.31 -> 1.32 # arch/ppc64/Kconfig 1.13 -> 1.14 # mm/mremap.c 1.28 -> 1.29 # arch/i386/mm/discontig.c 1.9 -> 1.12 # drivers/char/rio/rioroute.c 1.6 -> 1.7 # arch/ia64/ia32/ia32_entry.S 1.18 -> 1.20 # include/asm-m68knommu/processor.h 1.3 -> 1.4 # usr/Makefile 1.4 -> 1.5 # include/linux/list.h 1.21 -> 1.23 # scripts/Makefile.modpost 1.2 -> 1.3 # Documentation/cpu-freq/governors.txt 1.1 -> 1.2 # arch/x86_64/kernel/process.c 1.14 -> 1.15 # arch/sh/vmlinux.lds.S 1.9 -> 1.10 # net/ipv4/raw.c 1.27 -> 1.28 # Documentation/DocBook/sis900.tmpl 1.2 -> 1.3 # fs/ncpfs/ioctl.c 1.5 -> 1.6 # net/ipv6/tcp_ipv6.c 1.38 -> 1.40 # drivers/pcmcia/tcic.c 1.15 -> 1.16 # net/bluetooth/hci_sock.c 1.17 -> 1.18 # include/asm-ia64/ide.h 1.12 -> 1.13 # include/asm-ia64/iosapic.h 1.5 -> 1.9 # fs/ext3/xattr.c 1.10 -> 1.11 # include/asm-ia64/perfmon.h 1.11 -> 1.12 # Documentation/networking/NAPI_HOWTO.txt 1.3 -> 1.4 # fs/intermezzo/replicator.c 1.3 -> 1.4 # arch/mips/dec/irq.c 1.6 -> 1.7 # include/linux/netfilter_bridge/ebt_nat.h 1.1 -> 1.2 # drivers/pcmcia/hd64465_ss.c 1.10 -> 1.11 # net/ipv4/xfrm_user.c 1.10 -> 1.12 # arch/ia64/kernel/sys_ia64.c 1.20 -> 1.21 # arch/m68knommu/platform/5249/config.c 1.1 -> 1.2 # drivers/block/loop.c 1.82 -> 1.83 # drivers/pnp/resource.c 1.9 -> 1.10 # arch/ia64/kernel/signal.c 1.20 -> 1.21 # Documentation/ia64/fsys.txt 1.4 -> 1.5 # Documentation/magic-number.txt 1.3 -> 1.4 # net/ipv4/esp.c 1.13 -> 1.15 # drivers/ide/ide-probe.c 1.32 -> 1.33 # arch/m68knommu/platform/5206/config.c 1.1 -> 1.2 # net/rose/rose_in.c 1.5 -> 1.6 # arch/arm/mm/fault-common.c 1.14 -> 1.15 # drivers/acorn/net/ether1.c 1.8 -> 1.9 # drivers/char/tty_io.c 1.63 -> 1.64 # drivers/video/bw2.c 1.1 -> 1.4 # drivers/scsi/pcmcia/fdomain_stub.c 1.12 -> 1.13 # arch/m68k/Kconfig 1.9 -> 1.10 # arch/x86_64/pci/irq.c 1.5 -> 1.6 # include/asm-arm/arch-shark/time.h 1.6 -> 1.7 # net/ipv6/ndisc.c 1.23 -> 1.24 # drivers/usb/core/urb.c 1.11 -> 1.13 # fs/jfs/jfs_txnmgr.c 1.39 -> 1.40 # MAINTAINERS 1.126 -> 1.127 # sound/pci/intel8x0.c 1.26 -> 1.27 # arch/parisc/Kconfig 1.10 -> 1.11 # net/ipv6/netfilter/ip6t_esp.c 1.1 -> 1.2 # drivers/usb/class/usb-midi.h 1.3 -> 1.4 # usr/gen_init_cpio.c 1.2 -> 1.3 # net/bridge/netfilter/ebt_dnat.c 1.1 -> 1.2 # include/linux/cpufreq.h 1.18 -> 1.22 # drivers/pcmcia/sa1100_generic.c 1.25 -> 1.26 # drivers/char/rio/rio_linux.c 1.14 -> 1.15 # arch/ia64/ia32/sys_ia32.c 1.43 -> 1.45 # arch/sparc64/kernel/sys_sunos32.c 1.28 -> 1.30 # drivers/block/rd.c 1.68 -> 1.69 # net/atm/lec.c 1.14 -> 1.16 # drivers/char/raw.c 1.28 -> 1.29 # drivers/cdrom/mcd.c 1.29 -> 1.30 # mm/mmap.c 1.72 -> 1.74 # arch/mips64/kernel/linux32.c 1.11 -> 1.12 # include/linux/netfilter_bridge/ebt_redirect.h 1.1 -> 1.2 # fs/ext2/xattr.c 1.9 -> 1.10 # include/asm-sparc64/compat.h 1.7 -> 1.8 # net/unix/af_unix.c 1.35 -> 1.37 # Documentation/kernel-docs.txt 1.4 -> 1.5 # Documentation/input/ff.txt 1.3 -> 1.4 # arch/sparc64/kernel/sys_sparc32.c 1.65 -> 1.67 # include/asm-i386/mach-summit/mach_apic.h 1.20 -> 1.22 # drivers/net/pppoe.c 1.21 -> 1.23 # drivers/hotplug/cpci_hotplug_pci.c 1.6 -> 1.7 # include/linux/compiler.h 1.12 -> 1.13 # fs/intermezzo/file.c 1.8 -> 1.9 # drivers/video/cg3.c 1.1 -> 1.4 # net/bluetooth/rfcomm/sock.c 1.12 -> 1.14 # sound/oss/sb_card.c 1.15 -> 1.17 # drivers/block/z2ram.c 1.21 -> 1.22 # include/linux/if_wanpipe_common.h 1.3 -> 1.4 # net/rose/rose_timer.c 1.7 -> 1.8 # Documentation/networking/sk98lin.txt 1.3 -> 1.4 # drivers/net/eepro100.c 1.57 -> 1.59 # init/do_mounts.h 1.3 -> 1.4 # drivers/scsi/pcmcia/Kconfig 1.3 -> 1.4 # include/linux/wanpipe.h 1.5 -> 1.6 # drivers/isdn/i4l/isdn_ppp.c 1.72 -> 1.74 # drivers/net/sk_mca.c 1.8 -> 1.9 # fs/ext2/super.c 1.45 -> 1.46 # include/asm-ia64/ptrace.h 1.8 -> 1.9 # fs/nfs/file.c 1.25 -> 1.26 # drivers/i2c/i2c-algo-ibm_ocp.c 1.4 -> 1.5 # arch/sparc64/solaris/socket.c 1.8 -> 1.10 # arch/m68knommu/platform/5407/config.c 1.1 -> 1.2 # drivers/net/sk98lin/h/skgepnm2.h 1.2 -> 1.3 # drivers/isdn/hisax/telespci.c 1.22 -> 1.23 # drivers/isdn/hisax/hisax.h 1.45 -> 1.49 # arch/arm/mach-sa1100/generic.h 1.5 -> 1.6 # drivers/cdrom/sjcd.c 1.23 -> 1.24 # arch/mips/baget/irq.c 1.7 -> 1.8 # include/asm-ia64/machvec_sn1.h 1.5 -> 1.6 # Documentation/ia64/IRQ-redir.txt 1.1 -> 1.2 # drivers/scsi/sym53c8xx.c 1.29 -> 1.30 # drivers/scsi/zalon.c 1.2 -> 1.3 # net/packet/af_packet.c 1.18 -> 1.20 # Documentation/ide.txt 1.7 -> 1.8 # arch/i386/oprofile/op_model_ppro.c 1.4 -> 1.5 # drivers/block/paride/pf.c 1.37 -> 1.38 # include/asm-x86_64/unistd.h 1.12 -> 1.13 # mm/page-writeback.c 1.56 -> 1.57 # net/sunrpc/xprt.c 1.50 -> 1.51 # arch/x86_64/kernel/time.c 1.13 -> 1.14 # net/bluetooth/bnep/core.c 1.14 -> 1.15 # net/ipv4/tcp_output.c 1.23 -> 1.24 # net/bluetooth/l2cap.c 1.18 -> 1.20 # drivers/isdn/hisax/hisax_isac.h 1.3 -> 1.4 # drivers/oprofile/oprofile_stats.c 1.2 -> 1.3 # arch/mips/mips-boards/atlas/atlas_int.c 1.4 -> 1.5 # drivers/s390/char/con3215.c 1.12 -> 1.13 # drivers/cdrom/cdu31a.c 1.32 -> 1.33 # net/ax25/ax25_ds_in.c 1.4 -> 1.5 # drivers/net/wan/sdla_x25.c 1.20 -> 1.21 # Documentation/scsi/ibmmca.txt 1.7 -> 1.8 # arch/m68knommu/Kconfig 1.6 -> 1.8 # arch/x86_64/kernel/signal.c 1.14 -> 1.15 # arch/m68knommu/platform/68360/entry.S 1.3 -> 1.4 # Documentation/crypto/api-intro.txt 1.11 -> 1.12 # include/linux/netfilter_bridge/ebt_ip.h 1.2 -> 1.3 # arch/arm/kernel/time.c 1.14 -> 1.15 # arch/ppc64/kernel/sys_ppc32.c 1.49 -> 1.50 # arch/ia64/mm/tlb.c 1.14 -> 1.15 # include/linux/ipv6.h 1.3 -> 1.4 # Documentation/filesystems/directory-locking 1.3 -> 1.4 # drivers/scsi/fdomain.c 1.18 -> 1.19 # drivers/pci/probe.c 1.30 -> 1.33 # init/do_mounts_rd.c 1.1 -> 1.2 # CREDITS 1.77 -> 1.78 # drivers/video/p9100.c 1.1 -> 1.4 # drivers/message/i2o/i2o_block.c 1.51 -> 1.52 # Documentation/scsi/ChangeLog.ncr53c8xx 1.4 -> 1.5 # arch/i386/kernel/cpu/cpufreq/longrun.c 1.11 -> 1.12 # include/asm-x86_64/compat.h 1.5 -> 1.6 # drivers/usb/host/ohci-pci.c 1.9 -> 1.10 # drivers/net/shaper.c 1.12 -> 1.13 # Documentation/arm/Booting 1.1 -> 1.2 # arch/mips64/mips-boards/malta/malta_int.c 1.3 -> 1.4 # arch/i386/kernel/numaq.c 1.6 -> 1.8 # arch/s390x/kernel/linux32.c 1.39 -> 1.41 # include/asm-x86_64/pgtable.h 1.13 -> 1.15 # drivers/eisa/virtual_root.c 1.1 -> 1.2 # net/ipv4/xfrm_state.c 1.9 -> 1.11 # net/core/skbuff.c 1.19 -> 1.20 # include/linux/sdladrv.h 1.2 -> 1.3 # drivers/scsi/qlogicfc.c 1.27 -> 1.28 # arch/ppc/8xx_io/uart.c 1.18 -> 1.19 # include/net/sock.h 1.30 -> 1.33 # include/asm-parisc/bug.h 1.1 -> 1.2 # net/netrom/nr_timer.c 1.6 -> 1.7 # drivers/media/video/zoran.h 1.1 -> 1.2 # drivers/net/wan/sdlamain.c 1.14 -> 1.15 # drivers/isdn/hisax/isdnl1.h 1.29 -> 1.30 # Documentation/scsi/dpti.txt 1.3 -> 1.4 # include/asm-m68k/processor.h 1.7 -> 1.8 # net/core/sock.c 1.14 -> 1.18 # include/net/inet_common.h 1.4 -> 1.5 # include/asm-m68k/sun3_pgtable.h 1.3 -> 1.4 # include/linux/devfs_fs_kernel.h 1.28 -> 1.30 # net/atm/common.h 1.2 -> 1.3 # Documentation/block/biodoc.txt 1.3 -> 1.4 # net/ipv6/ip6_input.c 1.6 -> 1.7 # arch/i386/oprofile/op_model_athlon.c 1.4 -> 1.5 # arch/mips64/kernel/scall_o32.S 1.6 -> 1.7 # Documentation/isdn/INTERFACE 1.5 -> 1.6 # drivers/pnp/driver.c 1.12 -> 1.14 # include/asm-i386/pgtable.h 1.26 -> 1.30 # arch/ia64/ia32/ia32_ioctl.c 1.6 -> 1.7 # Documentation/kbuild/makefiles.txt 1.6 -> 1.7 # drivers/isdn/hisax/mic.c 1.26 -> 1.27 # drivers/s390/block/xpram.c 1.35 -> 1.36 # Documentation/networking/3c359.txt 1.1 -> 1.2 # net/ipv6/route.c 1.19 -> 1.21 # drivers/serial/21285.c 1.14 -> 1.15 # drivers/isdn/hisax/hisax_fcpcipnp.c 1.13 -> 1.15 # net/ipv4/tcp_input.c 1.33 -> 1.34 # drivers/scsi/sd.c 1.103 -> 1.105 # arch/m68k/atari/stram.c 1.21 -> 1.22 # drivers/s390/char/tape_block.c 1.1 -> 1.2 # net/ax25/ax25_std_in.c 1.4 -> 1.5 # arch/i386/mm/init.c 1.43 -> 1.45 # net/ipv4/tcp_minisocks.c 1.22 -> 1.24 # arch/ppc64/vmlinux.lds.S 1.12 -> 1.13 # include/asm-arm/proc-armv/tlbflush.h 1.2 -> 1.3 # include/asm-i386/i387.h 1.7 -> 1.10 # Documentation/cpu-freq/core.txt 1.3 -> 1.4 # sound/oss/trident.c 1.35 -> 1.36 # Documentation/arm/XScale/IOP3XX/dma.txt 1.1 -> 1.2 # net/ipv6/Makefile 1.9 -> 1.10 # drivers/isdn/hisax/enternow_pci.c 1.19 -> 1.20 # arch/alpha/Kconfig 1.10 -> 1.11 # arch/arm/kernel/ecard.c 1.20 -> 1.21 # drivers/block/DAC960.c 1.52 -> 1.53 # Documentation/scsi/ChangeLog.sym53c8xx 1.5 -> 1.6 # drivers/s390/block/dasd_genhd.c 1.21 -> 1.22 # Documentation/usb/philips.txt 1.6 -> 1.7 # arch/v850/kernel/irq.c 1.5 -> 1.6 # drivers/i2c/i2c-algo-pcf.c 1.8 -> 1.9 # net/atm/signaling.c 1.4 -> 1.5 # mm/slab.c 1.65 -> 1.69 # include/linux/socket.h 1.6 -> 1.7 # include/linux/eisa.h 1.2 -> 1.3 # arch/alpha/kernel/irq.c 1.18 -> 1.19 # drivers/md/dm.c 1.16 -> 1.17 # net/ipv4/netfilter/ip_nat_standalone.c 1.16 -> 1.18 # fs/filesystems.c 1.11 -> 1.12 # drivers/scsi/scsi_scan.c 1.63 -> 1.64 # arch/x86_64/Kconfig 1.15 -> 1.16 # include/asm-s390/pgtable.h 1.14 -> 1.15 # net/bridge/netfilter/ebt_mark.c 1.1 -> 1.2 # kernel/sched.c 1.161 -> 1.170 # Documentation/s390/cds.txt 1.7 -> 1.8 # drivers/media/video/planb.c 1.12 -> 1.13 # drivers/Makefile 1.31 -> 1.32 # arch/m68knommu/platform/5307/Makefile 1.2 -> 1.3 # drivers/block/paride/pd.c 1.46 -> 1.47 # net/atm/resources.h 1.1 -> 1.2 # arch/ia64/kernel/sigframe.h 1.3 -> 1.4 # include/asm-i386/pgtable-3level.h 1.10 -> 1.11 # init/Kconfig 1.10 -> 1.12 # drivers/usb/storage/sddr09.c 1.22 -> 1.23 # Documentation/sound/oss/NEWS 1.3 -> 1.4 # scripts/Makefile.build 1.31 -> 1.32 # arch/ia64/kernel/gate.S 1.13 -> 1.14 # drivers/block/xd.c 1.49 -> 1.50 # net/ipv6/netfilter/ip6t_hbh.c 1.1 -> 1.2 # drivers/ide/ide-io.c 1.3 -> 1.4 # include/asm-s390x/processor.h 1.10 -> 1.11 # arch/ppc/kernel/irq.c 1.23 -> 1.24 # net/atm/mpc.c 1.8 -> 1.9 # drivers/s390/char/tuball.c 1.8 -> 1.9 # net/bridge/netfilter/ebt_redirect.c 1.1 -> 1.2 # drivers/mtd/ftl.c 1.44 -> 1.45 # include/linux/atmdev.h 1.7 -> 1.8 # net/ipv6/udp.c 1.18 -> 1.19 # arch/sparc64/kernel/sparc64_ksyms.c 1.38 -> 1.40 # drivers/net/eth16i.c 1.12 -> 1.13 # include/net/xfrm.h 1.13 -> 1.16 # fs/sysfs/inode.c 1.83 -> 1.84 # include/asm-m68knommu/pci.h 1.1 -> 1.2 # Documentation/driver-model/platform.txt 1.1 -> 1.2 # fs/sysfs/mount.c 1.5 -> 1.6 # drivers/s390/block/dasd_3990_erp.c 1.11 -> 1.12 # arch/ppc64/kernel/sys32.S 1.11 -> 1.12 # Documentation/computone.txt 1.3 -> 1.4 # arch/m68knommu/platform/68360/commproc.c 1.2 -> 1.3 # arch/ia64/vmlinux.lds.S 1.27 -> 1.28 # drivers/char/vt.c 1.32 -> 1.35 # drivers/char/hvc_console.c 1.12 -> 1.13 # scripts/per-cpu-check.awk 1.3 -> 1.4 # include/asm-arm/ecard.h 1.6 -> 1.7 # arch/sparc64/vmlinux.lds.S 1.16 -> 1.17 # drivers/scsi/aic7xxx/aicasm/Makefile 1.8 -> 1.9 # arch/arm/mach-sa1100/system3.c 1.16 -> 1.17 # drivers/pci/setup-res.c 1.12 -> 1.13 # drivers/isdn/hisax/config.c 1.43 -> 1.46 # drivers/acorn/net/etherh.c 1.12 -> 1.13 # arch/sparc64/Kconfig 1.14 -> 1.16 # arch/ppc64/kernel/misc.S 1.50 -> 1.51 # net/ipv4/netfilter/iptable_mangle.c 1.8 -> 1.10 # include/asm-s390x/fcntl.h 1.2 -> 1.3 # arch/ia64/kernel/irq.c 1.18 -> 1.20 # fs/cifs/CHANGES 1.8 -> 1.10 # include/asm-parisc/pgtable.h 1.10 -> 1.11 # net/ipv4/ah.c 1.11 -> 1.13 # include/asm-x86_64/proto.h 1.7 -> 1.8 # arch/m68k/vmlinux-std.lds 1.14 -> 1.15 # arch/arm/mach-integrator/Makefile 1.6 -> 1.7 # drivers/pcmcia/i82365.c 1.23 -> 1.24 # include/asm-x86_64/ia32.h 1.10 -> 1.13 # drivers/isdn/hisax/w6692.c 1.50 -> 1.51 # fs/hugetlbfs/inode.c 1.21 -> 1.22 # net/bridge/netfilter/ebtable_filter.c 1.2 -> 1.3 # arch/sparc64/kernel/ioctl32.c 1.53 -> 1.54 # drivers/cpufreq/freq_table.c 1.1 -> 1.3 # drivers/scsi/Kconfig 1.16 -> 1.17 # fs/ext3/super.c 1.51 -> 1.53 # arch/arm/kernel/Makefile 1.15 -> 1.16 # arch/ia64/tools/print_offsets.c 1.13 -> 1.16 # include/linux/device.h 1.83 -> 1.84 # fs/cifs/connect.c 1.11 -> 1.13 # drivers/cdrom/cm206.c 1.29 -> 1.30 # arch/i386/kernel/cpu/cpufreq/p4-clockmod.c 1.12 -> 1.14 # drivers/pci/Makefile 1.23 -> 1.24 # arch/arm/common/sa1111.c 1.22 -> 1.23 # fs/partitions/check.c 1.95 -> 1.96 # arch/cris/Kconfig 1.5 -> 1.6 # include/asm-ia64/siginfo.h 1.11 -> 1.12 # drivers/serial/68328serial.h 1.2 -> 1.3 # drivers/serial/Kconfig 1.5 -> 1.6 # net/ax25/af_ax25.c 1.17 -> 1.19 # include/asm-ia64/pci.h 1.11 -> 1.12 # net/ax25/ax25_ds_timer.c 1.8 -> 1.9 # net/ipv4/tcp_timer.c 1.12 -> 1.13 # drivers/cdrom/aztcd.c 1.26 -> 1.27 # include/net/dst.h 1.10 -> 1.11 # drivers/net/bonding.c 1.17 -> 1.18 # include/asm-x86_64/segment.h 1.6 -> 1.7 # fs/intermezzo/methods.c 1.6 -> 1.7 # net/atm/raw.c 1.1 -> 1.2 # arch/ia64/kernel/perfmon.c 1.35.1.1 -> 1.38 # drivers/hotplug/cpqphp_pci.c 1.15 -> 1.16 # net/ax25/ax25_subr.c 1.5 -> 1.6 # net/sctp/ulpqueue.c 1.13 -> 1.14 # arch/i386/oprofile/nmi_int.c 1.8 -> 1.9 # include/asm-i386/mach-bigsmp/mach_apic.h 1.6 -> 1.8 # drivers/isdn/hisax/diva.c 1.39 -> 1.40 # net/ipv4/icmp.c 1.26 -> 1.27 # drivers/pnp/card.c 1.8 -> 1.10 # fs/locks.c 1.37 -> 1.39 # drivers/isdn/hisax/hfcscard.c 1.15 -> 1.16 # net/atm/resources.c 1.6 -> 1.7 # drivers/char/rio/riotable.c 1.7 -> 1.8 # drivers/oprofile/cpu_buffer.h 1.3 -> 1.4 # arch/ia64/Kconfig 1.14 -> 1.18 # arch/s390x/kernel/linux32.h 1.7 -> 1.8 # drivers/video/cg14.c 1.1 -> 1.4 # net/x25/af_x25.c 1.21 -> 1.23 # include/asm-ia64/sal.h 1.12 -> 1.14 # drivers/isdn/hisax/ix1_micro.c 1.26 -> 1.27 # crypto/api.c 1.26 -> 1.27 # include/linux/netfilter_bridge/ebtables.h 1.2 -> 1.3 # fs/cifs/TODO 1.3 -> 1.4 # drivers/char/sh-sci.c 1.12 -> 1.13 # arch/arm/mach-sa1100/irq.c 1.12 -> 1.13 # drivers/pnp/manager.c 1.4 -> 1.5 # drivers/serial/68360serial.c 1.6 -> 1.7 # fs/cifs/misc.c 1.5 -> 1.6 # arch/ia64/kernel/traps.c 1.25 -> 1.26 # arch/arm/vmlinux-armo.lds.in 1.13 -> 1.14 # drivers/ide/ide-lib.c 1.6 -> 1.7 # drivers/block/cciss.c 1.74 -> 1.76 # arch/ia64/mm/fault.c 1.10 -> 1.12 # include/asm-sparc64/fcntl.h 1.4 -> 1.5 # drivers/parport/ieee1284_ops.c 1.9 -> 1.10 # drivers/macintosh/macserial.c 1.12 -> 1.13 # include/linux/netfilter_bridge/ebt_log.h 1.1 -> 1.2 # arch/x86_64/boot/setup.S 1.3 -> 1.4 # arch/x86_64/ia32/ia32_signal.c 1.10 -> 1.11 # drivers/block/paride/pcd.c 1.31 -> 1.32 # drivers/serial/68328serial.c 1.2 -> 1.3 # net/rose/rose_route.c 1.6 -> 1.7 # include/asm-i386/serial.h 1.2 -> 1.3 # drivers/isdn/hisax/sedlbauer.c 1.33 -> 1.34 # drivers/pci/setup-bus.c 1.13 -> 1.14 # net/atm/clip.c 1.6 -> 1.7 # net/rose/rose_subr.c 1.6 -> 1.7 # drivers/acorn/net/ether3.c 1.12 -> 1.13 # net/wanrouter/af_wanpipe.c 1.15 -> 1.18 # include/asm-x86_64/processor.h 1.12 -> 1.13 # fs/mbcache.c 1.3 -> 1.4 # net/x25/x25_in.c 1.9 -> 1.10 # include/linux/if_wanpipe.h 1.3 -> 1.4 # arch/s390x/kernel/wrapper32.S 1.17 -> 1.19 # arch/mips64/mips-boards/atlas/atlas_int.c 1.3 -> 1.4 # include/linux/pnp.h 1.14 -> 1.17 # net/ipv4/igmp.c 1.13 -> 1.15 # arch/ppc/Kconfig 1.17 -> 1.18 # arch/ia64/kernel/ptrace.c 1.18 -> 1.20 # net/bridge/netfilter/ebtable_nat.c 1.2 -> 1.3 # drivers/net/wan/sdla_fr.c 1.23 -> 1.24 # Documentation/usb/scanner.txt 1.4 -> 1.5 # arch/ia64/sn/kernel/sn2/Makefile 1.8 -> 1.9 # arch/cris/kernel/irq.c 1.9 -> 1.10 # fs/inode.c 1.83 -> 1.84 # arch/ia64/kernel/smp.c 1.22 -> 1.23 # arch/sh/Kconfig 1.7 -> 1.8 # include/asm-alpha/processor.h 1.8 -> 1.9 # arch/ia64/kernel/init_task.c 1.7 -> 1.8 # fs/intermezzo/super.c 1.11 -> 1.12 # net/ipv4/route.c 1.40 -> 1.42 # drivers/scsi/imm.c 1.18 -> 1.19 # arch/i386/kernel/i386_ksyms.c 1.46 -> 1.49 # include/linux/slab.h 1.17 -> 1.18 # drivers/block/acsi.c 1.47 -> 1.48 # arch/i386/kernel/sysenter.c 1.9 -> 1.11 # drivers/isdn/hisax/teles3.c 1.25 -> 1.26 # drivers/block/umem.c 1.34 -> 1.35 # include/asm-sparc/processor.h 1.11 -> 1.12 # arch/mips/arc/arc_con.c 1.1 -> 1.2 # Documentation/sound/oss/PSS-updates 1.3 -> 1.4 # arch/parisc/kernel/syscall.S 1.7 -> 1.8 # net/appletalk/ddp.c 1.16 -> 1.18 # arch/i386/pci/irq.c 1.20 -> 1.22 # drivers/isdn/hisax/asuscom.c 1.31 -> 1.32 # drivers/ide/pci/amd74xx.c 1.14 -> 1.15 # drivers/char/amiserial.c 1.12 -> 1.13 # include/asm-i386/mach-default/mach_apic.h 1.20 -> 1.22 # drivers/net/wan/wanpipe_multppp.c 1.11 -> 1.12 # drivers/scsi/qlogicfas.c 1.17 -> 1.18 # drivers/isdn/hisax/teleint.c 1.19 -> 1.20 # Documentation/cpu-freq/cpu-drivers.txt 1.1 -> 1.3 # include/asm-ia64/thread_info.h 1.6 -> 1.8 # arch/arm/mach-sa1100/Makefile 1.24 -> 1.26 # arch/i386/kernel/i387.c 1.12 -> 1.14 # drivers/video/leofb.c 1.11 -> (deleted) # net/ipv6/netfilter/ip6t_ipv6header.c 1.1 -> 1.2 # include/asm-arm/arch-sa1100/time.h 1.6 -> 1.7 # drivers/isdn/hisax/avm_a1p.c 1.24 -> 1.25 # drivers/hotplug/ibmphp_core.c 1.23 -> 1.24 # arch/arm/mach-sa1100/Kconfig 1.3 -> 1.4 # include/asm-parisc/processor.h 1.8 -> 1.9 # include/asm-ia64/mmzone.h 1.3 -> 1.4 # Documentation/video4linux/bttv/Sound-FAQ 1.6 -> 1.7 # drivers/pnp/system.c 1.6 -> 1.8 # fs/block_dev.c 1.122 -> 1.123 # include/asm-sh/pgtable.h 1.13 -> 1.16 # arch/x86_64/pci/direct.c 1.3 -> 1.4 # arch/i386/mm/pgtable.c 1.8 -> 1.9 # mm/pdflush.c 1.17 -> 1.18 # include/asm-x86_64/desc.h 1.7 -> 1.8 # arch/ia64/kernel/unwind.c 1.11 -> 1.16 # net/netrom/nr_subr.c 1.5 -> 1.6 # drivers/video/ffb.c 1.1 -> 1.4 # include/asm-um/pgtable.h 1.7 -> 1.10 # drivers/char/rio/rioparam.c 1.3 -> 1.4 # net/atm/common.c 1.12 -> 1.14 # include/asm-parisc/compat.h 1.2 -> 1.3 # arch/ppc/vmlinux.lds.S 1.17 -> 1.18 # drivers/isdn/i4l/isdn_ppp_mp.h 1.3 -> 1.4 # (new) -> 1.1 arch/ia64/sn/io/sn2/ml_iograph.c # (new) -> 1.1 arch/ia64/sn/io/sn2/xtalk.c # (new) -> 1.1 arch/ia64/sn/io/sn2/ml_SN_init.c # (new) -> 1.1 include/asm-ia64/sn/rw_mmr.h # (new) -> 1.1 arch/ia64/sn/io/sn2/klconflib.c # (new) -> 1.1 arch/ia64/sn/io/sn2/module.c # (new) -> 1.1 arch/ia64/sn/kernel/iomv.c # (new) -> 1.1 arch/ia64/sn/io/sn2/pci_bus_cvlink.c # (new) -> 1.1 include/net/ah.h # (new) -> 1.1 arch/i386/boot/mtools.conf.in # (new) -> 1.1 include/net/compat_socket.h # (new) -> 1.1 arch/ia64/sn/io/sn2/sgi_io_init.c # (new) -> 1.2 include/asm-ia64/rwsem.h # (new) -> 1.1 arch/ia64/sn/io/sn2/l1_command.c # (new) -> 1.1 Documentation/basic_profiling.txt # (new) -> 1.1 arch/ia64/sn/io/sn2/xbow.c # (new) -> 1.1 arch/m68knommu/platform/68VZ328/de2/Makefile # (new) -> 1.1 include/asm-ia64/sn/pci/pic.h # (new) -> 1.1 arch/ia64/sn/io/sn2/shub.c # (new) -> 1.1 net/compat.c # (new) -> 1.1 arch/ia64/sn/io/sn2/pic.c # (new) -> 1.1 arch/arm/mach-sa1100/ssp.c # (new) -> 1.1 arch/ia64/sn/io/sn2/geo_op.c # (new) -> 1.1 arch/ia64/sn/io/sn2/klgraph.c # (new) -> 1.1 include/asm-ia64/sn/geo.h # (new) -> 1.2 net/ipv6/esp6.c # (new) -> 1.1 Documentation/eisa.txt # (new) -> 1.1 arch/ia64/sn/io/ioconfig_bus.c # (new) -> 1.1 include/net/esp.h # (new) -> 1.2 net/ipv6/ah6.c # (new) -> 1.1 arch/m68knommu/platform/68VZ328/ucdimm/Makefile # (new) -> 1.1 arch/ia64/sn/io/sn2/l1.c # (new) -> 1.1 arch/x86_64/ia32/tls32.c # (new) -> 1.1 arch/ia64/sn/io/sn2/shubio.c # (new) -> 1.1 drivers/video/leo.c # (new) -> 1.1 arch/ia64/sn/io/sn2/pcibr/Makefile # (new) -> 1.1 include/asm-ia64/sn/ioconfig_bus.h # (new) -> 1.1 arch/arm/kernel/apm.c # (new) -> 1.1 arch/ia64/sn/kernel/sn2/ptc_deadlock.S # (new) -> 1.2 drivers/pci/bus.c # (new) -> 1.1 arch/ia64/sn/kernel/sn2/sn_proc_fs.c # (new) -> 1.1 arch/ia64/sn/io/sn2/pciio.c # (new) -> 1.1 arch/arm/kernel/pm.c # (new) -> 1.1 arch/ia64/sn/io/sn2/Makefile # (new) -> 1.1 arch/m68knommu/platform/5307/timers.c # (new) -> 1.1 include/asm-ia64/sn/sn2/geo.h # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/03/04 torvalds@home.transmeta.com 1.1068.1.17 # Linux 2.5.64 # -------------------------------------------- # 03/03/05 davem@redhat.com 1.1068.1.18 # [PATCH] Fix time comparison typing bugs. # # Many places use inappropriate types for comparing jiffies, # int for example. Fix those places up. # -------------------------------------------- # 03/03/05 davem@nuts.ninka.net 1.1068.1.19 # Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5 # into nuts.ninka.net:/home/davem/src/BK/sparc-2.5 # -------------------------------------------- # 03/03/05 davem@nuts.ninka.net 1.1068.1.20 # [SPARC64]: Fix cpufreq config deps. # -------------------------------------------- # 03/03/05 Jeff.Wiedemeier@hp.com 1.1025.20.2 # [PATCH] enable setting of marvel/titan agp->type # # Now that the agpgart support is in, this can be enabled. # # /jeff # -------------------------------------------- # 03/03/05 greg@kroah.com 1.1068.8.1 # [PATCH] USB: add support for Treo devices to the visor driver. # # Finally... # -------------------------------------------- # 03/03/05 clemens@ladisch.de 1.1068.8.2 # [PATCH] usb-midi.h: fixes for SC-8820/50 # # sync with Nagano's version: # - protect vendors ids against multiple definitions # - sort Roland device ids # - fix SC-8850 cable bitmask # - add quirk for the SC-8820 # - add quirk for the MOTU Fastlane # -------------------------------------------- # 03/03/05 andre.breiler@null-mx.org 1.1068.8.3 # [PATCH] io_edgeport.c diff to fix endianess bugs # # attached a fix for the io_edgeport usb serial driver # This diff fixes endianess issues which prevented the driver to work on # bigendian machines (e.g. sparc). # -------------------------------------------- # 03/03/05 andmike@us.ibm.com 1.1068.1.21 # [PATCH] Fix SCSI error handler abort case # # I had my list empty checks reversed if aborting and bus device reset # failed. The condition that causes the error handler to run is still # unknown. # -------------------------------------------- # 03/03/05 greg@kroah.com 1.1068.8.4 # [PATCH] USB: added support for radio shack device to pl2303 driver. # # Thanks to gene_heskett@iolinc.net for the info for this. # -------------------------------------------- # 03/03/05 levon@movementarian.org 1.1068.1.22 # [PATCH] Fix oprofile on UP, small additional fix # # The below has been in -mm for a while, and has been tested on my UP # and 2-way machines. # # OProfile was completely unsafe on UP - a spinlock is no protection # against the NMI arriving and putting data into the buffer. Pretty stupid # bug. This fixes it by implementing reader/writer windows in the buffer # and removing the lock altogether. This patch was originally done by Will # Cohen. # # It also fixes the oops Dave Hansen saw on 2.5.62 SMP # -------------------------------------------- # 03/03/05 davem@nuts.ninka.net 1.1070 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/03/05 mochel@osdl.org 1.1068.9.1 # sysfs: Make sure root inode is executable and readable by everyone. # -------------------------------------------- # 03/03/05 mochel@osdl.org 1.1068.9.2 # driver model: fix platform_match() # # - Make it compare the name in struct platform_dev to the driver's name. # # From Dominik Brodowski # -------------------------------------------- # 03/03/05 mochel@osdl.org 1.1068.9.3 # sysfs: don't complain when sysfs can't register. # # During startup, sysfs won't succeed in registering with itself, because # it's not yet inititialized. This was causing an unnecessary error on boot. # -------------------------------------------- # 03/03/05 mochel@osdl.org 1.1068.9.4 # cpufreq: fix compile error. # # Use ->dev instead of ->intf.dev in struct cpufreq_policy. Introduced whilst # cleaning up part of the cpufreq code. # -------------------------------------------- # 03/03/05 miyazawa@linux-ipv6.org 1.1071 # [IPSEC]: Add full ipv6 support. # # Credits also to Mitsuru Kanda , # YOSHIFUJI Hideaki , # and Kunihiro Ishiguro. # -------------------------------------------- # 03/03/05 mochel@osdl.org 1.1068.1.23 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/03/05 torvalds@home.transmeta.com 1.1068.10.1 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/05 kai@tp1.ruhr-uni-bochum.de 1.1068.11.1 # kbuild: Make build stop on vmlinux link error # # set -e is needed for each (continued) line. # -------------------------------------------- # 03/03/05 kai@tp1.ruhr-uni-bochum.de 1.1068.11.2 # kbuild: Add some missing FORCE # # Those were missing, not particularly harmful, but still needed for # correctness. # -------------------------------------------- # 03/03/05 kai@tp1.ruhr-uni-bochum.de 1.1068.11.3 # kbuild: Make per-cpu-check ignore __crc_ symbols. # # We warn when symbols end in __per_cpu, but aren't in the per-cpu section. # However, checksum symbols gave false positives. # -------------------------------------------- # 03/03/05 sam@mars.ravnborg.org 1.1068.11.4 # [PATCH] kbuild: Smart notation for non-verbose output # # Create a nice shorthand to enable the non-verbose output mode. # make V=1 => Gives verbose output (default) # make V=0 => Gives non-verbose output # # One of the reasons why people does not use KBUILD_VERBOSE=0 that # much is simply the typing needed. # This notation should make it acceptable to type it. # The usage of "make V=0" is restricted to the command line. # Anyone that wants to enable the non-verbose mode pr. default shall # set KBUILD_VERBOSE in the shell. # -------------------------------------------- # 03/03/05 arnd@arndb.de 1.1068.11.5 # [trivial] avoid a warning for each module on s390x # # s390x has a reference to _GLOBAL_OFFSET_TABLE_ in each module # that is resolved by the module loader. This patch prevents # modpost from emitting a warning about that symbol. # -------------------------------------------- # 03/03/05 sam@mars.ravnborg.org 1.1068.11.6 # [PATCH] kbuild: touch-module after successfull creation only # # On Mon, Mar 03, 2003 at 05:11:10PM -0500, Bill Davidsen wrote: # > scripts/Makefile.modinst:16: *** Uh-oh, you have stale module entries. You # messed with SUBDIRS, do not complain if something goes wrong. # # This happens if you have encountered a compile error in a module. # In this case you did not succeed the compilation of fs/binfmt_aout, # and therefore no .o file can be located. # kbuild assumes this is because you have messed with SUBDIRS, which is wrong. # -------------------------------------------- # 03/03/05 davem@nuts.ninka.net 1.1068.10.2 # [KERNEL]: Add typecheck macro for verifying types at compile time. # -------------------------------------------- # 03/03/05 davem@nuts.ninka.net 1.1068.10.3 # [JIFFIES]: Use typecheck in time_foo jiffies macros. # -------------------------------------------- # 03/03/05 torvalds@home.transmeta.com 1.1068.10.4 # Fix up some timeouts to use the proper types. # # (While "signed long" is the same in practice, it is technically # incorrect, and the new anal type-checker complains). # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.1 # [ARM] Remove set_mac_address from acorn drivers. # # Acorn Ethernet drivers provided a duplicate set_mac_address # implementation which reflects the generic ethernet version in # drivers/net/net_init.c. Use the generic version instead. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.2 # [ARM] Convert ecard.c shutdown/reboot to use driver model # # ecard.c used to use the reboot notifier to ensure that the expansion # cards are in the correct state for rebooting. Use the driver model # shutdown method instead. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.3 # [ARM] Always call schedule_tail() after a fork() # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.4 # [ARM] Always claim the timer IRQ using SA_INTERRUPT. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.5 # [ARM] Add new kernel typedefs for __kernel_{timer,clockid}_t. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.6 # [ARM] Add dummy set_pgd() implementation. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.7 # [ARM] Make ARM's pci_controller_num dev argument appear to be used. # # This cuts down on the number of warnings during the build. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.8 # [ARM] Kill old mkdep dependency hack. # # We include a header file in an indirect method, which mkdep didn't # understand. Now that mkdep is gone, we don't need the hack to make # mkdep do the right thing. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.9 # [ARM] Fix ARM ide.h # # Kill ide_* resource handling. Add __ide_mm* macros to use our string # based mmio. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.10 # [ARM] Make TLB instruction selection more fine-grained # # This eliminates some unnecessary branches and instructions in the # TLB flush macros where configurations allow for this to occur. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.11 # [ARM] Update mach-types to latest vesion. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.12 # [ARM] Ensure we preserve other CPSR bits when switching to SVC mode. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.13 # [ARM] Power management updates # # This provides an element of core PM support to ARM, providing an APM # like user space interface, and separating the core PM support from # the SA1100 PM implementation. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.14 # [ARM] Add better PM support to SA1111 and SA11x0. # # This follows our existing PM interfaces. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.15 # [ARM] Clean up ARM PCI support (bios32.c) # # Eliminate have_isa_bridge - use isa_bridge instead. # Clean up PCI bus walking. # Clean up detection of fast back to back capability. # Ensure we set the bridge control register appropriately. # Pin swizzle functions are never called with pin == 0. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.16 # [CPUFREQ] Update ARM CPUFREQ drivers # # A 4 patch set from Dominik Brodowski, tested and fixed up by rmk # for ARM. # # (1) # # - the system3.c cpufreq notifier couldn't possibly compile before because # cpufreq_updateminmax has been undefined for ages. # - clean up sa1100fb.c notifier to specify exactly what's left TBD. # - double #include of cpufreq.c in drivers/pcmcia/sa1100_generic.c # # (2) # # Split up config symbols, add help text for CPU_FREQ_PROC_INTF # # (3) # # - update the Integrator CPUfreq driver so that it can get along with # cpufreq policies. # - modularize Integrator CPUfreq driver (all it did with # !CONFIG_CPU_FREQ was to print out some debug information) # # (4) # # - update the SA11x0 CPUfreq drivers so that they can get along with # cpufreq policies and governors. # - update the cpufreq core so that cpufreq_get() returns something # sensible during the first ->setpolicy or ->target call. # -------------------------------------------- # 03/03/06 jmorris@intercode.com.au 1.1072 # [IPV4]: Fix multicast route lookups. # -------------------------------------------- # 03/03/06 laforge@netfilter.org 1.1073 # [NETFILTER]: Fix ipv6 build. # -------------------------------------------- # 03/03/06 davem@kernel.bkbits.net 1.1074 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/03/06 ink@jurassic.park.msu.ru 1.1025.20.3 # [PATCH] alpha pcibios_claim_console_setup fix # # pcibios_claim_console_setup() doesn't look behind PCI-PCI bridges. # # Noticed by Anton Blanchard. # # Ivan. # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075 # Merge bk://are.twiddle.net/axp-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1073.1.1 # [NETFILTER]: Remove 2.0 and 2.2 stuff from netfilter. # -------------------------------------------- # 03/03/06 davem@nuts.ninka.net 1.1076 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/03/06 bcrl@redhat.com 1.1077 # [NET]: Simplify scm handling and sendmsg/recvmsg invocation, consolidate net compat syscalls. # # 1) Pull scm argument from sendmsg/recvmsg, it is available # from I/O control block # 2) Consolidate networking syscall compat call into net/compat.c # 3) Change ops->{sendmsg,recvmsg}() code sequences into sock_{sendmsg,recvmsg}() # -------------------------------------------- # 03/03/06 davidm@tiger.hpl.hp.com 1.914.127.34 # ia64: Make ia64_fetch_and_add() simpler to optimize so lib/rwsem.c # can be optimized properly. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.17 # [ARM] CPUFREQ - allow ARM to work with userspace governor. # # Patch from Dominik Brodowski. # # This patch is necessary to update the ARM drivers so that they can # live with the new cpufreq governor "userspace" (which I sent to Linus a # moment ago). # -------------------------------------------- # 03/03/06 davem@nuts.ninka.net 1.1078 # [NET]: Do not duplicate verify_compat_iovec in sparc64 solaris module. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1060.3.18 # [CPUFREQ] Make sa11x0_ppcr_to_freq return in units of kHz, not 100kHz. # -------------------------------------------- # 03/03/06 rmk@flint.arm.linux.org.uk 1.1068.10.5 # Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5 # into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075.1.1 # Make the "interactive bonus" work both ways - both the process # that is actually showing interactive behaviour (sleeping) and the # process that wakes up the interative process get a bonus. # # This means that processes that help interactive processes (usually # system daemons, and X11 in particular) will themselves get some bonus. # # The waker only gets whatever is left over from the "real" interactive # user, to avoid any bad behaviour. # -------------------------------------------- # 03/03/06 mingo@elte.hu 1.1075.2.1 # [PATCH] "interactivity changes", sched-2.5.64-A6 # # This includes the following items: # # - a new wakeup feature: SMART_WAKE_CHILD (now unconditional) [this is a # reworked version of the wakeup changes from Andrea's tree.] # # - scheduler parameter tunings (CHILD_PENALTY, MAX_TIMESLICE, # STARVATION_LIMIT, MAX_SLEEP_AVG) # # - activate_task() splitup to separate the interactivity-active variant # from the task-queue variant => this fixes our statistics in some cases. # # - finer-grained preemption: if priority is equal then the task with the # longer pending timeslice wins. # # - make it possible to disable sync-wakeups via SYNC_WAKEUPS (default:1) # # - a naming cleanup (sleep_timestamp => last_run) # # - fix up STARVATION_LIMIT usage so that a value of 0 is recognized as 'no # starvation limit'. # # It also merges Linus' "priority boost backmerging" # -------------------------------------------- # 03/03/06 torvalds@penguin.transmeta.com 1.1075.1.2 # Merge # -------------------------------------------- # 03/03/06 davidm@tiger.hpl.hp.com 1.1068.12.1 # ia64: Sync with 2.5.64. # -------------------------------------------- # 03/03/06 davidm@tiger.hpl.hp.com 1.1068.12.2 # ia64: Correct the value of siginfo.si_addr for SIGSEGV signals # triggered by NaT-page-consumption faults. # -------------------------------------------- # 03/03/06 ambx1@neo.rr.com 1.1075.1.3 # Manual Resource Setting Update # # This patch allows for partial setting of manual resources as needed by ALSA. # It does not change any existing APIs. # -------------------------------------------- # 03/03/06 stern@rowland.harvard.edu 1.1068.8.5 # [PATCH] USB: Patch for auto-sense cmd_len # # This patch fixes an oversight in usb-storage whereby the command length # and command buffer for an automatically-generated REQUEST-SENSE command # would not be initialized properly. # -------------------------------------------- # 03/03/06 davidm@tiger.hpl.hp.com 1.1068.12.3 # ia64: Hook up POSIX-timer syscalls. Take advantage of ptrace_notify(). # -------------------------------------------- # 03/03/06 david-b@pacbell.net 1.1068.8.6 # [PATCH] USB: track usb ch9 device state # # This patch merges the USB state definitions from the ARM Linux # code (inside the sa1100 driver) and uses them to track what can # be done with the device. That replaces the recently added # "udev->present" flag with a more complete/standard state model. # # There are a few changes that might affect behavior if things # start to go really haywire: # # - usb_set_address() and usb_set_configuration(), used while # enumerating, handle some unlikely cases more correctly: # don't allow setting address to zero (undefined behavior), # and do allow un-configuring (config 0). (Adds a FIXME # for an existing set-configuration bug too.) # # - usb_disconnect() flags the state change earlier (as soon # as it's known). # # - usb_submit_urb() works in the states where messaging is # allowed, and also enforces the "unless configured, only # control traffic is legal" rule. # # - usb_unlink_urb() doesn't care any more about that state. # (There seemed to be agreement that it must not matter.) # # This will help with some further cleanups in the complex of # issues relating to driver removal, device removal, config # changing (with driver unbind and rebind), reset, and so on. # -------------------------------------------- # 03/03/06 greg@kroah.com 1.1068.8.7 # [PATCH] USB: unfortunatly, we can't call usb_unlink_urb() right now all of the time. # # The host controllers have to be fixed up before we can safely take # out the check for dev->state. # -------------------------------------------- # 03/03/06 greg@kroah.com 1.1075.3.1 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/03/07 rmk@flint.arm.linux.org.uk 1.1068.10.6 # [ARM] Add generic SSP "PIO" mode driver # # Add SSP PIO driver - provides an interface for talking to # microcontrollers and such like connected to the SA1110's # SSP port. # -------------------------------------------- # 03/03/06 davem@nuts.ninka.net 1.1075.4.1 # [IPSEC]: Fix build when ipsec is disabled. # -------------------------------------------- # 03/03/06 davem@kernel.bkbits.net 1.1075.5.1 # Merge davem@nuts.ninka.net:/home/davem/src/BK/netfix-2.5 # into kernel.bkbits.net:/home/davem/netfix-2.5 # -------------------------------------------- # 03/03/06 kai@tp1.ruhr-uni-bochum.de 1.1068.11.7 # do_mounts: Fix boot from ramdisk # # Russell King investigated a failure case I introduced: When booting # with "load_ramdisk=1", we use the kernel root= parameter to determine # from what device to get the contents to copy into a ramdisk and then # mount that ramdisk as root. # # For the copy to work, /dev/root needs to point to the device to load the # ramdisk from. # -------------------------------------------- # 03/03/06 rddunlap@osdl.org 1.1079 # [IPV4/IPV6]: ICMP cleanups. # -------------------------------------------- # 03/03/06 kai@tp1.ruhr-uni-bochum.de 1.1075.6.1 # Merge tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5 # into tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5.make # -------------------------------------------- # 03/03/06 hch@lst.de 1.1075.7.1 # [PATCH] update fdomain pcmcia support # # get it to actually compile cleanly again, switch to scsi_add_host, # remove host list walking. # -------------------------------------------- # 03/03/06 hch@lst.de 1.1075.7.2 # [PATCH] update qlogic pcmcia support # # dito # -------------------------------------------- # 03/03/06 willy@debian.org 1.1075.7.3 # [PATCH] Remove naked GFP_DMA from drivers/scsi/sd.c # # This GFP_DMA can be GFP_KERNEL because sd_init_onedisk calls sd_spinup_disk # calls scsi_wait_req which can sleep. # -------------------------------------------- # 03/03/06 willy@debian.org 1.1075.7.4 # [PATCH] Remove naked GFP_DMA from drivers/scsi/sr.c # # In get_sectorsize(), we can already sleep in scsi_wait_req(). # In get_capabilities(), we can use GFP_KERNEL because it is only called # from sr_attach() which already does a GFP_KERNEL allocation. # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075.3.2 # Merge bk://kernel.bkbits.net/davem/netfix-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075.3.3 # Merge bk://bk.arm.linux.org.uk # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075.3.4 # Merge http://linux-isdn.bkbits.net/linux-2.5.make # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.5 # [PATCH] i386 IRQ balancing cleanup # # General coding cleanups in io_apic.c: # # - make pending_irq_balance_apicid[] static # # - reorder several functions so that forward decls are not needed and so # that `inline' actually works. # # - 80 col fixes. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.6 # [PATCH] balance_irq lockup fix # # irqdesc_t.lock is taken from interrupts - it needs irq-safe locking from # process context. # # Also timer_irq_works() needs to use an unsigned long to hold a jiffies value # (Kai Bankett) # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.7 # [PATCH] Fix nfs oops during mount # # Patch from Trond Myklebust # # This has been floating about for a while, and fixes the oops which people # keep on reporting. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.8 # [PATCH] rtc lock ranking fix # # Patch from: Zwane Mwaikambo # # Fix up a possible AB/BA deadlock identified by Dawson Engler's latest toy. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.9 # [PATCH] sk98lin 64-bit divide fix # # This driver is doing a division on a 64 bit valus which is identical to # "jiffies" and is asking for __udiv64. Cast the 64-bit value back to long. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.10 # [PATCH] cciss: fix initialization for PCI hotplug # # Patch from Stephen Cameron # # * Fix driver to wait for firmware to indicate that it is ready. # (Needed for PCI hotplug case, but for normal warm/cold reboot, by the # time driver inits, firmware will already be ready.) # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.11 # [PATCH] export pfn_to_nid to modules # # Patch from Patricia Gaughen # # This function was recently uninlined for NUMAQ. But it used to be a macro, # and modules need it. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.12 # [PATCH] Reduced stack usage in random.c # # Patch from: Matthew Wilcox # # Reduces stack use in random.c by 350 (or maybe 700) bytes by sharing a local # array between two functions. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.13 # [PATCH] fix inode reclaim imbalance # # Well I thought we were shooting down unused inodes a bit aggressively. With # 30,000 inodes total and 1000 unused, the 1000 are getting reclaimed # instantly. # # shrink_icache_memory() needs to return the number of reclaimable inodes to # page reclaim, not the total number. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.14 # [PATCH] remove __pgd_offset # # Patch from Dave Hansen # # __pgd_offset() and pgd_offset() are completely different functions. # __pgd_offset() is really just a helper to figure out which entry in a # pgd an address would fall into. pgd_offset() does all the leg work and # actually fetches the real pgd entry. # # pgd_index() is a much saner name for what __pgd_offset() does. In fact, # we do this: # #define __pgd_offset(address) pgd_index(address) # # The attached patch removes all instances of __pgd_offset and just # replaces them with pgd_index. # # Compiles with and without PAE on x86. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.15 # [PATCH] remove __pmd_offset # # Patch from Dave Hansen # # Same thing as the __pgd_offset one, just for pmds this time to keep the # naming consistent. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.16 # [PATCH] remove __pte_offset # # Patch from Dave Hansen # # ptes this time # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.17 # [PATCH] missed unlock_kernel() in ext3+htree # # Patch from Alex Tomas # # There's a missing unlock_kernel(). # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.18 # [PATCH] reduce stack size: elf_core_dump() # # Patch from "Randy.Dunlap" # # This patch reduces stack size in elf_core_dump() from over 0x400 (0x4a4 e.g.) # to less than 0x100 (0xb0 on a P4 with gcc 2.96). # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.19 # [PATCH] uninlining in fs/binfmt_elf.c # # uninline some functions which have multiple callsites. A 5% reduction in # text size. # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.20 # [PATCH] ext3: fix error-path memory leak # # Fix an error-path memory leak in ext3_fill_super(). # -------------------------------------------- # 03/03/06 akpm@digeo.com 1.1075.3.21 # [PATCH] fix ioremap off by one bug # # Patch from Andreas Klein # # Fixes an off-by-one in ioremap() - local variable `last_addr' is *inclusive* # - it is the last byte of the mapping, not the usual (last byte + 1). # -------------------------------------------- # 03/03/06 Andries.Brouwer@cwi.nl 1.1075.3.22 # [PATCH] scsi_error fix # # imm.c: spelling # scsi.h: remove old and now incorrect comment # scsi_scan.c: remove superfluous final return # scsi_error.c: apart from similar trivialities the only change: # # If a command fails (e.g. because it belongs to a newer # SCSI version than the device), it is fed to # scsi_decide_disposition(). That routine must return # SUCCESS, unless the error handler should be invoked. # # In the situation where host_byte is DID_OK, and message_byte # is COMMAND_COMPLETE, and status is CHECK_CONDITION, there is # no reason at all to invoke aborts and resets. The situation # is normal. I see here UNIT ATTENTION, Power on occurred # and ILLEGAL REQUEST, Invalid field in cdb. # # The 2.5.64 code does not return SUCCESS, but it returns the # return code of scsi_check_sense(), and that may be FAILED # in case we do not have valid sense. # -------------------------------------------- # 03/03/06 linux@brodo.de 1.1075.3.23 # [PATCH] pcmcia: it works again! # # platform_device_register may only be called after all class-specific # device data is initialized, or else the class-type add_device call (which # enables the pcmcia sockets) will fail. # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.1 # [PATCH] minor breakage fix from typo fixes # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.2 # [PATCH] minor typo fix that got missed # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.3 # [PATCH] remove 2.2 compatmac stuff from rio driver # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.4 # [PATCH] exterminate 2.2 gunk from video stuff # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.5 # [PATCH] look a typo 8) # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.6 # [PATCH] more 2.0 crap # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.7 # [PATCH] more 2.0/2.2 bits # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.8 # [PATCH] another typo that escaped # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.9 # [PATCH] fix aic7xxx aicasm build # # The -ldb has to be at the end sometimes # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.10 # [PATCH] remove a pile of 2.0 and 2.2 support # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.11 # [PATCH] filter more 2.2 junk # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.12 # [PATCH] kill stdarg in intermezzo # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.13 # [PATCH] missed patch - static not extern inline in cia # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.14 # [PATCH] correct BUG doc # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.15 # [PATCH] kill the now dead ide_ioreg_t # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.16 # [PATCH] kill long unused macro # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.17 # [PATCH] add serial port table for PC9800 # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.18 # [PATCH] correct BUG doc in parisc # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.19 # [PATCH] remove unused beep macro on sh # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.20 # [PATCH] Add ELF types for Hitach H8 series # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.21 # [PATCH] remove 2.2 junk from efs # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.22 # [PATCH] remove 2.2 bits fromw anpipe # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.23 # [PATCH] remove 2.0 and 2.2 stuff from netfilter # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.24 # [PATCH] add a new PCI quirk type for the ALi Magik series # # This chip needs latency and other setups to avoid a PCI/AGP deadlock # with tv cards # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.25 # [PATCH] remove 2.0/2.2 stuff # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.26 # [PATCH] remove 2.0/2.2 stuff from wanrouter # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.27 # [PATCH] correct emu10k url # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.28 # [PATCH] correct file names in comments in mm # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.29 # [PATCH] clean up 2.2 stuff in wanrouter code # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.30 # [PATCH] ALi it turns out has a 31bit audio device # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.31 # [PATCH] update PCI quirks # # ALi Magik requires workarounds for TV chips # IDE controllers require proper handling in legacy mode # PXB must be disabled on C0 450NX or the IDE will corrupt memory # VIA northbridge devices require the interrupt line is written # NEC_CBUS_2/3 require ISA DMA workarounds # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.32 # [PATCH] correct irq logic for x86 # # We must not look for a PCI IRQ for a non native mode IDE device # We must write PCI_INTERRUPT_LINE for VIA # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.33 # [PATCH] correct building of the old ide/hd.c driver # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.34 # [PATCH] clean up all the console inits using an initcall variant # # Dave Woodhouse did this a while ago and its been kicking around in my # tree just fine. This gets rid of a lot of the init lists of functions # still left in the kernel by having an __init type array built up for the # consoles as well # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.35 # [PATCH] bring ide-disk driver into line with 2.4.21pre # # This doesn't have the new -ac testing stuff from 2.4.21pre5-ac but it # has the stuff I now trust in it. This fixes the cache flush stuff and # also means ide-disk now should be safe shared IRQ # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.36 # [PATCH] ide-dma # # This switches ide-dma to ide_execute_command and makes IDE DMA also happy # when running shared IRQ # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.37 # [PATCH] switch ide-floppy to ide_execute_command # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.38 # [PATCH] switch ide-io (core ioctls etc) to ide_execute_command # # Also fix the irq masking bug # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.39 # [PATCH] add sensible names to the ide iops # # The outbsync one has further changes to come in the next batch to sort # out some platforms like PPC # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.40 # [PATCH] remove spare cast # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.41 # [PATCH] switch ide taskfile ioctls to ide_execute_command # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.42 # [PATCH] fix wrong type and statics in amd ide # -------------------------------------------- # 03/03/06 alan@lxorguk.ukuu.org.uk 1.1068.13.43 # [PATCH] update via driver from 3.35-ac to 3.36 # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075.3.24 # Merge home.transmeta.com:/home/torvalds/v2.5/alan # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/06 rmk@arm.linux.org.uk 1.1075.3.25 # [PATCH] Separate out pci bus resource allocator # # - Separate out bus resource allocator (pci_bus_alloc_resource) # - Provide pci_enable_bridges to setup command register for all # pci bridges. # -------------------------------------------- # 03/03/06 rmk@arm.linux.org.uk 1.1075.3.26 # [PATCH] Eliminate stack allocation of struct pci_dev... # # - Eliminate the stack allocation of a struct pci_dev, and make # pci_scan_slot() take a bus and a devfn argument. # - Add "dev->multifunction" to indicate whether this is a multifunction # device. # - Run header fixups before inserting the new pci device into any # device lists or announcing it to the drivers. # - Convert some more stuff to use the list_for_each* macro(s). # -------------------------------------------- # 03/03/06 rmk@arm.linux.org.uk 1.1075.3.27 # [PATCH] Only add devices to bus->devices while scanning... # # The pci_find* functions search using the following lists: # bus->children (for subordinate buses) # pci_root_buses (for all root buses) # pci_devices (for devices) # # This leaves one list which we can add devices to without any drivers # finding the new devices before we've finished with them. # # - initialise bus->node list head. # # - pci_scan_slot will scan the specified slot, and add the discovered # devices to the bus->devices list only. These devices will not # appear on the global device list, and do not show in sysfs, procfs. # pci_scan_slot returns the number of functions found. If you want # to find the devices, you have to scan bus->devices and look for # devices where list_empty(&dev->global_list) is true. # # - new function "pci_bus_add_devices" adds newly discovered devices # to the global device lists, and handles the sysfs and procfs # stuff, making the devices available to drivers. All our buses # which have an empty list head are treated as "new" (since they # are not attached to the parent buses list of children) and are # also added. Currently, no buses will be in this state when this # function is called. # # - new function "pci_scan_child_bus" scans a complete bus, building # a list of devices on bus->devices only, performing bus fixups # via pcibios_fixup_bus() and scanning behind bridges. It does # make devices externally visible. # # - pci_do_scan_bus retains its original behaviour - ie, it scans # and makes devices available immediately. # -------------------------------------------- # 03/03/06 rmk@arm.linux.org.uk 1.1075.3.28 # [PATCH] Convert setup-bus resource allocation to use bus->devices # # - Convert setup-bus.c resource allocation to scan bus->devices rather # than bus->children. As noted previously, newly discovered child # buses will not be on the parents list of children buses, so when # we're trying to assign resources, we need to scan the bus for # devices with subordinate buses rather than using the list of children # buses. # -------------------------------------------- # 03/03/06 rmk@arm.linux.org.uk 1.1075.3.29 # [PATCH] Fix up pci_scan_bridge and friends # # Now we tackle pci_add_new_bus and pci_scan_bridge. The hotplug code # currently uses this, but I'd like it to die off; pci_scan_bridge() # should be used to scan behind bridges. This may mean hotplug needs # some changes to pci_scan_bridge - if so, we need to find out what # changes are required and fix it. # # pci_alloc_child_bus() does what pci_add_new_bus() did, except it # doesn't attach the new bus to the parents list of child buses. The # only way this bus can be reached from the parent bus is by scanning # the parents devices list, and locating a device with a non-NULL # subordinate bus. The only code which should be doing this is the # PCI code. # # Since the new bus will have an empty list head for bus->node, we can # detect unattached buses prety easily. (see pci-3.diff.) # # pci_scan_bridge() changes slightly - we use our new pci_scan_child_bus() # function from pci-3.diff, which doesn't attach devices to the global # tree. This means callers of pci_scan_child_bus() and pci_scan_bridge() # (ie, hotplug) will need to call pci_bus_add_devices(). # -------------------------------------------- # 03/03/06 hpa@transmeta.com 1.1075.3.30 # [PATCH] bootsect removal # # This is the "boot sector removal" patch for i386 updated for Linux # 2.5.63-bk7. The only change against the 2.5.59 version is that the # FDOPTS Makefile variable, which lets one create a floppy image with # arbitrary kernel options, has been merged from the x86-64 version, and # the comments have been updated. # # The patch removes the in-kernel boot sector, which these days rarely # work correctly (it only supports up to 1 MB kernels, and only work on # legacy floppies -- not on IDE or USB devices, nor on any kind of # emulated devices like El Torito), replaces it with a placeholder stub, # and sets up the Makefile targets to create floppies or floppy images # using SYSLINUX. The FDOPTS Makefile variable can be used to set # kernel command line options (thanks to a suggestion by Andi Kleen.) # # Note that the same change has already been applied to the x86-64 # architecture. The last hunk of the patch corrects a comment in that # architecture. # -------------------------------------------- # 03/03/06 mochel@osdl.org 1.1068.1.24 # sysfs: fix up directory removal, once and for all. # # This patch was previously integrated, but dropped erroneously by a bk # merge. # # This fixes file cleanup during a sysfs directory removal by deleting files # from ->d_subdirs as they're iterated over, then checking if we can get a # reference on them. # -------------------------------------------- # 03/03/06 mochel@osdl.org 1.1068.1.25 # sysfs: Fix binary file handling. # # From Rusty Lynch: # # * makes sysfs cleanup the buffer->data allocated by the attribute write # functions # * fixes a bug that causes the kernel to oops when somebody attempts to # write to the file. # -------------------------------------------- # 03/03/06 mochel@osdl.org 1.1075.3.31 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/03/06 davidm@tiger.hpl.hp.com 1.1068.12.4 # ia64: Fix several small bugs/omissions from the 2.5.64 sync. # -------------------------------------------- # 03/03/06 anton@samba.org 1.1075.8.1 # [PATCH] missing include # # list.h must now include stddef since it uses NULL. # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075.8.2 # Fix "con_init()" function type and stale (and incorrect) declaration # -------------------------------------------- # 03/03/06 torvalds@home.transmeta.com 1.1075.8.3 # Fix a very theoretical race between the new RCU lookup and # concurrent renames in another directory. # # I doubt this can be triggered in practice, and the fix is # a bit heavy-handed, but let's see if numbers can show that # the simple fix doesn't show any real lock contention. # -------------------------------------------- # 03/03/06 sfr@canb.auug.org.au 1.1068.12.5 # [PATCH] ia64: compat_sys_futex() support # # ia 64 part of the patch. This gives you a 32 bit version of sys_futex (hopefully). # -------------------------------------------- # 03/03/06 jbarnes@sgi.com 1.1068.12.6 # [PATCH] ia64: ACPI fix for no PCI # # Andy Grover told me this should be posted here. It allows ACPI to # compile even with PCI turned off. Patch against 2.5.60. # -------------------------------------------- # 03/03/06 davidm@tiger.hpl.hp.com 1.1068.12.7 # ia64: Minor formatting/whitespace fixes in ia64-version of acpi.c. # -------------------------------------------- # 03/03/06 bjorn_helgaas@hp.com 1.1068.12.8 # [PATCH] ia64: IA32 support without sysctl doesn't work # # Make CONFIG_SYSCTL control sys32_sysctl as well. Based on a patch from Peter Chubb. # -------------------------------------------- # 03/03/07 kai@vaio.(none) 1.1025.19.2 # ISDN/HiSax: Introduce probe() functions # # Just separate the setup_*() functions of hisax subdrivers # into calls to *_probe() functions, a step towards using # standard initialization and modularization of hisax. # -------------------------------------------- # 03/03/07 kai@vaio.(none) 1.1025.19.3 # ISDN/HiSax: config.c cleanup # # Consolidate allocation / freeing of various data structures into # one function. # -------------------------------------------- # 03/03/07 kai@vaio.(none) 1.1025.19.4 # ISDN/HiSax: Remove unused ISDN_CHIP_* macros # # They were only defined, never used. # -------------------------------------------- # 03/03/07 kai@vaio.(none) 1.1025.19.5 # ISDN/HiSax: Get rid of CARD_* defines # # hisax.h defined a CARD_* macro for each CONFIG option, which # is totally unnecessary, just use the CONFIG option directly. # -------------------------------------------- # 03/03/07 kai@vaio.(none) 1.1025.19.6 # ISDN/HiSax: Remove amd7930.c # # This has been around for many years but was never finished. No # need to carry it on to yet another stable kernel. # -------------------------------------------- # 03/03/07 willy@debian.org 1.1075.7.5 # [PATCH] Some parisc updates for SCSI # # The config stanza for SCSI_ZALON was in the wrong place, so move it. # Make SCSI_NCR53C8XX conflict with SCSI_ZALON. # Give ncr53c8xx and sym53c8xx names # Fill in detach and release methods unconditionally. # Call pci_set_master() in sym53c8xx. # Both these drivers need interrupt.h, not sched.h # -------------------------------------------- # 03/03/07 torvalds@home.transmeta.com 1.1075.3.32 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/07 torvalds@home.transmeta.com 1.1075.3.33 # Merge http://lia64.bkbits.net/to-linus-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/07 david@gibson.dropbear.id.au 1.1075.3.34 # [PATCH] Squash warnings in usb-serial.c # # This squashes (gcc-3.2) "label and end of compound statement # deprecated" warnings in usb-serial.c. # -------------------------------------------- # 03/03/07 david@gibson.dropbear.id.au 1.1075.3.35 # [PATCH] Squash warning in ohci-pci.c on PowerBooks # # Apple PowerBooks want in ohci-pci.c for the prototype of # pci_device_to_OF_node(). This patch adds it to the already present # list of PowerBook specific #includes: # -------------------------------------------- # 03/03/07 mbligh@aracnet.com 1.1075.3.36 # [PATCH] Fix NUMA scheduler problem after interactivity merge # # NODE_THRESHOLD got accidentally dropped in the interactive scheduler # changes merge. This puts it back. # -------------------------------------------- # 03/03/07 mbligh@aracnet.com 1.1075.3.37 # [PATCH] revert pfn_to_nid change. # # This change was wrong. pfn_to_nid is a macro. # -------------------------------------------- # 03/03/07 zwane@linuxpower.ca 1.1075.3.38 # [PATCH] noirqbalance still doesn't do anything # # This one simply sets TARGET_CPUS to cpu_callout_map instead of # cpu_online_map so that when we finally do boot we actually use the other # cpus for servicing interrupts. # -------------------------------------------- # 03/03/07 mzyngier@freesurf.fr 1.1075.3.39 # [PATCH] Fix fs/binfmt_elf.c build # # The stack reducing patch that recently went in prevent alpha from # building (missing some ELF_CORE_COPY_XFPREGS ifdefs). The excluded # patch fixes it. # -------------------------------------------- # 03/03/07 mzyngier@freesurf.fr 1.1075.3.40 # [PATCH] Fix arch/alpha/vmlinux.lds.S typos. # # The console initcall patch that went in contains a typo that prevents # alpha from building. # -------------------------------------------- # 03/03/07 mingo@elte.hu 1.1075.3.41 # [PATCH] NUMA scheduler breakage # # __activate_task() and wake_up_forked_process() should call # nr_running_inc(rq) rather than doing a rq->nr_running++. # # Noted by Rick Lindsley # -------------------------------------------- # 03/03/07 hch@lst.de 1.1075.7.6 # [PATCH] remove some braindamage from drivers/scsi/pcmcia/Kconfig # # It contains one user-selectable option that does nothing but hiding the # four pcmcia drivers if not seleted (although we have an extra menu for # them!) one one that does exactly nothing. Remove those two. # -------------------------------------------- # 03/03/07 green@namesys.com 1.1075.3.42 # [PATCH] memleak in drivers/char/vt.c # # Seems there is a memleak on error exit path in drivers/char/vt.c, here's # the patch. Found with help of smatch + enhanced unfree script. # -------------------------------------------- # 03/03/07 mingo@elte.hu 1.1075.3.43 # [PATCH] more "interactivity changes", sched-B2 # # - fix a (now-) bug in kernel/softirq.c, it did a wakeup outside any # atomic regions, which falsely identified random processes as a # non-atomic wakeup, and which causes random priority boost to be # distributed. # # - reset the initial idle thread's priority back to PRIO_MAX after doing # the wakeup_forked_process() - correct preemption relies on this. # # - update current->prio immediately after a backboost. # # - clean up effective_prio() & sleep_avg calculations so that there are # fewer RT-task special cases. This has the advantage of the sleep_avg # being maintained even for RT tasks - this could be advantegous for # tasks that briefly enter/exit RT mode. # -------------------------------------------- # 03/03/07 willy@debian.org 1.1075.3.44 # [PATCH] fs/locks.c: fix bugs # # - Remove broken lock accounting # - Introduce __locks_delete_block() # - Stop using kdevname() # - Fix locks_remove_posix() # -------------------------------------------- # 03/03/07 shemminger@osdl.org 1.1075.3.45 # [PATCH] Turn off aio printk meant for debugging (2.5.64) # # The following messages are of interest only when debugging aio. # Otherwise, they are just console clutter. # -------------------------------------------- # 03/03/07 mingo@elte.hu 1.1075.3.46 # [PATCH] "interactivity changes", sched-2.5.64-B2 # # This fixes the SMP runqueue locking bug when updating the wakers # priority. It also includes: # # - only update the priority and do a requeueing if the sleep average has # changed. (this does not happen for pure CPU hogs or pure interactive # tasks, so no need to requeue/recalc-prio in that case.) [All the # necessary values are available at that point already, so gcc should # have an easy job making this branch really cheap.] # # - do not do a full task activation in the migration-thread path - that is # supposed to be near-atomic anyway. # # - fix up comments # # I solved the SMP locking bug by moving the requeueing outside of # try_to_wake_up(). It does not matter that the priority update is not # atomically done now, since the current process wont do anything # inbetween. (well, it could get preempted in a preemptible kernel, but # even that wont do any harm.) # -------------------------------------------- # 03/03/07 stevef@smfhome1.austin.rr.com 1.1068.7.3 # Fix oops in getdfs when null path passed in on mount. Fix oops when changed readsize caused readpages problem. Add support for altering rsize so can reduce pages read across net # below default of 4 # -------------------------------------------- # 03/03/07 torvalds@penguin.transmeta.com 1.1075.3.47 # Merge bk://cifs.bkbits.net/linux-2.5cifs # into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux # -------------------------------------------- # 03/03/07 davem@nuts.ninka.net 1.1075.9.1 # [SPARC]: One too many chars in INIT_C_CC # -------------------------------------------- # 03/03/07 greg@kroah.com 1.1075.10.1 # gen_init_cpio: Add the ability to add files to the cpio image. # -------------------------------------------- # 03/03/07 greg@kroah.com 1.1075.10.2 # kbuild: handle any failures of the gen_init_cpio or initramfs image to stop the build. # # This also shows how to add files to the initramfs build, but is # commented out. # # Patch originally done by Kai. # -------------------------------------------- # 03/03/07 torvalds@penguin.transmeta.com 1.1075.3.48 # Merge bk://kernel.bkbits.net/gregkh/linux/initramfs-2.5 # into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux # -------------------------------------------- # 03/03/07 davem@nuts.ninka.net 1.1075.9.2 # [FRAMEBUFFER]: Convert SBUS LEO driver to new APIs. # -------------------------------------------- # 03/03/07 davem@nuts.ninka.net 1.1075.9.3 # [SPARC64]: Use pci_remove_bus_device to delete, found by Ben Collins. # -------------------------------------------- # 03/03/07 davem@nuts.ninka.net 1.1075.3.49 # Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5 # into nuts.ninka.net:/home/davem/src/BK/sparc-2.5 # -------------------------------------------- # 03/03/07 davem@nuts.ninka.net 1.1075.3.50 # [SPARC64]: Update defconfig. # -------------------------------------------- # 03/03/07 torvalds@home.transmeta.com 1.1075.11.1 # Avoid warning due to missing return value # -------------------------------------------- # 03/03/07 torvalds@home.transmeta.com 1.1075.11.2 # Ignore initramfs cpio file # -------------------------------------------- # 03/03/07 kai@tp1.ruhr-uni-bochum.de 1.1075.12.1 # Merge tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5 # into tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5.isdn # -------------------------------------------- # 03/03/07 marcel@holtmann.org 1.1075.3.51 # [SPARC64]: Translate AUTOFS_IOC_EXPIRE_MULTI ioctl. # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.3 # [CPUFREQ] fix cpufreq core breakage(s) # # - update two more cpufreq-related sysfs files to the new interface # code # - always store the new, user-requested policy in another struct # cpufreq_policy so that we can safely fall back to the old one in # case something fails (this equals the behaviour before Pat's patch) # - the kobject which was registered in cpufreq_add_dev was inside a variable # private to this function -- so the whole cpufreq sysfs interface returned # -EINVAL. # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.4 # [CPUFREQ] fix userspace governor. # Let's put the sysfs file exported by the cpufreq userspace governor also # into the cpufreq/ - subdirectory of /sys/devices/sys/cpu0/. # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.5 # [CPUFREQ] remove unneeded code # # - no cpufreq driver uses the frequency table helper "setpolicy" any more # ("target" is much more appropriate for them anyways) - so remove # that helper # - all cpufreq drivers use the advanced registration process, so some # compatibility code can safely be removed. # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.6 # [CPUFREQ] updated cpufreq ref-counting and locking scheme # # This patch takes use of the now-working cpufreq_interface.kset and # cpufreq_policy.kobj to use reference counting within the cpufreq core # wherever this is more appropriate than the previous approach -- using one # semaphore. Additionally, the callbacks to the driver modules are protected # now. # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.7 # [CPUFREQ] add support for ICH4-M chipset in speedstep driver # # Intel ICH4-M soutbridges use exactly the same register interface for SpeedStep # as ICH2-M and ICH3-M southbridges -- which makes adding support for this # bridge (almost) trivial # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.8 # [CPUFREQ] allow cpufreq drivers to export sysfs files # # This patch lets cpufreq drivers export per-CPU files in the cpufreq and # cpu-specific sysfs directory. As an example, a file # "scaling_available_frequencies" is added to the p4-clockmod.c driver. # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.9 # [CPUFREQ] update documentation # # The sysfs directory where the cpufreq-related files are stored changed due # to the new device interface code, so the documentation needs to be updated # accordingly. Also, add some information about the reference counting and the # exporting of sysfs files by the drivers. # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.11.10 # [CPUFREQ] Move pci define to pci_ids.h # -------------------------------------------- # 03/03/08 davej@codemonkey.org.uk 1.1075.13.1 # [WATCHDOG] amd7xx_tco updates from Zwane, and nuke EXPORT_NO_SYMBOLS # -------------------------------------------- # 03/03/08 jejb@raven.il.steeleye.com 1.1075.14.1 # Merge raven.il.steeleye.com:/home/jejb/BK/linux-2.5.64-interim # into raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5 # -------------------------------------------- # 03/03/08 jejb@raven.il.steeleye.com 1.1075.14.2 # Correct nested variable thinko in scsi_error.c # -------------------------------------------- # 03/03/08 jejb@raven.il.steeleye.com 1.1075.14.3 # Fix DMA to stack problem in scsi_error.c # -------------------------------------------- # 03/03/08 jejb@raven.il.steeleye.com 1.1075.14.4 # Fix loop problem in SCSI error handler sense collection # # Also remove previous work around so sense is collected now if the # driver doesn't do it automatically. # # Also fix a problem where the retries get reset when the command is # reissued (we only want the retries set when the command is first # created). # -------------------------------------------- # 03/03/08 rml@tech9.net 1.1075.15.1 # [PATCH] no need for kernel_flag on UP # # This is a minor cleanup. We currently define and declare the BKL's # kernel_flag spinlock on either SMP or PREEMPT, which means a UP+PREEMPT # machine gets it. # # We only need the actual lock on SMP. # -------------------------------------------- # 03/03/08 torvalds@home.transmeta.com 1.1075.15.2 # Merge http://linux-isdn.bkbits.net/linux-2.5.isdn # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/08 davem@nuts.ninka.net 1.1075.3.52 # [SPARC64]: Make sure update_process_times runs inside of irq_{enter,exit} region. # -------------------------------------------- # 03/03/08 davem@kernel.bkbits.net 1.1075.3.53 # Merge davem@nuts.ninka.net:/home/davem/src/BK/sparc-2.5 # into kernel.bkbits.net:/home/davem/sparc-2.5 # -------------------------------------------- # 03/03/08 torvalds@home.transmeta.com 1.1075.13.2 # Merge bk://linux-dj.bkbits.net/watchdog # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/08 torvalds@home.transmeta.com 1.1075.3.54 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/08 mbligh@aracnet.com 1.1075.3.55 # [PATCH] 1/6 Share common physnode_map code between NUMA-Q and Summit # # From Andy Whitcroft # # Share a common physnode_map structure between NUMA-Q and Summit. # -------------------------------------------- # 03/03/08 mbligh@aracnet.com 1.1075.3.56 # [PATCH] 2/6 Make CONFIG_NUMA work on non-numa machines. # # From Andy Whitcroft # # A few very simple changes in order to make CONFIG_NUMA work everywhere, so # the distros can build one common binary kernel for distributions. # -------------------------------------------- # 03/03/08 mbligh@aracnet.com 1.1075.3.57 # [PATCH] 3/6 Convert physnode_map to u8 # # From Andy Whitcroft # # Convert physnode_map from an int to a u8 to save cachelines. # -------------------------------------------- # 03/03/08 mbligh@aracnet.com 1.1075.3.58 # [PATCH] 4/6 Fix the type of get_zholes_size for NUMA-Q # # From Andy Whitcroft # # Fix the type of get_zholes_size for NUMA-Q # -------------------------------------------- # 03/03/08 mbligh@aracnet.com 1.1075.3.59 # [PATCH] 5/6 Provide basic documentation for profiling # # People keep asking for this info, and Andrew asked me to put it under the # Documentation directory ... provides really simple instructions for taking # a profile so that users can report performance changes in a useful way. # -------------------------------------------- # 03/03/08 mbligh@aracnet.com 1.1075.3.60 # [PATCH] 6/6 cacheline align files_lock # # I'm getting a lot of cacheline bounce from .text.lock.file_table due to # false sharing of the cahceline. The following patch just aligns the lock # in it's own cacheline. # -------------------------------------------- # 03/03/08 davem@nuts.ninka.net 1.1080 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/03/08 jmorros@intercode.com.au 1.1081 # [CRYPTO]: Move km_types out of header. # -------------------------------------------- # 03/03/08 jmorris@intercode.com.au 1.1082 # [TCP]: Commonize duplicated code into a new function, tcp_bucket_destroy. # -------------------------------------------- # 03/03/08 jmorris@intercode.com.au 1.1083 # [NET]: Nuke SO_BSDCOMPAT. # -------------------------------------------- # 03/03/08 ahaas@airmail.net 1.1084 # [NETFILTER]: C99 initializers for ipv6 netfilter. # -------------------------------------------- # 03/03/08 ahaas@airmail.net 1.1085 # [NETFILTER]: C99 initializers for ipv4 netfilter. # -------------------------------------------- # 03/03/08 jmorris@intercode.com.au 1.1086 # [CRYPTO]: Add encrypt_iv() and decrypt_iv() methods. # -------------------------------------------- # 03/03/08 jmorris@intercode.com.au 1.1087 # [CRYPTO]: Eliminate crypto_tfm.crt_ctx, from Adam Richter. # -------------------------------------------- # 03/03/08 chas@locutus.cmf.nrl.navy.mil 1.1088 # [ATM]: Get lec net_device names correct. # -------------------------------------------- # 03/03/08 chas@locutus.cmf.nrl.navy.mil 1.1089 # [ATM]: Obsolete some atm_vcc members. # -------------------------------------------- # 03/03/08 davem@nuts.ninka.net 1.1090 # [ATM]: Add missing $(obj) to driver makefile. # -------------------------------------------- # 03/03/08 jmorris@intercode.com.au 1.1091 # [CRYPTO]: Documentation updates. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.61 # [PATCH] register_blkdev cleanups # # Patch from Andries.Brouwer@cwi.nl # # The following patch does the following: # # - static const char *blkdevs[MAX_BLKDEV]; disappears # - get_blkdev_list, (un)register_blkdev, __bdevname # are moved from block_dev.c to genhd.c # - the third "fops" parameter of register_blkdev was unused; # now removed everywhere # - zillions of places had printk("cannot get major") upon # error return from register_blkdev; removed all of these # and inserted a single printk in register_blkdev. # # Of course the reason for the patch is that one fixed size # array is eliminated. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.62 # [PATCH] fix possible latency in balance_dirty_pages() # # Tasks which throttle in balance_dirty_pages() will loop until the amount of # dirty memory falls below the configured dirty_ratio. # # This exposes the possibility that one task could be stuck in there for # arbitrary periods of time due to page dirtying activity by other tasks. # # The patch changes the logic so that tasks will break out of the loop if they # have written enough pages, regardless of the current dirty memory limits. # # Here "enough" pages is 1.5x the number of pages which they just dirtied. # # If the amount of dirty memory in the machine happens to still exceed # dirty_ratio (say, due to MAP_SHARED activity) then the task will again # throttle after dirtying a single page. But there is now an upper limit on # the time for which a single task will be captured in balance_dirty_pages(). # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.63 # [PATCH] Implement sendfile() for NFS # # Patch from Trond Myklebust # # Implement sendfile() for the NFS client. This is required for loop-on-NFS # support. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.64 # [PATCH] Allow VFS readahead to fall to zero # # Some workloads really, really want to have no readahead. Databases which are # perfoming small synchronous I/Os against a file which has extremely poor # layout. Any readahead at all is a lose here. # # But the current readahead code refuses to adapt that low. # # Fix it up so that we can indeed adaptively disable readahead altogether, and # do not start it again until we have seen max_readahead()'s worth of # consecutive reads. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.65 # [PATCH] Make diskstats per-cpu using kmalloc_percpu # # Patch from Ravikiran G Thirumalai # # Makes the disk stats on struct gendisk per-cpu. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.66 # [PATCH] Fix vm_area_struct slab corruption # # Patch from Hugh Dickins # # Hugh's patch fixes vm_area_struct slab corruption due to mremap's move_vma # mistaking how do_munmap splits vmas in one case. # # Neither of us are very happy with it - it is fragile, and obscure. Hugh will # revisit this later, but for now it should fix up the potential memory # corruption. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.67 # [PATCH] slab use-after-free detector # # Patch from Petr Vandrovec # # Modifies check_poison function to not only verify that last byte is # POISON_END, but also that all preceeding bytes are either POISON_BEFORE or # POISON_AFTER bytes. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.68 # [PATCH] slab debug: track caller program counter # # Patch from Manfred Spraul # # A patch that records the last kfree caller's program counter # and prints that if a poison check fails. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.69 # [PATCH] slab debug: symbolic output in caller tracking # # use print_symbol() to decode the offender's program counter. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.70 # [PATCH] Fix copy_page_range()'s handling of invalid pages # # Patch from Xavier Bru # # If copy_page_range encounters a pte which maps an invalid pageframe it will # proceed to try to add an rmap entry against that page. This causes oopses # when an application which has mapped an IO device via /dev/mem forks. # # Fix that up by correctly skipping the page_add_rmap() for these pte's. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.71 # [PATCH] move CONFIG_SWAP around # # Patch from Tom Rini # # Take CONFIG_SWAP out of the top-level menu into the general setup menu. Make # it dependent on CONFIG_MMU and common to all architectures. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.72 # [PATCH] fix div-by-zero in bonding.c # # Patch from: Shmulik Hen # # The following patch fixes a division by zero bug in the bonding module that # happens when transmitting through a bond with no slaves, in the XOR bonding # mode. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.73 # [PATCH] usercopy checks in old_readdir() # # Fix up some unchecked copy_to_user()s # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.74 # [PATCH] hugetlb unmap_vmas() SMP && PREEMPT fix # # Patch from Kevin Pedretti # # The unmap_vmas() logic is designed to chew away at all the pages without # holding off preemption for too long. But with CONFIG_SMP=y and # CONFIG_PREEMPT=y the number of pages which we batch up between rescheduling # opportunities is not a multiple of HPAGE_SIZE. So unmap_vmas() ends up # calling unmap_hugepage_range() with a poorly aligned&sized region, and it # goes BUG. # # Fix that up by ensuring that we always work across hugepage regions in # HPAGE_SIZE chunks. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.75 # [PATCH] ext2: fix error-path double-free # # Fix a double-kfree on an ext2 error path. Reported by Oleg Drokin. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.76 # [PATCH] fix memory leak in load_elf_binary() # # - Fix an error-path leak of memory and a dentry in load_elf_binary() # (spotted by Oleg Drokin). # # - Tidy up the handling of bad executable images: return -ENOEXEC rather # than 0. (We've committed suicide anyway, so probably nobody gets to see # this). # # - Fix up the logic in load_aout_interp(). It gets itself all set up to # return -ENOEXEC but there is in fact no path by which it can do this. Just # return ~0UL on errors, like load_elf_interp(). # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.77 # [PATCH] Extended attribute sharing and debug macro typo fixes # # Patch from Andreas Gruenbacher # # Tony Dziedzic has found two bugs in the extended attributes code. Patches with # explanations are attached. # # 1: Extended attribute sharing on ext2/ext3 not working # # The mb_cache_entry_insert function constantly returns an -EBUSY error # instead of 0, which causes the xattr cache that is needed by the xattr # sharing mechanism on ext2/ext3 to not share anything. This patch fixes # the problem. (It is possible that after applying this fix we will hit # bugs in code that wasn't used before.) # # 2: Oops in one of the xattr debug statements: The old_bh variable is NULL # if an inode that previously had no EA's assigned would share an EA block # with another inode. (This was hidden by the xattr sharing bug). # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.78 # [PATCH] protect 'action' in show_interrupts # # Patch from Zwane Mwaikambo # # On SMP or preemptible kernels, every instance of show_interrupts() is oopsily # racy wrt request_irq() and free_irq(). # # Fix that up by taking the irq_desc_t's lock while walking the action list. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.79 # [PATCH] i386 show_interrupts() fix # # show_interrupts() is accidentally modifying the incoming seq_file pointer. # It goes oops if seq_printf() returns non-zero. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.80 # [PATCH] fix SMP lockup in eepro100 with ethtool on unused # # Patch from Jason Lunz # # When support for the GSET and SSET ethtool ioctls was added to eepro100.c in # 2.4.20, the tx lock was overloaded to serialize their use. Unfortunately, # this lock is only initialized in dev->open(), causing ethtool to deadlock the # machine when used on an unconfigured eepro100 interface. # # The fix is to initialize the spinlock at probe time. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.81 # [PATCH] Larger buffer for /proc/interrupts display # # Patch from Zwane Mwaikambo # # Scale the buffer which is used for accumulating the /proc/interrupts output. # On large SMP it overflows. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.82 # [PATCH] Disable the "Unknown IO_APIC" message # # This message is the source of 90% of the traffic on linux-smp and is now # starting to fill up kernel bugzilla. # # Nobody has ever actually done anything about it and the message is wasting # people's time. Ingo acked this change. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.83 # [PATCH] raw.c: dev_t cleanup and oops fix # # Patch from Andries.Brouwer@cwi.nl # # The next patch in the dev_t series eliminates the last applied use # of MAX_BLKDEV - only the definition in major.h remains. # # Sneaky as I am, I combine this patch with the fix for an Oops: # On open, raw_open does # filp->f_dentry->d_inode->i_mapping = # bdev->bd_inode->i_mapping; # storing a pointer to bdev stuff. # But on release this pointer stayed, the block device is not # referenced anymore and disappears, and the next open references # undefined stuff. # I checked, and this can actually cause an Oops - scenario: # # # raw /dev/raw/raw12 /dev/hdf # # dd if=/dev/raw/raw12 of=/dev/null bs=512 count=1 # # raw /dev/raw/raw12 0 0 # # dd if=/dev/raw/raw12 of=/dev/null bs=512 count=1 # # Oops. # # More precisely the problem is that dentry_open does # file_ra_state_init(&f->f_ra, inode->i_mapping); # And file_ra_state_init uses mapping->backing_dev_info->ra_pages. # Ugly, to use so much information about the inode even before # the inode has been opened. # # In the patch below I reset i_mapping upon release of the raw device. # # akpm: I fixed a typo and exported default_backing_dev_info to GPL modules for # this. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.84 # [PATCH] missing spin_unlock() in sysfs_remove_dir() # # missing spin_unlock() in sysfs_remove_dir() # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.85 # [PATCH] rpc_delete_timer race fix # # Patch from Ulrich Weigand # # Fix a race wherein timer_pending() returns false, but the timer handler is # actually running on another CPU. We need to call del_timer_sync() # regardless, so we wait for completion of the handler. # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.86 # [PATCH] remove compile warning from serial console initcall # # Patch from: "Martin J. Bligh" # # This tiny patch removes the new compiler warning from my build - the new # console_initcall mechanism seems to require int from console_init ... I made # serial8250_console_init look like con_init # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.87 # [PATCH] revert the "remove kernel_flag" patch # # With CONFIG_SMP=n, CONFIG_PREEMPT=y, CONFIG_DEBUG_SPINLOCK=y we get many # undefined refs to kernel_flag. # # This is because spinlock debugging works on uniprocessor kernels now, and it # stores state inside the spinlock structure to do this. # # Having working spinlock debugging on UP kernels seems more important than # saving four bytes, so... # -------------------------------------------- # 03/03/08 akpm@digeo.com 1.1075.3.88 # [PATCH] fix a warning in eepro100.c # # Remove the unneeded forward declaration of eepro100_remove_one(). # # It is defeating the __attribute__(unused) tag on the definition of # eepro100_remove_one() and is causing a "defined but not used" warning. # -------------------------------------------- # 03/03/08 mbligh@aracnet.com 1.1075.3.89 # [PATCH] NUMA scheduler fixup # # From: Ingo Molnar # # This cleans up the NUMA scheduler to have separate triggers for idle # and busy rebalance ratio, preventing some complex interactions where # idle cpus can cause busy ones to busy rebalance more often. The core # functionality of this patch is rebalace_tick(). # # Tested in -mjb tree for over 1 month ... no problems at all found - # retested on top of 64-bk3 with new scheduler updates. # -------------------------------------------- # 03/03/09 jejb@raven.il.steeleye.com 1.1075.3.90 # Merge raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5 # into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5 # -------------------------------------------- # 03/03/09 torvalds@home.transmeta.com 1.1075.16.1 # Merge bk://linux-dj.bkbits.net/cpufreq # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/09 torvalds@home.transmeta.com 1.1075.3.91 # Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/09 levon@movementarian.org 1.1075.3.92 # [PATCH] fix oprofile on x86 > 1 counter # # Without this we have a choice between dropping lots of counter events # for counters > 0, or getting dazed and confused. This brings it inline # with the 2.4 module code. Tested on my 2-way. # # Also fix a typo from Steven Cole, and remove some unnecessary code # -------------------------------------------- # 03/03/09 ak@muc.de 1.1075.3.93 # [PATCH] Fast path context switch - microoptimize FPU reload # # Following some changes on x86-64. # # When cpu_has_fxsr is defined to 1 like in many kernels unlazy_fpu can # collapse to three instructions. For that inlining is a very good idea. # Otherwise it's 10 instructions or so, which can be still inlined. # # We don't need the lock prefix to test our local thread flags state. # Unfortunately test_thread_flag currently always uses test_bit which # has a LOCK on SMP, but that's unnecessary. LOCK is costly on P4, # so it's a good idea to avoid it. # # Work around this for now by testing directly. Better would be # probably to define __set_bit for all architectures to not guarantee # atomicity and then always use that for local thread_info accesses # in linux/thread_info.h # -------------------------------------------- # 03/03/09 torvalds@home.transmeta.com 1.1075.3.94 # Fix up i387 task switching bug introduced by Andi Kleen's patch # to speed it up - use the proper bitmask for clearing "used-fpu" # state. # -------------------------------------------- # 03/03/09 green@linuxhacker.ru 1.1092 # [VLAN]: Fix memory leak in procfs handling. # -------------------------------------------- # 03/03/09 ambx1@neo.rr.com 1.1075.1.4 # Interface Changes # # A few minor revisions. Simpifies a few commands and adds config mode # information. # -------------------------------------------- # 03/03/09 torvalds@home.transmeta.com 1.1075.3.95 # Fix nanosleep() problem noticed by Todd Mokros . # # If we raced on a timer expire, we'd get a negative timeout and think # that is was a _huge_ positive timeout. # -------------------------------------------- # 03/03/09 torvalds@home.transmeta.com 1.1075.3.96 # Cache the MSR_IA32_SYSENTER_CS value in the per-CPU TSS (using # the otherwise unused cpl1 entry for SS), so that we can avoid # re-loading it on task switches if it doesn't change. # -------------------------------------------- # 03/03/09 ambx1@neo.rr.com 1.1075.1.5 # Merge http://linux.bkbits.net/linux-2.5 # into neo.rr.com:/home/ambx1/src/bk/linus-2.5 # -------------------------------------------- # 03/03/09 ambx1@neo.rr.com 1.1075.1.6 # PnP Card Serivice Revisions # # This set of changes addresses the following issues with the existing card # service implementation: # # 1.) Only one driver can be bound to a card. # 2.) repetive code is required for pnp_request_card_device and other # functions # # This patch will make the card services usable by ALSA. # -------------------------------------------- # 03/03/09 ambx1@neo.rr.com 1.1075.1.7 # ALS100 Updates # # Updates the als100 driver to use the pnp apis. Includes resource config # templates. # -------------------------------------------- # 03/03/09 ambx1@neo.rr.com 1.1075.1.8 # OSS SB driver Updates # # Compatibility update for the latest changes. # -------------------------------------------- # 03/03/09 ambx1@neo.rr.com 1.1075.1.9 # Aditional Card Service Changes # # Fixes many issues that were discovered after testing. Also cleans up the # card service code and fixes the card_drvdata bug in which only one driver # at a time could have driver data. # -------------------------------------------- # 03/03/10 davej@codemonkey.org.uk 1.1075.3.97 # [CPUFREQ] Fix documentation typos. # -------------------------------------------- # 03/03/10 davej@codemonkey.org.uk 1.1075.3.98 # [CPUFREQ] powernow-k7 lazy voltage setting. # -------------------------------------------- # 03/03/10 torvalds@home.transmeta.com 1.1075.17.1 # Move "used FPU status" into new non-atomic thread_info->status field. # # This allows us to avoid having to use atomic updates for the lazy FP # status setting, since we don't have to worry about other CPU's racing # on the fields. # # Also, fix x86 FP state after fork() by making sure the FP is unlazied # _before_ we copy the state information. Otherwise, if a process did a # fork() while holding the FP state lazily in the registers, the child # would incorrectly unlazy bogus state. # -------------------------------------------- # 03/03/10 shaggy@shaggy.austin.ibm.com 1.1068.14.1 # JFS: Fix hang while flushing outstanding transactions under heavy load # # During syncbarrier recovery, when JFS is waiting for all outstanding # transactions to complete before allowing new ones to start, there was a # window where a new transaction starts, but is not committed when JFS thought # it could stop flushing the journal to disk. This caused the log_SYNCBARRIER # flag to not be reset, and no new transactions are allowed to start. # # This is fixed by using the log->active field to determine when to reset the # log_FLUSH flag. # -------------------------------------------- # 03/03/10 kraxel@bytesex.org 1.1075.17.2 # [PATCH] v4l: video-buf update # # This patch is a update for the video-buf mm helper module. It has # some minor bugfixes and a number of signed/unsigned cleanups to make # gcc 3.3 happy. # -------------------------------------------- # 03/03/10 rddunlap@osdl.org 1.1093 # [SNMP]: Fix SNMP_STAT_{USR,BH}PTR. # -------------------------------------------- # 03/03/10 davem@nuts.ninka.net 1.1094 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/03/10 torvalds@home.transmeta.com 1.1075.17.3 # Remove 's own home-made FPU begin/end macros, # use the real ones instead. # -------------------------------------------- # 03/03/10 torvalds@home.transmeta.com 1.1075.17.4 # Use a fixed per-cpu SYSENTER_MSR_ESP value by having the sysenter # entry routine load the real ESP0 off that per-cpu stack. Make this # even faster by putting the sysenter stack in the per-CPU TSS, so # that we can use the tss->esp0 value directly (which we have to # update on task switches anyway). # # CAREFUL! This needs very subtle code for debug and NMI exceptions, # to make sure we don't run with the sysenter stack in any real kernel # code! # -------------------------------------------- # 03/03/10 kuznet@ms2.inr.ac.ru 1.1095 # [IPV4]: Fix deadlock in IGMP locking. # -------------------------------------------- # 03/03/10 willy@debian.org 1.1075.17.5 # [PATCH] neaten fs/locks.c a little # # - Fix my email address to one which reaches me ;-) # - Remove timer.h include as we don't use timers. # - Add module.h. # - Sort includes alphabetically. # - Move EXPORT_SYMBOL from ksyms.c to locks.c. # - Simplify locks_conflict(). # -------------------------------------------- # 03/03/10 torvalds@home.transmeta.com 1.1094.1.1 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.2 # [PATCH] revert "noirqbalance still doesn't do anything" # # This recent patch caused Nick Piggin's 2xPIII VIA686B chipset machine into an # interrupts-off lockup during IDE probing. # # We don't really know why - it might be because an interrupt is delivered to a # secondary which doesn't expect it. # # I have a second patch from Zwane which solves the same problem in a different # way, but until that's had some wider testing I suggest we just back off the # original. # -------------------------------------------- # 03/03/10 hpa@transmeta.com 1.1094.1.3 # [PATCH] Fix $(src) versus $(obj) # # This fixes a bunch of "src" versus "obj" confusions that apparently # existed in my bootsect removal patch. How embarrassing... # -------------------------------------------- # 03/03/10 hch@lst.de 1.1094.1.4 # [PATCH] i2c-core.c procfs updates # # Cleanup the i2c procfs code a bit (less ifdef mess), partially based # on the lm_sensors CVS code. # -------------------------------------------- # 03/03/10 hch@lst.de 1.1094.1.5 # [PATCH] remove devfs_only() # # Rationale: devfs_only does nothing but disabling {un,}register_blkdev # and {un,}register_chrdev. {un,}register_blkdev already do nothing but # adding it's name argument to a lookup table for the __bdevname and # /proc/device output so this use is already bogus. The disabling of # the character device per-major arrays can work in practice but is # useless as any driver relying on it can't be used on non-devfs systems. # -------------------------------------------- # 03/03/10 ak@muc.de 1.1094.1.6 # [PATCH] x86-64 updates for 2.5.64-bk3 # # Make x86-64 boot again after the INITIAL_JIFFIES changes # and some bug fixes. Also some work for NPTL. # # - Merge with i386/2.5.64-bk3 # - Fix memory leak in copy_thread # - arch_prctl uses GDT for base if possible. Cleanup. # - clone supports bases >32bit for SETTLS etc. %fs hardcoded now. # - new ptrace support for 64bit TLS # - Disable (set|get)_thread_* for 64bit processes. # - Audit arch/x86_64 for jiffies wrap issues. # - Fix initial jiffies problem (that caused hanging kernels) # - FIx a few 32bit emulation bugs (sigaltstack, sigqueue) # - Some cleanup from Pavel # - Should compile again as UP # - Shrink size a bit by not putting exception tables into object files. # - Fix compilation with gcc 3.3 :- force inlining when needed # - Work around 2.5.64-bk3 console init bug. # - Fix some alignments in assembly code # -------------------------------------------- # 03/03/10 torvalds@home.transmeta.com 1.1094.1.7 # Merge bk://linux-pnp.bkbits.net/linux-pnp # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/10 torvalds@home.transmeta.com 1.1094.1.8 # Use cond_sched() instead of manual expansion of it. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.9 # [PATCH] ACPI suspend/resume locking fix # # Patch from Andreas Mohr # # Need to retake the spinlock in __pdflush() before continuing. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.10 # [PATCH] fix typo in init/Kconfig # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.11 # [PATCH] pnp warning fix # # The pnp_request_card_device() stub should return NULL, not -ENODEV. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.12 # [PATCH] fix console ordering default # # The conversion of the console registration to an initcall-style thing has # broken lots of people's setups. It is now dependent upon linkage order and # if you have both CONFIG_VT_CONSOLE and CONFIG_SERIAL_CONSOLE, no boot # messages come out on the screen because the kernel is selecting the serial # console first. # # It can be fixed by specifying console=tty0, but nobody is doing that. # # We can fix it up by placing drivers/char/ in front of drivers/serial/ in # linkage order. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.13 # [PATCH] work around gcc-3.x inlining bugs # # Force inlining even when gcc-3.x is too confused to do it for us. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.14 # [PATCH] NCPFS memleak fix # # Patch from Petr Vandrovec # Reported by Oleg Drokin. # # In NCP_IOC_SETOBJECTNAME handler, we allocated space (newname pointer), # copy stuff from userspace to there and then assign userspace # pointer to our internal structure, whoops! # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.15 # [PATCH] Memleak in Windows Logical Disk Manager partition # # Patch from Oleg Drokin # # Not freeing allocated memory on error exit path. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.16 # [PATCH] Fix memleak in ircomm_core # # Patch from Oleg Drokin # # There seems to be a memleak on error exit path. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.17 # [PATCH] Force cache alignment of task_structs # # I enabled the advanced use-after-free detector for large slab objects and the # kernel oopsed. This is because that debug code adds things at the head of # the slab objects, and the kernel will die if task_structs are not # well-aligned. # # The way to tell the slab allocator that it is not allowed to misalign objects # from this slab is SLAB_MUST_HWCACHE_ALIGN. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.18 # [PATCH] ext3: error handling robustness # # Fix a couple of ext3 error handling routines to not assume that the # superblock has valid journal and buffer_head pointers. These functions are # called during mount and unmount and that may not be true. # # This should fix the oops which Zwane saw when mounting a corrupt filesystem. # -------------------------------------------- # 03/03/10 akpm@digeo.com 1.1094.1.19 # [PATCH] ext2: fix directory handling bug # # Patch from Dave Miller. Fixes a very long-standing bug. # # If a process has an fd open against a now-removed directory, lookups on that # fd will end up calling ext2_find_entry() against a zero-length directory. # # When this happens ext2_find_entry() will, on the first pass through the loop, # set `kaddr' to page_address(page) - 20. Things get confused and the "zero # length directory entry" warning triggers. # # This only happens on 64-bit machines, because ext2_last_byte() is returning # an unsigned (32-bit) value, and the arithmetic works out OK for 32-bit # machines. # # So we change ext2_find_entry() to bale out immediately if the directory is # zero-length. All other directory-walking functions do this, but # ext2_find_entry() forgot to, due to the search-from-the-last-place # optimisation. # -------------------------------------------- # 03/03/11 davej@codemonkey.org.uk 1.1075.3.99 # [CPUFREQ] More typos. # -------------------------------------------- # 03/03/11 davej@tetrachloride.(none) 1.1094.1.20 # Merge tetrachloride.(none):/mnt/raid/src/kernel/2.5/bk-linus # into tetrachloride.(none):/mnt/raid/src/kernel/2.5/cpufreq # -------------------------------------------- # 03/03/11 sfr@canb.auug.org.au 1.1094.1.21 # [PATCH] compat_sys_fcntl{,64} Generic part # # This patch creates compat_sys_fcntl{,64}. The diffstat for the whole # patch set is below, but this is just the generic part, the architecture # specific parts will follow. # # This patch also removes struct flock64 from all the 64 bit architectures # (except parisc). # -------------------------------------------- # 03/03/11 sfr@canb.auug.org.au 1.1094.1.22 # [PATCH] compat_sys_fcntl{,64} x86_64 part # # Here is the x86_64 part of the patch with Andi's blessing. # -------------------------------------------- # 03/03/11 sfr@canb.auug.org.au 1.1094.1.23 # [PATCH] compat_sys_fcntl{,64} s390x part # # Here is the s390x part of the patch with Martin's blessing. # -------------------------------------------- # 03/03/11 sfr@canb.auug.org.au 1.1094.1.24 # [PATCH] compat_sys_fcntl{,64} parisc part # # Here is the parisc part of the patch with Willy's blessing. # -------------------------------------------- # 03/03/11 mzyngier@freesurf.fr 1.1094.1.25 # [PATCH] EISA/sysfs update # # Here is the latest round of EISA/sysfs update. # # - Add documentation, # - Add support for per EISA-id driver data, # - Move virtual_root device to a platform device, # - Update CREDITS. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.26 # [PATCH] include unistd.h in m68knommu 68360 entry code # # Include asm/unistd.h to get the NR_syscalls definition in the # m68knommu 68360 interrupt entry code. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.27 # [PATCH] include unistd.h in m68knommu 68328 entry code # # Include asm/unistd.h to get the NR_syscalls definition in the # m68knommu 68328 interrupt entry code. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.28 # [PATCH] include errn0.h in m68knommu 68328 interrupt setup code # # Include errno.h in the m68knommu 68328 specific interrupt setup code. # It needs a few E* types as return values. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.29 # [PATCH] m68knommu/ucdimm should use generic 68328 irq setup. # # This patch fixes the m68knommu ucdimm platform config to use the generic # 68328 irq setup. All 68*328 family can use the same setup. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.30 # [PATCH] fix spelling in m68knommu Kconfig help # # This patch fixes a couple of spelling errors in the m68knommy Kconfig # help entries. Also makes CONFIG_HIGHPROFILE dependant on CONFIG_COLDFIRE, # since that feature is only implemented on ColdFIre based platforms. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.31 # [PATCH] m68knommu/de2 should use generic 68328 irq setup. # # This patch fixes the m68knommu de2 platform config to use the generic # 68328 irq setup. All 68*328 family can use the same setup. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.32 # [PATCH] fix wrong argument prototype in m68knommu/68360 for interrupt handler # # Fix wrong argument prototype in m68knommu commproc.c. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.33 # [PATCH] include errno.h in m68knommu 68360 interrupt setup code # # Include errno.h in the m68knommu 68360 specific interrupt setup code. # It needs a few E* types as return values. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.34 # [PATCH] fix m68knommu/68VZ328 Makefile to traverse sub-dirs # # Fix m68knommu 68VZ328 Makefile to only traverse its sub-directories. # There is no local code files for it to compile. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.35 # [PATCH] fix m68knommu COMEM-lite PCI bios code # # This patch fixes up a lot of problems in the m68knommu architecture # CO-MEMlite PCI interface code. The code was seriously out of date, # not implementing many of the requried PCI bios support functions. # Also fixes many wrong function return types and arguments. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.36 # [PATCH] move common timer and vector code for m68knommu/ColdFire/5272 # # This patch moves common ColdFire vector and timer procesing code from # the local per-processor config.c for the 5272 ColdFire sub-architecture. # All ColdFire CPU's have the same timer and basic vector setup, seems # crazy to repeat this code for each of 6 ColdFire CPU varients. # This patch also removes the reset button support, this is now moved to # a proper device driver, where it belongs. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.37 # [PATCH] fix m68knommu/68VZ328/de2 Makefile to compile local code files # # This patch fixes the m68knomu/68VZ328/de2 Makefile to build all its # local code files. Previously it relied on Makefiles above it to do # this. It should be done here. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.38 # [PATCH] fix m68knommu/68VZ328/ucdimm Makefile to compile local code files # # This patch fixes the m68knomu/68VZ328/ucdimm Makefile to build all its # local code files. Previously it relied on Makefiles above it to do # this. It should be done here. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.39 # [PATCH] call schedule_tail() in m68knommu return from fork code path # # This patch adds a call to schedule_tail() in the return from fork # post processing. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.40 # [PATCH] move common timer and vector code for m68knommu/ColdFire/5307 # # This patch moves common ColdFire vector and timer procesing code from # the local per-processor config.c for the 5307 ColdFire sub-architecture. # All ColdFire CPU's have the same timer and basic vector setup, seems # crazy to repeat this code for each of 6 ColdFire CPU varients. # This patch also removes the reset button support, this is now moved to # a proper device driver, where it belongs. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.41 # [PATCH] fix m68knommu/68360 Kconfig wrong define # # This patch fixes a wrong m68knommu/68360 config define, # CONFIG_68630_SCC -> CONFIG_68360_SCC. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.42 # [PATCH] inline some mm functions for MMUless targets # # This patch is the last of the MMUless support changes to the mm system. # It inlines for MMUless targets the following functions: # # vmalloc_to_page() # follow_page() # remap_page_range() # # All of these return NULL for the non-MMU case. Doing the inline here # minimizes changes to assorted mm/ files. This patch was originally # from Christoph Hellwig. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.43 # [PATCH] include stddef.h in include/linux/list.h # # This patches add an include to stddef.h into include/linux/list.h. # It uses the NULL define. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.44 # [PATCH] fix m68knommu COMEM-lite PCI header code # # This patch fixes up the PCI bios header for the m68knommu COMEM-lite # PCI hardware support. Adds missing definitions, and a couple of trivial # inline functions here. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.45 # [PATCH] move common timer and vector code for m68knommu/ColdFire/5407 # # This patch moves common ColdFire vector and timer procesing code from # the local per-processor config.c for the 5407 ColdFire sub-architecture. # All ColdFire CPU's have the same timer and basic vector setup, seems # crazy to repeat this code for each of 6 ColdFire CPU varients. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.46 # [PATCH] fix m68knommu/68328 serial driver to use work_struct # # This patches fixes the m68knommu 68328 serial driver header to use the # work_struct, not the obsoleted workqueue. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.47 # [PATCH] build m68knommu/ColdFire common vectors.c and timers.c # # This patch puts the new common ColdFire timers.c and vectors.c into # the build list (in the m68knommu architecture branch). # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.48 # [PATCH] create common timer code for m68knommu/ColdFire processors # # This patch creates common timer setup and handling code for the m68knommu # ColdFire CPU sub-architecture. All 6 ColdFire CPU varients contain the # same hardware timers. Currently each sub-arch has its own timer code. # This reduces a lot of code duplication. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.49 # [PATCH] move common timer and vector code for m68knommu/ColdFire/5249 # # This patch moves common ColdFire vector and timer procesing code from # the local per-processor config.c for the 5249 ColdFire sub-architecture. # All ColdFire CPU's have the same timer and basic vector setup, seems # crazy to repeat this code for each of 6 ColdFire CPU varients. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.50 # [PATCH] move common timer and vector code for m68knommu/ColdFire/5206e # # This patch moves common ColdFire vector and timer procesing code from # the local per-processor config.c for the 5206e ColdFire sub-architecture. # All ColdFire CPU's have the same timer and basic vector setup, seems # crazy to repeat this code for each of 6 ColdFire CPU varients. # This patch also removes the reset button support, this is now moved to # a proper device driver, where it belongs. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.51 # [PATCH] move common timer and vector code for m68knommu/ColdFire/5206 # # This patch moves common ColdFire vector and timer procesing code from # the local per-processor config.c for the 5206 ColdFire sub-architecture. # All ColdFire CPU's have the same timer and basic vector setup, seems # crazy to repeat this code for each of 6 ColdFire CPU varients. # -------------------------------------------- # 03/03/11 gerg@snapgear.com 1.1094.1.52 # [PATCH] fix m68knommu/68360 serial driver to use work_struct # # This patches fixes the m68knommu 68360 serial driver to use the # work_struct, not the obsoleted workqueue. # -------------------------------------------- # 03/03/11 axboe@suse.de 1.1094.1.53 # [PATCH] Fix x86-64 build # -------------------------------------------- # 03/03/11 hch@sgi.com 1.1094.1.54 # [PATCH] fix kmem_cache_size() for new slab poisoning # # The new slab poisoning code broke kmem_cache_size(), it now returns # a too large size as the poisoning area after the object is includes. # XFS's kmem_zone_zalloc thus overwrites exactly that area and triggers # the new checks everytime such an object is freed again. # # I don't recommend using XFS on BK-current without this patch applied :) # -------------------------------------------- # 03/03/11 hch@sgi.com 1.1094.1.55 # [PATCH] remaining bits of DEVFS_FL_AUTO_DEVNUM # # Sorry, the devs_only() patch accidentally included the devfs-portion # of the DEVFS_FL_AUTO_DEVNUM patch. This patch contains the remaining # parts. # -------------------------------------------- # 03/03/11 hch@sgi.com 1.1094.1.56 # [PATCH] remove regular file support from devfs # # It's the _device_ filesystem, so regular files are grossly misplaced # here. Fortauntely only one driver actually tries to use it (microcode) # and it's works fine with a regular miscdevice as well. # -------------------------------------------- # 03/03/11 hch@sgi.com 1.1094.1.57 # [PATCH] missing drivers/video/Makefile entry # # This somehow got lost in the uClinux merge. # -------------------------------------------- # 03/03/11 hch@sgi.com 1.1094.1.58 # [PATCH] i2c ID updates # # another bunch of IDs appeared in lm_sensors CVS lately.. # -------------------------------------------- # 03/03/11 hch@sgi.com 1.1094.1.59 # [PATCH] update i2c algorithm drivers # # This one is from lm_sensors CVS and mostly cosmetic changes. I it up a # bit to compile properly under latest 2.5. # -------------------------------------------- # 03/03/11 hch@sgi.com 1.1094.1.60 # [PATCH] i2c-core locking updates # # The old adap_lock and driver_lock could deadlock and there was a bunch # of stuff that was horribly racy. The new locking scheme is from # lm_sensors CVS but I had to fix quite a few bugs to make this work. # -------------------------------------------- # 03/03/11 mochel@osdl.org 1.1094.1.61 # sysfs: fix BUG()s on directory creation and removal. # # - Don't d_delete() files when removing a directory - they must still be # hashed when dput() reaps them, and it will __d_drop() them anyway. # # - Don't d_invalidate() the directory on removal. # # - do simple_rmdir() after d_delete() on directory. # # - Remove extra dput(), which was causing refcount to go negative, causing # an oops when someone tried to create the directory again. # # - Make sure we don't d_delete() or do extra dput() on file when updating, # either. # -------------------------------------------- # 03/03/11 mochel@osdl.org 1.1094.1.62 # driver model: add bus_rescan_devices() # # From Ben Collins # # Used as manual trigger for device/driver binding, so drivers can claim # devices that are present but failed to be bound. In case of ieee1394, this # can happen if two computers are attached to a device - the second one won't # be able to claim it until the first detaches. # # Changed device_attach() to return 1 when a driver was bound to a device. # Makes it so bus_rescan_devices() can return the number of devices attached. # Tested this with ieee1394 over a bus reset and it worked as expected. # -------------------------------------------- # 03/03/11 shaggy@shaggy.austin.ibm.com 1.1094.2.1 # Merge jfs@jfs.bkbits.net:linux-2.5 # into shaggy.austin.ibm.com:/shaggy/bk/jfs-2.5 # -------------------------------------------- # 03/03/11 Andries.Brouwer@cwi.nl 1.1094.2.2 # [PATCH] some more NAND flash IDs # -------------------------------------------- # 03/03/11 torvalds@home.transmeta.com 1.1094.1.63 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/11 davem@nuts.ninka.net 1.1096 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/03/11 sfr@canb.auug.org.au 1.1094.3.1 # [COMPAT]: Sparc64 part of fcntl changes. # -------------------------------------------- # 03/03/11 uzi@uzix.org 1.1094.3.2 # [SPARC64]: Fix warning during uniprocessor build of US3 cpufreq. # -------------------------------------------- # 03/03/11 uzi@uzix.org 1.1094.3.3 # [SPARC64]: Need to export up_clock_tick on uniprocessor. # -------------------------------------------- # 03/03/11 ahaas@airmail.net 1.1097 # [NETFILTER]: Really apply the ipv4 C99 patches this time. :-) # -------------------------------------------- # 03/03/11 davem@kernel.bkbits.net 1.1098 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/03/11 torvalds@home.transmeta.com 1.1094.1.64 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/11 torvalds@home.transmeta.com 1.1099 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/03/11 elenstev@mesatop.com 1.1100 # [PATCH] Documentation spelling cleanup # # This patch fixes spelling errors in the Documentation directory and was # extensively reviewed by the following people: Dan Kegel, David # Woodhouse, Joe Perches, Jared Daniel J. Smith, Michael Hayes, and # Steven Cole # -------------------------------------------- # 03/03/11 akpm@digeo.com 1.1101 # [PATCH] unplugging fix # # Patch from Neil Brown # # Allow auto-unplugging to work for devices that do it themselves. # # Auto-unplugging - and blk_unplug_work in particular - assumes that the device # uses "generic_unplug_device" for unplugging, but some devices don't. md # crashes. # # So blk_unplug_work should use ->unplug_fn # -------------------------------------------- # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS Tue Mar 11 22:06:18 2003 +++ b/CREDITS Tue Mar 11 22:06:18 2003 @@ -3492,9 +3492,9 @@ N: Marc Zyngier E: maz@wild-wind.fr.eu.org +W: http://www.misterjones.org D: MD driver -S: 11 rue Victor HUGO -S: 95560 Montsoult +D: EISA/sysfs subsystem S: France # Don't add your name here, unless you really _are_ after Marc diff -Nru a/Documentation/DocBook/journal-api.tmpl b/Documentation/DocBook/journal-api.tmpl --- a/Documentation/DocBook/journal-api.tmpl Tue Mar 11 22:06:15 2003 +++ b/Documentation/DocBook/journal-api.tmpl Tue Mar 11 22:06:15 2003 @@ -216,7 +216,7 @@ A new feature of jbd since 2.5.25 is commit callbacks with the new journal_callback_set() function you can now ask the journalling layer -to call you back when the transaction is finally commited to disk, so that +to call you back when the transaction is finally committed to disk, so that you can do some of your own management. The key to this is the journal_callback struct, this maintains the internal callback information but you can extend it like this:- @@ -232,7 +232,7 @@ -this would be useful if you needed to know when data was commited to a +this would be useful if you needed to know when data was committed to a particular inode. diff -Nru a/Documentation/DocBook/sis900.tmpl b/Documentation/DocBook/sis900.tmpl --- a/Documentation/DocBook/sis900.tmpl Tue Mar 11 22:06:17 2003 +++ b/Documentation/DocBook/sis900.tmpl Tue Mar 11 22:06:17 2003 @@ -536,7 +536,7 @@ November 13, 2000, Revision 1.07, seventh release, 630E problem fixed -and furthur clean up. +and further clean up. diff -Nru a/Documentation/arm/Booting b/Documentation/arm/Booting --- a/Documentation/arm/Booting Tue Mar 11 22:06:18 2003 +++ b/Documentation/arm/Booting Tue Mar 11 22:06:18 2003 @@ -47,7 +47,7 @@ used for debugging purposes, or communication with the target.) As an alternative, the boot loader can pass the relevant 'console=' -option to the kernel via the tagged lists specifing the port, and +option to the kernel via the tagged lists specifying the port, and serial format options as described in linux/Documentation/kernel-parameters.txt. diff -Nru a/Documentation/arm/SA1100/serial_UART b/Documentation/arm/SA1100/serial_UART --- a/Documentation/arm/SA1100/serial_UART Tue Mar 11 22:06:16 2003 +++ b/Documentation/arm/SA1100/serial_UART Tue Mar 11 22:06:16 2003 @@ -39,7 +39,7 @@ name. The classic example is the content of the /etc/inittab file where you might have a getty process started on ttyS0. In this case: -- replace occurences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc. +- replace occurrences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc. - don't forget to add 'ttySA0', 'console', or the appropriate tty name in /etc/securetty for root to be allowed to login as well. diff -Nru a/Documentation/arm/Setup b/Documentation/arm/Setup --- a/Documentation/arm/Setup Tue Mar 11 22:06:15 2003 +++ b/Documentation/arm/Setup Tue Mar 11 22:06:15 2003 @@ -97,7 +97,7 @@ initrd_size This describes the kernel virtual start address and size of the - inital ramdisk. + initial ramdisk. rd_start diff -Nru a/Documentation/arm/XScale/IOP3XX/dma.txt b/Documentation/arm/XScale/IOP3XX/dma.txt --- a/Documentation/arm/XScale/IOP3XX/dma.txt Tue Mar 11 22:06:19 2003 +++ b/Documentation/arm/XScale/IOP3XX/dma.txt Tue Mar 11 22:06:19 2003 @@ -142,7 +142,7 @@ /* User's responsibility to keep buffers cached coherent */ cpu_dcache_clean(sgl->data, sgl->data + 1024); - /* queing the buffer, this function will sleep since no callback */ + /* queuing the buffer, this function will sleep since no callback */ err = dma_queue_buffer(channel, sgl_head); /* now we are woken from DMA complete */ @@ -186,7 +186,7 @@ int dma_flush_all(dmach_t channel); This completely flushes all queued buffers and on-going DMA transfers on a -given channel. This is called when DMA channel errors have occured. +given channel. This is called when DMA channel errors have occurred. void dma_free(dmach_t channel); diff -Nru a/Documentation/arm/mem_alignment b/Documentation/arm/mem_alignment --- a/Documentation/arm/mem_alignment Tue Mar 11 22:06:16 2003 +++ b/Documentation/arm/mem_alignment Tue Mar 11 22:06:16 2003 @@ -51,7 +51,7 @@ echo 1 > /proc/sys/debug/alignment You can also read the content of the same file to get statistical -information on unaligned access occurences plus the current mode of +information on unaligned access occurrences plus the current mode of operation for user space code. diff -Nru a/Documentation/basic_profiling.txt b/Documentation/basic_profiling.txt --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/basic_profiling.txt Tue Mar 11 22:06:20 2003 @@ -0,0 +1,48 @@ +These instructions are deliberately very basic. If you want something clever, +go read the real docs ;-) Please don't add more stuff, but feel free to +correct my mistakes ;-) (mbligh@aracnet.com) +Thanks to John Levon, Dave Hansen, et al. for help writing this. + + is the thing you're trying to measure. +Make sure you have the correct System.map / vmlinux referenced! +IMHO it's easier to use "make install" for linux and hack /sbin/installkernel +to copy config files, system.map, vmlinux to /boot. + +Readprofile +----------- +You need a fixed readprofile command for 2.5 ... either get hold of +a current version from: +http://www.kernel.org/pub/linux/utils/util-linux/ +or get readprofile binary fixed for 2.5 / akpm's 2.5 patch from +ftp://ftp.kernel.org/pub/linux/kernel/people/mbligh/tools/readprofile/ + +Add "profile=2" to the kernel command line. + +clear readprofile -r + +dump output readprofile -m /boot/System.map > captured_profile + +Oprofile +-------- +get source (I use 0.5) from http://oprofile.sourceforge.net/ +add "idle=poll" to the kernel command line +Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel +./configure --with-kernel-support +make install + +One time setup (pick appropriate one for your CPU): +P3 opcontrol --setup --vmlinux=/boot/vmlinux \ + --ctr0-event=CPU_CLK_UNHALTED --ctr0-count=100000 +Athlon/x86-64 opcontrol --setup --vmlinux=/boot/vmlinux \ + --ctr0-event=RETIRED_INSNS --ctr0-count=100000 +P4 opcontrol --setup --vmlinux=/boot/vmlinux \ + --ctr0-event=GLOBAL_POWER_EVENTS \ + --ctr0-unit-mask=1 --ctr0-count=100000 + +start daemon opcontrol --start-daemon +clear opcontrol --reset +start opcontrol --start + +stop opcontrol --stop +dump output oprofpp -dl -i /boot/vmlinux > output_file + diff -Nru a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt --- a/Documentation/block/biodoc.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/block/biodoc.txt Tue Mar 11 22:06:18 2003 @@ -635,9 +635,9 @@ be one of the many segments in the current bio (i.e i/o completion unit). The nr_sectors value refers to the total number of sectors in the whole request that remain to be transferred (no change). The purpose of the -hard_xxx values is for block to remember these counts everytime it hands +hard_xxx values is for block to remember these counts every time it hands over the request to the driver. These values are updated by block on -end_that_request_first, i.e. everytime the driver completes a part of the +end_that_request_first, i.e. every time the driver completes a part of the transfer and invokes block end*request helpers to mark this. The driver should not modify these values. The block layer sets up the nr_sectors and current_nr_sectors fields (based on the corresponding diff -Nru a/Documentation/cdrom/cdrom-standard.tex b/Documentation/cdrom/cdrom-standard.tex --- a/Documentation/cdrom/cdrom-standard.tex Tue Mar 11 22:06:16 2003 +++ b/Documentation/cdrom/cdrom-standard.tex Tue Mar 11 22:06:16 2003 @@ -758,11 +758,8 @@ \subsection{$Struct\ file_operations\ cdrom_fops$} The contents of this structure were described in section~\ref{cdrom.c}. -As already stated, this structure should be used to register block -devices with the kernel: -$$ -register_blkdev(major, , \&cdrom_fops); -$$ +A pointer to this structure is assigned to the $fops$ field +of the $struct gendisk$. \subsection{$Int\ register_cdrom( struct\ cdrom_device_info\ * cdi)$} diff -Nru a/Documentation/computone.txt b/Documentation/computone.txt --- a/Documentation/computone.txt Tue Mar 11 22:06:19 2003 +++ b/Documentation/computone.txt Tue Mar 11 22:06:19 2003 @@ -539,7 +539,7 @@ X for PORTNO in $MINORS X do X if test ! -c /dev/ttyF$PORTNO ; then -X # We got the harware but no device - make it +X # We got the hardware but no device - make it X mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO X fi X done @@ -552,7 +552,7 @@ X for PORTNO in $MINORS X do X if test ! -c /dev/cuf$PORTNO ; then -X # We got the harware but no device - make it +X # We got the hardware but no device - make it X mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO X fi X done diff -Nru a/Documentation/cpqarray.txt b/Documentation/cpqarray.txt --- a/Documentation/cpqarray.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/cpqarray.txt Tue Mar 11 22:06:17 2003 @@ -49,9 +49,9 @@ ----------------- If you want to use an EISA controller you'll have to supply some -insmod/lilo paramaters. If the driver is compiled into the kernel, must +insmod/lilo parameters. If the driver is compiled into the kernel, must give it the controller's IO port address at boot time (it is no longer -necessary to specifiy the IRQ). For example, if you had two SMART-2/E +necessary to specify the IRQ). For example, if you had two SMART-2/E controllers, in EISA slots 1 and 2 you'd give it a boot argument like this: diff -Nru a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt --- a/Documentation/cpu-freq/core.txt Tue Mar 11 22:06:19 2003 +++ b/Documentation/cpu-freq/core.txt Tue Mar 11 22:06:19 2003 @@ -35,6 +35,10 @@ kernel "constant" loops_per_jiffy is updated on frequency changes here. +Reference counting is done by cpufreq_get_cpu and cpufreq_put_cpu, +which make sure that the cpufreq processor driver is correctly +registered with the core, and will not be unloaded until +cpufreq_put_cpu is called. 2. CPUFreq notifiers ==================== diff -Nru a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt --- a/Documentation/cpu-freq/cpu-drivers.txt Tue Mar 11 22:06:20 2003 +++ b/Documentation/cpu-freq/cpu-drivers.txt Tue Mar 11 22:06:20 2003 @@ -35,7 +35,7 @@ So, you just got a brand-new CPU / chipset with datasheets and want to add cpufreq support for this CPU / chipset? Great. Here are some hints -on what is neccessary: +on what is necessary: 1.1 Initialization @@ -54,7 +54,7 @@ cpufreq_driver.init - A pointer to the per-CPU initialization function. -cpufreq_driver.verify - A pointer to a "verfication" funciton. +cpufreq_driver.verify - A pointer to a "verification" funciton. cpufreq_driver.setpolicy _or_ cpufreq_driver.target - See below on the differences. @@ -63,13 +63,16 @@ cpufreq_driver.exit - A pointer to a per-CPU cleanup function. +cpufreq_driver.attr - A pointer to a NULL-terminated list of + "struct freq_attr" which allow to + export values to sysfs. 1.2 Per-CPU Initialization -------------------------- Whenever a new CPU is registered with the device model, or after the -cpufreq driver registers itself, the per-CPU initialization fucntion +cpufreq driver registers itself, the per-CPU initialization function cpufreq_driver.init is called. It takes a struct cpufreq_policy *policy as argument. What to do now? @@ -91,7 +94,7 @@ this CPU (if appropriate) policy->min, policy->max, -policy->policy and, if neccessary, +policy->policy and, if necessary, policy->governor must contain the "default policy" for this CPU. A few moments later, cpufreq_driver.verify and either diff -Nru a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt --- a/Documentation/cpu-freq/governors.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/cpu-freq/governors.txt Tue Mar 11 22:06:17 2003 @@ -98,7 +98,7 @@ ------------- The CPUfreq governor "userspace" allows the user, or any userspace -program running with UID "root", to set the CPU to a specifc frequency +program running with UID "root", to set the CPU to a specific frequency by making a sysfs file "scaling_setspeed" available in the CPU-device directory. diff -Nru a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt --- a/Documentation/cpu-freq/user-guide.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/cpu-freq/user-guide.txt Tue Mar 11 22:06:15 2003 @@ -58,7 +58,8 @@ Intel Pentium 4, Intel Xeon National Semiconductors Geode GX Transmeta Crusoe -varios processors on some ACPI 2.0-compatible systems [**] +VIA Cyrix 3 / C3 +various processors on some ACPI 2.0-compatible systems [**] [*] only certain Intel mobile PIII processors are supported. If you know that you own a speedstep-capable processor, pass the option @@ -81,9 +82,9 @@ 2. "Policy" / "Governor" ? ========================== -Some CPU frequency scaling-capable processor switch between varios +Some CPU frequency scaling-capable processor switch between various frequencies and operating voltages "on the fly" without any kernel or -user involvement. This guarantuees very fast switching to a frequency +user involvement. This guarantees very fast switching to a frequency which is high enough to serve the user's needs, but low enough to save power. @@ -93,7 +94,7 @@ On these systems, all you can do is select the lower and upper frequency limit as well as whether you want more aggressive -power-saving or more instantly avaialble processing power. +power-saving or more instantly available processing power. 2.2 Governor @@ -114,9 +115,9 @@ ------------------------------ The preferred interface is located in the sysfs filesystem. If you -mounted it at /sys, the cpufreq interface is located in the -cpu-device directory (e.g. /sys/devices/sys/cpu0/ for the first -CPU). +mounted it at /sys, the cpufreq interface is located in a subdirectory +"cpufreq" within the cpu-device directory +(e.g. /sys/devices/sys/cpu0/cpufreq/ for the first CPU). cpuinfo_min_freq : this file shows the minimum operating frequency the processor can run at(in kHz) @@ -125,7 +126,7 @@ scaling_driver : this file shows what cpufreq driver is used to set the frequency on this CPU -available_scaling_governors : this file shows the CPUfreq governors +scaling_available_governors : this file shows the CPUfreq governors available in this kernel. You can see the currently activated governor in diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt --- a/Documentation/crypto/api-intro.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/crypto/api-intro.txt Tue Mar 11 22:06:18 2003 @@ -38,9 +38,8 @@ Compressors. The compression algorithms especially seem to be performing very well so far. -An asynchronous scheduling interface is in planning but not yet -implemented, as we need to further analyze the requirements of all of -the possible hardware scenarios (e.g. IPsec NIC offload). +Support for hardware crypto devices via an asynchronous interface is +under development. Here's an example of how to use the API: @@ -87,8 +86,8 @@ DEVELOPER NOTES -None of this code should be called from hardirq context, only softirq and -user contexts. +Transforms may only be allocated in user context, and cryptographic +methods may only be called from softirq and user contexts. When using the API for ciphers, performance will be optimal if each scatterlist contains data which is a multiple of the cipher's block @@ -137,16 +136,11 @@ list, see: http://samba.org/~jamesm/crypto/ -Ongoing development discussion may also be found on -kerneli cryptoapi-devel, -see http://www.kerneli.org/mailman/listinfo/cryptoapi-devel - AUTHORS James Morris David S. Miller -Jean-Francois Dive (SHA1 algorithm module) CREDITS @@ -191,6 +185,10 @@ Matthew Skala (Twofish) Dag Arne Osvik (Serpent) Brian Gladman (AES) + + +SHA1 algorithm contributors: + Jean-Francois Dive DES algorithm contributors: Raimar Falke @@ -215,6 +213,8 @@ Herbert Valerio Riedel Kyle McMartin Adam J. Richter + +Generic scatterwalk code by Adam J. Richter Please send any credits updates or corrections to: James Morris diff -Nru a/Documentation/devices.txt b/Documentation/devices.txt --- a/Documentation/devices.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/devices.txt Tue Mar 11 22:06:16 2003 @@ -898,7 +898,7 @@ ... Network Block Device is somehow similar to loopback - devices: If you read from it, it sends packet accross + devices: If you read from it, it sends packet across network asking server for data. If you write to it, it sends packet telling server to write. It could be used to mounting filesystems over the net, swapping over diff -Nru a/Documentation/driver-model/driver.txt b/Documentation/driver-model/driver.txt --- a/Documentation/driver-model/driver.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/driver-model/driver.txt Tue Mar 11 22:06:17 2003 @@ -36,7 +36,7 @@ ~~~~~~~~~~~~~~ The driver must initialize at least the name and bus fields. It should -also initalize the devclass field (when it arrives), so it may obtain +also initialize the devclass field (when it arrives), so it may obtain the proper linkage internally. It should also initialize as many of the callbacks as possible, though each is optional. @@ -93,7 +93,7 @@ }, }; -Some may find the syntax of embedded struct intialization awkward or +Some may find the syntax of embedded struct initialization awkward or even a bit ugly. So far, it's the best way we've found to do what we want... Registration @@ -198,7 +198,7 @@ int (*suspend) (struct device * dev, u32 state, u32 level); suspend is called to put the device in a low power state. There are -several stages to sucessfully suspending a device, which is denoted in +several stages to successfully suspending a device, which is denoted in the @level parameter. Breaking the suspend transition into several stages affords the platform flexibility in performing device power management based on the requirements of the system and the @@ -206,7 +206,7 @@ SUSPEND_NOTIFY notifies the device that a suspend transition is about to happen. This happens on system power state transition to verify -that all devices can sucessfully suspend. +that all devices can successfully suspend. A driver may choose to fail on this call, which should cause the entire suspend transition to fail. A driver should fail only if it diff -Nru a/Documentation/driver-model/platform.txt b/Documentation/driver-model/platform.txt --- a/Documentation/driver-model/platform.txt Tue Mar 11 22:06:19 2003 +++ b/Documentation/driver-model/platform.txt Tue Mar 11 22:06:19 2003 @@ -34,7 +34,7 @@ gives them a common parent if they don't already have one. But, besides the organizational benefits, the platform bus can also -accomodate firmware-based enumeration. +accommodate firmware-based enumeration. Device Discovery diff -Nru a/Documentation/eisa.txt b/Documentation/eisa.txt --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/eisa.txt Tue Mar 11 22:06:20 2003 @@ -0,0 +1,164 @@ +EISA bus support (Marc Zyngier ) + +This document groups random notes about porting EISA drivers to the +new EISA/sysfs API. + +Starting from version 2.5.59, the EISA bus is almost given the same +status as other much more mainstream busses such as PCI or USB. This +has been possible through sysfs, which defines a nice enough set of +abstractions to manage busses, devices and drivers. + +Although the new API is quite simple to use, converting existing +drivers to the new infrastructure is not an easy task (mostly because +detection code is generally also used to probe ISA cards). Moreover, +most EISA drivers are among the oldest Linux drivers so, as you can +imagine, some dust has settled here over the years. + +The EISA infrastructure is made up of three parts : + + - The bus code implements most of the generic code. It is shared + among all the architectures that the EISA code runs on. It + implements bus probing (detecting EISA cards avaible on the bus), + allocates I/O resources, allows fancy naming through sysfs, and + offers interfaces for driver to register. + + - The bus root driver implements the glue between the bus hardware + and the generic bus code. It is responsible for discovering the + device implementing the bus, and setting it up to be latter probed + by the bus code. This can go from something as simple as reserving + an I/O region on x86, to the rather more complex, like the hppa + EISA code. This is the part to implement in order to have EISA + running on an "new" platform. + + - The driver offers the bus a list of devices that it manages, and + implements the necessary callbacks to probe and release devices + whenever told to. + +Every function/structure below lives in , which depends +heavily on . + +** Bus root driver : + +int eisa_root_register (struct eisa_root_device *root); + +The eisa_root_register function is used to declare a device as the +root of an EISA bus. The eisa_root_device structure holds a reference +to this device, as well as some parameters for probing purposes. + +struct eisa_root_device { + struct list_head node; + struct device *dev; /* Pointer to bridge device */ + struct resource *res; + unsigned long bus_base_addr; + int slots; /* Max slot number */ + int bus_nr; /* Set by eisa_root_register */ +}; + +node : used for eisa_root_register internal purpose +dev : pointer to the root device +res : root device I/O resource +bus_base_addr : slot 0 address on this bus +slots : max slot number to probe +bus_nr : unique bus id, set by eisa_root_register + +** Driver : + +int eisa_driver_register (struct eisa_driver *edrv); +void eisa_driver_unregister (struct eisa_driver *edrv); + +Clear enough ? + +struct eisa_device_id { + char sig[EISA_SIG_LEN]; + unsigned long driver_data; +}; + +struct eisa_driver { + const struct eisa_device_id *id_table; + struct device_driver driver; +}; + +id_table : an array of NULL terminated EISA id strings, + followed by an empty string. Each string can be + paired with a driver-dependant value (driver_data). + +driver : a generic driver, such as described in + Documentation/driver-model/driver.txt. Only .name, + .probe and .remove members are mandatory. + +An example is the 3c509 driver : + +struct eisa_device_id el3_eisa_ids[] = { + { "TCM5092" }, + { "TCM5093" }, + { "" } +}; + +struct eisa_driver el3_eisa_driver = { + .id_table = el3_eisa_ids, + .driver = { + .name = "3c509", + .probe = el3_eisa_probe, + .remove = __devexit_p (el3_device_remove) + } +}; + +** Device : + +The sysfs framework calls .probe and .remove functions upon device +discovery and removal (note that the .remove function is only called +when driver is built as a module). + +Both functions are passed a pointer to a 'struct device', which is +encapsulated in a 'struct eisa_device' described as follows : + +struct eisa_device { + struct eisa_device_id id; + int slot; + unsigned long base_addr; + struct resource res; + struct device dev; /* generic device */ +}; + +id : EISA id, as read from device. id.driver_data is set from the + matching driver EISA id. +slot : slot number which the device was detected on +res : I/O resource allocated to this device +dev : generic device (see Documentation/driver-model/device.txt) + +You can get the 'struct eisa_device' from 'struct device' using the +'to_eisa_device' macro. + +** Misc stuff : + +void eisa_set_drvdata (struct eisa_device *edev, void *data); + +Stores data into the device's driver_data area. + +void *eisa_get_drvdata (struct eisa_device *edev): + +Gets the pointer previously stored into the device's driver_data area. + +** Random notes : + +Converting an EISA driver to the new API mostly involves *deleting* +code (since probing is now in the core EISA code). Unfortunately, most +drivers share their probing routine between ISA, MCA and EISA. Special +care must be taken when ripping out the EISA code, so other busses +won't suffer from these surgical strikes... + +You *must not* expect any EISA device to be detected when returning +from eisa_driver_register, since the chances are that the bus has not +yet been probed. In fact, that's what happens most of the time (the +bus root driver usually kicks in rather late in the boot process). +Unfortunately, most drivers are doing the probing by themselves, and +expect to have explored the whole machine when they exit their probe +routine. + +** Thanks : + +I'd like to thank the following people for their help : +- Xavier Benigni for lending me a wonderful Alpha Jensen, +- James Bottomley, Jeff Garzik for getting this stuff into the kernel, +- Andries Brouwer for contributing numerous EISA ids, +- Catrin Jones for coping with too many machines at home diff -Nru a/Documentation/filesystems/Exporting b/Documentation/filesystems/Exporting --- a/Documentation/filesystems/Exporting Tue Mar 11 22:06:16 2003 +++ b/Documentation/filesystems/Exporting Tue Mar 11 22:06:16 2003 @@ -45,7 +45,7 @@ to already have a (non-connected) dentry, and must be able to move that dentry into place (based on the parent and name in the ->lookup). This is particuarly needed for directories as - it is a dcache invarient that directories only have one dentry. + it is a dcache invariant that directories only have one dentry. To implement these features, the dcache has: diff -Nru a/Documentation/filesystems/devfs/README b/Documentation/filesystems/devfs/README --- a/Documentation/filesystems/devfs/README Tue Mar 11 22:06:17 2003 +++ b/Documentation/filesystems/devfs/README Tue Mar 11 22:06:17 2003 @@ -56,7 +56,7 @@ Operational issues (essential reading) Instructions for the impatient -Permissions persistence accross reboots +Permissions persistence across reboots Dealing with drivers without devfs support All the way with Devfs Other Issues @@ -1465,13 +1465,6 @@ The simplest option (especially when porting drivers to devfs) is to keep using the old major and minor numbers. Devfs will take whatever values are given for major&minor and pass them onto userspace. - -Alternatively, you can have devfs choose unique device numbers for -you. When you register a character or block device using -devfs_register you can provide the optional -DEVFS_FL_AUTO_DEVNUM flag, which will then automatically allocate a -unique device number (the allocation is separated for the character -and block devices). This device number is a 16 bit number, so this leaves plenty of space for large numbers of discs and partitions. This scheme can also be diff -Nru a/Documentation/filesystems/directory-locking b/Documentation/filesystems/directory-locking --- a/Documentation/filesystems/directory-locking Tue Mar 11 22:06:18 2003 +++ b/Documentation/filesystems/directory-locking Tue Mar 11 22:06:18 2003 @@ -110,4 +110,4 @@ Notice that "directory" in the above == "anything that might have children", so if we are going to introduce hybrid objects we will need either to make sure that link(2) doesn't work for them or to make changes -in is_subdir() that would make it work even in presense of such beasts. +in is_subdir() that would make it work even in presence of such beasts. diff -Nru a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt --- a/Documentation/filesystems/ext3.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/filesystems/ext3.txt Tue Mar 11 22:06:16 2003 @@ -48,11 +48,11 @@ sb=n Use alternate superblock at this location. -data=journal All data are commited into the journal prior +data=journal All data are committed into the journal prior to being written into the main file system. data=ordered (*) All data are forced directly out to the main file - system prior to its metadata being commited to + system prior to its metadata being committed to the journal. data=writeback Data ordering is not preserved, data may be diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt --- a/Documentation/filesystems/proc.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/filesystems/proc.txt Tue Mar 11 22:06:16 2003 @@ -344,7 +344,7 @@ Each column represents the number of pages of a certain order which are available. In this case, there are 0 chunks of 2^0*PAGE_SIZE available in ZONE_DMA, 4 chunks of 2^1*PAGE_SIZE in ZONE_DMA, 101 chunks of 2^4*PAGE_SIZE -availble in ZONE_NORMAL, etc... +available in ZONE_NORMAL, etc... 1.3 IDE devices in /proc/ide diff -Nru a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt --- a/Documentation/filesystems/sysfs.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/filesystems/sysfs.txt Tue Mar 11 22:06:15 2003 @@ -55,7 +55,7 @@ value per file, so it is socially acceptable to express an array of values of the same type. -Mixing types, expressing mulitple lines of data, and doing fancy +Mixing types, expressing multiple lines of data, and doing fancy formatting of data is heavily frowned upon. Doing these things may get you publically humiliated and your code rewritten without notice. diff -Nru a/Documentation/ia64/IRQ-redir.txt b/Documentation/ia64/IRQ-redir.txt --- a/Documentation/ia64/IRQ-redir.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/ia64/IRQ-redir.txt Tue Mar 11 22:06:18 2003 @@ -29,7 +29,7 @@ The output of the command cat /proc/irq/IRQ#/smp_affinity gives the target CPU mask for the specified interrupt vector. If the CPU -mask is preceeded by the character "r", the interrupt is redirectable +mask is preceded by the character "r", the interrupt is redirectable (i.e. lowest priority mode routing is used), otherwise its route is fixed. diff -Nru a/Documentation/ia64/fsys.txt b/Documentation/ia64/fsys.txt --- a/Documentation/ia64/fsys.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/ia64/fsys.txt Tue Mar 11 22:06:17 2003 @@ -4,7 +4,7 @@ ----------------------------------- Started: 13-Jan-2003 - Last update: 24-Jan-2003 + Last update: 11-Feb-2003 David Mosberger-Tang @@ -42,9 +42,9 @@ can disable interrupts and avoid all other interruption-sources to avoid preemption) - - neither the memory nor the register stack can be trusted while + - neither the memory-stack nor the register-stack can be trusted while in fsys-mode (they point to the user-level stacks, which may - be invalid) + be invalid, or completely bogus addresses) In summary, fsys-mode is much more similar to running in user-mode than it is to running in kernel-mode. Of course, given that the diff -Nru a/Documentation/ide.txt b/Documentation/ide.txt --- a/Documentation/ide.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/ide.txt Tue Mar 11 22:06:18 2003 @@ -4,7 +4,7 @@ ============================================================================== - The hdparm utility can be used to controll various IDE features on a + The hdparm utility can be used to control various IDE features on a running system. It is packaged separately. Please Look for it on popular linux FTP sites. @@ -37,7 +37,7 @@ ================================================================================ Common pitfalls: -- 40-conductor IDE cables are capable of transfering data in DMA modes up to +- 40-conductor IDE cables are capable of transferring data in DMA modes up to udma2, but no faster. - If possible devices should be attached to separate channels if they are diff -Nru a/Documentation/input/ff.txt b/Documentation/input/ff.txt --- a/Documentation/input/ff.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/input/ff.txt Tue Mar 11 22:06:18 2003 @@ -163,7 +163,7 @@ ~~~~~~~~~~~~~~~~~~~~ Not all devices have the same strength. Therefore, users should set a gain factor depending on how strong they want effects to be. This setting is -persistent accross access to the driver, so you should not care about it if +persistent across access to the driver, so you should not care about it if you are writing games, as another utility probably already set this for you. /* Set the gain of the device @@ -200,7 +200,7 @@ Proceed as if you wanted to upload a new effect, except that instead of setting the id field to -1, you set it to the wanted effect id. Normally, the effect is not stopped and restarted. However, depending on the -type of device, not all paramaters can be dynamically updated. For example, +type of device, not all parameters can be dynamically updated. For example, the direction of an effect cannot be updated with iforce devices. In this case, the driver stops the effect, up-load it, and restart it. diff -Nru a/Documentation/isdn/INTERFACE b/Documentation/isdn/INTERFACE --- a/Documentation/isdn/INTERFACE Tue Mar 11 22:06:18 2003 +++ b/Documentation/isdn/INTERFACE Tue Mar 11 22:06:18 2003 @@ -735,7 +735,7 @@ driver = driver-Id command = ISDN_STAT_PROT arg = The lower 8 Bits define the addressed protocol as defined - in ISDN_PTYPE..., the upper bits are used to differenciate + in ISDN_PTYPE..., the upper bits are used to differentiate the protocol specific STAT. para = protocol and function specific. See isdnif.h for detail. diff -Nru a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt --- a/Documentation/kbuild/kconfig-language.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/kbuild/kconfig-language.txt Tue Mar 11 22:06:16 2003 @@ -69,7 +69,7 @@ default values are visible, only the first defined one is active. Default values are not limited to the menu entry, where they are defined, this means the default can be defined somewhere else or be - overriden by an earlier definition. + overridden by an earlier definition. The default value is only assigned to the config symbol if no other value was set by the user (via the input prompt above). If an input prompt is visible the default value is presented to the user and can @@ -142,7 +142,7 @@ -------------- The position of a menu entry in the tree is determined in two ways. First -it can be specified explicitely: +it can be specified explicitly: menu "Network device support" depends NET diff -Nru a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt --- a/Documentation/kbuild/makefiles.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/kbuild/makefiles.txt Tue Mar 11 22:06:18 2003 @@ -561,7 +561,7 @@ Usually kbuild descends down in subdirectories due to "obj-* := dir/", but in the architecture makefiles where the kbuild infrastructure -is not sufficent this sometimes needs to be explicit. +is not sufficient this sometimes needs to be explicit. Example: #arch/i386/boot/Makefile diff -Nru a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt --- a/Documentation/kernel-doc-nano-HOWTO.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/kernel-doc-nano-HOWTO.txt Tue Mar 11 22:06:17 2003 @@ -21,7 +21,7 @@ This is a program for converting SGML template files into SGML files. When a file is referenced it is searched for symbols - exported (EXPORT_SYMBOL), to be able to distingush between internal + exported (EXPORT_SYMBOL), to be able to distinguish between internal and external functions. It invokes kernel-doc, giving it the list of functions that are to be documented. diff -Nru a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt --- a/Documentation/kernel-docs.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/kernel-docs.txt Tue Mar 11 22:06:18 2003 @@ -488,7 +488,7 @@ memory allocation. Description: Article written for people wishing to make their data acquisition boards work on their GNU/Linux machines. Gives a basic - overview on writting drivers, from the naming of functions to + overview on writing drivers, from the naming of functions to interrupt handling. Notes: Two-parts article. Part II is at http://www.ednmag.com/ednmag/reg/2000/07062000/14df.htm diff -Nru a/Documentation/kobject.txt b/Documentation/kobject.txt --- a/Documentation/kobject.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/kobject.txt Tue Mar 11 22:06:16 2003 @@ -7,7 +7,7 @@ 0. Introduction -The kobject infrastructure performs basic object managment that larger +The kobject infrastructure performs basic object management that larger data structures and subsystems can leverage, rather than reimplement similar functionality. This functionality consists primarily concerns: diff -Nru a/Documentation/magic-number.txt b/Documentation/magic-number.txt --- a/Documentation/magic-number.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/magic-number.txt Tue Mar 11 22:06:17 2003 @@ -146,7 +146,7 @@ NMI_MAGIC 0x48414d4d455201 nmi_s include/asm-mips64/sn/nmi.h Note that there are also defined special per-driver magic numbers in sound -memory managment. See include/sound/sndmagic.h for complete list of them. Many +memory management. See include/sound/sndmagic.h for complete list of them. Many OSS sound drivers have their magic numbers constructed from the soundcard PCI ID - these are not listed here as well. diff -Nru a/Documentation/networking/3c359.txt b/Documentation/networking/3c359.txt --- a/Documentation/networking/3c359.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/networking/3c359.txt Tue Mar 11 22:06:18 2003 @@ -41,7 +41,7 @@ message_level: Controls level of messages created by the driver. Defaults to 0: which only displays start-up and critical messages. Presently any non-zero value will display all soft messages as well. NB This does not turn -debuging messages on, that must be done by modified the source code. +debugging messages on, that must be done by modified the source code. Variable MTU size: diff -Nru a/Documentation/networking/3c509.txt b/Documentation/networking/3c509.txt --- a/Documentation/networking/3c509.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/networking/3c509.txt Tue Mar 11 22:06:16 2003 @@ -106,7 +106,7 @@ 8 transceiver type and duplex mode taken from card's EEPROM config settings 12 10baseT (RJ-45 connector); force full-duplex mode -Prior to driver version 1.18c, only tranceiver codes 0-4 were supported. Note +Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note that the new transceiver codes 8 and 12 are the *only* ones that will enable full-duplex mode, no matter what the card's detected EEPROM settings might be. This insured that merely upgrading the driver from an earlier version would @@ -146,7 +146,7 @@ Tx Carrier Errors Reported in /proc/net/dev If an EtherLink III appears to transmit packets, but the "Tx carrier errors" field in /proc/net/dev increments as quickly as the Tx packet count, you -likely have an unterminated network or the incorrect media tranceiver selected. +likely have an unterminated network or the incorrect media transceiver selected. 3c509B card is not detected on machines with an ISA PnP BIOS. While the updated driver works with most PnP BIOS programs, it does not work diff -Nru a/Documentation/networking/NAPI_HOWTO.txt b/Documentation/networking/NAPI_HOWTO.txt --- a/Documentation/networking/NAPI_HOWTO.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/networking/NAPI_HOWTO.txt Tue Mar 11 22:06:17 2003 @@ -85,7 +85,7 @@ In this case your only choice is to move all to dev->poll() II) Clear-on-write (COW) - i) you clear the status by writting a 1 in the bit-location you want. + i) you clear the status by writing a 1 in the bit-location you want. These are the majority of the NICs and work the best with NAPI. Put only receive events in dev->poll(); leave the rest in the old interrupt handler. @@ -200,7 +200,7 @@ /* two new additions */ /* first register my poll method */ dev->poll = my_poll; -/* next register my weight/quanta; can be overriden in /proc */ +/* next register my weight/quanta; can be overridden in /proc */ dev->weight = 16; . . @@ -346,10 +346,10 @@ netif_rx_schedule_prep() returns 1 if device is in running state and gets successfully added to the core poll list. If we get a zero value we can _almost_ assume are already added to the list (instead of not running. -Logic based on the fact that you shouldnt get interrupt if not running) +Logic based on the fact that you shouldn't get interrupt if not running) We rectify this by disabling rx and rxnobuf interrupts. -II) that receive_packets(dev) and make_rx_buffs_avail() may have dissapeared. +II) that receive_packets(dev) and make_rx_buffs_avail() may have disappeared. These functionalities are still around actually...... infact, receive_packets(dev) is very close to my_poll() and @@ -442,7 +442,7 @@ int rx_work_limit = dev->quota; /************************ end note note *********************************/ - do { // outer beggining loop starts here + do { // outer beginning loop starts here clear_rx_status_register_bit(); diff -Nru a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt --- a/Documentation/networking/bonding.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/networking/bonding.txt Tue Mar 11 22:06:16 2003 @@ -304,7 +304,7 @@ Configuring Multiple ARP Targets ================================ -While ARP monitoring can be done with just one target, it can be usefull +While ARP monitoring can be done with just one target, it can be useful in a High Availability setup to have several targets to monitor. In the case of just one target, the target itself may go down or have a problem making it unresponsive to ARP requests. Having an additional target (or diff -Nru a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c --- a/Documentation/networking/ifenslave.c Tue Mar 11 22:06:15 2003 +++ b/Documentation/networking/ifenslave.c Tue Mar 11 22:06:15 2003 @@ -540,7 +540,7 @@ static short mif_flags; -/* Get the inteface configuration from the kernel. */ +/* Get the interface configuration from the kernel. */ static int if_getconfig(char *ifname) { struct ifreq ifr; diff -Nru a/Documentation/networking/sis900.txt b/Documentation/networking/sis900.txt --- a/Documentation/networking/sis900.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/networking/sis900.txt Tue Mar 11 22:06:15 2003 @@ -243,7 +243,7 @@ Chapter 7. Revision History * November 13, 2000, Revision 1.07, seventh release, 630E problem - fixed and furthur clean up. + fixed and further clean up. * November 4, 1999, Revision 1.06, Second release, lots of clean up and optimization. * August 8, 1999, Revision 1.05, Initial Public Release diff -Nru a/Documentation/networking/sk98lin.txt b/Documentation/networking/sk98lin.txt --- a/Documentation/networking/sk98lin.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/networking/sk98lin.txt Tue Mar 11 22:06:18 2003 @@ -138,7 +138,7 @@ options sk98lin ... For "...", use the same syntax as described below for the command -line paramaters of modprobe. +line parameters of modprobe. You either have to reboot your computer or unload and reload the driver to activate the new parameters. The syntax of the driver parameters is: @@ -276,7 +276,7 @@ Large frames (also called jumbo frames) are now supported by the driver. This can result in a greatly improved throughput if -transfering large amounts of data. +transferring large amounts of data. To enable large frames, set the MTU (maximum transfer unit) of the interface to the value you wish (up to 9000). The command for this is: @@ -489,7 +489,7 @@ established (#10402) - Installation problems with RedHat 6.0 (#10409) New Features: -- Connection state ouput at "network connection up" +- Connection state output at "network connection up" Known limitations: - None diff -Nru a/Documentation/networking/tuntap.txt b/Documentation/networking/tuntap.txt --- a/Documentation/networking/tuntap.txt Tue Mar 11 22:06:17 2003 +++ b/Documentation/networking/tuntap.txt Tue Mar 11 22:06:17 2003 @@ -40,7 +40,7 @@ Set permissions: e.g. chmod 0700 /dev/net/tun - if you want the device only accesible by root. Giving regular users the + if you want the device only accessible by root. Giving regular users the right to assign network devices is NOT a good idea. Users could assign bogus network interfaces to trick firewalls or administrators. diff -Nru a/Documentation/networking/wan-router.txt b/Documentation/networking/wan-router.txt --- a/Documentation/networking/wan-router.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/networking/wan-router.txt Tue Mar 11 22:06:15 2003 @@ -577,7 +577,7 @@ bata2-2.2.1 Feb 20 2001 o Bug fixes to the CHDLC device drivers. - The driver had compilation problmes under kernels + The driver had compilation problems under kernels 2.2.14 or lower. o Bug fixes to the Setup installation script. diff -Nru a/Documentation/networking/wanpipe.txt b/Documentation/networking/wanpipe.txt --- a/Documentation/networking/wanpipe.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/networking/wanpipe.txt Tue Mar 11 22:06:15 2003 @@ -577,7 +577,7 @@ bata2-2.2.1 Feb 20 2001 o Bug fixes to the CHDLC device drivers. - The driver had compilation problmes under kernels + The driver had compilation problems under kernels 2.2.14 or lower. o Bug fixes to the Setup installation script. diff -Nru a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt --- a/Documentation/oops-tracing.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/oops-tracing.txt Tue Mar 11 22:06:16 2003 @@ -219,7 +219,7 @@ 2: 'F' if any module was force loaded by insmod -f, ' ' if all modules were loaded normally. - 3: 'S' if the oops occured on an SMP kernel running on hardware that + 3: 'S' if the oops occurred on an SMP kernel running on hardware that hasn't been certified as safe to run multiprocessor. Currently this occurs only on various Athlons that are not SMP capable. diff -Nru a/Documentation/pnp.txt b/Documentation/pnp.txt --- a/Documentation/pnp.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/pnp.txt Tue Mar 11 22:06:15 2003 @@ -96,7 +96,7 @@ All Plug and Play drivers, protocols, and services meet at a central location called the Plug and Play Layer. This layer is responsible for the exchange of information between PnP drivers and PnP protocols. Thus it automatically -forwards commands to the proper protocol. This makes writting PnP drivers +forwards commands to the proper protocol. This makes writing PnP drivers significantly easier. The following functions are available from the Plug and Play Layer: diff -Nru a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt --- a/Documentation/s390/Debugging390.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/s390/Debugging390.txt Tue Mar 11 22:06:15 2003 @@ -52,7 +52,7 @@ 16 General propose registers, 32 bit on s/390 64 bit on z/Architecture, r0-r15 or gpr0-gpr15 used for arithmetic & addressing. -16 Control registers, 32 bit on s/390 64 bit on z/Architecture, ( cr0-cr15 kernel usage only ) used for memory managment, +16 Control registers, 32 bit on s/390 64 bit on z/Architecture, ( cr0-cr15 kernel usage only ) used for memory management, interrupt control,debugging control etc. 16 Access registers ( ar0-ar15 ) 32 bit on s/390 & z/Architecture @@ -243,7 +243,7 @@ spaces for the user & kernel. This means we can support 2GB of non Extended RAM on s/390, & more -with the Extended memory managment swap device & +with the Extended memory management swap device & currently 4TB of physical memory currently on z/Architecture. @@ -385,7 +385,7 @@ of extra space on the callers stack which is obviously freed up on function exit ( e.g. the caller may choose to allocate nothing of a buffer of 4k if required for temporary purposes ), it generates -very efficent code ( a few cycles ) when compared to alternatives +very efficient code ( a few cycles ) when compared to alternatives like malloc. automatics: These are local variables on the stack, @@ -1091,7 +1091,7 @@ The VM Debugger is case insensitive. VM's strengths are usually other debuggers weaknesses you can get at any resource -no matter how sensitive e.g. memory managment resources,change address translation +no matter how sensitive e.g. memory management resources,change address translation in the PSW. For kernel hacking you will reap dividends if you get good at it. The VM Debugger displays operators but not operands, probably because some @@ -1194,7 +1194,7 @@ Displaying & modifying Registers -------------------------------- D G will display all the gprs -Adding a extra G to all the commands is neccessary to access the full 64 bit +Adding a extra G to all the commands is necessary to access the full 64 bit content in VM on z/Architecture obviously this isn't required for access registers as these are still 32 bit. e.g. DGG instead of DG @@ -1280,7 +1280,7 @@ Tracing particular processes ---------------------------- -The kernels text segment is intentionally at an address in memory that it will +The kernel's text segment is intentionally at an address in memory that it will very seldom collide with text segments of user programs ( thanks Martin ), this simplifies debugging the kernel. However it is quite common for user processes to have addresses which collide @@ -1425,7 +1425,7 @@ shutdown -h now or halt. do a Q CPUS to find out how many cpus you have detach each one of them from cp except cpu 0 -by issueing a +by issuing a DETACH CPU 01-(number of cpus in configuration) & boot linux again. TR SIGP will trace inter processor signal processor instructions. @@ -1671,7 +1671,7 @@ ( & many other instructions ) they consist of a length field & an absolute address field. For each IO typically get 1 or 2 interrupts one for channel end ( primary status ) when the channel is idle & the second for device end ( secondary status ) sometimes you get both -concurrently, you check how the IO went on by issueing a TEST SUBCHANNEL at each interrupt, +concurrently, you check how the IO went on by issuing a TEST SUBCHANNEL at each interrupt, from which you receive an Interruption response block (IRB). If you get channel & device end status in the IRB without channel checks etc. your IO probably went okay. If you didn't you probably need a doctorto examine the IRB & extended status word etc. @@ -2153,14 +2153,14 @@ current working directory. This is very useful in that a customer can mail a core dump to a technical support department & the technical support department can reconstruct what happened. -Provided the have an indentical copy of this program with debugging symbols compiled in & +Provided the have an identical copy of this program with debugging symbols compiled in & the source base of this build is available. In short it is far more useful than something like a crash log could ever hope to be. In theory all that is missing to restart a core dumped program is a kernel patch which will do the following. 1) Make a new kernel task structure -2) Reload all the dumped pages back into the kernels memory managment structures. +2) Reload all the dumped pages back into the kernel's memory management structures. 3) Do the required clock fixups 4) Get all files & network connections for the process back into an identical state ( really difficult ). 5) A few more difficult things I haven't thought of. @@ -2374,7 +2374,7 @@ e.g. to switch on the lcs "debug feature" echo 5 > /proc/s390dbf/lcs/level -& then after the error occured. +& then after the error occurred. cat /proc/s390dbf/lcs/sprintf >/logfile the logfile now contains some information which may help tech support resolve a problem in the field. @@ -2462,9 +2462,9 @@ SGI's lcrash tool which allows one to look at kernel structures in a running kernel. -It also complements a tool called dumptool which dumps all the kernels +It also complements a tool called dumptool which dumps all the kernel's memory pages & registers to either a tape or a disk. -This can be used by tech support or an ambitous end user do +This can be used by tech support or an ambitious end user do post mortem debugging of a machine like gdb core dumps. Going into how to use this tool in detail will be explained diff -Nru a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt --- a/Documentation/s390/cds.txt Tue Mar 11 22:06:19 2003 +++ b/Documentation/s390/cds.txt Tue Mar 11 22:06:19 2003 @@ -214,7 +214,7 @@ cdev - the ccw_device the data is requested for. buffer - Pointer to a buffer pointer. The read_conf_data() routine will allocate a buffer and initialize the buffer pointer - accordingly. It's the device driver's responsability to + accordingly. It's the device driver's responsibility to release the kernel memory if no longer needed. length - Length of the buffer allocated and retrieved. lpm - Logical path mask to be used for retrieving the data. If @@ -224,7 +224,7 @@ 0 - Successful completion -ENODEV - cdev invalid. -EINVAL - An invalid parameter was detected, or the function was called early. --EIO - An irrecoverable I/O error occured or the device is +-EIO - An irrecoverable I/O error occurred or the device is not operational. -ENOMEM - The read_conf_data() routine couldn't obtain storage. -EOPNOTSUPP - The device doesn't support the read configuration @@ -428,7 +428,7 @@ can handle lost data on the network to allow for enhanced I/O processing. Unless the channel subsystem at any time presents a secondary status interrupt, -exploiting this feature will cause only primary status interrups to be +exploiting this feature will cause only primary status interrupts to be presented to the device driver while overlapping I/O is performed. When a secondary status without error (alert status) is presented, this indicates successful completion for all overlapping ccw_device_start() requests that have diff -Nru a/Documentation/s390/driver-model.txt b/Documentation/s390/driver-model.txt --- a/Documentation/s390/driver-model.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/s390/driver-model.txt Tue Mar 11 22:06:15 2003 @@ -53,7 +53,7 @@ a. Each driver can provide one or more parameter interfaces where parameters can be specified. These interfaces are also in the driver's responsibility. -b. After a. has been performed, if neccessary, the device is finally brought up +b. After a. has been performed, if necessary, the device is finally brought up via the 'online' interface. @@ -145,7 +145,7 @@ The handler field of the struct ccw_device is meant to be set to the interrupt -handler for the device. In order to accomodate drivers which use several +handler for the device. In order to accommodate drivers which use several distinct handlers (e.g. multi subchannel devices), this is a member of ccw_device instead of ccw_driver. The handler is registered with the common layer during set_online() processing diff -Nru a/Documentation/scsi/ChangeLog.ncr53c8xx b/Documentation/scsi/ChangeLog.ncr53c8xx --- a/Documentation/scsi/ChangeLog.ncr53c8xx Tue Mar 11 22:06:18 2003 +++ b/Documentation/scsi/ChangeLog.ncr53c8xx Tue Mar 11 22:06:18 2003 @@ -247,7 +247,7 @@ - Add the 53c876 description to the chip table. This is only useful for printing the right name of the controller. - DEL-441 Item 2 work-around for the 53c876 rev <= 5 (0x15). - - Add additionnal checking of INQUIRY data: + - Add additional checking of INQUIRY data: Check INQUIRY data received length is at least 7. Byte 7 of inquiry data contains device features bits and the driver might be confused by garbage. Also check peripheral qualifier. @@ -420,7 +420,7 @@ - Split DATA_IN and DATA_OUT scripts into 2 sub-scripts. 64 segments are moved from on-chip RAM scripts. If more segments, a script in main memory is used for the - additionnal segments. + additional segments. - Since the SCRIPTS processor continues SCRIPTS execution after having won arbitration, do some stuff prior to testing any SCSI phase on reselection. This should have the vertue to process @@ -475,7 +475,7 @@ ------------------------------ - Use FAST-5 instead of SLOW for slow scsi devices according to new SPI-2 draft. - - Make some changes in order to accomodate with 875 rev <= 3 + - Make some changes in order to accommodate with 875 rev <= 3 device errata listing 397. Minor consequences are: . Leave use of PCI Write and Invalidate under user control. Now, by default the driver does not enable PCI MWI and option diff -Nru a/Documentation/scsi/ChangeLog.sym53c8xx b/Documentation/scsi/ChangeLog.sym53c8xx --- a/Documentation/scsi/ChangeLog.sym53c8xx Tue Mar 11 22:06:19 2003 +++ b/Documentation/scsi/ChangeLog.sym53c8xx Tue Mar 11 22:06:19 2003 @@ -15,7 +15,7 @@ - In ncr_soft_reset(), only try to ABORT the current operation for chips that support SRUN bit in ISTAT1 and if SCRIPTS are currently running, as 896 and 1010 manuals suggest. - - In the CCB abort path, donnot assume that the CCB is currently + - In the CCB abort path, do not assume that the CCB is currently queued to SCRIPTS. This is not always true, notably after a QUEUE FULL status or when using untagged commands. @@ -562,7 +562,7 @@ * version pre-sym53c8xx-0.10 - Add the 53c876 description to the chip table. This is only useful for printing the right name of the controller. - - Add additionnal checking of INQUIRY data: + - Add additional checking of INQUIRY data: Check INQUIRY data received length is at least 7. Byte 7 of inquiry data contains device features bits and the driver might be confused by garbage. Also check peripheral qualifier. diff -Nru a/Documentation/scsi/ChangeLog.sym53c8xx_2 b/Documentation/scsi/ChangeLog.sym53c8xx_2 --- a/Documentation/scsi/ChangeLog.sym53c8xx_2 Tue Mar 11 22:06:17 2003 +++ b/Documentation/scsi/ChangeLog.sym53c8xx_2 Tue Mar 11 22:06:17 2003 @@ -32,7 +32,7 @@ missing free of this memory on instance detach. - Check against GPIO3 pulled low for HVD controllers (driver did just the opposite). - Misdetection of BUS mode was triggerred on module reload only, + Misdetection of BUS mode was triggered on module reload only, since BIOS settings were trusted instead on first load. Wed Feb 7 21:00 2001 Gerard Roudier @@ -71,7 +71,7 @@ #LUN <= 7. - Set busy_itl in LCB to 1 if the LCB is allocated and a SCSI command is active. This is a simplification. - - In sym_hcb_free(), donnot scan the free_ccbq if no CCBs + - In sym_hcb_free(), do not scan the free_ccbq if no CCBs has been allocated. This fixes a panic if attach failed. - Add DT/ST (double/simple transition) in the transfer negotiation announce. diff -Nru a/Documentation/scsi/dpti.txt b/Documentation/scsi/dpti.txt --- a/Documentation/scsi/dpti.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/scsi/dpti.txt Tue Mar 11 22:06:18 2003 @@ -75,7 +75,7 @@ * to the board. * * The files dpti_ioctl.h dptsig.h osd_defs.h osd_util.h sys_info.h are part of the - * interface files for Adaptecs managment routines. These define the structures used + * interface files for Adaptec's management routines. These define the structures used * in the ioctls. They are written to be portable. They are hard to read, but I need * to use them 'as is' or I can miss changes in the interface. * diff -Nru a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt --- a/Documentation/scsi/ibmmca.txt Tue Mar 11 22:06:18 2003 +++ b/Documentation/scsi/ibmmca.txt Tue Mar 11 22:06:18 2003 @@ -810,9 +810,9 @@ commandline parameter is added, called 'activity'. 2) Added the READ_CONTROL bit for test_unit_ready SCSI-command. 3) Added some suppress_exception bits to read_device_capacity and - all device_inquiry occurences in the driver code. + all device_inquiry occurrences in the driver code. 4) Complaints about the various KERNEL_VERSION implementations are - taken into account. Every local_LinuxKernelVersion occurence is + taken into account. Every local_LinuxKernelVersion occurrence is now replaced by KERNEL_VERSION, defined in linux/version.h. Corresponding changes were applied to ibmmca.h, too. This was a contribution to all kernel-parts by Philipp Hahn. @@ -866,7 +866,7 @@ 2) Adapter-information and autoadaption to address-space is done. 3) Auto-probing for maximum synchronous SCSI transfer rate is working. 4) Optimization to some embedded function calls is applied. - 5) Added some comment for the user to wait for SCSI-devices beeing probed. + 5) Added some comment for the user to wait for SCSI-devices being probed. 6) Finished version 3.2 for Kernel 2.4.0. It least, I thought it is but... - Michael Lang @@ -966,7 +966,7 @@ ------DA where '-' stays dark, 'D' shows the SCSI-device id - and 'A' shows the SCSI hostindex, beeing currently + and 'A' shows the SCSI hostindex, being currently accessed. During boottime, this will give the message SCSIini* @@ -1091,7 +1091,7 @@ now. Normally you really won't need to activate this flag in the kernel configuration, as all post 1989 SCSI-devices should accept the reset-signal, when the computer is switched on. The SCSI- - subsystem generates this reset while beeing initialized. This flag + subsystem generates this reset while being initialized. This flag is really reserved for users with very old, very strange or self-made SCSI-devices. Q: Why is the SCSI-order of my drives mirrored to the device-order diff -Nru a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt --- a/Documentation/scsi/ncr53c8xx.txt Tue Mar 11 22:06:14 2003 +++ b/Documentation/scsi/ncr53c8xx.txt Tue Mar 11 22:06:14 2003 @@ -238,7 +238,7 @@ optimizations based on actual head positions and its mechanical characteristics. This feature may also reduce average command latency. In order to really gain advantage of this feature, devices must have -a reasonnable cache size (No miracle is to be expected for a low-end +a reasonable cache size (No miracle is to be expected for a low-end hard disk with 128 KB or less). Some kown SCSI devices do not properly support tagged command queuing. Generally, firmware revisions that fix this kind of problems are available @@ -592,7 +592,7 @@ Some SCSI-2 devices do not report this feature in byte 7 of inquiry response but do support it properly (TAMARACK scanners for example). -CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT (default and only reasonnable answer: n) +CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT (default and only reasonable answer: n) If you suspect a device of yours does not properly support disconnections, you can answer "y". Then, all SCSI devices will never disconnect the bus even while performing long SCSI operations. @@ -827,7 +827,7 @@ Available option bits: 0x0: No check. - 0x1: Check and donnot attach the controller on error. + 0x1: Check and do not attach the controller on error. 0x2: Check and just warn on error. 0x4: Disable SCSI bus integrity checking. @@ -850,7 +850,7 @@ 10.2.22 Enable use of IMMEDIATE ARBITRATION (only supported by the sym53c8xx driver. See 10.7 for more details) - iarb:0 donnot use this feature. + iarb:0 do not use this feature. iarb:#x use this feature according to bit fields as follow: bit 0 (1) : enable IARB each time the initiator has been reselected @@ -880,7 +880,7 @@ settle time 10 seconds settle:10 differential support from BIOS settings diff:1 irq mode from BIOS settings irqm:1 - SCSI BUS check donnot attach on error buschk:1 + SCSI BUS check do not attach on error buschk:1 immediate arbitration disabled iarb:0 10.3 Advised boot setup commands @@ -1272,7 +1272,7 @@ - terminations at both end of the SCSI chain - linux syslog messages (some of them may help you) -If you donnot find the source of problems, you can configure the +If you do not find the source of problems, you can configure the driver with no features enabled. - only asynchronous data transfers @@ -1345,14 +1345,14 @@ Field C : SIST io register (SCSI Interrupt Status) Bit 0x08 : SGE SCSI GROSS ERROR Indicates that the chip detected a severe error condition - on the SCSI BUS that prevents the SCSI protocol from functionning + on the SCSI BUS that prevents the SCSI protocol from functioning properly. - Bit 0x04 : UDC Undexpected Disconnection + Bit 0x04 : UDC Unexpected Disconnection Indicates that the device released the SCSI BUS when the chip was not expecting this to happen. A device may behave so to indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred. Bit 0x02 : RST SCSI BUS Reset - Generally SCSI targets donnot reset the SCSI BUS, although any + Generally SCSI targets do not reset the SCSI BUS, although any device on the BUS can reset it at any time. Bit 0x01 : PAR Parity SCSI parity error detected. diff -Nru a/Documentation/scsi/sym53c8xx_2.txt b/Documentation/scsi/sym53c8xx_2.txt --- a/Documentation/scsi/sym53c8xx_2.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/scsi/sym53c8xx_2.txt Tue Mar 11 22:06:15 2003 @@ -205,7 +205,7 @@ optimizations based on actual head positions and its mechanical characteristics. This feature may also reduce average command latency. In order to really gain advantage of this feature, devices must have -a reasonnable cache size (No miracle is to be expected for a low-end +a reasonable cache size (No miracle is to be expected for a low-end hard disk with 128 KB or less). Some kown old SCSI devices do not properly support tagged command queuing. Generally, firmware revisions that fix this kind of problems are available @@ -579,7 +579,7 @@ Available option bits: 0x0: No check. - 0x1: Check and donnot attach the controller on error. + 0x1: Check and do not attach the controller on error. 0x2: Check and just warn on error. 10.2.16 Exclude a host from being attached @@ -698,7 +698,7 @@ - terminations at both end of the SCSI chain - linux syslog messages (some of them may help you) -If you donnot find the source of problems, you can configure the +If you do not find the source of problems, you can configure the driver or devices in the NVRAM with minimal features. - only asynchronous data transfers @@ -756,14 +756,14 @@ Field C : SIST io register (SCSI Interrupt Status) Bit 0x08 : SGE SCSI GROSS ERROR Indicates that the chip detected a severe error condition - on the SCSI BUS that prevents the SCSI protocol from functionning + on the SCSI BUS that prevents the SCSI protocol from functioning properly. - Bit 0x04 : UDC Undexpected Disconnection + Bit 0x04 : UDC Unexpected Disconnection Indicates that the device released the SCSI BUS when the chip was not expecting this to happen. A device may behave so to - indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occured. + indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred. Bit 0x02 : RST SCSI BUS Reset - Generally SCSI targets donnot reset the SCSI BUS, although any + Generally SCSI targets do not reset the SCSI BUS, although any device on the BUS can reset it at any time. Bit 0x01 : PAR Parity SCSI parity error detected. diff -Nru a/Documentation/sonypi.txt b/Documentation/sonypi.txt --- a/Documentation/sonypi.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/sonypi.txt Tue Mar 11 22:06:15 2003 @@ -130,7 +130,7 @@ tested) when using the driver with the fnkeyinit parameter. I cannot reproduce it on my laptop and not all users have this problem. This happens because the fnkeyinit parameter enables the ACPI - mode (but without additionnal ACPI control, like processor + mode (but without additional ACPI control, like processor speed handling etc). Use ACPI instead of APM if it works on your laptop. diff -Nru a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt --- a/Documentation/sound/alsa/ALSA-Configuration.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/sound/alsa/ALSA-Configuration.txt Tue Mar 11 22:06:15 2003 @@ -659,7 +659,7 @@ Module supports autoprobe and multiple chips (max 8). Note: on some notebooks the buffer address cannot be detected automatically, or causes hang-up during initialization. - In such a case, specify the buffer top address explicity via + In such a case, specify the buffer top address explicitly via buffer_top option. For example, Sony F250: buffer_top=0x25a800 diff -Nru a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl Tue Mar 11 22:06:16 2003 +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl Tue Mar 11 22:06:16 2003 @@ -2807,7 +2807,7 @@ - If you aquire a spinlock in the interrupt handler, and the + If you acquire a spinlock in the interrupt handler, and the lock is used in other pcm callbacks, too, then you have to release the lock before calling snd_pcm_period_elapsed(), because diff -Nru a/Documentation/sound/oss/NEWS b/Documentation/sound/oss/NEWS --- a/Documentation/sound/oss/NEWS Tue Mar 11 22:06:19 2003 +++ b/Documentation/sound/oss/NEWS Tue Mar 11 22:06:19 2003 @@ -19,7 +19,7 @@ Before Linux 2.4 you had to specify the resources for sounddrivers statically linked into the kernel at compile time -(in make config/menuconfig/xconfig). In Linux 2.4 the ressources are +(in make config/menuconfig/xconfig). In Linux 2.4 the resources are now specified at the boot-time kernel commandline (e.g. the lilo 'append=' line or everything that's after the kernel name in grub). Read the Configure.help entry for your card for the parameters. diff -Nru a/Documentation/sound/oss/PSS-updates b/Documentation/sound/oss/PSS-updates --- a/Documentation/sound/oss/PSS-updates Tue Mar 11 22:06:20 2003 +++ b/Documentation/sound/oss/PSS-updates Tue Mar 11 22:06:20 2003 @@ -22,12 +22,12 @@ This parameter takes a port address as its parameter. Any available port address can be specified to enable the CDROM port, except for 0x0 and -1 as these values would leave the port disabled. Like the joystick port, the cdrom -port will require that an appropiate CDROM driver be loaded before you can make +port will require that an appropriate CDROM driver be loaded before you can make use of the newly enabled CDROM port. Like the joystick port option above, remember to load the CDROM driver AFTER the pss sound driver. While it may differ on some PSS sound cards, all the PSS sound cards that I have seen have a builtin Wearnes CDROM port. If this is the case with your PSS sound card you -should load aztcd with the appropiate port option that matches the port you +should load aztcd with the appropriate port option that matches the port you assigned to the CDROM port when you loaded your pss sound driver. (ex. modprobe pss pss_cdrom_port=0x340 && modprobe aztcd aztcd=0x340) The default setting of this parameter leaves the CDROM port disabled to maintain full @@ -44,7 +44,7 @@ value will only attept to configure the CDROM and joystick ports. This parameter can be used by a user who only wished to use the builtin joystick and/or CDROM port(s) of his PSS sound card. If this driver is loaded with this -parameter and with the paramter below set to true then a user can safely unload +parameter and with the parameter below set to true then a user can safely unload this driver with the following command "rmmod pss && rmmod ad1848 && rmmod mpu401 && rmmod sound && rmmod soundcore" and retain the full functionality of his CDROM and/or joystick port(s) while gaining back the memory previously used diff -Nru a/Documentation/sound/oss/cs46xx b/Documentation/sound/oss/cs46xx --- a/Documentation/sound/oss/cs46xx Tue Mar 11 22:06:15 2003 +++ b/Documentation/sound/oss/cs46xx Tue Mar 11 22:06:15 2003 @@ -78,7 +78,7 @@ driver to disable compilation of the CS_DBGOUT print statements: #define CSDEBUG 1 -Please see the defintions for cs_debuglevel and cs_debugmask for additional +Please see the definitions for cs_debuglevel and cs_debugmask for additional information on the debug levels and sections. There is also a csdbg executable to allow runtime manipulation of these diff -Nru a/Documentation/specialix.txt b/Documentation/specialix.txt --- a/Documentation/specialix.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/specialix.txt Tue Mar 11 22:06:15 2003 @@ -326,7 +326,7 @@ Fixed bugs and restrictions: - - During intialization, interrupts are blindly turned on. + - During initialization, interrupts are blindly turned on. Having a shadow variable would cause an extra memory access on every IO instruction. - The interrupt (on the card) should be disabled when we diff -Nru a/Documentation/swsusp.txt b/Documentation/swsusp.txt --- a/Documentation/swsusp.txt Tue Mar 11 22:06:14 2003 +++ b/Documentation/swsusp.txt Tue Mar 11 22:06:14 2003 @@ -90,7 +90,7 @@ function do_software_suspend, it is called. Here we shrink everything including dcache, inodes, buffers and memory (here mainly processes are swapped out). We count how many pages we need to duplicate (we have to be atomical!) then we -create an appropiate sized page directory. It will point to the original and +create an appropriate sized page directory. It will point to the original and the new (copied) address of the page. We get the free pages by __get_free_pages() but since it changes state we have to be able to track it later so it also flips in a bit in page's flags (a new Nosave flag). We diff -Nru a/Documentation/uml/UserModeLinux-HOWTO.txt b/Documentation/uml/UserModeLinux-HOWTO.txt --- a/Documentation/uml/UserModeLinux-HOWTO.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/uml/UserModeLinux-HOWTO.txt Tue Mar 11 22:06:16 2003 @@ -2509,7 +2509,7 @@ 1100..88.. ssttoopp This puts the UML in a loop reading mconsole requests until a 'go' - mconsole command is recieved. This is very useful for making backups + mconsole command is received. This is very useful for making backups of UML filesystems, as the UML can be stopped, then synced via 'sysrq s', so that everything is written to the filesystem. You can then copy the filesystem and then send the UML 'go' via mconsole. diff -Nru a/Documentation/usb/URB.txt b/Documentation/usb/URB.txt --- a/Documentation/usb/URB.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/usb/URB.txt Tue Mar 11 22:06:16 2003 @@ -86,7 +86,7 @@ Return value is a pointer to the allocated URB, 0 if allocation failed. The parameter isoframes specifies the number of isochronous transfer frames -you want to schedule. For CTRL/BULK/INT, use 0. The mem_flags paramter +you want to schedule. For CTRL/BULK/INT, use 0. The mem_flags parameter holds standard memory allocation flags, letting you control (among other things) whether the underlying code may block or not. diff -Nru a/Documentation/usb/hiddev.txt b/Documentation/usb/hiddev.txt --- a/Documentation/usb/hiddev.txt Tue Mar 11 22:06:16 2003 +++ b/Documentation/usb/hiddev.txt Tue Mar 11 22:06:16 2003 @@ -173,7 +173,7 @@ usage to be retrieved can be specified as above, or the user can choose to fill in the report_type field and specify the report_id as HID_REPORT_ID_UNKNOWN. In this case, the hiddev_usage_ref will be -filled in with the report and field infomation associated with this +filled in with the report and field information associated with this usage if it is found. HIDIOCSUSAGE - struct hiddev_usage_ref (write) diff -Nru a/Documentation/usb/philips.txt b/Documentation/usb/philips.txt --- a/Documentation/usb/philips.txt Tue Mar 11 22:06:19 2003 +++ b/Documentation/usb/philips.txt Tue Mar 11 22:06:19 2003 @@ -27,9 +27,9 @@ Specifies the desired framerate. Is an integer in the range of 4-30. fbufs - This paramter specifies the number of internal buffers to use for storing + This parameter specifies the number of internal buffers to use for storing frames from the cam. This will help if the process that reads images from - the cam is a bit slow or momentarely busy. However, on slow machines it + the cam is a bit slow or momentarily busy. However, on slow machines it only introduces lag, so choose carefully. The default is 3, which is reasonable. You can set it between 2 and 5. diff -Nru a/Documentation/usb/scanner.txt b/Documentation/usb/scanner.txt --- a/Documentation/usb/scanner.txt Tue Mar 11 22:06:20 2003 +++ b/Documentation/usb/scanner.txt Tue Mar 11 22:06:20 2003 @@ -282,7 +282,7 @@ } if((fpout=fopen("out.dat", "w+")) == NULL) { - perror("Unable to open ouput file"); + perror("Unable to open output file"); exit(1); } diff -Nru a/Documentation/video4linux/bttv/Sound-FAQ b/Documentation/video4linux/bttv/Sound-FAQ --- a/Documentation/video4linux/bttv/Sound-FAQ Tue Mar 11 22:06:20 2003 +++ b/Documentation/video4linux/bttv/Sound-FAQ Tue Mar 11 22:06:20 2003 @@ -15,18 +15,18 @@ bttv0: model: BT848(Hauppauge old) [autodetected] -You should verify this is correct. If it is'nt, you have to pass the +You should verify this is correct. If it isn't, you have to pass the correct board type as insmod argument, "insmod bttv card=2" for example. The file CARDLIST has a list of valid arguments for card. -If your card is'nt listed there, you might check the source code for -new entries which are not listed yet. If there is'nt one for your +If your card isn't listed there, you might check the source code for +new entries which are not listed yet. If there isn't one for your card, you can check if one of the existing entries does work for you (just trial and error...). Some boards have an extra processor for sound to do stereo decoding and other nice features. The msp34xx chips are used by Hauppauge for example. If your board has one, you might have to load a helper -module like msp3400.o to make sound work. If there is'nt one for the +module like msp3400.o to make sound work. If there isn't one for the chip used on your board: Bad luck. Start writing a new one. Well, you might want to check the video4linux mailing list archive first... diff -Nru a/Documentation/video4linux/zr36120.txt b/Documentation/video4linux/zr36120.txt --- a/Documentation/video4linux/zr36120.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/video4linux/zr36120.txt Tue Mar 11 22:06:15 2003 @@ -146,10 +146,10 @@ The consequence is that, when loading the driver as a module, the module may tell you it's out of memory, but 'free' says otherwise. The reason is simple; the modules wants its memory -contingious, not fragmented, and after a long uptime there +contiguous, not fragmented, and after a long uptime there probably isn't a fragment of memory large enough... -The driver uses a double buffering scheme, which should realy +The driver uses a double buffering scheme, which should really be an n-way buffer, depending on the size of allocated framebuffer and the requested grab-size/format. This current version also fixes a dead-lock situation during irq diff -Nru a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt --- a/Documentation/vm/hugetlbpage.txt Tue Mar 11 22:06:15 2003 +++ b/Documentation/vm/hugetlbpage.txt Tue Mar 11 22:06:15 2003 @@ -69,7 +69,7 @@ mount none /mnt/huge -t hugetlbfs -This commands mounts a (psuedo) filesystem of type hugetlbfs on the directory +This command mounts a (pseudo) filesystem of type hugetlbfs on the directory /mnt/huge. Any files created on /mnt/huge uses hugepages. An example is given at the end of this document. diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Tue Mar 11 22:06:18 2003 +++ b/MAINTAINERS Tue Mar 11 22:06:18 2003 @@ -641,7 +641,7 @@ P: Rui Sousa M: rui.p.m.sousa@clix.pt L: emu10k1-devel@lists.sourceforge.net -W: http://opensource.creative.com/ +W: http://sourceforge.net/projects/emu10k1/ S: Maintained ETHEREXPRESS-16 NETWORK DRIVER diff -Nru a/Makefile b/Makefile --- a/Makefile Tue Mar 11 22:06:15 2003 +++ b/Makefile Tue Mar 11 22:06:15 2003 @@ -107,6 +107,11 @@ # For now, leave verbose as default +ifdef V + ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) + endif +endif ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 1 endif @@ -322,13 +327,14 @@ # set -e makes the rule exit immediately on error define rule_vmlinux__ - set -e; \ + set -e \ $(if $(filter .tmp_kallsyms%,$^),, \ echo ' GEN .version'; \ . $(srctree)/scripts/mkversion > .tmp_version; \ mv -f .tmp_version .version; \ $(MAKE) $(build)=init; \ ) + set -e \ $(call cmd,vmlinux__); \ echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd endef diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig --- a/arch/alpha/Kconfig Tue Mar 11 22:06:19 2003 +++ b/arch/alpha/Kconfig Tue Mar 11 22:06:19 2003 @@ -15,10 +15,6 @@ bool default y -config SWAP - bool - default y - config UID16 bool diff -Nru a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c --- a/arch/alpha/kernel/core_marvel.c Tue Mar 11 22:06:15 2003 +++ b/arch/alpha/kernel/core_marvel.c Tue Mar 11 22:06:15 2003 @@ -1076,7 +1076,7 @@ /* * Fill it in. */ - agp->type = 0 /* FIXME: ALPHA_CORE_AGP */; + agp->type = ALPHA_CORE_AGP; agp->hose = hose; agp->private = NULL; agp->ops = &marvel_agp_ops; diff -Nru a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c --- a/arch/alpha/kernel/core_titan.c Tue Mar 11 22:06:16 2003 +++ b/arch/alpha/kernel/core_titan.c Tue Mar 11 22:06:16 2003 @@ -764,7 +764,7 @@ /* * Fill it in. */ - agp->type = 0 /* FIXME: ALPHA_CORE_AGP */; + agp->type = ALPHA_CORE_AGP; agp->hose = hose; agp->private = port; agp->ops = &titan_agp_ops; diff -Nru a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c --- a/arch/alpha/kernel/irq.c Tue Mar 11 22:06:19 2003 +++ b/arch/alpha/kernel/irq.c Tue Mar 11 22:06:19 2003 @@ -515,6 +515,7 @@ #endif int i; struct irqaction * action; + unsigned long flags; #ifdef CONFIG_SMP seq_puts(p, " "); @@ -525,9 +526,10 @@ #endif for (i = 0; i < ACTUAL_NR_IRQS; i++) { + spin_lock_irqsave(&irq_desc[i].lock, flags); action = irq_desc[i].action; if (!action) - continue; + goto unlock; seq_printf(p, "%3d: ",i); #ifndef CONFIG_SMP seq_printf(p, "%10u ", kstat_irqs(i)); @@ -538,15 +540,18 @@ #endif seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %c%s", - (action->flags & SA_INTERRUPT)?'+':' ', - action->name); + (action->flags & SA_INTERRUPT)?'+':' ', + action->name); for (action=action->next; action; action = action->next) { seq_printf(p, ", %c%s", - (action->flags & SA_INTERRUPT)?'+':' ', - action->name); + (action->flags & SA_INTERRUPT)?'+':' ', + action->name); } + seq_putc(p, '\n'); +unlock: + spin_unlock_irqrestore(&irq_desc[i].lock, flags); } #if CONFIG_SMP seq_puts(p, "IPI: "); diff -Nru a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c --- a/arch/alpha/kernel/pci.c Tue Mar 11 22:06:15 2003 +++ b/arch/alpha/kernel/pci.c Tue Mar 11 22:06:15 2003 @@ -393,26 +393,36 @@ } static void __init +pcibios_claim_one_bus(struct pci_bus *b) +{ + struct list_head *ld; + struct pci_bus *child_bus; + + for (ld = b->devices.next; ld != &b->devices; ld = ld->next) { + struct pci_dev *dev = pci_dev_b(ld); + int i; + + for (i = 0; i < PCI_NUM_RESOURCES; i++) { + struct resource *r = &dev->resource[i]; + + if (r->parent || !r->start || !r->flags) + continue; + pci_claim_resource(dev, i); + } + } + + list_for_each_entry(child_bus, &b->children, node) + pcibios_claim_one_bus(child_bus); +} + +static void __init pcibios_claim_console_setup(void) { struct list_head *lb; for(lb = pci_root_buses.next; lb != &pci_root_buses; lb = lb->next) { struct pci_bus *b = pci_bus_b(lb); - struct list_head *ld; - - for (ld = b->devices.next; ld != &b->devices; ld = ld->next) { - struct pci_dev *dev = pci_dev_b(ld); - int i; - - for (i = 0; i < PCI_NUM_RESOURCES; i++) { - struct resource *r = &dev->resource[i]; - - if (r->parent || !r->start || !r->flags) - continue; - pci_claim_resource(dev, i); - } - } + pcibios_claim_one_bus(b); } } diff -Nru a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c --- a/arch/alpha/kernel/sys_nautilus.c Tue Mar 11 22:06:16 2003 +++ b/arch/alpha/kernel/sys_nautilus.c Tue Mar 11 22:06:16 2003 @@ -78,6 +78,8 @@ nautilus_kill_arch(int mode) { struct pci_bus *bus = pci_isa_hose->bus; + u32 pmuport; + int off; switch (mode) { case LINUX_REBOOT_CMD_RESTART: @@ -92,14 +94,18 @@ break; case LINUX_REBOOT_CMD_POWER_OFF: - { - u32 pmuport; - pci_bus_read_config_dword(bus, 0x88, 0x10, &pmuport); - pmuport &= 0xfffe; - outl(0xffff, pmuport); /* clear pending events */ - outw(0x2000, pmuport+4); /* power off */ - /* NOTREACHED */ + /* Assume M1543C */ + off = 0x2000; /* SLP_TYPE = 0, SLP_EN = 1 */ + pci_bus_read_config_dword(bus, 0x88, 0x10, &pmuport); + if (!pmuport) { + /* M1535D/D+ */ + off = 0x3400; /* SLP_TYPE = 5, SLP_EN = 1 */ + pci_bus_read_config_dword(bus, 0x88, 0xe0, &pmuport); } + pmuport &= 0xfffe; + outw(0xffff, pmuport); /* Clear pending events. */ + outw(off, pmuport + 4); + /* NOTREACHED */ break; } } diff -Nru a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c --- a/arch/alpha/mm/fault.c Tue Mar 11 22:06:16 2003 +++ b/arch/alpha/mm/fault.c Tue Mar 11 22:06:16 2003 @@ -232,11 +232,11 @@ else { /* Synchronize this task's top level page-table with the "reference" page table from init. */ - long offset = __pgd_offset(address); + long index = pgd_index(address); pgd_t *pgd, *pgd_k; - pgd = current->active_mm->pgd + offset; - pgd_k = swapper_pg_dir + offset; + pgd = current->active_mm->pgd + index; + pgd_k = swapper_pg_dir + index; if (!pgd_present(*pgd) && pgd_present(*pgd_k)) { pgd_val(*pgd) = pgd_val(*pgd_k); return; diff -Nru a/arch/alpha/oprofile/op_model_ev4.c b/arch/alpha/oprofile/op_model_ev4.c --- a/arch/alpha/oprofile/op_model_ev4.c Tue Mar 11 22:06:17 2003 +++ b/arch/alpha/oprofile/op_model_ev4.c Tue Mar 11 22:06:17 2003 @@ -34,7 +34,7 @@ for these "disabled" counter overflows are ignored by the interrupt handler. - This is most irritating, becuase the hardware *can* enable and + This is most irritating, because the hardware *can* enable and disable the interrupts for these counters independently, but the wrperfmon interface doesn't allow it. */ diff -Nru a/arch/alpha/vmlinux.lds.S b/arch/alpha/vmlinux.lds.S --- a/arch/alpha/vmlinux.lds.S Tue Mar 11 22:06:17 2003 +++ b/arch/alpha/vmlinux.lds.S Tue Mar 11 22:06:17 2003 @@ -63,6 +63,13 @@ .init.ramfs : { *(.init.ramfs) } __initramfs_end = .; + . = ALIGN(8); + .con_initcall.init : { + __con_initcall_start = .; + *(.con_initcall.init) + __con_initcall_end = .; + } + . = ALIGN(64); __per_cpu_start = .; .data.percpu : { *(.data.percpu) } diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig Tue Mar 11 22:06:17 2003 +++ b/arch/arm/Kconfig Tue Mar 11 22:06:17 2003 @@ -20,10 +20,6 @@ bool default y -config SWAP - bool - default y - config EISA bool ---help--- @@ -534,15 +530,63 @@ written) to implement the policy. If you don't understand what this is all about, it's safe to say 'N'. + +# CPUfreq on SA11x0 is special -- it _needs_ the userspace governor + +config CPU_FREQ_SA1100 + bool + depends on CPU_FREQ && SA1100_LART + default y + +config CPU_FREQ_SA1110 + bool + depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3) + default y + +if (CPU_FREQ_SA1100 || CPU_FREQ_SA1110) + +config CPU_FREQ_GOV_USERSPACE + bool + depends on CPU_FREQ + default y + config CPU_FREQ_24_API bool - depends on CPU_FREQ + depends on CPU_FREQ_GOV_USERSPACE && SYSCTL default y config CPU_FREQ_PROC_INTF - tristate - depends on CPU_FREQ + tristate "/proc/cpufreq interface (deprecated)" + depends on CPU_FREQ && PROC_FS + help + This enables the /proc/cpufreq interface for controlling + CPUFreq. Please note that it is recommended to use the sysfs + interface instead (which is built automatically). + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +endif + +# CPUfreq on Integrator can use the generic cpufreq core + +config CPU_FREQ_INTEGRATOR + tristate "CPUfreq driver for ARM Integrator CPUs" + depends on ARCH_INTEGRATOR && CPU_FREQ default y + help + This enables the CPUfreq driver for ARM Integrator CPUs. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say Y. + +if (CPU_FREQ_INTEGRATOR) + +source "drivers/cpufreq/Kconfig" + +endif source "drivers/pci/Kconfig" diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c Tue Mar 11 22:06:19 2003 +++ b/arch/arm/common/sa1111.c Tue Mar 11 22:06:19 2003 @@ -743,25 +743,23 @@ static int sa1111_suspend(struct device *dev, u32 state, u32 level) { struct sa1111 *sachip = dev_get_drvdata(dev); + struct sa1111_save_data *save; unsigned long flags; char *base; + if (!dev->saved_state && level == SUSPEND_NOTIFY) + dev->saved_state = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); + if (!dev->saved_state) + return -ENOMEM; + + save = (struct sa1111_save_data *)dev->saved_state; + + spin_lock_irqsave(&sachip->lock, flags); + /* * Save state. */ - if (level == SUSPEND_SAVE_STATE || - level == SUSPEND_DISABLE || - level == SUSPEND_POWER_DOWN) { - struct sa1111_save_data *save; - - if (!dev->saved_state) - dev->saved_state = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); - if (!dev->saved_state) - return -ENOMEM; - - save = (struct sa1111_save_data *)dev->saved_state; - - spin_lock_irqsave(&sachip->lock, flags); + if (level == SUSPEND_SAVE_STATE) { base = sachip->base; save->skcr = sa1111_readl(base + SA1111_SKCR); save->skpcr = sa1111_readl(base + SA1111_SKPCR); @@ -779,26 +777,21 @@ save->wakepol1 = sa1111_readl(base + SA1111_WAKEPOL1); save->wakeen0 = sa1111_readl(base + SA1111_WAKEEN0); save->wakeen1 = sa1111_readl(base + SA1111_WAKEEN1); - spin_unlock_irqrestore(&sachip->lock, flags); } /* * Disable. */ - if (level == SUSPEND_DISABLE && state == 4) { - unsigned int val; - - spin_lock_irqsave(&sachip->lock, flags); - base = sachip->base; - - sa1111_writel(0, base + SA1111_SKPWM0); - sa1111_writel(0, base + SA1111_SKPWM1); - val = sa1111_readl(base + SA1111_SKCR); - sa1111_writel(val | SKCR_SLEEP, base + SA1111_SKCR); + if (level == SUSPEND_POWER_DOWN && state == 4) { + unsigned int val = sa1111_readl(sachip->base + SA1111_SKCR); - spin_unlock_irqrestore(&sachip->lock, flags); + sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR); + sa1111_writel(0, sachip->base + SA1111_SKPWM0); + sa1111_writel(0, sachip->base + SA1111_SKPWM1); } + spin_unlock_irqrestore(&sachip->lock, flags); + return 0; } @@ -819,17 +812,15 @@ unsigned long flags, id; char *base; - if (level != RESUME_RESTORE_STATE && level != RESUME_ENABLE) - return 0; - save = (struct sa1111_save_data *)dev->saved_state; if (!save) return 0; - dev->saved_state = NULL; + spin_lock_irqsave(&sachip->lock, flags); /* * Ensure that the SA1111 is still here. + * FIXME: shouldn't do this here. */ id = sa1111_readl(sachip->base + SA1111_SKID); if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { @@ -839,29 +830,42 @@ return 0; } - spin_lock_irqsave(&sachip->lock, flags); - sa1111_wake(sachip); + /* + * First of all, wake up the chip. + */ + if (level == RESUME_POWER_ON) { + sa1111_wake(sachip); + + sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0); + sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1); + } + + if (level == RESUME_RESTORE_STATE) { + base = sachip->base; + sa1111_writel(save->skcr, base + SA1111_SKCR); + sa1111_writel(save->skpcr, base + SA1111_SKPCR); + sa1111_writel(save->skcdr, base + SA1111_SKCDR); + sa1111_writel(save->skaud, base + SA1111_SKAUD); + sa1111_writel(save->skpwm0, base + SA1111_SKPWM0); + sa1111_writel(save->skpwm1, base + SA1111_SKPWM1); + + base = sachip->base + SA1111_INTC; + sa1111_writel(save->intpol0, base + SA1111_INTPOL0); + sa1111_writel(save->intpol1, base + SA1111_INTPOL1); + sa1111_writel(save->inten0, base + SA1111_INTEN0); + sa1111_writel(save->inten1, base + SA1111_INTEN1); + sa1111_writel(save->wakepol0, base + SA1111_WAKEPOL0); + sa1111_writel(save->wakepol1, base + SA1111_WAKEPOL1); + sa1111_writel(save->wakeen0, base + SA1111_WAKEEN0); + sa1111_writel(save->wakeen1, base + SA1111_WAKEEN1); + } - base = sachip->base; - sa1111_writel(save->skcr, base + SA1111_SKCR); - sa1111_writel(save->skpcr, base + SA1111_SKPCR); - sa1111_writel(save->skcdr, base + SA1111_SKCDR); - sa1111_writel(save->skaud, base + SA1111_SKAUD); - sa1111_writel(save->skpwm0, base + SA1111_SKPWM0); - sa1111_writel(save->skpwm1, base + SA1111_SKPWM1); - - base = sachip->base + SA1111_INTC; - sa1111_writel(save->intpol0, base + SA1111_INTPOL0); - sa1111_writel(save->intpol1, base + SA1111_INTPOL1); - sa1111_writel(save->inten0, base + SA1111_INTEN0); - sa1111_writel(save->inten1, base + SA1111_INTEN1); - sa1111_writel(save->wakepol0, base + SA1111_WAKEPOL0); - sa1111_writel(save->wakepol1, base + SA1111_WAKEPOL1); - sa1111_writel(save->wakeen0, base + SA1111_WAKEEN0); - sa1111_writel(save->wakeen1, base + SA1111_WAKEEN1); spin_unlock_irqrestore(&sachip->lock, flags); - kfree(save); + if (level == RESUME_ENABLE) { + dev->saved_state = NULL; + kfree(save); + } return 0; } diff -Nru a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile --- a/arch/arm/kernel/Makefile Tue Mar 11 22:06:19 2003 +++ b/arch/arm/kernel/Makefile Tue Mar 11 22:06:19 2003 @@ -16,6 +16,7 @@ obj- := obj-$(CONFIG_APM) += apm.o +obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_ARCH_ACORN) += ecard.o time-acorn.o obj-$(CONFIG_ARCH_CLPS7500) += time-acorn.o obj-$(CONFIG_FOOTBRIDGE) += isa.o diff -Nru a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/kernel/apm.c Tue Mar 11 22:06:20 2003 @@ -0,0 +1,573 @@ +/* + * bios-less APM driver for ARM Linux + * Jamey Hicks + * adapted from the APM BIOS driver for Linux by Stephen Rothwell (sfr@linuxcare.com) + * + * APM 1.2 Reference: + * Intel Corporation, Microsoft Corporation. Advanced Power Management + * (APM) BIOS Interface Specification, Revision 1.2, February 1996. + * + * [This document is available from Microsoft at: + * http://www.microsoft.com/hwdev/busbios/amp_12.htm] + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* + * The apm_bios device is one of the misc char devices. + * This is its minor number. + */ +#define APM_MINOR_DEV 134 + +/* + * See Documentation/Config.help for the configuration options. + * + * Various options can be changed at boot time as follows: + * (We allow underscores for compatibility with the modules code) + * apm=on/off enable/disable APM + */ + +/* + * Maximum number of events stored + */ +#define APM_MAX_EVENTS 20 + +/* + * The per-file APM data + */ +struct apm_user { + struct list_head list; + + int suser: 1; + int writer: 1; + int reader: 1; + int suspend_wait: 1; + int suspend_result; + + int suspends_pending; + int standbys_pending; + unsigned int suspends_read; + unsigned int standbys_read; + + int event_head; + int event_tail; + apm_event_t events[APM_MAX_EVENTS]; +}; + +/* + * Local variables + */ +static int suspends_pending; +static int standbys_pending; +static int apm_disabled; + +static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); +static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); + +/* + * This is a list of everyone who has opened /dev/apm_bios + */ +static spinlock_t user_list_lock = SPIN_LOCK_UNLOCKED; +static LIST_HEAD(apm_user_list); + +/* + * The kapmd info. + */ +static struct task_struct *kapmd; +static DECLARE_COMPLETION(kapmd_exit); + +static const char driver_version[] = "1.13"; /* no spaces */ + +/* + * This structure gets filled in by the machine specific 'get_power_status' + * implementation. Any fields which are not set default to a safe value. + */ +struct apm_power_info { + unsigned char ac_line_status; + unsigned char battery_status; + unsigned char battery_flag; + unsigned char battery_life; + int time; + int units; +}; + +/* + * Compatibility cruft until the IPAQ people move over to the new + * interface. + */ +static void __apm_get_power_status(struct apm_power_info *info) +{ +#if 0 && defined(CONFIG_SA1100_H3600) && defined(CONFIG_TOUCHSCREEN_H3600) + extern int h3600_apm_get_power_status(u_char *, u_char *, u_char *, + u_char *, u_short *); + + if (machine_is_h3600()) { + int dx; + h3600_apm_get_power_status(&info->ac_line_status, + &info->battery_status, &info->battery_flag, + &info->battery_life, &dx); + info->time = dx & 0x7fff; + info->units = dx & 0x8000 ? 0 : 1; + } +#endif +} + +/* + * This allows machines to provide their own "apm get power status" function. + */ +void (*apm_get_power_status)(struct apm_power_info *) = __apm_get_power_status; +EXPORT_SYMBOL(apm_get_power_status); + +static int queue_empty(struct apm_user *as) +{ + return as->event_head == as->event_tail; +} + +static apm_event_t get_queued_event(struct apm_user *as) +{ + as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; + return as->events[as->event_tail]; +} + +static void queue_event_one_user(struct apm_user *as, apm_event_t event) +{ + as->event_head = (as->event_head + 1) % APM_MAX_EVENTS; + if (as->event_head == as->event_tail) { + static int notified; + + if (notified++ == 0) + printk(KERN_ERR "apm: an event queue overflowed\n"); + as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; + } + as->events[as->event_head] = event; + + if (!as->suser || !as->writer) + return; + + switch (event) { + case APM_SYS_SUSPEND: + case APM_USER_SUSPEND: + as->suspends_pending++; + suspends_pending++; + break; + + case APM_SYS_STANDBY: + case APM_USER_STANDBY: + as->standbys_pending++; + standbys_pending++; + break; + } +} + +static void queue_event(apm_event_t event, struct apm_user *sender) +{ + struct list_head *l; + + spin_lock(&user_list_lock); + list_for_each(l, &apm_user_list) { + struct apm_user *as = list_entry(l, struct apm_user, list); + + if (as != sender && as->reader) + queue_event_one_user(as, event); + } + spin_unlock(&user_list_lock); + wake_up_interruptible(&apm_waitqueue); +} + +/* defined in pm.c */ +extern int suspend(void); + +static int apm_suspend(void) +{ + struct list_head *l; + int err = suspend(); + + /* + * Anyone on the APM queues will think we're still suspended. + * Send a message so everyone knows we're now awake again. + */ + queue_event(APM_NORMAL_RESUME, NULL); + + /* + * Finally, wake up anyone who is sleeping on the suspend. + */ + spin_lock(&user_list_lock); + list_for_each(l, &apm_user_list) { + struct apm_user *as = list_entry(l, struct apm_user, list); + + as->suspend_result = err; + as->suspend_wait = 0; + } + spin_unlock(&user_list_lock); + + wake_up_interruptible(&apm_suspend_waitqueue); + return err; +} + +static ssize_t apm_read(struct file *fp, char *buf, size_t count, loff_t *ppos) +{ + struct apm_user *as = fp->private_data; + apm_event_t event; + int i = count, ret = 0, nonblock = fp->f_flags & O_NONBLOCK; + + if (count < sizeof(apm_event_t)) + return -EINVAL; + + if (queue_empty(as) && nonblock) + return -EAGAIN; + + wait_event_interruptible(apm_waitqueue, !queue_empty(as)); + + while ((i >= sizeof(event)) && !queue_empty(as)) { + event = get_queued_event(as); + printk(" apm_read: event=%d\n", event); + + ret = -EFAULT; + if (copy_to_user(buf, &event, sizeof(event))) + break; + + switch (event) { + case APM_SYS_SUSPEND: + case APM_USER_SUSPEND: + as->suspends_read++; + break; + + case APM_SYS_STANDBY: + case APM_USER_STANDBY: + as->standbys_read++; + break; + } + + buf += sizeof(event); + i -= sizeof(event); + } + + if (i < count) + ret = count - i; + + return ret; +} + +static unsigned int apm_poll(struct file *fp, poll_table * wait) +{ + struct apm_user * as = fp->private_data; + + poll_wait(fp, &apm_waitqueue, wait); + return queue_empty(as) ? 0 : POLLIN | POLLRDNORM; +} + +/* + * apm_ioctl - handle APM ioctl + * + * APM_IOC_SUSPEND + * This IOCTL is overloaded, and performs two functions. It is used to: + * - initiate a suspend + * - acknowledge a suspend read from /dev/apm_bios. + * Only when everyone who has opened /dev/apm_bios with write permission + * has acknowledge does the actual suspend happen. + */ +static int +apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg) +{ + struct apm_user *as = filp->private_data; + int err = -EINVAL; + + if (!as->suser || !as->writer) + return -EPERM; + + switch (cmd) { + case APM_IOC_STANDBY: + break; + + case APM_IOC_SUSPEND: + /* + * If we read a suspend command from /dev/apm_bios, + * then the corresponding APM_IOC_SUSPEND ioctl is + * interpreted as an acknowledge. + */ + if (as->suspends_read > 0) { + as->suspends_read--; + as->suspends_pending--; + suspends_pending--; + } else { + queue_event(APM_USER_SUSPEND, as); + } + + /* + * If there are outstanding suspend requests for other + * people on /dev/apm_bios, we must sleep for them. + * Last one to bed turns the lights out. + */ + if (suspends_pending > 0) { + as->suspend_wait = 1; + err = wait_event_interruptible(apm_suspend_waitqueue, + as->suspend_wait == 0); + if (err == 0) + err = as->suspend_result; + } else { + err = apm_suspend(); + } + break; + } + + return err; +} + +static int apm_release(struct inode * inode, struct file * filp) +{ + struct apm_user *as = filp->private_data; + filp->private_data = NULL; + + spin_lock(&user_list_lock); + list_del(&as->list); + spin_unlock(&user_list_lock); + + /* + * We are now unhooked from the chain. As far as new + * events are concerned, we no longer exist. However, we + * need to balance standbys_pending and suspends_pending, + * which means the possibility of sleeping. + */ + if (as->standbys_pending > 0) { + standbys_pending -= as->standbys_pending; +// if (standbys_pending <= 0) +// standby(); + } + if (as->suspends_pending > 0) { + suspends_pending -= as->suspends_pending; + if (suspends_pending <= 0) + apm_suspend(); + } + + kfree(as); + return 0; +} + +static int apm_open(struct inode * inode, struct file * filp) +{ + struct apm_user *as; + + as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); + if (as) { + memset(as, 0, sizeof(*as)); + + /* + * XXX - this is a tiny bit broken, when we consider BSD + * process accounting. If the device is opened by root, we + * instantly flag that we used superuser privs. Who knows, + * we might close the device immediately without doing a + * privileged operation -- cevans + */ + as->suser = capable(CAP_SYS_ADMIN); + as->writer = (filp->f_mode & FMODE_WRITE) == FMODE_WRITE; + as->reader = (filp->f_mode & FMODE_READ) == FMODE_READ; + + spin_lock(&user_list_lock); + list_add(&as->list, &apm_user_list); + spin_unlock(&user_list_lock); + + filp->private_data = as; + } + + return as ? 0 : -ENOMEM; +} + +static struct file_operations apm_bios_fops = { + owner: THIS_MODULE, + read: apm_read, + poll: apm_poll, + ioctl: apm_ioctl, + open: apm_open, + release: apm_release, +}; + +static struct miscdevice apm_device = { + minor: APM_MINOR_DEV, + name: "apm_bios", + fops: &apm_bios_fops +}; + + +#ifdef CONFIG_PROC_FS +/* + * Arguments, with symbols from linux/apm_bios.h. + * + * 0) Linux driver version (this will change if format changes) + * 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2. + * 2) APM flags from APM Installation Check (0x00): + * bit 0: APM_16_BIT_SUPPORT + * bit 1: APM_32_BIT_SUPPORT + * bit 2: APM_IDLE_SLOWS_CLOCK + * bit 3: APM_BIOS_DISABLED + * bit 4: APM_BIOS_DISENGAGED + * 3) AC line status + * 0x00: Off-line + * 0x01: On-line + * 0x02: On backup power (BIOS >= 1.1 only) + * 0xff: Unknown + * 4) Battery status + * 0x00: High + * 0x01: Low + * 0x02: Critical + * 0x03: Charging + * 0x04: Selected battery not present (BIOS >= 1.2 only) + * 0xff: Unknown + * 5) Battery flag + * bit 0: High + * bit 1: Low + * bit 2: Critical + * bit 3: Charging + * bit 7: No system battery + * 0xff: Unknown + * 6) Remaining battery life (percentage of charge): + * 0-100: valid + * -1: Unknown + * 7) Remaining battery life (time units): + * Number of remaining minutes or seconds + * -1: Unknown + * 8) min = minutes; sec = seconds + */ +static int apm_get_info(char *buf, char **start, off_t fpos, int length) +{ + struct apm_power_info info; + char *units; + int ret; + + info.ac_line_status = 0xff; + info.battery_status = 0xff; + info.battery_flag = 0xff; + info.battery_life = 255; + info.time = -1; + info.units = -1; + + if (apm_get_power_status) + apm_get_power_status(&info); + + switch (info.units) { + default: units = "?"; break; + case 0: units = "min"; break; + case 1: units = "sec"; break; + } + + ret = sprintf(buf, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", + driver_version, APM_32_BIT_SUPPORT, + info.ac_line_status, info.battery_status, + info.battery_flag, info.battery_life, + info.time, units); + + return ret; +} +#endif + +#if 0 +static int kapmd(void *startup) +{ + struct task_struct *tsk = current; + + daemonize(); + strcpy(tsk->comm, "kapmd"); + kapmd = tsk; + + spin_lock_irq(&tsk->sigmask_lock); + siginitsetinv(&tsk->blocked, sigmask(SIGQUIT)); + recalc_sigpending(tsk); + spin_unlock_irq(&tsk->sigmask_lock); + + complete((struct completion *)startup); + + do { + set_task_state(tsk, TASK_INTERRUPTIBLE); + schedule(); + } while (!signal_pending(tsk)); + + complete_and_exit(&kapmd_exit, 0); +} +#endif + +static int __init apm_init(void) +{ +// struct completion startup = COMPLETION_INITIALIZER(startup); + int ret; + + if (apm_disabled) { + printk(KERN_NOTICE "apm: disabled on user request.\n"); + return -ENODEV; + } + + if (PM_IS_ACTIVE()) { + printk(KERN_NOTICE "apm: overridden by ACPI.\n"); + return -EINVAL; + } + +// ret = kernel_thread(kapmd, &startup, CLONE_FS | CLONE_FILES); +// if (ret) +// return ret; +// wait_for_completion(&startup); + + pm_active = 1; + +#ifdef CONFIG_PROC_FS + create_proc_info_entry("apm", 0, NULL, apm_get_info); +#endif + + ret = misc_register(&apm_device); + if (ret != 0) { + pm_active = 0; + remove_proc_entry("apm", NULL); + send_sig(SIGQUIT, kapmd, 1); + wait_for_completion(&kapmd_exit); + } + + return ret; +} + +static void __exit apm_exit(void) +{ + misc_deregister(&apm_device); + remove_proc_entry("apm", NULL); + pm_active = 0; +// send_sig(SIGQUIT, kapmd, 1); +// wait_for_completion(&kapmd_exit); +} + +module_init(apm_init); +module_exit(apm_exit); + +MODULE_AUTHOR("Stephen Rothwell"); +MODULE_DESCRIPTION("Advanced Power Management"); +MODULE_LICENSE("GPL"); + +EXPORT_NO_SYMBOLS; + +#ifndef MODULE +static int __init apm_setup(char *str) +{ + while ((str != NULL) && (*str != '\0')) { + if (strncmp(str, "off", 3) == 0) + apm_disabled = 1; + if (strncmp(str, "on", 2) == 0) + apm_disabled = 0; + str = strchr(str, ','); + if (str != NULL) + str += strspn(str, ", \t"); + } + return 1; +} + +__setup("apm=", apm_setup); +#endif diff -Nru a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c --- a/arch/arm/kernel/bios32.c Tue Mar 11 22:06:16 2003 +++ b/arch/arm/kernel/bios32.c Tue Mar 11 22:06:16 2003 @@ -18,7 +18,6 @@ #include static int debug_pci; -int have_isa_bridge; void pcibios_report_status(u_int status_mask, int warn) { @@ -363,9 +362,8 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) { struct pci_sys_data *root = bus->sysdata; - struct list_head *walk; - u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY; - u16 all_status = -1; + struct pci_dev *dev; + u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK; pbus_assign_bus_resources(bus, root); @@ -373,42 +371,43 @@ * Walk the devices on this bus, working out what we can * and can't support. */ - for (walk = bus->devices.next; walk != &bus->devices; walk = walk->next) { - struct pci_dev *dev = pci_dev_b(walk); + list_for_each_entry(dev, &bus->devices, bus_list) { u16 status; pdev_fixup_device_resources(root, dev); pci_read_config_word(dev, PCI_STATUS, &status); - all_status &= status; + + /* + * If any device on this bus does not support fast back + * to back transfers, then the bus as a whole is not able + * to support them. Having fast back to back transfers + * on saves us one PCI cycle per transaction. + */ + if (!(status & PCI_STATUS_FAST_BACK)) + features &= ~PCI_COMMAND_FAST_BACK; if (pdev_bad_for_parity(dev)) features &= ~(PCI_COMMAND_SERR | PCI_COMMAND_PARITY); - /* - * If this device is an ISA bridge, set the have_isa_bridge - * flag. We will then go looking for things like keyboard, - * etc - */ - if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA || - dev->class >> 8 == PCI_CLASS_BRIDGE_EISA) - have_isa_bridge = !0; + switch (dev->class >> 8) { +#if defined(CONFIG_ISA) || defined(CONFIG_EISA) + case PCI_CLASS_BRIDGE_ISA: + case PCI_CLASS_BRIDGE_EISA: + /* + * If this device is an ISA bridge, set isa_bridge + * to point at this device. We will then go looking + * for things like keyboard, etc. + */ + isa_bridge = dev; + break; +#endif } /* - * If any device on this bus does not support fast back to back - * transfers, then the bus as a whole is not able to support them. - * Having fast back to back transfers on saves us one PCI cycle - * per transaction. - */ - if (all_status & PCI_STATUS_FAST_BACK) - features |= PCI_COMMAND_FAST_BACK; - - /* * Now walk the devices again, this time setting them up. */ - for (walk = bus->devices.next; walk != &bus->devices; walk = walk->next) { - struct pci_dev *dev = pci_dev_b(walk); + list_for_each_entry(dev, &bus->devices, bus_list) { u16 cmd; pci_read_config_word(dev, PCI_COMMAND, &cmd); @@ -416,7 +415,17 @@ pci_write_config_word(dev, PCI_COMMAND, cmd); pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, - SMP_CACHE_BYTES >> 2); + L1_CACHE_BYTES >> 2); + } + + /* + * Propagate the flags to the PCI bridge. + */ + if (bus->self && bus->self->hdr_type == PCI_HEADER_TYPE_BRIDGE) { + if (features & PCI_COMMAND_FAST_BACK) + bus->bridge_ctl |= PCI_BRIDGE_CTL_FAST_BACK; + if (features & PCI_COMMAND_PARITY) + bus->bridge_ctl |= PCI_BRIDGE_CTL_PARITY; } /* @@ -454,20 +463,17 @@ */ u8 __devinit pci_std_swizzle(struct pci_dev *dev, u8 *pinp) { - int pin = *pinp; + int pin = *pinp - 1; - if (pin != 0) { - pin -= 1; - while (dev->bus->self) { - pin = (pin + PCI_SLOT(dev->devfn)) & 3; - /* - * move up the chain of bridges, - * swizzling as we go. - */ - dev = dev->bus->self; - } - *pinp = pin + 1; + while (dev->bus->self) { + pin = (pin + PCI_SLOT(dev->devfn)) & 3; + /* + * move up the chain of bridges, + * swizzling as we go. + */ + dev = dev->bus->self; } + *pinp = pin + 1; return PCI_SLOT(dev->devfn); } diff -Nru a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c --- a/arch/arm/kernel/ecard.c Tue Mar 11 22:06:19 2003 +++ b/arch/arm/kernel/ecard.c Tue Mar 11 22:06:19 2003 @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -57,7 +56,7 @@ enum req { req_readbytes, - req_reset_all + req_reset }; struct ecard_request { @@ -131,14 +130,11 @@ #define POD_INT_ADDR(x) ((volatile unsigned char *)\ ((BUS_ADDR((x)) - IO_BASE) + IO_START)) -static inline void ecard_task_reset(void) +static inline void ecard_task_reset(struct ecard_request *req) { - ecard_t *ec; - - for (ec = cards; ec; ec = ec->next) - if (ec->loader) - ecard_loader_reset(POD_INT_ADDR(ec->podaddr), - ec->loader); + struct expansion_card *ec = req->ec; + if (ec->loader) + ecard_loader_reset(POD_INT_ADDR(ec->podaddr), ec->loader); } static void @@ -218,8 +214,8 @@ ecard_task_readbytes(req); break; - case req_reset_all: - ecard_task_reset(); + case req_reset: + ecard_task_reset(req); break; } } @@ -355,60 +351,6 @@ /* ======================= Mid-level card control ===================== */ -/* - * This function is responsible for resetting the expansion cards to a - * sensible state immediately prior to rebooting the system. This function - * has process state (keventd), so we can sleep. - * - * Possible "val" values here: - * SYS_RESTART - restarting system - * SYS_HALT - halting system - * SYS_POWER_OFF - powering down system - * - * We ignore all calls, unless it is a SYS_RESTART call - power down/halts - * will be followed by a SYS_RESTART if ctrl-alt-del is pressed again. - */ -static int ecard_reboot(struct notifier_block *me, unsigned long val, void *v) -{ - struct ecard_request req; - - if (val != SYS_RESTART) - return 0; - - /* - * Disable the expansion card interrupt - */ - disable_irq(IRQ_EXPANSIONCARD); - - /* - * If we have any expansion card loader code which will handle - * the reset for us, call it now. - */ - req.req = req_reset_all; - ecard_call(&req); - - /* - * Disable the expansion card interrupt again, just to be sure. - */ - disable_irq(IRQ_EXPANSIONCARD); - - /* - * Finally, reset the expansion card interrupt mask to - * all enable (RISC OS doesn't set this) - */ -#ifdef HAS_EXPMASK - have_expmask = ~0; - __raw_writeb(have_expmask, EXPMASK_ENABLE); -#endif - return 0; -} - -static struct notifier_block ecard_reboot_notifier = { - .notifier_call = ecard_reboot, -}; - - - static void ecard_readbytes(void *addr, ecard_t *ec, int off, int len, int useld) { @@ -1083,11 +1025,6 @@ { int slot, irqhw; - /* - * Register our reboot notifier - */ - register_reboot_notifier(&ecard_reboot_notifier); - #ifdef CONFIG_CPU_32 init_waitqueue_head(&ecard_wait); #endif @@ -1158,11 +1095,32 @@ return 0; } +/* + * Before rebooting, we must make sure that the expansion card is in a + * sensible state, so it can be re-detected. This means that the first + * page of the ROM must be visible. We call the expansion cards reset + * handler, if any. + */ +static void ecard_drv_shutdown(struct device *dev) +{ + struct expansion_card *ec = ECARD_DEV(dev); + struct ecard_driver *drv = ECARD_DRV(dev->driver); + struct ecard_request req; + + if (drv->shutdown) + drv->shutdown(ec); + ecard_release(ec); + req.req = req_reset; + req.ec = ec; + ecard_call(&req); +} + int ecard_register_driver(struct ecard_driver *drv) { drv->drv.bus = &ecard_bus_type; drv->drv.probe = ecard_drv_probe; drv->drv.remove = ecard_drv_remove; + drv->drv.shutdown = ecard_drv_shutdown; return driver_register(&drv->drv); } diff -Nru a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S --- a/arch/arm/kernel/entry-armv.S Tue Mar 11 22:06:16 2003 +++ b/arch/arm/kernel/entry-armv.S Tue Mar 11 22:06:16 2003 @@ -1028,8 +1028,10 @@ @ @ now branch to the relevant MODE handling routine @ - mov r13, #PSR_I_BIT | MODE_SVC - msr spsr_c, r13 @ switch to SVC_32 mode + mrs r13, cpsr + bic r13, r13, #MODE_MASK + orr r13, r13, #MODE_SVC + msr spsr, r13 @ switch to SVC_32 mode and lr, lr, #15 ldr lr, [pc, lr, lsl #2] diff -Nru a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S --- a/arch/arm/kernel/entry-common.S Tue Mar 11 22:06:15 2003 +++ b/arch/arm/kernel/entry-common.S Tue Mar 11 22:06:15 2003 @@ -75,9 +75,8 @@ * This is how we return from a fork. */ ENTRY(ret_from_fork) -#ifdef CONFIG_PREEMPT + ldr r0, [r0, #TI_TASK] bl schedule_tail -#endif get_thread_info tsk ldr r1, [tsk, #TI_FLAGS] @ check for syscall tracing mov why, #1 diff -Nru a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c --- a/arch/arm/kernel/irq.c Tue Mar 11 22:06:14 2003 +++ b/arch/arm/kernel/irq.c Tue Mar 11 22:06:14 2003 @@ -165,17 +165,22 @@ { int i; struct irqaction * action; + unsigned long flags; for (i = 0 ; i < NR_IRQS ; i++) { + spin_lock_irqsave(&irq_controller_lock, flags); action = irq_desc[i].action; if (!action) - continue; + goto unlock; + seq_printf(p, "%3d: %10u ", i, kstat_irqs(i)); seq_printf(p, " %s", action->name); - for (action = action->next; action; action = action->next) { + for (action = action->next; action; action = action->next) seq_printf(p, ", %s", action->name); - } + seq_putc(p, '\n'); +unlock: + spin_unlock_irqrestore(&irq_controller_lock, flags); } #ifdef CONFIG_ARCH_ACORN diff -Nru a/arch/arm/kernel/pm.c b/arch/arm/kernel/pm.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/kernel/pm.c Tue Mar 11 22:06:20 2003 @@ -0,0 +1,126 @@ +/* + * linux/arch/arm/kernel/suspend.c + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License. + * + * This is the common support code for suspending an ARM machine. + * pm_do_suspend() is responsible for actually putting the CPU to + * sleep. + */ +#include +#include +#include +#include + +#include +#include + +int suspend(void) +{ + int ret; + + /* + * Suspend "legacy" devices. + */ + ret = pm_send_all(PM_SUSPEND, (void *)3); + if (ret != 0) + goto out; + + /* + * Tell LDM devices we're going to suspend. + */ + ret = device_suspend(4, SUSPEND_NOTIFY); + if (ret != 0) + goto resume_legacy; + + /* + * Disable, devices, and save state. + */ + device_suspend(4, SUSPEND_DISABLE); + device_suspend(4, SUSPEND_SAVE_STATE); + + /* + * Tell devices that they're going to be powered off. + */ + device_suspend(4, SUSPEND_POWER_DOWN); + + local_irq_disable(); + leds_event(led_stop); + + ret = pm_do_suspend(); + + leds_event(led_start); + local_irq_enable(); + + /* + * Tell devices that they now have power. + */ + device_resume(RESUME_POWER_ON); + + /* + * Restore the CPU frequency settings. + */ +#ifdef CONFIG_CPU_FREQ + cpufreq_restore(); +#endif + + /* + * Resume LDM devices. + */ + device_resume(RESUME_RESTORE_STATE); + device_resume(RESUME_ENABLE); + + resume_legacy: + /* + * Resume "legacy" devices. + */ + pm_send_all(PM_RESUME, (void *)0); + + out: + return ret; +} + +#ifdef CONFIG_SYSCTL +#include +#include + +/* + * This came from arch/arm/mach-sa1100/pm.c: + * Copyright (c) 2001 Cliff Brake + * with modifications by Nicolas Pitre and Russell King. + * + * ARGH! ACPI people defined CTL_ACPI in linux/acpi.h rather than + * linux/sysctl.h. + * + * This means our interface here won't survive long - it needs a new + * interface. Quick hack to get this working - use sysctl id 9999. + */ +#warning ACPI broke the kernel, this interface needs to be fixed up. +#define CTL_ACPI 9999 +#define ACPI_S1_SLP_TYP 19 + +static struct ctl_table pm_table[] = +{ + {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, (proc_handler *)&suspend}, + {0} +}; + +static struct ctl_table pm_dir_table[] = +{ + {CTL_ACPI, "pm", NULL, 0, 0555, pm_table}, + {0} +}; + +/* + * Initialize power interface + */ +static int __init pm_init(void) +{ + register_sysctl_table(pm_dir_table, 1); + return 0; +} + +fs_initcall(pm_init); + +#endif diff -Nru a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c --- a/arch/arm/kernel/time.c Tue Mar 11 22:06:18 2003 +++ b/arch/arm/kernel/time.c Tue Mar 11 22:06:18 2003 @@ -200,6 +200,7 @@ static struct irqaction timer_irq = { .name = "timer", + .flags = SA_INTERRUPT, }; /* diff -Nru a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile --- a/arch/arm/mach-integrator/Makefile Tue Mar 11 22:06:19 2003 +++ b/arch/arm/mach-integrator/Makefile Tue Mar 11 22:06:19 2003 @@ -4,10 +4,11 @@ # Object file lists. -obj-y := arch.o cpu.o irq.o mm.o time.o +obj-y := arch.o irq.o mm.o time.o obj-m := obj-n := obj- := obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_PCI) += pci_v3.o pci.o +obj-$(CONFIG_CPU_FREQ_INTEGRATOR) += cpu.o diff -Nru a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c --- a/arch/arm/mach-integrator/cpu.c Tue Mar 11 22:06:17 2003 +++ b/arch/arm/mach-integrator/cpu.c Tue Mar 11 22:06:17 2003 @@ -23,6 +23,8 @@ #include #include +static struct cpufreq_driver integrator_driver; + #define CM_ID (IO_ADDRESS(INTEGRATOR_HDR_BASE)+INTEGRATOR_HDR_ID_OFFSET) #define CM_OSC (IO_ADDRESS(INTEGRATOR_HDR_BASE)+INTEGRATOR_HDR_OSC_OFFSET) #define CM_STAT (IO_ADDRESS(INTEGRATOR_HDR_BASE)+INTEGRATOR_HDR_STAT_OFFSET) @@ -43,7 +45,6 @@ return 2000 * (vco.vdw + 8) / cc_divisor[vco.od] / factor; } -#ifdef CONFIG_CPU_FREQ /* * Divisor indexes in ascending divisor order */ @@ -69,21 +70,17 @@ return vco; } + /* - * Validate the speed in khz. If it is outside our - * range, then return the lowest. + * Validate the speed policy. */ -static int integrator_verify_speed(struct cpufreq_policy *policy) +static int integrator_verify_policy(struct cpufreq_policy *policy) { struct vco vco; - if (policy->max > policy->cpuinfo.max_freq) - policy->max = policy->cpuinfo.max_freq; - - if (policy->max < 12000) - policy->max = 12000; - if (policy->max > 160000) - policy->max = 160000; + cpufreq_verify_within_limits(policy, + policy->cpuinfo.min_freq, + policy->cpuinfo.max_freq); vco = freq_to_vco(policy->max, 1); @@ -92,12 +89,28 @@ if (vco.vdw > 152) vco.vdw = 152; - policy->min = policy->max = vco_to_freq(vco, 1); + policy->max = vco_to_freq(vco, 1); + + vco = freq_to_vco(policy->min, 1); + + if (vco.vdw < 4) + vco.vdw = 4; + if (vco.vdw > 152) + vco.vdw = 152; + + policy->min = vco_to_freq(vco, 1); + + cpufreq_verify_within_limits(policy, + policy->cpuinfo.min_freq, + policy->cpuinfo.max_freq); return 0; } -static int integrator_set_policy(struct cpufreq_policy *policy) + +static int integrator_set_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) { unsigned long cpus_allowed; int cpu = policy->cpu; @@ -121,9 +134,18 @@ cm_osc = __raw_readl(CM_OSC); vco.od = (cm_osc >> 8) & 7; vco.vdw = cm_osc & 255; - freqs.old = vco_to_freq(vco, 1); - freqs.new = target_freq; + + /* freq_to_vco rounds down -- so we need the next larger freq in + * case of CPUFREQ_RELATION_L. + */ + if (relation == CPUFREQ_RELATION_L) + target_freq += 1999; + if (target_freq > policy->max) + target_freq = policy->max; + vco = freq_to_vco(target_freq, 1); + freqs.new = vco_to_freq(vco, 1); + freqs.cpu = policy->cpu; if (freqs.old == freqs.new) { @@ -132,7 +154,6 @@ } cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - vco = freq_to_vco(policy->max, 1); cm_osc = __raw_readl(CM_OSC); cm_osc &= 0xfffff800; @@ -152,80 +173,64 @@ return 0; } -static struct cpufreq_policy integrator_policy = { - .cpu = 0, - .policy = CPUFREQ_POLICY_POWERSAVE, - .cpuinfo = { - .max_freq = 160000, - .min_freq = 12000, - .transition_latency = CPUFREQ_ETERNAL, - }, -}; +static int integrator_cpufreq_init(struct cpufreq *policy) +{ + unsigned long cus_allowed; + unsigned int cpu = policy->cpu; + u_int cm_osc, cm_stat, mem_freq_khz; + struct vco vco; -static struct cpufreq_driver integrator_driver = { - .verify = integrator_verify_speed, - .setpolicy = integrator_set_policy, - .policy = &integrator_policy, - .name = "integrator", -}; -#endif + cpus_allowed = current->cpus_allowed; -static int __init integrator_cpu_init(void) -{ - struct cpufreq_policy *policies; - unsigned long cpus_allowed; - int cpu; + set_cpus_allowed(current, 1 << cpu); + BUG_ON(cpu != smp_processor_id()); - policies = kmalloc(sizeof(struct cpufreq_policy) * NR_CPUS, - GFP_KERNEL); - if (!policies) { - printk(KERN_ERR "CPU: unable to allocate policies structure\n"); - return -ENOMEM; - } + /* detect memory etc. */ + cm_stat = __raw_readl(CM_STAT); + cm_osc = __raw_readl(CM_OSC); + vco.od = (cm_osc >> 20) & 7; + vco.vdw = (cm_osc >> 12) & 255; + mem_freq_khz = vco_to_freq(vco, 2); + + printk(KERN_INFO "CPU%d: Module id: %d\n", cpu, cm_stat & 255); + printk(KERN_INFO "CPU%d: Memory clock = %d.%03d MHz\n", + cpu, mem_freq_khz / 1000, mem_freq_khz % 1000); - cpus_allowed = current->cpus_allowed; - for (cpu = 0; cpu < NR_CPUS; cpu++) { - u_int cm_osc, cm_stat, mem_freq_khz; - struct vco vco; - - if (!cpu_online(cpu)) - continue; - - set_cpus_allowed(current, 1 << cpu); - BUG_ON(cpu != smp_processor_id()); - - cm_stat = __raw_readl(CM_STAT); - cm_osc = __raw_readl(CM_OSC); - vco.od = (cm_osc >> 20) & 7; - vco.vdw = (cm_osc >> 12) & 255; - mem_freq_khz = vco_to_freq(vco, 2); - - printk(KERN_INFO "CPU%d: Module id: %d\n", cpu, cm_stat & 255); - printk(KERN_INFO "CPU%d: Memory clock = %d.%03d MHz\n", - cpu, mem_freq_khz / 1000, mem_freq_khz % 1000); - - vco.od = (cm_osc >> 8) & 7; - vco.vdw = cm_osc & 255; - - policies[cpu].cpu = cpu; - policies[cpu].policy = CPUFREQ_POLICY_POWERSAVE, - policies[cpu].cpuinfo.max_freq = 160000; - policies[cpu].cpuinfo.min_freq = 12000; - policies[cpu].cpuinfo.transition_latency = CPUFREQ_ETERNAL; - policies[cpu].min = - policies[cpu].max = vco_to_freq(vco, 1); - } + vco.od = (cm_osc >> 8) & 7; + vco.vdw = cm_osc & 255; - set_cpus_allowed(current, cpus_allowed); + /* set default policy and cpuinfo */ + policy->policy = CPUFREQ_POLICY_PERFORMANCE; + policy->cpuinfo.max_freq = 160000; + policy->cpuinfo.min_freq = 12000; + policy->cpuinfo.transition_latency = 1000; /* 1 ms, assumed */ + policy->cur = policy->min = policy->max = vco_to_freq(vco, 1); /* current freq */ -#ifdef CONFIG_CPU_FREQ - integrator_driver.policy = policies; - cpufreq_register(&integrator_driver); -#else - kfree(policies); -#endif + set_cpus_allowed(current, cpus_allowed); return 0; } -arch_initcall(integrator_cpu_init); +static struct cpufreq_driver integrator_driver = { + .verify = integrator_verify_policy, + .target = integrator_set_target, + .init = integrator_cpufreq_init, + .name = "integrator", +}; + +static int __init integrator_cpu_init(void) +{ + return cpufreq_register_driver(&integrator_driver); +} + +static void __exit integrator_cpu_exit(void) +{ + cpufreq_unregister_driver(&integrator_driver); +} + +MODULE_AUTHOR ("Russell M. King"); +MODULE_DESCRIPTION ("cpufreq driver for ARM Integrator CPUs"); +MODULE_LICENSE ("GPL"); + +module_init(integrator_cpu_init); +module_exit(integrator_cpu_exit); diff -Nru a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig --- a/arch/arm/mach-sa1100/Kconfig Tue Mar 11 22:06:20 2003 +++ b/arch/arm/mach-sa1100/Kconfig Tue Mar 11 22:06:20 2003 @@ -326,6 +326,15 @@ # help # :: write me :: +config SA1100_SSP + tristate "Generic PIO SSP" + depends on ARCH_SA1100 + help + Say Y here to enable support for the generic PIO SSP driver. + This isn't for audio support, but for attached sensors and + other devices, eg for BadgePAD 4 sensor support, or Jornada + 720 touchscreen support. + config SA1100_USB tristate "SA1100 USB function support" depends on ARCH_SA1100 diff -Nru a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile --- a/arch/arm/mach-sa1100/Makefile Tue Mar 11 22:06:20 2003 +++ b/arch/arm/mach-sa1100/Makefile Tue Mar 11 22:06:20 2003 @@ -9,15 +9,8 @@ obj- := led-y := leds.o -# This needs to be cleaned up. We probably need to have SA1100 -# and SA1110 config symbols. -ifeq ($(CONFIG_CPU_FREQ),y) -obj-$(CONFIG_SA1100_ASSABET) += cpu-sa1110.o -obj-$(CONFIG_SA1100_CERF) += cpu-sa1110.o -obj-$(CONFIG_SA1100_HACKKIT) += cpu-sa1110.o -obj-$(CONFIG_SA1100_LART) += cpu-sa1100.o -obj-$(CONFIG_SA1100_PT_SYSTEM3) += cpu-sa1110.o -endif +obj-$(CONFIG_CPU_FREQ_SA1100) += cpu-sa1100.o +obj-$(CONFIG_CPU_FREQ_SA1110) += cpu-sa1110.o # Specific board support obj-$(CONFIG_SA1100_ADSBITSY) += adsbitsy.o @@ -99,3 +92,4 @@ # Miscelaneous functions obj-$(CONFIG_PM) += pm.o sleep.o +obj-$(CONFIG_SA1100_SSP) += ssp.o diff -Nru a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c --- a/arch/arm/mach-sa1100/cpu-sa1100.c Tue Mar 11 22:06:15 2003 +++ b/arch/arm/mach-sa1100/cpu-sa1100.c Tue Mar 11 22:06:15 2003 @@ -101,7 +101,7 @@ } sa1100_dram_regs_t; - +static struct cpufreq_driver sa1100_driver; static sa1100_dram_regs_t sa1100_dram_settings[] = { @@ -176,60 +176,73 @@ } } -static int sa1100_setspeed(struct cpufreq_policy *policy) +static int sa1100_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) { unsigned int cur = sa11x0_getspeed(); + unsigned int new_ppcr; + struct cpufreq_freqs freqs; + switch(relation){ + case CPUFREQ_RELATION_L: + new_ppcr = sa11x0_freq_to_ppcr(target_freq); + if (sa11x0_ppcr_to_freq(new_ppcr) > policy->max) + new_ppcr--; + break; + case CPUFREQ_RELATION_H: + new_ppcr = sa11x0_freq_to_ppcr(target_freq); + if ((sa11x0_ppcr_to_freq(new_ppcr) > target_freq) && + (sa11x0_ppcr_to_freq(new_ppcr - 1) >= policy->min)) + mew_ppcr--; + break; + } freqs.old = cur; - freqs.new = policy->max; + freqs.new = sa11x0_ppcr_to_freq(new_ppcr); freqs.cpu = 0; cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - if (policy->max > cur) - sa1100_update_dram_timings(cur, policy->max); + if (freqs.new > cur) + sa1100_update_dram_timings(cur, freqs.new); - PPCR = sa11x0_freq_to_ppcr(policy->max); + PPCR = new_ppcr; - if (policy->max < cur) - sa1100_update_dram_timings(cur, policy->max); + if (freqs.new < cur) + sa1100_update_dram_timings(cur, freqs.new); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); return 0; } -static struct cpufreq_policy sa1100_policy = { - .cpu = 0, - .policy = CPUFREQ_POLICY_POWERSAVE, - .cpuinfo = { - .max_freq = 287000, - .min_freq = 59000, - .transition_latency = CPUFREQ_ETERNAL, - }, -}; +static int __init sa1100_cpu_init(struct cpufreq_policy *policy) +{ + if (policy->cpu != 0) + return -EINVAL; + policy->cur = policy->min = policy->max = sa11x0_getspeed(); + policy->policy = CPUFREQ_POLICY_POWERSAVE; + policy->cpuinfo.min_freq = 59000; + policy->cpuinfo.max_freq = 287000; + policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; + return 0; +} static struct cpufreq_driver sa1100_driver = { .verify = sa11x0_verify_speed, - .setpolicy = sa1100_setspeed, - .policy = &sa1100_policy, + .target = sa1100_target, + .init = sa1100_cpu_init, .name = "sa1100", }; static int __init sa1100_dram_init(void) { - int ret = -ENODEV; - - if ((processor_id & CPU_SA1100_MASK) == CPU_SA1100_ID) { - sa1100_driver.cpu_cur_freq[0] = - sa1100_policy.min = - sa1100_policy.max = sa11x0_getspeed(); - - ret = cpufreq_register(&sa1100_driver); - } - - return ret; + cpufreq_gov_userspace_init(); + if ((processor_id & CPU_SA1100_MASK) == CPU_SA1100_ID) + return cpufreq_register_driver(&sa1100_driver); + else + return -ENODEV; } arch_initcall(sa1100_dram_init); diff -Nru a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c --- a/arch/arm/mach-sa1100/cpu-sa1110.c Tue Mar 11 22:06:15 2003 +++ b/arch/arm/mach-sa1100/cpu-sa1110.c Tue Mar 11 22:06:15 2003 @@ -32,6 +32,8 @@ #undef DEBUG +static struct cpufreq_driver sa1110_driver; + struct sdram_params { u_char rows; /* bits */ u_char cas_latency; /* cycles */ @@ -208,11 +210,11 @@ } /* - * Ok, set the CPU frequency. Since we've done the validation - * above, we can match for an exact frequency. If we don't find - * an exact match, we will to set the lowest frequency to be safe. + * Ok, set the CPU frequency. */ -static int sa1110_setspeed(struct cpufreq_policy *policy) +static int sa1110_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) { struct sdram_params *sdram = &sdram_params; struct cpufreq_freqs freqs; @@ -220,8 +222,25 @@ unsigned long flags; unsigned int ppcr, unused; - ppcr = sa11x0_freq_to_ppcr(policy->max); - sdram_calculate_timing(&sd, policy->max, sdram); + switch(relation){ + case CPUFREQ_RELATION_L: + ppcr = sa11x0_freq_to_ppcr(target_freq); + if (sa11x0_ppcr_to_freq(ppcr) > policy->max) + ppcr--; + break; + case CPUFREQ_RELATION_H: + ppcr = sa11x0_freq_to_ppcr(target_freq); + if (ppcr && (sa11x0_ppcr_to_freq(ppcr) > target_freq) && + (sa11x0_ppcr_to_freq(ppcr-1) >= policy->min)) + ppcr--; + break; + } + + freqs.old = sa11x0_getspeed(); + freqs.new = sa11x0_ppcr_to_freq(ppcr); + freqs.cpu = 0; + + sdram_calculate_timing(&sd, freqs.new, sdram); #if 0 /* @@ -240,10 +259,6 @@ sd.mdcas[2] = 0xaaaaaaaa; #endif - freqs.old = sa11x0_getspeed(); - freqs.new = policy->max; - freqs.cpu = 0; - cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); /* @@ -288,27 +303,29 @@ /* * Now, return the SDRAM refresh back to normal. */ - sdram_update_refresh(policy->max, sdram); + sdram_update_refresh(freqs.new, sdram); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); return 0; } -static struct cpufreq_policy sa1110_policy = { - .cpu = 0, - .policy = CPUFREQ_POLICY_POWERSAVE, - .cpuinfo = { - .max_freq = 287000, - .min_freq = 59000, - .transition_latency = CPUFREQ_ETERNAL, - }, -}; +static int __init sa1110_cpu_init(struct cpufreq_policy *policy) +{ + if (policy->cpu != 0) + return -EINVAL; + policy->cur = policy->min = policy->max = sa11x0_getspeed(); + policy->policy = CPUFREQ_POLICY_POWERSAVE; + policy->cpuinfo.min_freq = 59000; + policy->cpuinfo.max_freq = 287000; + policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; + return 0; +} static struct cpufreq_driver sa1110_driver = { - .verify = sa11x0_verify_speed, - .setpolicy = sa1110_setspeed, - .policy = &sa1110_policy, + .verify = sa11x0_verify_speed, + .target = sa1110_target, + .init = sa1110_cpu_init, .name = "sa1110", }; @@ -331,15 +348,11 @@ sdram->tck, sdram->trcd, sdram->trp, sdram->twr, sdram->refresh, sdram->cas_latency); + cpufreq_gov_userspace_init(); + memcpy(&sdram_params, sdram, sizeof(sdram_params)); - sa1110_driver.cpu_cur_freq[0] = - sa1110_policy.min = - sa1110_policy.max = sa11x0_getspeed(); - - sa1110_setspeed(&sa1110_policy); - - return cpufreq_register(&sa1110_driver); + return cpufreq_register_driver(&sa1110_driver); } return 0; diff -Nru a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c --- a/arch/arm/mach-sa1100/generic.c Tue Mar 11 22:06:16 2003 +++ b/arch/arm/mach-sa1100/generic.c Tue Mar 11 22:06:16 2003 @@ -48,33 +48,48 @@ 2802 /* 280.2 MHz */ }; -#ifdef CONFIG_CPU_FREQ +#if defined(CONFIG_CPU_FREQ_SA1100) || defined(CONFIG_CPU_FREQ_SA1110) +/* rounds up(!) */ unsigned int sa11x0_freq_to_ppcr(unsigned int khz) { int i; khz /= 100; - for (i = NR_FREQS - 1; i > 0; i--) - if (cclk_frequency_100khz[i] <= khz) + for (i = 0; i < NR_FREQS; i++) + if (cclk_frequency_100khz[i] >= khz) break; return i; } -/* - * Validate the policy. We aren't able to do any fancy in-kernel - * scaling, so we force min=max, and set the policy to "performance". - * If we can't generate the precise frequency requested, round it up. +unsigned int sa11x0_ppcr_to_freq(unsigned int idx) +{ + unsigned int freq = 0; + if (idx < NR_FREQS) + freq = cclk_frequency_100khz[idx] * 100; + return freq; +} + + +/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on + * this platform, anyway. */ int sa11x0_verify_speed(struct cpufreq_policy *policy) { - if (policy->max > policy->cpuinfo.max_freq) - policy->max = policy->cpuinfo.max_freq; + unsigned int tmp; + if (policy->cpu) + return -EINVAL; + + cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); + + /* make sure that at least one frequency is within the policy */ + tmp = cclk_frequency_100khz[sa11x0_freq_to_ppcr(policy->min)] * 100; + if (tmp > policy->max) + policy->max = tmp; + + cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); - policy->max = cclk_frequency_100khz[sa11x0_freq_to_ppcr(policy->max)] * 100; - policy->min = policy->max; - policy->policy = CPUFREQ_POLICY_POWERSAVE; return 0; } diff -Nru a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h --- a/arch/arm/mach-sa1100/generic.h Tue Mar 11 22:06:18 2003 +++ b/arch/arm/mach-sa1100/generic.h Tue Mar 11 22:06:18 2003 @@ -23,3 +23,4 @@ extern unsigned int sa11x0_freq_to_ppcr(unsigned int khz); extern int sa11x0_verify_speed(struct cpufreq_policy *policy); extern unsigned int sa11x0_getspeed(void); +extern unsigned int sa11x0_ppcr_to_freq(unsigned int idx); diff -Nru a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c --- a/arch/arm/mach-sa1100/irq.c Tue Mar 11 22:06:19 2003 +++ b/arch/arm/mach-sa1100/irq.c Tue Mar 11 22:06:19 2003 @@ -211,6 +211,99 @@ .end = 0x9005ffff, }; +struct sa1100irq_state { + unsigned int saved; + unsigned int icmr; + unsigned int iclr; + unsigned int iccr; +}; + +static int sa1100irq_suspend(struct device *dev, u32 state, u32 level) +{ + struct sa1100irq_state *st; + + if (!dev->saved_state && level == SUSPEND_NOTIFY) + dev->saved_state = kmalloc(sizeof(struct sa1100irq_state), + GFP_KERNEL); + if (!dev->saved_state) + return -ENOMEM; + + if (level == SUSPEND_POWER_DOWN) { + st = (struct sa1100irq_state *)dev->saved_state; + + st->saved = 1; + st->icmr = ICMR; + st->iclr = ICLR; + st->iccr = ICCR; + + /* + * Disable all GPIO-based interrupts. + */ + ICMR &= ~(IC_GPIO11_27|IC_GPIO10|IC_GPIO9|IC_GPIO8|IC_GPIO7| + IC_GPIO6|IC_GPIO5|IC_GPIO4|IC_GPIO3|IC_GPIO2| + IC_GPIO1|IC_GPIO0); + + /* + * Set the appropriate edges for wakeup. + */ + GRER = PWER & GPIO_IRQ_rising_edge; + GFER = PWER & GPIO_IRQ_falling_edge; + + /* + * Clear any pending GPIO interrupts. + */ + GEDR = GEDR; + } + return 0; +} + +static int sa1100irq_resume(struct device *dev, u32 level) +{ + struct sa1100irq_state *st; + + if (level == RESUME_POWER_ON) { + st = (struct sa1100irq_state *)dev->saved_state; + dev->saved_state = NULL; + + if (st->saved) { + ICCR = st->iccr; + ICLR = st->iclr; + + GRER = GPIO_IRQ_rising_edge & GPIO_IRQ_mask; + GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask; + + ICMR = st->icmr; + } + + kfree(st); + } + return 0; +} + +static struct device_driver sa1100irq_driver = { + .name = "sa11x0-irq", + .bus = &system_bus_type, + .suspend = sa1100irq_suspend, + .resume = sa1100irq_resume, +}; + +static struct sys_device sa1100irq_device = { + .name = "irq", + .id = 0, + .dev = { + .name = "Intel SA11x0 [Interrupt Controller]", + .driver = &sa1100irq_driver, + }, +}; + +static int __init sa1100irq_init_devicefs(void) +{ + driver_register(&sa1100irq_driver); + return sys_device_register(&sa1100irq_device); +} + +device_initcall(sa1100irq_init_devicefs); + void __init sa1100_init_irq(void) { unsigned int irq; diff -Nru a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c --- a/arch/arm/mach-sa1100/pm.c Tue Mar 11 22:06:16 2003 +++ b/arch/arm/mach-sa1100/pm.c Tue Mar 11 22:06:16 2003 @@ -22,25 +22,12 @@ * 2002-05-27: Nicolas Pitre Killed sleep.h and the kmalloced save array. * Storage is local on the stack now. */ -#include -#include -#include -#include -#include #include -#include -#include +#include #include #include #include -#include - - -/* - * Debug macros - */ -#undef DEBUG extern void sa1100_cpu_suspend(void); extern void sa1100_cpu_resume(void); @@ -58,10 +45,9 @@ SLEEP_SAVE_OSCR, SLEEP_SAVE_OIER, SLEEP_SAVE_OSMR0, SLEEP_SAVE_OSMR1, SLEEP_SAVE_OSMR2, SLEEP_SAVE_OSMR3, - SLEEP_SAVE_GPDR, SLEEP_SAVE_GRER, SLEEP_SAVE_GFER, SLEEP_SAVE_GAFR, + SLEEP_SAVE_GPDR, SLEEP_SAVE_GAFR, SLEEP_SAVE_PPDR, SLEEP_SAVE_PPSR, SLEEP_SAVE_PPAR, SLEEP_SAVE_PSDR, - SLEEP_SAVE_ICMR, SLEEP_SAVE_Ser1SDCR0, SLEEP_SAVE_SIZE @@ -72,10 +58,6 @@ { unsigned long sleep_save[SLEEP_SAVE_SIZE]; - local_irq_disable(); - - leds_event(led_stop); - /* preserve current time */ RCNR = xtime.tv_sec; @@ -88,8 +70,6 @@ SAVE(OIER); SAVE(GPDR); - SAVE(GRER); - SAVE(GFER); SAVE(GAFR); SAVE(PPDR); @@ -99,13 +79,6 @@ SAVE(Ser1SDCR0); - SAVE(ICMR); - - /* ... maybe a global variable initialized by arch code to set this? */ - GRER = PWER; - GFER = 0; - GEDR = GEDR; - /* Clear previous reset status */ RCSR = RCSR_HWR | RCSR_SWR | RCSR_WDR | RCSR_SMR; @@ -115,22 +88,23 @@ /* go zzz */ sa1100_cpu_suspend(); - /* ensure not to come back here if it wasn't intended */ + /* + * Ensure not to come back here if it wasn't intended + */ PSPR = 0; -#ifdef DEBUG - printk(KERN_DEBUG "*** made it back from resume\n"); -#endif + /* + * Ensure interrupt sources are disabled; we will re-init + * the interrupt subsystem via the device manager. + */ + ICLR = 0; + ICCR = 1; + ICMR = 0; /* restore registers */ RESTORE(GPDR); - RESTORE(GRER); - RESTORE(GFER); RESTORE(GAFR); - /* clear any edge detect bit */ - GEDR = GEDR; - RESTORE(PPDR); RESTORE(PPSR); RESTORE(PPAR); @@ -138,6 +112,9 @@ RESTORE(Ser1SDCR0); + /* + * Clear the peripheral sleep-hold bit. + */ PSSR = PSSR_PH; RESTORE(OSMR0); @@ -147,24 +124,9 @@ RESTORE(OSCR); RESTORE(OIER); - ICLR = 0; - ICCR = 1; - RESTORE(ICMR); - /* restore current time */ xtime.tv_sec = RCNR; - leds_event(led_start); - - local_irq_enable(); - - /* - * Restore the CPU frequency settings. - */ -#ifdef CONFIG_CPU_FREQ - cpufreq_restore(); -#endif - return 0; } @@ -172,78 +134,3 @@ { return virt_to_phys(sp); } - -#ifdef CONFIG_SYSCTL -/* - * ARGH! ACPI people defined CTL_ACPI in linux/acpi.h rather than - * linux/sysctl.h. - * - * This means our interface here won't survive long - it needs a new - * interface. Quick hack to get this working - use sysctl id 9999. - */ -#warning ACPI broke the kernel, this interface needs to be fixed up. -#define CTL_ACPI 9999 -#define ACPI_S1_SLP_TYP 19 - -/* - * Send us to sleep. - */ -static int sysctl_pm_do_suspend(void) -{ - int retval; - - /* - * Suspend "legacy" devices. - */ - retval = pm_send_all(PM_SUSPEND, (void *)3); - if (retval == 0) { - /* - * Suspend LDM devices. - */ - device_suspend(4, SUSPEND_NOTIFY); - device_suspend(4, SUSPEND_SAVE_STATE); - device_suspend(4, SUSPEND_DISABLE); - - retval = pm_do_suspend(); - - /* - * Resume LDM devices. - */ - device_resume(RESUME_RESTORE_STATE); - device_resume(RESUME_ENABLE); - - /* - * Resume "legacy" devices. - */ - pm_send_all(PM_RESUME, (void *)0); - } - - return retval; -} - -static struct ctl_table pm_table[] = -{ - {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, (proc_handler *)&sysctl_pm_do_suspend}, - {0} -}; - -static struct ctl_table pm_dir_table[] = -{ - {CTL_ACPI, "pm", NULL, 0, 0555, pm_table}, - {0} -}; - -/* - * Initialize power interface - */ -static int __init pm_init(void) -{ - register_sysctl_table(pm_dir_table, 1); - return 0; -} - -fs_initcall(pm_init); - -#endif - -EXPORT_SYMBOL(pm_do_suspend); diff -Nru a/arch/arm/mach-sa1100/ssp.c b/arch/arm/mach-sa1100/ssp.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/mach-sa1100/ssp.c Tue Mar 11 22:06:20 2003 @@ -0,0 +1,208 @@ +/* + * linux/arch/arm/mach-sa1100/ssp.c + * + * Copyright (C) 2003 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Generic SSP driver. This provides the generic core for simple + * IO-based SSP applications. + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +static void ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned int status = Ser4SSSR; + + if (status & SSSR_ROR) { + printk(KERN_WARNING "SSP: receiver overrun\n"); + } + + Ser4SSSR = SSSR_ROR; +} + +/** + * ssp_write_word - write a word to the SSP port + * @data: 16-bit, MSB justified data to write. + * + * Wait for a free entry in the SSP transmit FIFO, and write a data + * word to the SSP port. + * + * The caller is expected to perform the necessary locking. + * + * Returns: + * %-ETIMEDOUT timeout occurred (for future) + * 0 success + */ +int ssp_write_word(u16 data) +{ + while (!(Ser4SSSR & SSSR_TNF)) + cpu_relax(); + + Ser4SSDR = data; + + return 0; +} + +/** + * ssp_read_word - read a word from the SSP port + * + * Wait for a data word in the SSP receive FIFO, and return the + * received data. Data is LSB justified. + * + * Note: Currently, if data is not expected to be received, this + * function will wait for ever. + * + * The caller is expected to perform the necessary locking. + * + * Returns: + * %-ETIMEDOUT timeout occurred (for future) + * 16-bit data success + */ +int ssp_read_word(void) +{ + while (!(Ser4SSSR & SSSR_RNE)) + cpu_relax(); + + return Ser4SSDR; +} + +/** + * ssp_flush - flush the transmit and receive FIFOs + * + * Wait for the SSP to idle, and ensure that the receive FIFO + * is empty. + * + * The caller is expected to perform the necessary locking. + */ +void ssp_flush(void) +{ + do { + while (Ser4SSSR & SSSR_RNE) { + (void) Ser4SSDR; + } + } while (Ser4SSSR & SSSR_BSY); +} + +/** + * ssp_enable - enable the SSP port + * + * Turn on the SSP port. + */ +void ssp_enable(void) +{ + Ser4SSCR0 |= SSCR0_SSE; +} + +/** + * ssp_disable - shut down the SSP port + * + * Turn off the SSP port, optionally powering it down. + */ +void ssp_disable(void) +{ + Ser4SSCR0 &= ~SSCR0_SSE; +} + +/** + * ssp_save_state - save the SSP configuration + * @ssp: pointer to structure to save SSP configuration + * + * Save the configured SSP state for suspend. + */ +void ssp_save_state(struct ssp_state *ssp) +{ + ssp->cr0 = Ser4SSCR0; + ssp->cr1 = Ser4SSCR1; + + Ser4SSCR0 &= ~SSCR0_SSE; +} + +/** + * ssp_restore_state - restore a previously saved SSP configuration + * @ssp: pointer to configuration saved by ssp_save_state + * + * Restore the SSP configuration saved previously by ssp_save_state. + */ +void ssp_restore_state(struct ssp_state *ssp) +{ + Ser4SSSR = SSSR_ROR; + + Ser4SSCR0 = ssp->cr0 & ~SSCR0_SSE; + Ser4SSCR1 = ssp->cr1; + Ser4SSCR0 = ssp->cr0; +} + +/** + * ssp_init - setup the SSP port + * + * initialise and claim resources for the SSP port. + * + * Returns: + * %-ENODEV if the SSP port is unavailable + * %-EBUSY if the resources are already in use + * %0 on success + */ +int ssp_init(void) +{ + int ret; + + if (!(PPAR & PPAR_SPR) && (Ser4MCCR0 & MCCR0_MCE)) + return -ENODEV; + + if (!request_mem_region(__PREG(Ser4SSCR0), 0x18, "SSP")) { + return -EBUSY; + } + + Ser4SSSR = SSSR_ROR; + + ret = request_irq(IRQ_Ser4SSP, ssp_interrupt, 0, "SSP", NULL); + if (ret) + goto out_region; + + return 0; + + out_region: + release_mem_region(__PREG(Ser4SSCR0), 0x18); + return ret; +} + +/** + * ssp_exit - undo the effects of ssp_init + * + * release and free resources for the SSP port. + */ +void ssp_exit(void) +{ + Ser4SSCR0 &= ~SSCR0_SSE; + + free_irq(IRQ_Ser4SSP, NULL); + release_mem_region(__PREG(Ser4SSCR0), 0x18); +} + +MODULE_AUTHOR("Russell King"); +MODULE_DESCRIPTION("SA11x0 SSP PIO driver"); +MODULE_LICENSE("GPL"); + +EXPORT_SYMBOL(ssp_write_word); +EXPORT_SYMBOL(ssp_read_word); +EXPORT_SYMBOL(ssp_flush); +EXPORT_SYMBOL(ssp_enable); +EXPORT_SYMBOL(ssp_disable); +EXPORT_SYMBOL(ssp_save_state); +EXPORT_SYMBOL(ssp_restore_state); +EXPORT_SYMBOL(ssp_init); +EXPORT_SYMBOL(ssp_exit); diff -Nru a/arch/arm/mach-sa1100/system3.c b/arch/arm/mach-sa1100/system3.c --- a/arch/arm/mach-sa1100/system3.c Tue Mar 11 22:06:19 2003 +++ b/arch/arm/mach-sa1100/system3.c Tue Mar 11 22:06:19 2003 @@ -213,11 +213,17 @@ static int sdram_notifier(struct notifier_block *nb, unsigned long event, void *data) { + struct cpufreq_policy *policy = data; switch (event) { - case CPUFREQ_MINMAX: - cpufreq_updateminmax(data, 147500, 206000); + case CPUFREQ_ADJUST: + case CPUFREQ_INCOMPATIBLE: + cpufreq_verify_within_limits(policy, 147500, 206000); + break; + case CPUFREQ_NOTIFY: + if ((policy->min < 147500) || + (policy->max > 206000)) + panic("cpufreq failed to limit the speed\n"); break; - } return 0; } @@ -405,7 +411,7 @@ goto DONE; } -#if defined( CONFIG_CPU_FREQ ) +#ifdef CONFIG_CPU_FREQ ret = cpufreq_register_notifier(&system3_clkchg_block); if ( ret != 0 ) { printk( KERN_WARNING"PT Digital Board: could not register clock scale callback\n" ); diff -Nru a/arch/arm/mm/fault-common.c b/arch/arm/mm/fault-common.c --- a/arch/arm/mm/fault-common.c Tue Mar 11 22:06:17 2003 +++ b/arch/arm/mm/fault-common.c Tue Mar 11 22:06:17 2003 @@ -342,20 +342,20 @@ struct pt_regs *regs) { struct task_struct *tsk; - unsigned int offset; + unsigned int index; pgd_t *pgd, *pgd_k; pmd_t *pmd, *pmd_k; if (addr < TASK_SIZE) return do_page_fault(addr, fsr, regs); - offset = __pgd_offset(addr); + index = pgd_index(addr); /* * FIXME: CP15 C1 is write only on ARMv3 architectures. */ - pgd = cpu_get_pgd() + offset; - pgd_k = init_mm.pgd + offset; + pgd = cpu_get_pgd() + index; + pgd_k = init_mm.pgd + index; if (pgd_none(*pgd_k)) goto bad_area; diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types --- a/arch/arm/tools/mach-types Tue Mar 11 22:06:17 2003 +++ b/arch/arm/tools/mach-types Tue Mar 11 22:06:17 2003 @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Mon Jan 13 22:55:16 2003 +# Last update: Wed Mar 5 22:11:59 2003 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -228,7 +228,7 @@ arnold SA1100_ARNOLD ARNOLD 217 psiboard SA1100_PSIBOARD PSIBOARD 218 jz8028 ARCH_JZ8028 JZ8028 219 -ipaq3 ARCH_IPAQ3 IPAQ3 220 +h5400 ARCH_IPAQ3 IPAQ3 220 forte SA1100_FORTE FORTE 221 acam SA1100_ACAM ACAM 222 abox SA1100_ABOX ABOX 223 @@ -259,7 +259,7 @@ stork_egg ARCH_STORK_EGG STORK_EGG 248 wismo SA1100_WISMO WISMO 249 ezlinx ARCH_EZLINX EZLINX 250 -at91rm9200 ARCH_AT91 AT91 251 +at91 ARCH_AT91 AT91 251 orion ARCH_ORION ORION 252 neptune ARCH_NEPTUNE NEPTUNE 253 hackkit SA1100_HACKKIT HACKKIT 254 @@ -281,3 +281,27 @@ siren ARCH_SIREN SIREN 270 greenlake ARCH_GREENLAKE GREENLAKE 271 argus ARCH_ARGUS ARGUS 272 +combadge SA1100_COMBADGE COMBADGE 273 +rokepxa ARCH_ROKEPXA ROKEPXA 274 +cintegrator ARCH_CINTEGRATOR CINTEGRATOR 275 +guidea07 ARCH_GUIDEA07 GUIDEA07 276 +tat257 ARCH_TAT257 TAT257 277 +igp2425 ARCH_IGP2425 IGP2425 278 +bluegrama ARCH_BLUEGRAMMA BLUEGRAMMA 279 +ipod ARCH_IPOD IPOD 280 +adsbitsyx ARCH_ADSBITSYX ADSBITSYX 281 +trizeps2 ARCH_TRIZEPS2 TRIZEPS2 282 +viper ARCH_VIPER VIPER 283 +adsbitsyplus SA1100_ADSBITSYPLUS ADSBITSYPLUS 284 +adsagc SA1100_ADSAGC ADSAGC 285 +stp7312 ARCH_STP7312 STP7312 286 +nx_phnx ARCH_PXA255 PXA255 287 +wep_ep250 ARCH_WEP_EP250 WEP_EP250 288 +inhandelf3 ARCH_INHANDELF3 INHANDELF3 289 +adi_coyote ARCH_ADI_COYOTE ADI_COYOTE 290 +iyonix ARCH_IYONIX IYONIX 291 +damicam_sa1110 ARCH_DAMICAM_SA1110 DAMICAM_SA1110 292 +meg03 ARCH_MEG03 MEG03 293 +pxa_whitechapel ARCH_PXA_WHITECHAPEL PXA_WHITECHAPEL 294 +nwsc ARCH_NWSC NWSC 295 +nwlarm ARCH_NWLARM NWLARM 296 diff -Nru a/arch/arm/vmlinux-armo.lds.in b/arch/arm/vmlinux-armo.lds.in --- a/arch/arm/vmlinux-armo.lds.in Tue Mar 11 22:06:19 2003 +++ b/arch/arm/vmlinux-armo.lds.in Tue Mar 11 22:06:19 2003 @@ -38,6 +38,9 @@ *(.initcall6.init) *(.initcall7.init) __initcall_end = .; + __con_initcall_start = .; + *(.con_initcall.init) + __con_initcall_end = .; . = ALIGN(32768); __init_end = .; } diff -Nru a/arch/arm/vmlinux-armv.lds.in b/arch/arm/vmlinux-armv.lds.in --- a/arch/arm/vmlinux-armv.lds.in Tue Mar 11 22:06:16 2003 +++ b/arch/arm/vmlinux-armv.lds.in Tue Mar 11 22:06:16 2003 @@ -45,6 +45,9 @@ *(.initcall6.init) *(.initcall7.init) __initcall_end = .; + __con_initcall_start = .; + *(.con_initcall.init) + __con_initcall_end = .; . = ALIGN(32); __initramfs_start = .; usr/built-in.o(.init.ramfs) diff -Nru a/arch/cris/Kconfig b/arch/cris/Kconfig --- a/arch/cris/Kconfig Tue Mar 11 22:06:19 2003 +++ b/arch/cris/Kconfig Tue Mar 11 22:06:19 2003 @@ -9,10 +9,6 @@ bool default y -config SWAP - bool - default y - config UID16 bool default y diff -Nru a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c --- a/arch/cris/kernel/irq.c Tue Mar 11 22:06:20 2003 +++ b/arch/cris/kernel/irq.c Tue Mar 11 22:06:20 2003 @@ -228,11 +228,13 @@ { int i; struct irqaction * action; + unsigned long flags; for (i = 0; i < NR_IRQS; i++) { + local_irq_save(flags); action = irq_action[i]; if (!action) - continue; + goto skip; seq_printf(p, "%2d: %10u %c %s", i, kstat_cpu(0).irqs[i], (action->flags & SA_INTERRUPT) ? '+' : ' ', @@ -243,6 +245,8 @@ action->name); } seq_putc(p, '\n'); +skip: + local_irq_restore(flags); } return 0; } diff -Nru a/arch/cris/vmlinux.lds.S b/arch/cris/vmlinux.lds.S --- a/arch/cris/vmlinux.lds.S Tue Mar 11 22:06:17 2003 +++ b/arch/cris/vmlinux.lds.S Tue Mar 11 22:06:17 2003 @@ -69,7 +69,12 @@ *(.initcall6.init); *(.initcall7.init); __initcall_end = .; - + } + .con_initcall.init : { + __con_initcall_start = .; + *(.con_initcall.init) + __con_initcall_end = .; + /* We fill to the next page, so we can discard all init pages without needing to consider what payload might be appended to the kernel image. */ diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Tue Mar 11 22:06:15 2003 +++ b/arch/i386/Kconfig Tue Mar 11 22:06:15 2003 @@ -18,15 +18,6 @@ bool default y -config SWAP - bool "Support for paging of anonymous memory" - default y - help - This option allows you to choose whether you want to have support - for socalled swap devices or swap files in your kernel that are - used to provide more virtual memory than the actual RAM present - in your computer. If unusre say Y. - config SBUS bool @@ -488,7 +479,7 @@ # Common NUMA Features config NUMA bool "Numa Memory Allocation Support" - depends on (HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT && ACPI && !ACPI_HT_ONLY))) + depends on (HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT && ACPI && !ACPI_HT_ONLY))) || X86_PC config DISCONTIGMEM bool diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile --- a/arch/i386/Makefile Tue Mar 11 22:06:16 2003 +++ b/arch/i386/Makefile Tue Mar 11 22:06:16 2003 @@ -92,7 +92,8 @@ boot := arch/i386/boot -.PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install +.PHONY: zImage bzImage compressed zlilo bzlilo \ + zdisk bzdisk fdimage fdimage144 fdimage288 install all: bzImage @@ -110,8 +111,8 @@ zdisk bzdisk: vmlinux $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk -install: vmlinux - $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) install +install fdimage fdimage144 fdimage288: vmlinux + $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ archclean: $(Q)$(MAKE) $(clean)=arch/i386/boot @@ -122,5 +123,8 @@ echo ' (your) ~/bin/installkernel or' echo ' (distribution) /sbin/installkernel or' echo ' install to $$(INSTALL_PATH) and run lilo' + echo ' bzdisk - Create a boot floppy in /dev/fd0' + echo ' fdimage - Create a boot floppy image' endef +CLEAN_FILES += arch/$(ARCH)/boot/fdimage arch/$(ARCH)/boot/mtools.conf diff -Nru a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile --- a/arch/i386/boot/Makefile Tue Mar 11 22:06:17 2003 +++ b/arch/i386/boot/Makefile Tue Mar 11 22:06:17 2003 @@ -62,8 +62,36 @@ $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed \ IMAGE_OFFSET=$(IMAGE_OFFSET) $@ -zdisk: $(BOOTIMAGE) - dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0 +# Set this if you want to pass append arguments to the zdisk/fdimage kernel +FDARGS = + +$(obj)/mtools.conf: $(src)/mtools.conf.in + sed -e 's|@OBJ@|$(obj)|g' < $< > $@ + +# This requires write access to /dev/fd0 +zdisk: $(BOOTIMAGE) $(obj)/mtools.conf + MTOOLSRC=$(obj)/mtools.conf mformat a: ; sync + syslinux /dev/fd0 ; sync + echo 'default linux $(FDARGS)' | \ + MTOOLSRC=$(src)/mtools.conf mcopy - a:syslinux.cfg + MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) a:linux ; sync + +# These require being root or having syslinux 2.02 or higher installed +fdimage fdimage144: $(BOOTIMAGE) $(obj)/mtools.conf + dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=1440 + MTOOLSRC=$(obj)/mtools.conf mformat v: ; sync + syslinux $(obj)/fdimage ; sync + echo 'default linux $(FDARGS)' | \ + MTOOLSRC=$(obj)/mtools.conf mcopy - v:syslinux.cfg + MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) v:linux ; sync + +fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf + dd if=/dev/zero of=$(obj)/fdimage bs=1024 count=2880 + MTOOLSRC=$(obj)/mtools.conf mformat w: ; sync + syslinux $(obj)/fdimage ; sync + echo 'default linux $(FDARGS)' | \ + MTOOLSRC=$(obj)/mtools.conf mcopy - w:syslinux.cfg + MTOOLSRC=$(obj)/mtools.conf mcopy $(BOOTIMAGE) w:linux ; sync zlilo: $(BOOTIMAGE) if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi diff -Nru a/arch/i386/boot/bootsect.S b/arch/i386/boot/bootsect.S --- a/arch/i386/boot/bootsect.S Tue Mar 11 22:06:17 2003 +++ b/arch/i386/boot/bootsect.S Tue Mar 11 22:06:17 2003 @@ -4,29 +4,13 @@ * modified by Drew Eckhardt * modified by Bruce Evans (bde) * modified by Chris Noe (May 1999) (as86 -> gas) - * - * 360k/720k disk support: Andrzej Krzysztofowicz + * gutted by H. Peter Anvin (Jan 2003) * * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment * addresses must be multiplied by 16 to obtain their respective linear * addresses. To avoid confusion, linear addresses are written using leading * hex while segment addresses are written as segment:offset. * - * bde - should not jump blindly, there may be systems with only 512K low - * memory. Use int 0x12 to get the top of memory, etc. - * - * It then loads 'setup' directly after itself (0x90200), and the system - * at 0x10000, using BIOS interrupts. - * - * NOTE! currently system is at most (8*65536-4096) bytes long. This should - * be no problem, even in the future. I want to keep it simple. This 508 kB - * kernel size should be enough, especially as this doesn't contain the - * buffer cache as in minix (and especially now that the kernel is - * compressed :-) - * - * The loader has been made as simple as possible, and continuous - * read errors will result in a unbreakable loop. Reboot by hand. It - * loads pretty fast by getting whole tracks at a time whenever possible. */ #include @@ -59,359 +43,51 @@ .global _start _start: -# First things first. Move ourself from 0x7C00 -> 0x90000 and jump there. + # Normalize the start address + jmpl $BOOTSEG, $start2 - movw $BOOTSEG, %ax - movw %ax, %ds # %ds = BOOTSEG - movw $INITSEG, %ax - movw %ax, %es # %ax = %es = INITSEG - movw $256, %cx - subw %si, %si - subw %di, %di - cld - rep - movsw - ljmp $INITSEG, $go - -# bde - changed 0xff00 to 0x4000 to use debugger at 0x6400 up (bde). We -# wouldn't have to worry about this if we checked the top of memory. Also -# my BIOS can be configured to put the wini drive tables in high memory -# instead of in the vector table. The old stack might have clobbered the -# drive table. - -go: movw $0x4000-12, %di # 0x4000 is an arbitrary value >= - # length of bootsect + length of - # setup + room for stack; - # 12 is disk parm size. - movw %ax, %ds # %ax and %es already contain INITSEG +start2: + movw %cs, %ax + movw %ax, %ds + movw %ax, %es movw %ax, %ss - movw %di, %sp # put stack at INITSEG:0x4000-12. + movw $0x7c00, %sp + sti + cld -# Many BIOS's default disk parameter tables will not recognize -# multi-sector reads beyond the maximum sector number specified -# in the default diskette parameter tables - this may mean 7 -# sectors in some cases. -# -# Since single sector reads are slow and out of the question, -# we must take care of this by creating new parameter tables -# (for the first disk) in RAM. We will set the maximum sector -# count to 36 - the most we will encounter on an ED 2.88. -# -# High doesn't hurt. Low does. -# -# Segments are as follows: %cs = %ds = %es = %ss = INITSEG, %fs = 0, -# and %gs is unused. - - movw %cx, %fs # %fs = 0 - movw $0x78, %bx # %fs:%bx is parameter table address - pushw %ds - ldsw %fs:(%bx), %si # %ds:%si is source - movb $6, %cl # copy 12 bytes - pushw %di # %di = 0x4000-12. - rep # don't worry about cld - movsw # already done above - popw %di - popw %ds - movb $36, 0x4(%di) # patch sector count - movw %di, %fs:(%bx) - movw %es, %fs:2(%bx) - -# Get disk drive parameters, specifically number of sectors/track. - -# It seems that there is no BIOS call to get the number of sectors. -# Guess 36 sectors if sector 36 can be read, 18 sectors if sector 18 -# can be read, 15 if sector 15 can be read. Otherwise guess 9. -# Note that %cx = 0 from rep movsw above. + movw $bugger_off_msg, %si - movw $disksizes, %si # table of sizes to try -probe_loop: +msg_loop: lodsb - cbtw # extend to word - movw %ax, sectors - cmpw $disksizes+4, %si - jae got_sectors # If all else fails, try 9 - - xchgw %cx, %ax # %cx = track and sector - xorw %dx, %dx # drive 0, head 0 - movw $0x0200, %bx # address = 512, in INITSEG (%es = %cs) - movw $0x0201, %ax # service 2, 1 sector - int $0x13 - jc probe_loop # try next value - -got_sectors: - movb $0x03, %ah # read cursor pos - xorb %bh, %bh - int $0x10 - movw $9, %cx - movb $0x07, %bl # page 0, attribute 7 (normal) - # %bh is set above; int10 doesn't - # modify it - movw $msg1, %bp - movw $0x1301, %ax # write string, move cursor - int $0x10 # tell the user we're loading.. - -# Load the setup-sectors directly after the moved bootblock (at 0x90200). -# We should know the drive geometry to do it, as setup may exceed first -# cylinder (for 9-sector 360K and 720K floppies). - - movw $0x0001, %ax # set sread (sector-to-read) to 1 as - movw $sread, %si # the boot sector has already been read - movw %ax, (%si) - - call kill_motor # reset FDC - movw $0x0200, %bx # address = 512, in INITSEG -next_step: - movb setup_sects, %al - movw sectors, %cx - subw (%si), %cx # (%si) = sread - cmpb %cl, %al - jbe no_cyl_crossing - movw sectors, %ax - subw (%si), %ax # (%si) = sread -no_cyl_crossing: - call read_track - pushw %ax # save it - call set_next # set %bx properly; it uses %ax,%cx,%dx - popw %ax # restore - subb %al, setup_sects # rest - for next step - jnz next_step - - pushw $SYSSEG - popw %es # %es = SYSSEG - call read_it - call kill_motor - call print_nl - -# After that we check which root-device to use. If the device is -# defined (!= 0), nothing is done and the given device is used. -# Otherwise, one of /dev/fd0H2880 (2,32) or /dev/PS0 (2,28) or /dev/at0 (2,8) -# depending on the number of sectors we pretend to know we have. - -# Segments are as follows: %cs = %ds = %ss = INITSEG, -# %es = SYSSEG, %fs = 0, %gs is unused. - - movw root_dev, %ax - orw %ax, %ax - jne root_defined - - movw sectors, %bx - movw $0x0208, %ax # /dev/ps0 - 1.2Mb - cmpw $15, %bx - je root_defined - - movb $0x1c, %al # /dev/PS0 - 1.44Mb - cmpw $18, %bx - je root_defined - - movb $0x20, %al # /dev/fd0H2880 - 2.88Mb - cmpw $36, %bx - je root_defined - - movb $0, %al # /dev/fd0 - autodetect -root_defined: - movw %ax, root_dev - -# After that (everything loaded), we jump to the setup-routine -# loaded directly after the bootblock: - - ljmp $SETUPSEG, $0 - -# These variables are addressed via %si register as it gives shorter code. - -sread: .word 0 # sectors read of current track -head: .word 0 # current head -track: .word 0 # current track - -# This routine loads the system at address SYSSEG, making sure -# no 64kB boundaries are crossed. We try to load it as fast as -# possible, loading whole tracks whenever we can. - -read_it: - movw %es, %ax # %es = SYSSEG when called - testw $0x0fff, %ax -die: jne die # %es must be at 64kB boundary - xorw %bx, %bx # %bx is starting address within segment -rp_read: -#ifdef __BIG_KERNEL__ # look in setup.S for bootsect_kludge - bootsect_kludge = 0x220 # 0x200 + 0x20 which is the size of the - lcall *bootsect_kludge # bootsector + bootsect_kludge offset -#else - movw %es, %ax - subw $SYSSEG, %ax - movw %bx, %cx - shr $4, %cx - add %cx, %ax # check offset -#endif - cmpw syssize, %ax # have we loaded everything yet? - jbe ok1_read - - ret - -ok1_read: - movw sectors, %ax - subw (%si), %ax # (%si) = sread - movw %ax, %cx - shlw $9, %cx - addw %bx, %cx - jnc ok2_read - - je ok2_read - - xorw %ax, %ax - subw %bx, %ax - shrw $9, %ax -ok2_read: - call read_track - call set_next - jmp rp_read - -read_track: - pusha - pusha - movw $0xe2e, %ax # loading... message 2e = . + andb %al, %al + jz die + movb $0xe, %ah movw $7, %bx - int $0x10 - popa - -# Accessing head, track, sread via %si gives shorter code. + int $0x10 + jmp msg_loop - movw 4(%si), %dx # 4(%si) = track - movw (%si), %cx # (%si) = sread - incw %cx - movb %dl, %ch - movw 2(%si), %dx # 2(%si) = head - movb %dl, %dh - andw $0x0100, %dx - movb $2, %ah - pushw %dx # save for error dump - pushw %cx - pushw %bx - pushw %ax - int $0x13 - jc bad_rt - - addw $8, %sp - popa - ret - -set_next: - movw %ax, %cx - addw (%si), %ax # (%si) = sread - cmp sectors, %ax - jne ok3_set - movw $0x0001, %ax - xorw %ax, 2(%si) # change head - jne ok4_set - incw 4(%si) # next track -ok4_set: +die: + # Allow the user to press a key, then reboot xorw %ax, %ax -ok3_set: - movw %ax, (%si) # set sread - shlw $9, %cx - addw %cx, %bx - jnc set_next_fin - movw %es, %ax - addb $0x10, %ah - movw %ax, %es - xorw %bx, %bx -set_next_fin: - ret - -bad_rt: - pushw %ax # save error code - call print_all # %ah = error, %al = read - xorb %ah, %ah - xorb %dl, %dl - int $0x13 - addw $10, %sp - popa - jmp read_track - -# print_all is for debugging purposes. -# -# it will print out all of the registers. The assumption is that this is -# called from a routine, with a stack frame like -# -# %dx -# %cx -# %bx -# %ax -# (error) -# ret <- %sp - -print_all: - movw $5, %cx # error code + 4 registers - movw %sp, %bp -print_loop: - pushw %cx # save count remaining - call print_nl # <-- for readability - cmpb $5, %cl - jae no_reg # see if register name is needed - - movw $0xe05 + 'A' - 1, %ax - subb %cl, %al - int $0x10 - movb $'X', %al - int $0x10 - movb $':', %al - int $0x10 -no_reg: - addw $2, %bp # next register - call print_hex # print it - popw %cx - loop print_loop - ret + int $0x16 + int $0x19 -print_nl: - movw $0xe0d, %ax # CR - int $0x10 - movb $0xa, %al # LF - int $0x10 - ret - -# print_hex is for debugging purposes, and prints the word -# pointed to by %ss:%bp in hexadecimal. - -print_hex: - movw $4, %cx # 4 hex digits - movw (%bp), %dx # load word into %dx -print_digit: - rolw $4, %dx # rotate to use low 4 bits - movw $0xe0f, %ax # %ah = request - andb %dl, %al # %al = mask for nybble - addb $0x90, %al # convert %al to ascii hex - daa # in only four instructions! - adc $0x40, %al - daa - int $0x10 - loop print_digit - ret + # int 0x19 should never return. In case it does anyway, + # invoke the BIOS reset code... + ljmp $0xf000,$0xfff0 -# This procedure turns off the floppy drive motor, so -# that we enter the kernel in a known state, and -# don't have to worry about it later. -# NOTE: Doesn't save %ax or %dx; do it yourself if you need to. - -kill_motor: -#if 1 - xorw %ax, %ax # reset FDC - xorb %dl, %dl - int $0x13 -#else - movw $0x3f2, %dx - xorb %al, %al - outb %al, %dx -#endif - ret -sectors: .word 0 -disksizes: .byte 36, 21, 18, 15, 9 -msg1: .byte 13, 10 - .ascii "Loading" +bugger_off_msg: + .ascii "Direct booting from floppy is no longer supported.\r\n" + .ascii "Please use a boot loader program instead.\r\n" + .ascii "\n" + .ascii "Remove disk and press any key to reboot . . .\r\n" + .byte 0 + -# XXX: This is a fairly snug fit. + # Kernel attributes; used by setup -.org 497 + .org 497 setup_sects: .byte SETUPSECTS root_flags: .word ROOT_RDONLY syssize: .word SYSSIZE diff -Nru a/arch/i386/boot/mtools.conf.in b/arch/i386/boot/mtools.conf.in --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/boot/mtools.conf.in Tue Mar 11 22:06:20 2003 @@ -0,0 +1,17 @@ +# +# mtools configuration file for "make (b)zdisk" +# + +# Actual floppy drive +drive a: + file="/dev/fd0" + +# 1.44 MB floppy disk image +drive v: + file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=18 filter + +# 2.88 MB floppy disk image (mostly for virtual uses) +drive w: + file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=36 filter + + diff -Nru a/arch/i386/boot/tools/build.c b/arch/i386/boot/tools/build.c --- a/arch/i386/boot/tools/build.c Tue Mar 11 22:06:17 2003 +++ b/arch/i386/boot/tools/build.c Tue Mar 11 22:06:17 2003 @@ -150,13 +150,10 @@ sz = sb.st_size; fprintf (stderr, "System is %d kB\n", sz/1024); sys_size = (sz + 15) / 16; - /* 0x28000*16 = 2.5 MB, conservative estimate for the current maximum */ - if (sys_size > (is_big_kernel ? 0x28000 : DEF_SYSSIZE)) + /* 0x40000*16 = 4.0 MB, reasonable estimate for the current maximum */ + if (sys_size > (is_big_kernel ? 0x40000 : DEF_SYSSIZE)) die("System is too big. Try using %smodules.", is_big_kernel ? "" : "bzImage or "); - if (sys_size > 0xefff) - fprintf(stderr,"warning: kernel is too big for standalone boot " - "from floppy\n"); while (sz > 0) { int l, n; diff -Nru a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c --- a/arch/i386/kernel/cpu/common.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/cpu/common.c Tue Mar 11 22:06:15 2003 @@ -480,7 +480,7 @@ */ atomic_inc(&init_mm.mm_count); current->active_mm = &init_mm; - if(current->mm) + if (current->mm) BUG(); enter_lazy_tlb(&init_mm, current, cpu); @@ -508,7 +508,7 @@ /* * Force FPU initialization: */ - clear_thread_flag(TIF_USEDFPU); + current_thread_info()->status = 0; current->used_math = 0; stts(); } 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 Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/cpu/cpufreq/acpi.c Tue Mar 11 22:06:15 2003 @@ -619,6 +619,7 @@ .init = acpi_cpufreq_cpu_init, .exit = acpi_cpufreq_cpu_exit, .name = "acpi-cpufreq", + .owner = THIS_MODULE, }; diff -Nru a/arch/i386/kernel/cpu/cpufreq/elanfreq.c b/arch/i386/kernel/cpu/cpufreq/elanfreq.c --- a/arch/i386/kernel/cpu/cpufreq/elanfreq.c Tue Mar 11 22:06:17 2003 +++ b/arch/i386/kernel/cpu/cpufreq/elanfreq.c Tue Mar 11 22:06:17 2003 @@ -250,6 +250,7 @@ .target = elanfreq_target, .init = elanfreq_cpu_init, .name = "elanfreq", + .owner = THIS_MODULE, }; diff -Nru a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c --- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c Tue Mar 11 22:06:17 2003 +++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c Tue Mar 11 22:06:17 2003 @@ -451,6 +451,7 @@ .target = cpufreq_gx_target, .init = cpufreq_gx_cpu_init, .name = "gx-suspmod", + .owner = THIS_MODULE, }; static int __init cpufreq_gx_init(void) 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 Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c Tue Mar 11 22:06:15 2003 @@ -649,6 +649,7 @@ .target = longhaul_target, .init = longhaul_cpu_init, .name = "longhaul", + .owner = THIS_MODULE, }; static int __init longhaul_init (void) diff -Nru a/arch/i386/kernel/cpu/cpufreq/longrun.c b/arch/i386/kernel/cpu/cpufreq/longrun.c --- a/arch/i386/kernel/cpu/cpufreq/longrun.c Tue Mar 11 22:06:18 2003 +++ b/arch/i386/kernel/cpu/cpufreq/longrun.c Tue Mar 11 22:06:18 2003 @@ -253,6 +253,7 @@ .setpolicy = longrun_set_policy, .init = longrun_cpu_init, .name = "longrun", + .owner = THIS_MODULE, }; diff -Nru a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c --- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c Tue Mar 11 22:06:19 2003 +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c Tue Mar 11 22:06:19 2003 @@ -214,6 +214,7 @@ else p4clockmod_table[i].frequency = (stock_freq * i)/8; } + cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu); /* cpuinfo and default policy values */ policy->policy = CPUFREQ_POLICY_PERFORMANCE; @@ -226,9 +227,14 @@ static int cpufreq_p4_cpu_exit(struct cpufreq_policy *policy) { + cpufreq_frequency_table_put_attr(policy->cpu); return cpufreq_p4_setdc(policy->cpu, DC_DISABLE); } +static struct freq_attr* p4clockmod_attr[] = { + &cpufreq_freq_attr_scaling_available_freqs, + NULL, +}; static struct cpufreq_driver p4clockmod_driver = { .verify = cpufreq_p4_verify, @@ -236,6 +242,8 @@ .init = cpufreq_p4_cpu_init, .exit = cpufreq_p4_cpu_exit, .name = "p4-clockmod", + .owner = THIS_MODULE, + .attr = p4clockmod_attr, }; diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c Tue Mar 11 22:06:15 2003 @@ -190,6 +190,7 @@ .init = powernow_k6_cpu_init, .exit = powernow_k6_cpu_exit, .name = "powernow-k6", + .owner = THIS_MODULE, }; diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c Tue Mar 11 22:06:15 2003 @@ -239,12 +239,17 @@ __asm__("\tcli\n"); rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); fidvidctl.bits.SGTC = latency; /* Stop grant timeout counter */ + fidvidctl.bits.FID = fid; - fidvidctl.bits.VID = vid; - /* Note, we could set these lazily. Ie, only do voltage transition - if its changed since last time (Some speeds have the same voltage) */ fidvidctl.bits.FIDC = 1; - fidvidctl.bits.VIDC = 1; + + /* Set the voltage lazily. Ie, only do voltage transition + if its changed since last time (Some speeds have the same voltage) */ + if (fidvidctl.bits.VID != vid) { + fidvidctl.bits.VID = vid; + fidvidctl.bits.VIDC = 1; + } + wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); if (have_a0 == 1) __asm__("\tsti\n"); @@ -377,6 +382,7 @@ .target = powernow_target, .init = powernow_cpu_init, .name = "powernow-k7", + .owner = THIS_MODULE, }; static int __init powernow_init (void) diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep.c b/arch/i386/kernel/cpu/cpufreq/speedstep.c --- a/arch/i386/kernel/cpu/cpufreq/speedstep.c Tue Mar 11 22:06:14 2003 +++ b/arch/i386/kernel/cpu/cpufreq/speedstep.c Tue Mar 11 22:06:14 2003 @@ -29,7 +29,6 @@ #include - /* speedstep_chipset: * It is necessary to know which chipset is used. As accesses to * this device occur at various places in this module, we need a @@ -40,7 +39,7 @@ #define SPEEDSTEP_CHIPSET_ICH2M 0x00000002 #define SPEEDSTEP_CHIPSET_ICH3M 0x00000003 - +#define SPEEDSTEP_CHIPSET_ICH4M 0x00000004 /* speedstep_processor */ @@ -106,6 +105,7 @@ switch (speedstep_chipset) { case SPEEDSTEP_CHIPSET_ICH2M: case SPEEDSTEP_CHIPSET_ICH3M: + case SPEEDSTEP_CHIPSET_ICH4M: /* get PMBASE */ pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase); if (!(pmbase & 0x01)) @@ -166,6 +166,7 @@ switch (speedstep_chipset) { case SPEEDSTEP_CHIPSET_ICH2M: case SPEEDSTEP_CHIPSET_ICH3M: + case SPEEDSTEP_CHIPSET_ICH4M: /* get PMBASE */ pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase); if (!(pmbase & 0x01)) @@ -245,6 +246,7 @@ switch (speedstep_chipset) { case SPEEDSTEP_CHIPSET_ICH2M: case SPEEDSTEP_CHIPSET_ICH3M: + case SPEEDSTEP_CHIPSET_ICH4M: { u16 value = 0; @@ -277,6 +279,14 @@ static unsigned int speedstep_detect_chipset (void) { speedstep_chipset_dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82801DB_12, + PCI_ANY_ID, + PCI_ANY_ID, + NULL); + if (speedstep_chipset_dev) + return SPEEDSTEP_CHIPSET_ICH4M; + + speedstep_chipset_dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, @@ -658,6 +668,7 @@ .verify = speedstep_verify, .target = speedstep_target, .init = speedstep_cpu_init, + .owner = THIS_MODULE, }; diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S Tue Mar 11 22:06:16 2003 +++ b/arch/i386/kernel/entry.S Tue Mar 11 22:06:16 2003 @@ -72,6 +72,12 @@ NT_MASK = 0x00004000 VM_MASK = 0x00020000 +/* + * ESP0 is at offset 4. 0x100 is the size of the TSS, and + * also thus the top-of-stack pointer offset of SYSENTER_ESP + */ +TSS_ESP0_OFFSET = (4 - 0x100) + #ifdef CONFIG_PREEMPT #define preempt_stop cli #else @@ -229,6 +235,8 @@ # sysenter call handler stub ENTRY(sysenter_entry) + movl TSS_ESP0_OFFSET(%esp),%esp +sysenter_past_esp: sti pushl $(__USER_DS) pushl %ebp @@ -458,12 +466,36 @@ addl $4, %esp jmp ret_from_exception +/* + * Debug traps and NMI can happen at the one SYSENTER instruction + * that sets up the real kernel stack. Check here, since we can't + * allow the wrong stack to be used. + * + * "TSS_ESP0_OFFSET+12" is because the NMI/debug handler will have + * already pushed 3 words if it hits on the sysenter instruction: + * eflags, cs and eip. + * + * We just load the right stack, and push the three (known) values + * by hand onto the new stack - while updating the return eip past + * the instruction that would have done it for sysenter. + */ +#define CHECK_SYSENTER_EIP \ + cmpl $sysenter_entry,(%esp); \ + jne 1f; \ + movl TSS_ESP0_OFFSET+12(%esp),%esp; \ + pushfl; \ + pushl $__KERNEL_CS; \ + pushl $sysenter_past_esp; \ +1: + ENTRY(debug) + CHECK_SYSENTER_EIP pushl $0 pushl $do_debug jmp error_code ENTRY(nmi) + CHECK_SYSENTER_EIP pushl %eax SAVE_ALL movl %esp, %edx diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c --- a/arch/i386/kernel/i386_ksyms.c Tue Mar 11 22:06:20 2003 +++ b/arch/i386/kernel/i386_ksyms.c Tue Mar 11 22:06:20 2003 @@ -68,6 +68,7 @@ EXPORT_SYMBOL(MCA_bus); #ifdef CONFIG_DISCONTIGMEM EXPORT_SYMBOL(node_data); +EXPORT_SYMBOL(physnode_map); #endif #ifdef CONFIG_X86_NUMAQ EXPORT_SYMBOL(xquad_portio); diff -Nru a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c --- a/arch/i386/kernel/i387.c Tue Mar 11 22:06:20 2003 +++ b/arch/i386/kernel/i387.c Tue Mar 11 22:06:20 2003 @@ -52,29 +52,13 @@ * FPU lazy state save handling. */ -static inline void __save_init_fpu( struct task_struct *tsk ) -{ - if ( cpu_has_fxsr ) { - asm volatile( "fxsave %0 ; fnclex" - : "=m" (tsk->thread.i387.fxsave) ); - } else { - asm volatile( "fnsave %0 ; fwait" - : "=m" (tsk->thread.i387.fsave) ); - } - clear_tsk_thread_flag(tsk, TIF_USEDFPU); -} - -void save_init_fpu( struct task_struct *tsk ) -{ - __save_init_fpu(tsk); - stts(); -} - void kernel_fpu_begin(void) { + struct thread_info *thread = current_thread_info(); + preempt_disable(); - if (test_thread_flag(TIF_USEDFPU)) { - __save_init_fpu(current); + if (thread->status & TS_USEDFPU) { + __save_init_fpu(thread->task); return; } clts(); diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c Tue Mar 11 22:06:16 2003 +++ b/arch/i386/kernel/io_apic.c Tue Mar 11 22:06:16 2003 @@ -221,8 +221,9 @@ # define Dprintk(x...) # endif -extern unsigned long irq_affinity [NR_IRQS]; -int __cacheline_aligned pending_irq_balance_apicid [NR_IRQS]; +extern unsigned long irq_affinity[NR_IRQS]; + +static int __cacheline_aligned pending_irq_balance_apicid[NR_IRQS]; static int irqbalance_disabled = NO_BALANCE_IRQ; static int physical_balance = 0; @@ -251,8 +252,54 @@ #define BALANCED_IRQ_LESS_DELTA (HZ) long balanced_irq_interval = MAX_BALANCED_IRQ_INTERVAL; - -static inline void balance_irq(int cpu, int irq); + +static unsigned long move(int curr_cpu, unsigned long allowed_mask, + unsigned long now, int direction) +{ + int search_idle = 1; + int cpu = curr_cpu; + + goto inside; + + do { + if (unlikely(cpu == curr_cpu)) + search_idle = 0; +inside: + if (direction == 1) { + cpu++; + if (cpu >= NR_CPUS) + cpu = 0; + } else { + cpu--; + if (cpu == -1) + cpu = NR_CPUS-1; + } + } while (!cpu_online(cpu) || !IRQ_ALLOWED(cpu,allowed_mask) || + (search_idle && !IDLE_ENOUGH(cpu,now))); + + return cpu; +} + +static inline void balance_irq(int cpu, int irq) +{ + unsigned long now = jiffies; + unsigned long allowed_mask; + unsigned int new_cpu; + + if (irqbalance_disabled) + return; + + allowed_mask = cpu_online_map & irq_affinity[irq]; + new_cpu = move(cpu, allowed_mask, now, 1); + if (cpu != new_cpu) { + irq_desc_t *desc = irq_desc + irq; + unsigned long flags; + + spin_lock_irqsave(&desc->lock, flags); + pending_irq_balance_apicid[irq]=cpu_to_logical_apicid(new_cpu); + spin_unlock_irqrestore(&desc->lock, flags); + } +} static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold) { @@ -263,7 +310,8 @@ if (!irq_desc[j].action) continue; /* Is it a significant load ? */ - if (IRQ_DELTA(CPU_TO_PACKAGEINDEX(i),j) < useful_load_threshold) + if (IRQ_DELTA(CPU_TO_PACKAGEINDEX(i),j) < + useful_load_threshold) continue; balance_irq(i, j); } @@ -430,7 +478,8 @@ * We seek the least loaded sibling by making the comparison * (A+B)/2 vs B */ - if (physical_balance && (CPU_IRQ(min_loaded) >> 1) > CPU_IRQ(cpu_sibling_map[min_loaded])) + if (physical_balance && (CPU_IRQ(min_loaded) >> 1) > + CPU_IRQ(cpu_sibling_map[min_loaded])) min_loaded = cpu_sibling_map[min_loaded]; allowed_mask = cpu_online_map & irq_affinity[selected_irq]; @@ -438,11 +487,15 @@ if (target_cpu_mask & allowed_mask) { irq_desc_t *desc = irq_desc + selected_irq; - Dprintk("irq = %d moved to cpu = %d\n", selected_irq, min_loaded); + unsigned long flags; + + Dprintk("irq = %d moved to cpu = %d\n", + selected_irq, min_loaded); /* mark for change destination */ - spin_lock(&desc->lock); - pending_irq_balance_apicid[selected_irq] = cpu_to_logical_apicid(min_loaded); - spin_unlock(&desc->lock); + spin_lock_irqsave(&desc->lock, flags); + pending_irq_balance_apicid[selected_irq] = + cpu_to_logical_apicid(min_loaded); + spin_unlock_irqrestore(&desc->lock, flags); /* Since we made a change, come back sooner to * check for more variation. */ @@ -453,58 +506,16 @@ goto tryanotherirq; not_worth_the_effort: - /* if we did not find an IRQ to move, then adjust the time interval upward */ + /* + * if we did not find an IRQ to move, then adjust the time interval + * upward + */ balanced_irq_interval = min((long)MAX_BALANCED_IRQ_INTERVAL, balanced_irq_interval + BALANCED_IRQ_MORE_DELTA); Dprintk("IRQ worth rotating not found\n"); return; } -static unsigned long move(int curr_cpu, unsigned long allowed_mask, unsigned long now, int direction) -{ - int search_idle = 1; - int cpu = curr_cpu; - - goto inside; - - do { - if (unlikely(cpu == curr_cpu)) - search_idle = 0; -inside: - if (direction == 1) { - cpu++; - if (cpu >= NR_CPUS) - cpu = 0; - } else { - cpu--; - if (cpu == -1) - cpu = NR_CPUS-1; - } - } while (!cpu_online(cpu) || !IRQ_ALLOWED(cpu,allowed_mask) || - (search_idle && !IDLE_ENOUGH(cpu,now))); - - return cpu; -} - -static inline void balance_irq (int cpu, int irq) -{ - unsigned long now = jiffies; - unsigned long allowed_mask; - unsigned int new_cpu; - - if (irqbalance_disabled) - return; - - allowed_mask = cpu_online_map & irq_affinity[irq]; - new_cpu = move(cpu, allowed_mask, now, 1); - if (cpu != new_cpu) { - irq_desc_t *desc = irq_desc + irq; - spin_lock(&desc->lock); - pending_irq_balance_apicid[irq] = cpu_to_logical_apicid(new_cpu); - spin_unlock(&desc->lock); - } -} - int balanced_irq(void *unused) { int i; @@ -516,26 +527,32 @@ /* push everything to CPU 0 to give us a starting point. */ for (i = 0 ; i < NR_IRQS ; i++) pending_irq_balance_apicid[i] = cpu_to_logical_apicid(0); - for (;;) { - set_current_state(TASK_INTERRUPTIBLE); - time_remaining = schedule_timeout(time_remaining); - if (time_after(jiffies, prev_balance_time+balanced_irq_interval)) { - Dprintk("balanced_irq: calling do_irq_balance() %lu\n", jiffies); - do_irq_balance(); - prev_balance_time = jiffies; - time_remaining = balanced_irq_interval; - } - } + +repeat: + set_current_state(TASK_INTERRUPTIBLE); + time_remaining = schedule_timeout(time_remaining); + if (time_after(jiffies, prev_balance_time+balanced_irq_interval)) { + Dprintk("balanced_irq: calling do_irq_balance() %lu\n", + jiffies); + do_irq_balance(); + prev_balance_time = jiffies; + time_remaining = balanced_irq_interval; + } + goto repeat; } static int __init balanced_irq_init(void) { int i; struct cpuinfo_x86 *c; + c = &boot_cpu_data; if (irqbalance_disabled) return 0; - /* Enable physical balance only if more than 1 physical processor is present */ + /* + * Enable physical balance only if more than 1 physical processor + * is present + */ if (smp_num_siblings > 1 && cpu_online_map >> 2) physical_balance = 1; @@ -1150,11 +1167,8 @@ enable_8259A_irq(0); } -void __init UNEXPECTED_IO_APIC(void) +static inline void UNEXPECTED_IO_APIC(void) { - printk(KERN_WARNING "INFO: unexpected IO-APIC, please file a report at\n"); - printk(KERN_WARNING " http://bugzilla.kernel.org\n"); - printk(KERN_WARNING " if your kernel is less than 3 months old.\n"); } void __init print_IO_APIC(void) @@ -1566,7 +1580,7 @@ */ static int __init timer_irq_works(void) { - unsigned int t1 = jiffies; + unsigned long t1 = jiffies; local_irq_enable(); /* Let ten ticks pass... */ diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c --- a/arch/i386/kernel/irq.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/irq.c Tue Mar 11 22:06:15 2003 @@ -135,43 +135,47 @@ { int i, j; struct irqaction * action; + unsigned long flags; seq_printf(p, " "); for (j=0; jtypename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) seq_printf(p, ", %s", action->name); + seq_putc(p, '\n'); +skip: + spin_unlock_irqrestore(&irq_desc[i].lock, flags); } seq_printf(p, "NMI: "); for (j = 0; j < NR_CPUS; j++) if (cpu_online(j)) - p += seq_printf(p, "%10u ", nmi_count(j)); + seq_printf(p, "%10u ", nmi_count(j)); seq_putc(p, '\n'); #if CONFIG_X86_LOCAL_APIC seq_printf(p, "LOC: "); for (j = 0; j < NR_CPUS; j++) if (cpu_online(j)) - p += seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs); + seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs); seq_putc(p, '\n'); #endif seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); diff -Nru a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c --- a/arch/i386/kernel/microcode.c Tue Mar 11 22:06:16 2003 +++ b/arch/i386/kernel/microcode.c Tue Mar 11 22:06:16 2003 @@ -372,7 +372,6 @@ ret = (ssize_t)len; } out_fsize: - devfs_set_file_size(devfs_handle, mc_fsize); vfree(microcode); out_unlock: up_write(µcode_rwsem); @@ -388,7 +387,6 @@ if (mc_applied) { int bytes = NR_CPUS * sizeof(struct microcode); - devfs_set_file_size(devfs_handle, 0); kfree(mc_applied); mc_applied = NULL; printk(KERN_INFO "microcode: freed %d bytes\n", bytes); diff -Nru a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c --- a/arch/i386/kernel/numaq.c Tue Mar 11 22:06:18 2003 +++ b/arch/i386/kernel/numaq.c Tue Mar 11 22:06:18 2003 @@ -31,8 +31,7 @@ #include /* These are needed before the pgdat's are created */ -unsigned long node_start_pfn[MAX_NUMNODES]; -unsigned long node_end_pfn[MAX_NUMNODES]; +extern long node_start_pfn[], node_end_pfn[]; #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) @@ -64,26 +63,6 @@ } } } - -/* - * ----------------------------------------- - * - * functions related to physnode_map - * - * ----------------------------------------- - */ -/* - * physnode_map keeps track of the physical memory layout of the - * numaq nodes on a 256Mb break (each element of the array will - * represent 256Mb of memory and will be marked by the node id. so, - * if the first gig is on node 0, and the second gig is on node 1 - * physnode_map will contain: - * physnode_map[0-3] = 0; - * physnode_map[4-7] = 1; - * physnode_map[8- ] = -1; - */ -int physnode_map[MAX_ELEMENTS] = { [0 ... (MAX_ELEMENTS - 1)] = -1}; -EXPORT_SYMBOL(physnode_map); /* * for each node mark the regions diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c Tue Mar 11 22:06:14 2003 +++ b/arch/i386/kernel/process.c Tue Mar 11 22:06:14 2003 @@ -275,6 +275,15 @@ release_x86_irqs(dead_task); } +/* + * This gets called before we allocate a new thread and copy + * the current task into it. + */ +void prepare_to_copy(struct task_struct *tsk) +{ + unlazy_fpu(tsk); +} + int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, unsigned long unused, struct task_struct * p, struct pt_regs * regs) @@ -297,9 +306,6 @@ savesegment(gs,p->thread.gs); tsk = current; - unlazy_fpu(tsk); - struct_cpy(&p->thread.i387, &tsk->thread.i387); - if (unlikely(NULL != tsk->thread.ts_io_bitmap)) { p->thread.ts_io_bitmap = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); if (!p->thread.ts_io_bitmap) diff -Nru a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c --- a/arch/i386/kernel/smpboot.c Tue Mar 11 22:06:17 2003 +++ b/arch/i386/kernel/smpboot.c Tue Mar 11 22:06:17 2003 @@ -966,6 +966,7 @@ if (APIC_init_uniprocessor()) printk(KERN_NOTICE "Local APIC not detected." " Using dummy APIC emulation.\n"); + map_cpu_to_logical_apicid(); return; } diff -Nru a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c --- a/arch/i386/kernel/srat.c Tue Mar 11 22:06:16 2003 +++ b/arch/i386/kernel/srat.c Tue Mar 11 22:06:16 2003 @@ -57,8 +57,7 @@ static int zholes_size_init; static unsigned long zholes_size[MAX_NUMNODES * MAX_NR_ZONES]; -unsigned long node_start_pfn[MAX_NUMNODES]; -unsigned long node_end_pfn[MAX_NUMNODES]; +extern unsigned long node_start_pfn[], node_end_pfn[]; extern void * boot_ioremap(unsigned long, unsigned long); @@ -182,30 +181,19 @@ } } -/* - * physnode_map keeps track of the physical memory layout of the - * numaq nodes on a 256Mb break (each element of the array will - * represent 256Mb of memory and will be marked by the node id. so, - * if the first gig is on node 0, and the second gig is on node 1 - * physnode_map will contain: - * physnode_map[0-3] = 0; - * physnode_map[4-7] = 1; - * physnode_map[8- ] = -1; - */ -int pfnnode_map[MAX_ELEMENTS] = { [0 ... (MAX_ELEMENTS - 1)] = -1}; -EXPORT_SYMBOL(pfnnode_map); - -static void __init initialize_pfnnode_map(void) +static void __init initialize_physnode_map(void) { - unsigned long topofchunk, cur = 0; int i; - - for (i = 0; i < num_memory_chunks; i++) { - cur = node_memory_chunk[i].start_pfn; - topofchunk = node_memory_chunk[i].end_pfn; - while (cur < topofchunk) { - pfnnode_map[PFN_TO_ELEMENT(cur)] = node_memory_chunk[i].nid; - cur ++; + unsigned long pfn; + struct node_memory_chunk_s *nmcp; + + /* Run the list of memory chunks and fill in the phymap. */ + nmcp = node_memory_chunk; + for (i = num_memory_chunks; --i >= 0; nmcp++) { + for (pfn = nmcp->start_pfn; pfn <= nmcp->end_pfn; + pfn += PAGES_PER_ELEMENT) + { + physnode_map[pfn / PAGES_PER_ELEMENT] = (int)nmcp->nid; } } } @@ -272,7 +260,7 @@ for (i = 0; i < num_memory_chunks; i++) node_memory_chunk[i].nid = pxm_to_nid_map[node_memory_chunk[i].pxm]; - initialize_pfnnode_map(); + initialize_physnode_map(); printk("pxm bitmap: "); for (i = 0; i < sizeof(pxm_bitmap); i++) { diff -Nru a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c --- a/arch/i386/kernel/sysenter.c Tue Mar 11 22:06:20 2003 +++ b/arch/i386/kernel/sysenter.c Tue Mar 11 22:06:20 2003 @@ -40,8 +40,10 @@ int cpu = get_cpu(); struct tss_struct *tss = init_tss + cpu; + tss->ss1 = __KERNEL_CS; + tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss; wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0); - wrmsr(MSR_IA32_SYSENTER_ESP, tss->esp0, 0); + wrmsr(MSR_IA32_SYSENTER_ESP, tss->esp1, 0); wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) sysenter_entry, 0); printk("Enabling SEP on CPU %d\n", cpu); diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/traps.c Tue Mar 11 22:06:15 2003 @@ -737,13 +737,14 @@ */ asmlinkage void math_state_restore(struct pt_regs regs) { - struct task_struct *tsk = current; - clts(); /* Allow maths ops (or we recurse) */ + struct thread_info *thread = current_thread_info(); + struct task_struct *tsk = thread->task; + clts(); /* Allow maths ops (or we recurse) */ if (!tsk->used_math) init_fpu(tsk); restore_fpu(tsk); - set_thread_flag(TIF_USEDFPU); /* So we fnsave on switch_to() */ + thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */ } #ifndef CONFIG_MATH_EMULATION diff -Nru a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c --- a/arch/i386/kernel/vm86.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/kernel/vm86.c Tue Mar 11 22:06:15 2003 @@ -291,7 +291,7 @@ tss = init_tss + smp_processor_id(); tss->esp0 = tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0; - disable_sysenter(); + disable_sysenter(tss); tsk->thread.screen_bitmap = info->screen_bitmap; if (info->flags & VM86_SCREEN_BITMAP) diff -Nru a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c --- a/arch/i386/mm/discontig.c Tue Mar 11 22:06:17 2003 +++ b/arch/i386/mm/discontig.c Tue Mar 11 22:06:17 2003 @@ -36,11 +36,36 @@ struct pglist_data *node_data[MAX_NUMNODES]; bootmem_data_t node0_bdata; +/* + * numa interface - we expect the numa architecture specfic code to have + * populated the following initialisation. + * + * 1) numnodes - the total number of nodes configured in the system + * 2) physnode_map - the mapping between a pfn and owning node + * 3) node_start_pfn - the starting page frame number for a node + * 3) node_end_pfn - the ending page fram number for a node + */ + +/* + * physnode_map keeps track of the physical memory layout of a generic + * numa node on a 256Mb break (each element of the array will + * represent 256Mb of memory and will be marked by the node id. so, + * if the first gig is on node 0, and the second gig is on node 1 + * physnode_map will contain: + * + * physnode_map[0-3] = 0; + * physnode_map[4-7] = 1; + * physnode_map[8- ] = -1; + */ +u8 physnode_map[MAX_ELEMENTS] = { [0 ... (MAX_ELEMENTS - 1)] = -1}; + +unsigned long node_start_pfn[MAX_NUMNODES]; +unsigned long node_end_pfn[MAX_NUMNODES]; + extern unsigned long find_max_low_pfn(void); extern void find_max_pfn(void); extern void one_highpage_init(struct page *, int, int); -extern unsigned long node_start_pfn[], node_end_pfn[]; extern struct e820map e820; extern char _end; extern unsigned long highend_pfn, highstart_pfn; @@ -55,6 +80,36 @@ unsigned long node_remap_offset[MAX_NUMNODES]; void *node_remap_start_vaddr[MAX_NUMNODES]; void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); + +/* + * FLAT - support for basic PC memory model with discontig enabled, essentially + * a single node with all available processors in it with a flat + * memory map. + */ +void __init get_memcfg_numa_flat(void) +{ + int pfn; + + printk("NUMA - single node, flat memory mode\n"); + + /* Run the memory configuration and find the top of memory. */ + find_max_pfn(); + node_start_pfn[0] = 0; + node_end_pfn[0] = max_pfn; + + /* Fill in the physnode_map with our simplistic memory model, + * all memory is in node 0. + */ + for (pfn = node_start_pfn[0]; pfn <= node_end_pfn[0]; + pfn += PAGES_PER_ELEMENT) + { + physnode_map[pfn / PAGES_PER_ELEMENT] = 0; + } + + /* Indicate there is one node available. */ + node_set_online(0); + numnodes = 1; +} /* * Find the highest page frame number we have available for the node diff -Nru a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c --- a/arch/i386/mm/fault.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/mm/fault.c Tue Mar 11 22:06:15 2003 @@ -394,14 +394,14 @@ * Do _not_ use "tsk" here. We might be inside * an interrupt in the middle of a task switch.. */ - int offset = __pgd_offset(address); + int index = pgd_index(address); pgd_t *pgd, *pgd_k; pmd_t *pmd, *pmd_k; pte_t *pte_k; asm("movl %%cr3,%0":"=r" (pgd)); - pgd = offset + (pgd_t *)__va(pgd); - pgd_k = init_mm.pgd + offset; + pgd = index + (pgd_t *)__va(pgd); + pgd_k = init_mm.pgd + index; if (!pgd_present(*pgd_k)) goto no_context; diff -Nru a/arch/i386/mm/init.c b/arch/i386/mm/init.c --- a/arch/i386/mm/init.c Tue Mar 11 22:06:19 2003 +++ b/arch/i386/mm/init.c Tue Mar 11 22:06:19 2003 @@ -98,26 +98,26 @@ { pgd_t *pgd; pmd_t *pmd; - int pgd_ofs, pmd_ofs; + int pgd_idx, pmd_idx; unsigned long vaddr; vaddr = start; - pgd_ofs = __pgd_offset(vaddr); - pmd_ofs = __pmd_offset(vaddr); - pgd = pgd_base + pgd_ofs; + pgd_idx = pgd_index(vaddr); + pmd_idx = pmd_index(vaddr); + pgd = pgd_base + pgd_idx; - for ( ; (pgd_ofs < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_ofs++) { + for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) { if (pgd_none(*pgd)) one_md_table_init(pgd); pmd = pmd_offset(pgd, vaddr); - for (; (pmd_ofs < PTRS_PER_PMD) && (vaddr != end); pmd++, pmd_ofs++) { + for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end); pmd++, pmd_idx++) { if (pmd_none(*pmd)) one_page_table_init(pmd); vaddr += PMD_SIZE; } - pmd_ofs = 0; + pmd_idx = 0; } } @@ -132,17 +132,17 @@ pgd_t *pgd; pmd_t *pmd; pte_t *pte; - int pgd_ofs, pmd_ofs, pte_ofs; + int pgd_idx, pmd_idx, pte_ofs; - pgd_ofs = __pgd_offset(PAGE_OFFSET); - pgd = pgd_base + pgd_ofs; + pgd_idx = pgd_index(PAGE_OFFSET); + pgd = pgd_base + pgd_idx; pfn = 0; - for (; pgd_ofs < PTRS_PER_PGD; pgd++, pgd_ofs++) { + for (; pgd_idx < PTRS_PER_PGD; pgd++, pgd_idx++) { pmd = one_md_table_init(pgd); if (pfn >= max_low_pfn) continue; - for (pmd_ofs = 0; pmd_ofs < PTRS_PER_PMD && pfn < max_low_pfn; pmd++, pmd_ofs++) { + for (pmd_idx = 0; pmd_idx < PTRS_PER_PMD && pfn < max_low_pfn; pmd++, pmd_idx++) { /* Map with big pages if possible, otherwise create normal page tables. */ if (cpu_has_pse) { set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE)); @@ -214,7 +214,7 @@ vaddr = PKMAP_BASE; page_table_range_init(vaddr, vaddr + PAGE_SIZE*LAST_PKMAP, pgd_base); - pgd = swapper_pg_dir + __pgd_offset(vaddr); + pgd = swapper_pg_dir + pgd_index(vaddr); pmd = pmd_offset(pgd, vaddr); pte = pte_offset_kernel(pmd, vaddr); pkmap_page_table = pte; diff -Nru a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c --- a/arch/i386/mm/ioremap.c Tue Mar 11 22:06:16 2003 +++ b/arch/i386/mm/ioremap.c Tue Mar 11 22:06:16 2003 @@ -148,7 +148,7 @@ */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PAGE_MASK; - size = PAGE_ALIGN(last_addr) - phys_addr; + size = PAGE_ALIGN(last_addr+1) - phys_addr; /* * Ok, go for it.. diff -Nru a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c --- a/arch/i386/mm/pgtable.c Tue Mar 11 22:06:20 2003 +++ b/arch/i386/mm/pgtable.c Tue Mar 11 22:06:20 2003 @@ -64,7 +64,7 @@ pmd_t *pmd; pte_t *pte; - pgd = swapper_pg_dir + __pgd_offset(vaddr); + pgd = swapper_pg_dir + pgd_index(vaddr); if (pgd_none(*pgd)) { BUG(); return; @@ -104,7 +104,7 @@ printk ("set_pmd_pfn: pfn misaligned\n"); return; /* BUG(); */ } - pgd = swapper_pg_dir + __pgd_offset(vaddr); + pgd = swapper_pg_dir + pgd_index(vaddr); if (pgd_none(*pgd)) { printk ("set_pmd_pfn: pgd_none\n"); return; /* BUG(); */ diff -Nru a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c --- a/arch/i386/oprofile/nmi_int.c Tue Mar 11 22:06:19 2003 +++ b/arch/i386/oprofile/nmi_int.c Tue Mar 11 22:06:19 2003 @@ -58,7 +58,7 @@ unsigned int const nr_ctrls = model->num_controls; struct op_msr_group * counters = &msrs->counters; struct op_msr_group * controls = &msrs->controls; - int i; + unsigned int i; for (i = 0; i < nr_ctrs; ++i) { rdmsr(counters->addrs[i], @@ -108,7 +108,7 @@ unsigned int const nr_ctrls = model->num_controls; struct op_msr_group * counters = &msrs->counters; struct op_msr_group * controls = &msrs->controls; - int i; + unsigned int i; for (i = 0; i < nr_ctrls; ++i) { wrmsr(controls->addrs[i], @@ -182,7 +182,7 @@ static int nmi_create_files(struct super_block * sb, struct dentry * root) { - int i; + unsigned int i; for (i = 0; i < model->num_counters; ++i) { struct dentry * dir; diff -Nru a/arch/i386/oprofile/op_model_athlon.c b/arch/i386/oprofile/op_model_athlon.c --- a/arch/i386/oprofile/op_model_athlon.c Tue Mar 11 22:06:18 2003 +++ b/arch/i386/oprofile/op_model_athlon.c Tue Mar 11 22:06:18 2003 @@ -104,10 +104,11 @@ if (CTR_OVERFLOWED(low)) { oprofile_add_sample(eip, is_kernel, i, cpu); CTR_WRITE(reset_value[i], msrs, i); - return 1; } } - return 0; + + /* See op_model_ppro.c */ + return 1; } diff -Nru a/arch/i386/oprofile/op_model_p4.c b/arch/i386/oprofile/op_model_p4.c --- a/arch/i386/oprofile/op_model_p4.c Tue Mar 11 22:06:15 2003 +++ b/arch/i386/oprofile/op_model_p4.c Tue Mar 11 22:06:15 2003 @@ -389,7 +389,7 @@ static void p4_fill_in_addresses(struct op_msrs * const msrs) { - int i; + unsigned int i; unsigned int addr, stag; setup_num_counters(); @@ -608,13 +608,14 @@ CTR_WRITE(reset_value[i], real); /* P4 quirk: you have to re-unmask the apic vector */ apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); - return 1; } } /* P4 quirk: you have to re-unmask the apic vector */ apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); - return 0; + + /* See op_model_ppro.c */ + return 1; } diff -Nru a/arch/i386/oprofile/op_model_ppro.c b/arch/i386/oprofile/op_model_ppro.c --- a/arch/i386/oprofile/op_model_ppro.c Tue Mar 11 22:06:18 2003 +++ b/arch/i386/oprofile/op_model_ppro.c Tue Mar 11 22:06:18 2003 @@ -98,10 +98,17 @@ if (CTR_OVERFLOWED(low)) { oprofile_add_sample(eip, is_kernel, i, cpu); CTR_WRITE(reset_value[i], msrs, i); - return 1; } } - return 0; + + /* We can't work out if we really handled an interrupt. We + * might have caught a *second* counter just after overflowing + * the interrupt for this counter then arrives + * and we don't find a counter that's overflowed, so we + * would return 0 and get dazed + confused. Instead we always + * assume we found an overflow. This sucks. + */ + return 1; } diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c --- a/arch/i386/pci/irq.c Tue Mar 11 22:06:20 2003 +++ b/arch/i386/pci/irq.c Tue Mar 11 22:06:20 2003 @@ -804,6 +804,7 @@ int pirq_enable_irq(struct pci_dev *dev) { u8 pin; + extern int interrupt_line_quirk; pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) { char *msg; @@ -813,9 +814,17 @@ msg = ""; else msg = " Please try using pci=biosirq."; + + /* With IDE legacy devices the IRQ lookup failure is not a problem.. */ + if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5)) + return 0; + printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n", 'A' + pin - 1, dev->slot_name, msg); } - + /* VIA bridges use interrupt line for apic/pci steering across + the V-Link */ + else if (interrupt_line_quirk) + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); return 0; } diff -Nru a/arch/i386/vmlinux.lds.S b/arch/i386/vmlinux.lds.S --- a/arch/i386/vmlinux.lds.S Tue Mar 11 22:06:15 2003 +++ b/arch/i386/vmlinux.lds.S Tue Mar 11 22:06:15 2003 @@ -74,6 +74,9 @@ *(.initcall7.init) } __initcall_end = .; + __con_initcall_start = .; + .con_initcall.init : { *(.con_initcall.init) } + __con_initcall_end = .; . = ALIGN(4096); __initramfs_start = .; .init.ramfs : { *(.init.ramfs) } diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig --- a/arch/ia64/Kconfig Tue Mar 11 22:06:19 2003 +++ b/arch/ia64/Kconfig Tue Mar 11 22:06:19 2003 @@ -22,11 +22,7 @@ bool default y -config SWAP - bool - default y - -config RWSEM_GENERIC_SPINLOCK +config RWSEM_XCHGADD_ALGORITHM bool default y @@ -424,6 +420,18 @@ If you don't know what to do here, say N. +config PREEMPT + bool "Preemptible Kernel" + help + This option reduces the latency of the kernel when reacting to + real-time or interactive events by allowing a low priority process to + be preempted even if it is in kernel mode executing a system call. + This allows applications to run more reliably even when the system is + under load. + + Say Y here if you are building a kernel for a desktop, embedded + or real-time system. Say N if you are unsure. + config IA32_SUPPORT bool "Support running of Linux/x86 binaries" help @@ -874,6 +882,12 @@ and certain other kinds of spinlock errors commonly made. This is best used in conjunction with the NMI watchdog so that spinlock deadlocks are also debuggable. + +config DEBUG_SPINLOCK_SLEEP + bool "Sleep-inside-spinlock checking" + help + If you say Y here, various routines which may sleep will become very + noisy if they are called with a spinlock held. config IA64_DEBUG_CMPXCHG bool "Turn on compare-and-exchange bug checking (slow!)" diff -Nru a/arch/ia64/Makefile b/arch/ia64/Makefile --- a/arch/ia64/Makefile Tue Mar 11 22:06:15 2003 +++ b/arch/ia64/Makefile Tue Mar 11 22:06:15 2003 @@ -52,18 +52,19 @@ core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/ core-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/kernel/ \ arch/ia64/sn/io/ \ + arch/ia64/sn/io/sn2/ \ + arch/ia64/sn/io/sn2/pcibr/ \ arch/ia64/sn/kernel/sn2/ drivers-$(CONFIG_PCI) += arch/ia64/pci/ drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/ drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ -drivers-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/fakeprom/ boot := arch/ia64/boot tools := arch/ia64/tools .PHONY: boot compressed include/asm-ia64/offsets.h -all: vmlinux +all: prepare vmlinux compressed: vmlinux.gz diff -Nru a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c --- a/arch/ia64/hp/sim/simscsi.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/hp/sim/simscsi.c Tue Mar 11 22:06:17 2003 @@ -156,7 +156,7 @@ if (sc->request_bufflen < req.len) return; - stat.fd = desc[sc->target]; + stat.fd = desc[sc->device->id]; if (DBG) printk("simscsi_%s @ %lx (off %lx)\n", mode == SSC_READ ? "read":"write", req.addr, offset); @@ -178,7 +178,7 @@ struct disk_stat stat; struct disk_req req; - stat.fd = desc[sc->target]; + stat.fd = desc[sc->device->id]; while (list_len) { req.addr = __pa(page_address(sl->page) + sl->offset); @@ -259,6 +259,7 @@ int simscsi_queuecommand (Scsi_Cmnd *sc, void (*done)(Scsi_Cmnd *)) { + unsigned int target_id = sc->device->id; char fname[MAX_ROOT_LEN+16]; size_t disk_size; char *buf; @@ -267,21 +268,21 @@ if (DBG) printk("simscsi_queuecommand: target=%d,cmnd=%u,sc=%lu,sp=%lx,done=%p\n", - sc->target, sc->cmnd[0], sc->serial_number, sp, done); + target_id, sc->cmnd[0], sc->serial_number, sp, done); #endif sc->result = DID_BAD_TARGET << 16; sc->scsi_done = done; - if (sc->target <= 15 && sc->lun == 0) { + if (target_id <= 15 && sc->device->lun == 0) { switch (sc->cmnd[0]) { case INQUIRY: if (sc->request_bufflen < 35) { break; } - sprintf (fname, "%s%c", simscsi_root, 'a' + sc->target); - desc[sc->target] = ia64_ssc(__pa(fname), SSC_READ_ACCESS|SSC_WRITE_ACCESS, - 0, 0, SSC_OPEN); - if (desc[sc->target] < 0) { + sprintf (fname, "%s%c", simscsi_root, 'a' + target_id); + desc[target_id] = ia64_ssc(__pa(fname), SSC_READ_ACCESS|SSC_WRITE_ACCESS, + 0, 0, SSC_OPEN); + if (desc[target_id] < 0) { /* disk doesn't exist... */ break; } @@ -303,37 +304,37 @@ break; case READ_6: - if (desc[sc->target] < 0 ) + if (desc[target_id] < 0 ) break; simscsi_readwrite6(sc, SSC_READ); break; case READ_10: - if (desc[sc->target] < 0 ) + if (desc[target_id] < 0 ) break; simscsi_readwrite10(sc, SSC_READ); break; case WRITE_6: - if (desc[sc->target] < 0) + if (desc[target_id] < 0) break; simscsi_readwrite6(sc, SSC_WRITE); break; case WRITE_10: - if (desc[sc->target] < 0) + if (desc[target_id] < 0) break; simscsi_readwrite10(sc, SSC_WRITE); break; case READ_CAPACITY: - if (desc[sc->target] < 0 || sc->request_bufflen < 8) { + if (desc[target_id] < 0 || sc->request_bufflen < 8) { break; } buf = sc->request_buffer; - disk_size = simscsi_get_disk_size(desc[sc->target]); + disk_size = simscsi_get_disk_size(desc[target_id]); /* pretend to be a 1GB disk (partition table contains real stuff): */ buf[0] = (disk_size >> 24) & 0xff; diff -Nru a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c --- a/arch/ia64/hp/sim/simserial.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/hp/sim/simserial.c Tue Mar 11 22:06:17 2003 @@ -63,7 +63,6 @@ static char *serial_name = "SimSerial driver"; static char *serial_version = "0.6"; -static spinlock_t serial_lock = SPIN_LOCK_UNLOCKED; /* * This has been extracted from asm/serial.h. We need one eventually but @@ -235,14 +234,14 @@ if (!tty || !info->xmit.buf) return; - spin_lock_irqsave(&serial_lock, flags); + local_irq_save(flags); if (CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) == 0) { - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); return; } info->xmit.buf[info->xmit.head] = ch; info->xmit.head = (info->xmit.head + 1) & (SERIAL_XMIT_SIZE-1); - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); } static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done) @@ -250,7 +249,8 @@ int count; unsigned long flags; - spin_lock_irqsave(&serial_lock, flags); + + local_irq_save(flags); if (info->x_char) { char c = info->x_char; @@ -293,7 +293,7 @@ info->xmit.tail += count; } out: - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); } static void rs_flush_chars(struct tty_struct *tty) @@ -334,7 +334,7 @@ break; } - spin_lock_irqsave(&serial_lock, flags); + local_irq_save(flags); { c1 = CIRC_SPACE_TO_END(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); @@ -344,7 +344,7 @@ info->xmit.head = ((info->xmit.head + c) & (SERIAL_XMIT_SIZE-1)); } - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); buf += c; count -= c; @@ -352,7 +352,7 @@ } up(&tmp_buf_sem); } else { - spin_lock_irqsave(&serial_lock, flags); + local_irq_save(flags); while (1) { c = CIRC_SPACE_TO_END(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); if (count < c) @@ -367,7 +367,7 @@ count -= c; ret += c; } - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); } /* * Hey, we transmit directly from here in our case @@ -398,9 +398,9 @@ struct async_struct *info = (struct async_struct *)tty->driver_data; unsigned long flags; - spin_lock_irqsave(&serial_lock, flags); + local_irq_save(flags); info->xmit.head = info->xmit.tail = 0; - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); wake_up_interruptible(&tty->write_wait); @@ -573,7 +573,7 @@ state->irq); #endif - spin_lock_irqsave(&serial_lock, flags); + local_irq_save(flags); { /* * First unlink the serial port from the IRQ chain... @@ -611,7 +611,7 @@ info->flags &= ~ASYNC_INITIALIZED; } - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); } /* @@ -634,13 +634,13 @@ state = info->state; - spin_lock_irqsave(&serial_lock, flags); + local_irq_save(flags); if (tty_hung_up_p(filp)) { #ifdef SIMSERIAL_DEBUG printk("rs_close: hung_up\n"); #endif MOD_DEC_USE_COUNT; - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); return; } #ifdef SIMSERIAL_DEBUG @@ -665,11 +665,11 @@ } if (state->count) { MOD_DEC_USE_COUNT; - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); return; } info->flags |= ASYNC_CLOSING; - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); /* * Now we wait for the transmit buffer to clear; and we notify @@ -776,7 +776,7 @@ if (!page) return -ENOMEM; - spin_lock_irqsave(&serial_lock, flags); + local_irq_save(flags); if (info->flags & ASYNC_INITIALIZED) { free_page(page); @@ -857,11 +857,11 @@ } info->flags |= ASYNC_INITIALIZED; - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); return 0; errout: - spin_unlock_irqrestore(&serial_lock, flags); + local_irq_restore(flags); return retval; } diff -Nru a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S --- a/arch/ia64/ia32/ia32_entry.S Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/ia32/ia32_entry.S Tue Mar 11 22:06:17 2003 @@ -300,7 +300,7 @@ data8 compat_sys_statfs data8 compat_sys_fstatfs /* 100 */ data8 sys32_ioperm - data8 sys32_socketcall + data8 compat_sys_socketcall data8 sys_syslog data8 compat_sys_setitimer data8 compat_sys_getitimer /* 105 */ @@ -424,6 +424,26 @@ data8 sys_ni_syscall /* reserved for Security */ data8 sys_gettid data8 sys_readahead /* 225 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 230 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 235 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 compat_sys_futex /* 240 */ + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall + data8 sys_ni_syscall /* 245 */ data8 sys_ni_syscall data8 sys_ni_syscall data8 sys_ni_syscall diff -Nru a/arch/ia64/ia32/ia32_ioctl.c b/arch/ia64/ia32/ia32_ioctl.c --- a/arch/ia64/ia32/ia32_ioctl.c Tue Mar 11 22:06:18 2003 +++ b/arch/ia64/ia32/ia32_ioctl.c Tue Mar 11 22:06:18 2003 @@ -97,11 +97,9 @@ int info; /* [o] auxiliary information */ } sg_io_hdr32_t; /* 64 bytes long (on IA32) */ -struct iovec32 { unsigned int iov_base; int iov_len; }; - static int alloc_sg_iovec(sg_io_hdr_t *sgp, int uptr32) { - struct iovec32 *uiov = (struct iovec32 *) P(uptr32); + struct compat_iovec *uiov = (struct compat_iovec *) P(uptr32); sg_iovec_t *kiov; int i; @@ -136,7 +134,7 @@ static int copy_back_sg_iovec(sg_io_hdr_t *sgp, int uptr32) { - struct iovec32 *uiov = (struct iovec32 *) P(uptr32); + struct compat_iovec *uiov = (struct compat_iovec *) P(uptr32); sg_iovec_t *kiov = (sg_iovec_t *) sgp->dxferp; int i; diff -Nru a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c --- a/arch/ia64/ia32/ia32_support.c Tue Mar 11 22:06:15 2003 +++ b/arch/ia64/ia32/ia32_support.c Tue Mar 11 22:06:15 2003 @@ -93,7 +93,7 @@ { unsigned long eflag, fsr, fcr, fir, fdr, csd, ssd, tssd; struct pt_regs *regs = ia64_task_regs(t); - int nr = smp_processor_id(); /* LDT and TSS depend on CPU number: */ + int nr = get_cpu(); /* LDT and TSS depend on CPU number: */ eflag = t->thread.eflag; fsr = t->thread.fsr; @@ -119,6 +119,7 @@ regs->r17 = (_TSS(nr) << 48) | (_LDT(nr) << 32) | (__u32) regs->r17; regs->r30 = load_desc(_LDT(nr)); /* LDTD */ + put_cpu(); } /* diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c --- a/arch/ia64/ia32/sys_ia32.c Tue Mar 11 22:06:18 2003 +++ b/arch/ia64/ia32/sys_ia32.c Tue Mar 11 22:06:18 2003 @@ -924,12 +924,11 @@ (struct compat_timeval *) A(a.tvp)); } -struct iovec32 { unsigned int iov_base; int iov_len; }; asmlinkage ssize_t sys_readv (unsigned long,const struct iovec *,unsigned long); asmlinkage ssize_t sys_writev (unsigned long,const struct iovec *,unsigned long); static struct iovec * -get_iovec32 (struct iovec32 *iov32, struct iovec *iov_buf, u32 count, int type) +get_compat_iovec (struct compat_iovec *iov32, struct iovec *iov_buf, u32 count, int type) { int i; u32 buf, len; @@ -939,7 +938,7 @@ if (!count) return 0; - if (verify_area(VERIFY_READ, iov32, sizeof(struct iovec32)*count)) + if (verify_area(VERIFY_READ, iov32, sizeof(struct compat_iovec)*count)) return NULL; if (count > UIO_MAXIOV) return NULL; @@ -971,14 +970,14 @@ } asmlinkage long -sys32_readv (int fd, struct iovec32 *vector, u32 count) +sys32_readv (int fd, struct compat_iovec *vector, u32 count) { struct iovec iovstack[UIO_FASTIOV]; struct iovec *iov; long ret; mm_segment_t old_fs = get_fs(); - iov = get_iovec32(vector, iovstack, count, VERIFY_WRITE); + iov = get_compat_iovec(vector, iovstack, count, VERIFY_WRITE); if (!iov) return -EFAULT; set_fs(KERNEL_DS); @@ -990,14 +989,14 @@ } asmlinkage long -sys32_writev (int fd, struct iovec32 *vector, u32 count) +sys32_writev (int fd, struct compat_iovec *vector, u32 count) { struct iovec iovstack[UIO_FASTIOV]; struct iovec *iov; long ret; mm_segment_t old_fs = get_fs(); - iov = get_iovec32(vector, iovstack, count, VERIFY_READ); + iov = get_compat_iovec(vector, iovstack, count, VERIFY_READ); if (!iov) return -EFAULT; set_fs(KERNEL_DS); @@ -1080,701 +1079,6 @@ } /* - * Declare the IA32 version of the msghdr - */ - -struct msghdr32 { - unsigned int msg_name; /* Socket name */ - int msg_namelen; /* Length of name */ - unsigned int msg_iov; /* Data blocks */ - unsigned int msg_iovlen; /* Number of blocks */ - unsigned int msg_control; /* Per protocol magic (eg BSD file descriptor passing) */ - unsigned int msg_controllen; /* Length of cmsg list */ - unsigned msg_flags; -}; - -struct cmsghdr32 { - compat_size_t cmsg_len; - int cmsg_level; - int cmsg_type; -}; - -/* Bleech... */ -#define __CMSG32_NXTHDR(ctl, len, cmsg, cmsglen) __cmsg32_nxthdr((ctl),(len),(cmsg),(cmsglen)) -#define CMSG32_NXTHDR(mhdr, cmsg, cmsglen) cmsg32_nxthdr((mhdr), (cmsg), (cmsglen)) -#define CMSG32_ALIGN(len) ( ((len)+sizeof(int)-1) & ~(sizeof(int)-1) ) -#define CMSG32_DATA(cmsg) \ - ((void *)((char *)(cmsg) + CMSG32_ALIGN(sizeof(struct cmsghdr32)))) -#define CMSG32_SPACE(len) \ - (CMSG32_ALIGN(sizeof(struct cmsghdr32)) + CMSG32_ALIGN(len)) -#define CMSG32_LEN(len) (CMSG32_ALIGN(sizeof(struct cmsghdr32)) + (len)) -#define __CMSG32_FIRSTHDR(ctl,len) \ - ((len) >= sizeof(struct cmsghdr32) ? (struct cmsghdr32 *)(ctl) : (struct cmsghdr32 *)NULL) -#define CMSG32_FIRSTHDR(msg) __CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen) - -static inline struct cmsghdr32 * -__cmsg32_nxthdr (void *ctl, __kernel_size_t size, struct cmsghdr32 *cmsg, int cmsg_len) -{ - struct cmsghdr32 * ptr; - - ptr = (struct cmsghdr32 *)(((unsigned char *) cmsg) + CMSG32_ALIGN(cmsg_len)); - if ((unsigned long)((char*)(ptr+1) - (char *) ctl) > size) - return NULL; - return ptr; -} - -static inline struct cmsghdr32 * -cmsg32_nxthdr (struct msghdr *msg, struct cmsghdr32 *cmsg, int cmsg_len) -{ - return __cmsg32_nxthdr(msg->msg_control, msg->msg_controllen, cmsg, cmsg_len); -} - -static inline int -get_msghdr32 (struct msghdr *mp, struct msghdr32 *mp32) -{ - int ret; - unsigned int i; - - if (!access_ok(VERIFY_READ, mp32, sizeof(*mp32))) - return -EFAULT; - ret = __get_user(i, &mp32->msg_name); - mp->msg_name = (void *)A(i); - ret |= __get_user(mp->msg_namelen, &mp32->msg_namelen); - ret |= __get_user(i, &mp32->msg_iov); - mp->msg_iov = (struct iovec *)A(i); - ret |= __get_user(mp->msg_iovlen, &mp32->msg_iovlen); - ret |= __get_user(i, &mp32->msg_control); - mp->msg_control = (void *)A(i); - ret |= __get_user(mp->msg_controllen, &mp32->msg_controllen); - ret |= __get_user(mp->msg_flags, &mp32->msg_flags); - return ret ? -EFAULT : 0; -} - -/* - * There is a lot of hair here because the alignment rules (and thus placement) of cmsg - * headers and length are different for 32-bit apps. -DaveM - */ -static int -get_cmsghdr32 (struct msghdr *kmsg, unsigned char *stackbuf, struct sock *sk, size_t *bufsize) -{ - struct cmsghdr *kcmsg, *kcmsg_base; - __kernel_size_t kcmlen, tmp; - compat_size_t ucmlen; - struct cmsghdr32 *ucmsg; - long err; - - kcmlen = 0; - kcmsg_base = kcmsg = (struct cmsghdr *)stackbuf; - ucmsg = CMSG32_FIRSTHDR(kmsg); - while (ucmsg != NULL) { - if (get_user(ucmlen, &ucmsg->cmsg_len)) - return -EFAULT; - - /* Catch bogons. */ - if (CMSG32_ALIGN(ucmlen) < CMSG32_ALIGN(sizeof(struct cmsghdr32))) - return -EINVAL; - if ((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control) + ucmlen) - > kmsg->msg_controllen) - return -EINVAL; - - tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) + - CMSG_ALIGN(sizeof(struct cmsghdr))); - kcmlen += tmp; - ucmsg = CMSG32_NXTHDR(kmsg, ucmsg, ucmlen); - } - if (kcmlen == 0) - return -EINVAL; - - /* - * The kcmlen holds the 64-bit version of the control length. It may not be - * modified as we do not stick it into the kmsg until we have successfully copied - * over all of the data from the user. - */ - if (kcmlen > *bufsize) { - *bufsize = kcmlen; - kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL); - } - if (kcmsg == NULL) - return -ENOBUFS; - - /* Now copy them over neatly. */ - memset(kcmsg, 0, kcmlen); - ucmsg = CMSG32_FIRSTHDR(kmsg); - while (ucmsg != NULL) { - err = get_user(ucmlen, &ucmsg->cmsg_len); - tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) + - CMSG_ALIGN(sizeof(struct cmsghdr))); - kcmsg->cmsg_len = tmp; - err |= get_user(kcmsg->cmsg_level, &ucmsg->cmsg_level); - err |= get_user(kcmsg->cmsg_type, &ucmsg->cmsg_type); - - /* Copy over the data. */ - err |= copy_from_user(CMSG_DATA(kcmsg), CMSG32_DATA(ucmsg), - (ucmlen - CMSG32_ALIGN(sizeof(*ucmsg)))); - if (err) - goto out_free_efault; - - /* Advance. */ - kcmsg = (struct cmsghdr *)((char *)kcmsg + CMSG_ALIGN(tmp)); - ucmsg = CMSG32_NXTHDR(kmsg, ucmsg, ucmlen); - } - - /* Ok, looks like we made it. Hook it up and return success. */ - kmsg->msg_control = kcmsg_base; - kmsg->msg_controllen = kcmlen; - return 0; - -out_free_efault: - if (kcmsg_base != (struct cmsghdr *)stackbuf) - sock_kfree_s(sk, kcmsg_base, kcmlen); - return -EFAULT; -} - -/* - * Verify & re-shape IA32 iovec. The caller must ensure that the - * iovec is big enough to hold the re-shaped message iovec. - * - * Save time not doing verify_area. copy_*_user will make this work - * in any case. - * - * Don't need to check the total size for overflow (cf net/core/iovec.c), - * 32-bit sizes can't overflow a 64-bit count. - */ - -static inline int -verify_iovec32 (struct msghdr *m, struct iovec *iov, char *address, int mode) -{ - int size, err, ct; - struct iovec32 *iov32; - - if (m->msg_namelen) { - if (mode == VERIFY_READ) { - err = move_addr_to_kernel(m->msg_name, m->msg_namelen, address); - if (err < 0) - goto out; - } - m->msg_name = address; - } else - m->msg_name = NULL; - - err = -EFAULT; - size = m->msg_iovlen * sizeof(struct iovec32); - if (copy_from_user(iov, m->msg_iov, size)) - goto out; - m->msg_iov = iov; - - err = 0; - iov32 = (struct iovec32 *)iov; - for (ct = m->msg_iovlen; ct-- > 0; ) { - iov[ct].iov_len = (__kernel_size_t)iov32[ct].iov_len; - iov[ct].iov_base = (void *) A(iov32[ct].iov_base); - err += iov[ct].iov_len; - } -out: - return err; -} - -static void -put_cmsg32(struct msghdr *kmsg, int level, int type, int len, void *data) -{ - struct cmsghdr32 *cm = (struct cmsghdr32 *) kmsg->msg_control; - struct cmsghdr32 cmhdr; - int cmlen = CMSG32_LEN(len); - - if(cm == NULL || kmsg->msg_controllen < sizeof(*cm)) { - kmsg->msg_flags |= MSG_CTRUNC; - return; - } - - if(kmsg->msg_controllen < cmlen) { - kmsg->msg_flags |= MSG_CTRUNC; - cmlen = kmsg->msg_controllen; - } - cmhdr.cmsg_level = level; - cmhdr.cmsg_type = type; - cmhdr.cmsg_len = cmlen; - - if(copy_to_user(cm, &cmhdr, sizeof cmhdr)) - return; - if(copy_to_user(CMSG32_DATA(cm), data, - cmlen - sizeof(struct cmsghdr32))) - return; - cmlen = CMSG32_SPACE(len); - kmsg->msg_control += cmlen; - kmsg->msg_controllen -= cmlen; -} - -static void -scm_detach_fds32 (struct msghdr *kmsg, struct scm_cookie *scm) -{ - struct cmsghdr32 *cm = (struct cmsghdr32 *) kmsg->msg_control; - int fdmax = (kmsg->msg_controllen - sizeof(struct cmsghdr32)) - / sizeof(int); - int fdnum = scm->fp->count; - struct file **fp = scm->fp->fp; - int *cmfptr; - int err = 0, i; - - if (fdnum < fdmax) - fdmax = fdnum; - - for (i = 0, cmfptr = (int *) CMSG32_DATA(cm); - i < fdmax; - i++, cmfptr++) { - int new_fd; - err = get_unused_fd(); - if (err < 0) - break; - new_fd = err; - err = put_user(new_fd, cmfptr); - if (err) { - put_unused_fd(new_fd); - break; - } - /* Bump the usage count and install the file. */ - get_file(fp[i]); - current->files->fd[new_fd] = fp[i]; - } - - if (i > 0) { - int cmlen = CMSG32_LEN(i * sizeof(int)); - if (!err) - err = put_user(SOL_SOCKET, &cm->cmsg_level); - if (!err) - err = put_user(SCM_RIGHTS, &cm->cmsg_type); - if (!err) - err = put_user(cmlen, &cm->cmsg_len); - if (!err) { - cmlen = CMSG32_SPACE(i * sizeof(int)); - kmsg->msg_control += cmlen; - kmsg->msg_controllen -= cmlen; - } - } - if (i < fdnum) - kmsg->msg_flags |= MSG_CTRUNC; - - /* - * All of the files that fit in the message have had their - * usage counts incremented, so we just free the list. - */ - __scm_destroy(scm); -} - -/* - * In these cases we (currently) can just copy to data over verbatim because all CMSGs - * created by the kernel have well defined types which have the same layout in both the - * 32-bit and 64-bit API. One must add some special cased conversions here if we start - * sending control messages with incompatible types. - * - * SCM_RIGHTS and SCM_CREDENTIALS are done by hand in recvmsg32 right after - * we do our work. The remaining cases are: - * - * SOL_IP IP_PKTINFO struct in_pktinfo 32-bit clean - * IP_TTL int 32-bit clean - * IP_TOS __u8 32-bit clean - * IP_RECVOPTS variable length 32-bit clean - * IP_RETOPTS variable length 32-bit clean - * (these last two are clean because the types are defined - * by the IPv4 protocol) - * IP_RECVERR struct sock_extended_err + - * struct sockaddr_in 32-bit clean - * SOL_IPV6 IPV6_RECVERR struct sock_extended_err + - * struct sockaddr_in6 32-bit clean - * IPV6_PKTINFO struct in6_pktinfo 32-bit clean - * IPV6_HOPLIMIT int 32-bit clean - * IPV6_FLOWINFO u32 32-bit clean - * IPV6_HOPOPTS ipv6 hop exthdr 32-bit clean - * IPV6_DSTOPTS ipv6 dst exthdr(s) 32-bit clean - * IPV6_RTHDR ipv6 routing exthdr 32-bit clean - * IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean - */ -static void -cmsg32_recvmsg_fixup (struct msghdr *kmsg, unsigned long orig_cmsg_uptr) -{ - unsigned char *workbuf, *wp; - unsigned long bufsz, space_avail; - struct cmsghdr *ucmsg; - long err; - - bufsz = ((unsigned long)kmsg->msg_control) - orig_cmsg_uptr; - space_avail = kmsg->msg_controllen + bufsz; - wp = workbuf = kmalloc(bufsz, GFP_KERNEL); - if (workbuf == NULL) - goto fail; - - /* To make this more sane we assume the kernel sends back properly - * formatted control messages. Because of how the kernel will truncate - * the cmsg_len for MSG_TRUNC cases, we need not check that case either. - */ - ucmsg = (struct cmsghdr *) orig_cmsg_uptr; - while (((unsigned long)ucmsg) < ((unsigned long)kmsg->msg_control)) { - struct cmsghdr32 *kcmsg32 = (struct cmsghdr32 *) wp; - int clen64, clen32; - - /* - * UCMSG is the 64-bit format CMSG entry in user-space. KCMSG32 is within - * the kernel space temporary buffer we use to convert into a 32-bit style - * CMSG. - */ - err = get_user(kcmsg32->cmsg_len, &ucmsg->cmsg_len); - err |= get_user(kcmsg32->cmsg_level, &ucmsg->cmsg_level); - err |= get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type); - if (err) - goto fail2; - - clen64 = kcmsg32->cmsg_len; - copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg), - clen64 - CMSG_ALIGN(sizeof(*ucmsg))); - clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) + - CMSG32_ALIGN(sizeof(struct cmsghdr32))); - kcmsg32->cmsg_len = clen32; - - ucmsg = (struct cmsghdr *) (((char *)ucmsg) + CMSG_ALIGN(clen64)); - wp = (((char *)kcmsg32) + CMSG32_ALIGN(clen32)); - } - - /* Copy back fixed up data, and adjust pointers. */ - bufsz = (wp - workbuf); - if (copy_to_user((void *)orig_cmsg_uptr, workbuf, bufsz)) - goto fail2; - - kmsg->msg_control = (struct cmsghdr *) (((char *)orig_cmsg_uptr) + bufsz); - kmsg->msg_controllen = space_avail - bufsz; - kfree(workbuf); - return; - - fail2: - kfree(workbuf); - fail: - /* - * If we leave the 64-bit format CMSG chunks in there, the application could get - * confused and crash. So to ensure greater recovery, we report no CMSGs. - */ - kmsg->msg_controllen += bufsz; - kmsg->msg_control = (void *) orig_cmsg_uptr; -} - -/* XXX This really belongs in some header file... -DaveM */ -#define MAX_SOCK_ADDR 128 /* 108 for Unix domain - - 16 for IP, 16 for IPX, - 24 for IPv6, - about 80 for AX.25 */ -/* - * BSD sendmsg interface - */ - -int -sys32_sendmsg (int fd, struct msghdr32 *msg, unsigned flags) -{ - struct socket *sock; - char address[MAX_SOCK_ADDR]; - struct iovec iovstack[UIO_FASTIOV], *iov = iovstack; - unsigned char ctl[sizeof(struct cmsghdr) + 20]; /* 20 is size of ipv6_pktinfo */ - unsigned char *ctl_buf = ctl; - struct msghdr msg_sys; - int err, iov_size, total_len; - size_t ctl_len; - - err = -EFAULT; - if (get_msghdr32(&msg_sys, msg)) - goto out; - - sock = sockfd_lookup(fd, &err); - if (!sock) - goto out; - - /* do not move before msg_sys is valid */ - err = -EINVAL; - if (msg_sys.msg_iovlen > UIO_MAXIOV) - goto out_put; - - /* Check whether to allocate the iovec area*/ - err = -ENOMEM; - iov_size = msg_sys.msg_iovlen * sizeof(struct iovec32); - if (msg_sys.msg_iovlen > UIO_FASTIOV) { - iov = sock_kmalloc(sock->sk, iov_size, GFP_KERNEL); - if (!iov) - goto out_put; - } - - /* This will also move the address data into kernel space */ - err = verify_iovec32(&msg_sys, iov, address, VERIFY_READ); - if (err < 0) - goto out_freeiov; - total_len = err; - - err = -ENOBUFS; - - if (msg_sys.msg_controllen > INT_MAX) - goto out_freeiov; - if (msg_sys.msg_controllen) { - ctl_len = sizeof(ctl); - err = get_cmsghdr32(&msg_sys, ctl_buf, sock->sk, &ctl_len); - if (err) - goto out_freeiov; - ctl_buf = msg_sys.msg_control; - } - msg_sys.msg_flags = flags; - - if (sock->file->f_flags & O_NONBLOCK) - msg_sys.msg_flags |= MSG_DONTWAIT; - err = sock_sendmsg(sock, &msg_sys, total_len); - - if (ctl_buf != ctl) - sock_kfree_s(sock->sk, ctl_buf, ctl_len); -out_freeiov: - if (iov != iovstack) - sock_kfree_s(sock->sk, iov, iov_size); -out_put: - sockfd_put(sock); -out: - return err; -} - -/* - * BSD recvmsg interface - */ - -int -sys32_recvmsg (int fd, struct msghdr32 *msg, unsigned int flags) -{ - struct socket *sock; - struct iovec iovstack[UIO_FASTIOV]; - struct iovec *iov=iovstack; - struct msghdr msg_sys; - unsigned long cmsg_ptr; - int err, iov_size, total_len, len; - - /* kernel mode address */ - char addr[MAX_SOCK_ADDR]; - - /* user mode address pointers */ - struct sockaddr *uaddr; - int *uaddr_len; - - err = -EFAULT; - if (get_msghdr32(&msg_sys, msg)) - goto out; - - sock = sockfd_lookup(fd, &err); - if (!sock) - goto out; - - err = -EINVAL; - if (msg_sys.msg_iovlen > UIO_MAXIOV) - goto out_put; - - /* Check whether to allocate the iovec area*/ - err = -ENOMEM; - iov_size = msg_sys.msg_iovlen * sizeof(struct iovec); - if (msg_sys.msg_iovlen > UIO_FASTIOV) { - iov = sock_kmalloc(sock->sk, iov_size, GFP_KERNEL); - if (!iov) - goto out_put; - } - - /* - * Save the user-mode address (verify_iovec will change the - * kernel msghdr to use the kernel address space) - */ - - uaddr = msg_sys.msg_name; - uaddr_len = &msg->msg_namelen; - err = verify_iovec32(&msg_sys, iov, addr, VERIFY_WRITE); - if (err < 0) - goto out_freeiov; - total_len=err; - - cmsg_ptr = (unsigned long)msg_sys.msg_control; - msg_sys.msg_flags = 0; - - if (sock->file->f_flags & O_NONBLOCK) - flags |= MSG_DONTWAIT; - - /* XXX This code needs massive updating... -DaveM */ - lock_kernel(); - { - struct sock_iocb *si; - struct kiocb iocb; - - init_sync_kiocb(&iocb, NULL); - si = kiocb_to_siocb(&iocb); - si->sock = sock; - si->scm = &si->async_scm; - si->msg = &msg_sys; - si->size = total_len; - si->flags = flags; - memset(si->scm, 0, sizeof(*si->scm)); - - err = sock->ops->recvmsg(&iocb, sock, &msg_sys, total_len, - flags, si->scm); - if (-EIOCBQUEUED == err) - err = wait_on_sync_kiocb(&iocb); - - if (err < 0) - goto out_unlock_freeiov; - - len = err; - if (!msg_sys.msg_control) { - if (sock->passcred || si->scm->fp) - msg_sys.msg_flags |= MSG_CTRUNC; - if (si->scm->fp) - __scm_destroy(si->scm); - } else { - /* - * If recvmsg processing itself placed some control messages into - * user space, it's is using 64-bit CMSG processing, so we need to - * fix it up before we tack on more stuff. - */ - if ((unsigned long) msg_sys.msg_control != cmsg_ptr) - cmsg32_recvmsg_fixup(&msg_sys, cmsg_ptr); - - /* Wheee... */ - if (sock->passcred) - put_cmsg32(&msg_sys, SOL_SOCKET, SCM_CREDENTIALS, - sizeof(si->scm->creds), - &si->scm->creds); - if (si->scm->fp != NULL) - scm_detach_fds32(&msg_sys, si->scm); - } - } - unlock_kernel(); - - if (uaddr != NULL) { - err = move_addr_to_user(addr, msg_sys.msg_namelen, uaddr, uaddr_len); - if (err < 0) - goto out_freeiov; - } - err = __put_user(msg_sys.msg_flags, &msg->msg_flags); - if (err) - goto out_freeiov; - err = __put_user((unsigned long)msg_sys.msg_control-cmsg_ptr, - &msg->msg_controllen); - if (err) - goto out_freeiov; - err = len; - - out_freeiov: - if (iov != iovstack) - sock_kfree_s(sock->sk, iov, iov_size); - out_put: - sockfd_put(sock); - out: - return err; - - out_unlock_freeiov: - goto out_freeiov; -} - -/* Argument list sizes for sys_socketcall */ -#define AL(x) ((x) * sizeof(u32)) -static const unsigned char nas[18]={AL(0),AL(3),AL(3),AL(3),AL(2),AL(3), - AL(3),AL(3),AL(4),AL(4),AL(4),AL(6), - AL(6),AL(2),AL(5),AL(5),AL(3),AL(3)}; -#undef AL - -extern asmlinkage long sys_bind(int fd, struct sockaddr *umyaddr, int addrlen); -extern asmlinkage long sys_connect(int fd, struct sockaddr *uservaddr, - int addrlen); -extern asmlinkage long sys_accept(int fd, struct sockaddr *upeer_sockaddr, - int *upeer_addrlen); -extern asmlinkage long sys_getsockname(int fd, struct sockaddr *usockaddr, - int *usockaddr_len); -extern asmlinkage long sys_getpeername(int fd, struct sockaddr *usockaddr, - int *usockaddr_len); -extern asmlinkage long sys_send(int fd, void *buff, size_t len, unsigned flags); -extern asmlinkage long sys_sendto(int fd, u32 buff, compat_size_t len, - unsigned flags, u32 addr, int addr_len); -extern asmlinkage long sys_recv(int fd, void *ubuf, size_t size, unsigned flags); -extern asmlinkage long sys_recvfrom(int fd, u32 ubuf, compat_size_t size, - unsigned flags, u32 addr, u32 addr_len); -extern asmlinkage long sys_setsockopt(int fd, int level, int optname, - char *optval, int optlen); -extern asmlinkage long sys_getsockopt(int fd, int level, int optname, - u32 optval, u32 optlen); - -extern asmlinkage long sys_socket(int family, int type, int protocol); -extern asmlinkage long sys_socketpair(int family, int type, int protocol, - int usockvec[2]); -extern asmlinkage long sys_shutdown(int fd, int how); -extern asmlinkage long sys_listen(int fd, int backlog); - -asmlinkage long -sys32_socketcall (int call, u32 *args) -{ - int ret; - u32 a[6]; - u32 a0,a1; - - if (callSYS_RECVMSG) - return -EINVAL; - if (copy_from_user(a, args, nas[call])) - return -EFAULT; - a0=a[0]; - a1=a[1]; - - switch(call) - { - case SYS_SOCKET: - ret = sys_socket(a0, a1, a[2]); - break; - case SYS_BIND: - ret = sys_bind(a0, (struct sockaddr *)A(a1), a[2]); - break; - case SYS_CONNECT: - ret = sys_connect(a0, (struct sockaddr *)A(a1), a[2]); - break; - case SYS_LISTEN: - ret = sys_listen(a0, a1); - break; - case SYS_ACCEPT: - ret = sys_accept(a0, (struct sockaddr *)A(a1), (int *)A(a[2])); - break; - case SYS_GETSOCKNAME: - ret = sys_getsockname(a0, (struct sockaddr *)A(a1), (int *)A(a[2])); - break; - case SYS_GETPEERNAME: - ret = sys_getpeername(a0, (struct sockaddr *)A(a1), (int *)A(a[2])); - break; - case SYS_SOCKETPAIR: - ret = sys_socketpair(a0, a1, a[2], (int *)A(a[3])); - break; - case SYS_SEND: - ret = sys_send(a0, (void *)A(a1), a[2], a[3]); - break; - case SYS_SENDTO: - ret = sys_sendto(a0, a1, a[2], a[3], a[4], a[5]); - break; - case SYS_RECV: - ret = sys_recv(a0, (void *)A(a1), a[2], a[3]); - break; - case SYS_RECVFROM: - ret = sys_recvfrom(a0, a1, a[2], a[3], a[4], a[5]); - break; - case SYS_SHUTDOWN: - ret = sys_shutdown(a0,a1); - break; - case SYS_SETSOCKOPT: - ret = sys_setsockopt(a0, a1, a[2], (char *)A(a[3]), - a[4]); - break; - case SYS_GETSOCKOPT: - ret = sys_getsockopt(a0, a1, a[2], a[3], a[4]); - break; - case SYS_SENDMSG: - ret = sys32_sendmsg(a0, (struct msghdr32 *) A(a1), a[2]); - break; - case SYS_RECVMSG: - ret = sys32_recvmsg(a0, (struct msghdr32 *) A(a1), a[2]); - break; - default: - ret = EINVAL; - break; - } - return ret; -} - -/* * sys32_ipc() is the de-multiplexer for the SysV IPC calls in 32bit emulation.. * * This is really horribly ugly. @@ -3151,6 +2455,7 @@ asmlinkage long sys32_sysctl (struct sysctl32 *args) { +#ifdef CONFIG_SYSCTL struct sysctl32 a32; mm_segment_t old_fs = get_fs (); void *oldvalp, *newvalp; @@ -3188,6 +2493,9 @@ return -EFAULT; return ret; +#else + return -ENOSYS; +#endif } asmlinkage long @@ -3433,8 +2741,12 @@ u32 bufferram; u32 totalswap; u32 freeswap; - unsigned short procs; - char _f[22]; + u16 procs; + u16 pad; + u32 totalhigh; + u32 freehigh; + u32 mem_unit; + char _f[8]; }; asmlinkage long @@ -3463,6 +2775,9 @@ err |= __put_user(s.totalswap, &info->totalswap); err |= __put_user(s.freeswap, &info->freeswap); err |= __put_user(s.procs, &info->procs); + err |= __put_user (s.totalhigh, &info->totalhigh); + err |= __put_user (s.freehigh, &info->freehigh); + err |= __put_user (s.mem_unit, &info->mem_unit); if (err) return -EFAULT; return ret; diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/acpi.c Tue Mar 11 22:06:17 2003 @@ -55,6 +55,7 @@ asm (".weak iosapic_override_isa_irq"); asm (".weak iosapic_register_platform_intr"); asm (".weak iosapic_init"); +asm (".weak iosapic_system_init"); asm (".weak iosapic_version"); void (*pm_idle) (void); @@ -182,7 +183,9 @@ #define ACPI_MAX_PLATFORM_INTERRUPTS 256 /* Array to record platform interrupt vectors for generic interrupt routing. */ -int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = { [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1 }; +int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = { + [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1 +}; enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_IOSAPIC; @@ -291,40 +294,6 @@ static int __init -acpi_find_iosapic (unsigned int gsi, u32 *gsi_base, char **iosapic_address) -{ - struct acpi_table_iosapic *iosapic; - int ver; - int max_pin; - char *p; - char *end; - - if (!gsi_base || !iosapic_address) - return -ENODEV; - - p = (char *) (acpi_madt + 1); - end = p + (acpi_madt->header.length - sizeof(struct acpi_table_madt)); - - while (p < end) { - if (*p == ACPI_MADT_IOSAPIC) { - iosapic = (struct acpi_table_iosapic *) p; - - *gsi_base = iosapic->global_irq_base; - *iosapic_address = ioremap(iosapic->address, 0); - - ver = iosapic_version(*iosapic_address); - max_pin = (ver >> 16) & 0xff; - - if ((gsi - *gsi_base) <= max_pin) - return 0; /* Found it! */ - } - p += p[1]; - } - return -ENODEV; -} - - -static int __init acpi_parse_iosapic (acpi_table_entry_header *header) { struct acpi_table_iosapic *iosapic; @@ -335,16 +304,9 @@ acpi_table_print_madt_entry(header); - if (iosapic_init) { -#ifndef CONFIG_ITANIUM - /* PCAT_COMPAT flag indicates dual-8259 setup */ - iosapic_init(iosapic->address, iosapic->global_irq_base, - acpi_madt->flags.pcat_compat); -#else - /* Firmware on old Itanium systems is broken */ - iosapic_init(iosapic->address, iosapic->global_irq_base, 1); -#endif - } + if (iosapic_init) + iosapic_init(iosapic->address, iosapic->global_irq_base); + return 0; } @@ -354,8 +316,6 @@ { struct acpi_table_plat_int_src *plintsrc; int vector; - u32 gsi_base; - char *iosapic_address; plintsrc = (struct acpi_table_plat_int_src *) header; if (!plintsrc) @@ -368,11 +328,6 @@ return -ENODEV; } - if (acpi_find_iosapic(plintsrc->global_irq, &gsi_base, &iosapic_address)) { - printk(KERN_WARNING PREFIX "IOSAPIC not found\n"); - return -ENODEV; - } - /* * Get vector assignment for this interrupt, set attributes, * and program the IOSAPIC routing table. @@ -382,10 +337,8 @@ plintsrc->iosapic_vector, plintsrc->eid, plintsrc->id, - (plintsrc->flags.polarity == 1) ? 1 : 0, - (plintsrc->flags.trigger == 1) ? 1 : 0, - gsi_base, - iosapic_address); + (plintsrc->flags.polarity == 1) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, + (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); platform_intr_list[plintsrc->type] = vector; return 0; @@ -408,8 +361,8 @@ return 0; iosapic_override_isa_irq(p->bus_irq, p->global_irq, - (p->flags.polarity == 1) ? 1 : 0, - (p->flags.trigger == 1) ? 1 : 0); + (p->flags.polarity == 1) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, + (p->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); return 0; } @@ -439,7 +392,13 @@ acpi_madt = (struct acpi_table_madt *) __va(phys_addr); /* remember the value for reference after free_initmem() */ +#ifdef CONFIG_ITANIUM + has_8259 = 1; /* Firmware on old Itanium systems is broken */ +#else has_8259 = acpi_madt->flags.pcat_compat; +#endif + if (iosapic_system_init) + iosapic_system_init(has_8259); /* Get base address of IPI Message Block */ @@ -571,7 +530,7 @@ } void __init -acpi_numa_arch_fixup(void) +acpi_numa_arch_fixup (void) { int i, j, node_from, node_to; @@ -618,7 +577,7 @@ if (!pxm_bit_test(j)) continue; node_to = pxm_to_nid_map[j]; - node_distance(node_from, node_to) = + node_distance(node_from, node_to) = slit_table->entry[i*slit_table->localities + j]; } } @@ -639,8 +598,7 @@ { struct acpi_table_header *fadt_header; struct fadt_descriptor_rev2 *fadt; - u32 sci_irq, gsi_base; - char *iosapic_address; + u32 sci_irq; if (!phys_addr || !size) return -EINVAL; @@ -662,8 +620,7 @@ if (has_8259 && sci_irq < 16) return 0; /* legacy, no setup required */ - if (!acpi_find_iosapic(sci_irq, &gsi_base, &iosapic_address)) - iosapic_register_intr(sci_irq, 0, 0, gsi_base, iosapic_address); + iosapic_register_intr(sci_irq, IOSAPIC_POL_LOW, IOSAPIC_LEVEL); return 0; } @@ -717,8 +674,6 @@ if ((spcr->base_addr.space_id != ACPI_SERIAL_PCICONF_SPACE) && (spcr->int_type == ACPI_SERIAL_INT_SAPIC)) { - u32 gsi_base; - char *iosapic_address; int vector; /* We have a UART in memory space with an SAPIC interrupt */ @@ -728,11 +683,7 @@ (spcr->global_int[1] << 8) | (spcr->global_int[0]) ); - /* Which iosapic does this interrupt belong to? */ - - if (!acpi_find_iosapic(gsi, &gsi_base, &iosapic_address)) - vector = iosapic_register_intr(gsi, 1, 1, - gsi_base, iosapic_address); + vector = iosapic_register_intr(gsi, IOSAPIC_POL_HIGH, IOSAPIC_EDGE); } return 0; } @@ -741,7 +692,7 @@ int __init -acpi_boot_init (char *cmdline) +acpi_boot_init (void) { /* @@ -812,20 +763,20 @@ smp_boot_data.cpu_count = total_cpus; smp_build_cpu_map(); -#ifdef CONFIG_NUMA +# ifdef CONFIG_NUMA build_cpu_to_node_map(); -#endif +# endif #endif /* Make boot-up look pretty */ printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, total_cpus); return 0; } +/* + * PCI Interrupt Routing + */ -/* -------------------------------------------------------------------------- - PCI Interrupt Routing - -------------------------------------------------------------------------- */ - +#ifdef CONFIG_PCI int __init acpi_get_prt (struct pci_vector_struct **vectors, int *count) { @@ -866,6 +817,7 @@ *count = acpi_prt.count; return 0; } +#endif /* CONFIG_PCI */ /* Assume IA64 always use I/O SAPIC */ @@ -888,12 +840,10 @@ return gsi_to_vector(irq); } -int __init +int acpi_register_irq (u32 gsi, u32 polarity, u32 trigger) { int vector = 0; - u32 irq_base; - char *iosapic_address; if (acpi_madt->flags.pcat_compat && (gsi < 16)) return isa_irq_to_vector(gsi); @@ -901,12 +851,9 @@ if (!iosapic_register_intr) return 0; - /* Find the IOSAPIC */ - if (!acpi_find_iosapic(gsi, &irq_base, &iosapic_address)) { - /* Turn it on */ - vector = iosapic_register_intr (gsi, polarity, trigger, - irq_base, iosapic_address); - } + /* Turn it on */ + vector = iosapic_register_intr (gsi, polarity ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, + trigger ? IOSAPIC_EDGE : IOSAPIC_LEVEL); return vector; } diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S --- a/arch/ia64/kernel/entry.S Tue Mar 11 22:06:16 2003 +++ b/arch/ia64/kernel/entry.S Tue Mar 11 22:06:16 2003 @@ -586,10 +586,21 @@ // work.need_resched etc. mustn't get changed by this CPU before it returns to // user- or fsys-mode: (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk +#ifdef CONFIG_PREEMPT + rsm psr.i // disable interrupts + adds r17=TI_FLAGS+IA64_TASK_SIZE,r13 +(pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 + ;; +(pKStk) ld4 r21=[r20] // preempt_count ->r21 + ;; +(pKStk) cmp4.eq p6,p0=r21,r0 // p6 <- preempt_count == 0 + ;; +#else /* CONFIG_PREEMPT */ (pUStk) rsm psr.i ;; (pUStk) adds r17=TI_FLAGS+IA64_TASK_SIZE,r13 ;; +#endif /* CONFIG_PREEMPT */ .work_processed: (p6) ld4 r18=[r17] // load current_thread_info()->flags adds r2=PT(R8)+16,r12 @@ -701,7 +712,7 @@ * NOTE: alloc, loadrs, and cover can't be predicated. */ (pNonSys) br.cond.dpnt dont_preserve_current_frame - cover // add current frame into dirty partition + cover // add current frame into dirty partition and set cr.ifs ;; mov r19=ar.bsp // get new backing store pointer sub r16=r16,r18 // krbs = old bsp - size of dirty partition @@ -727,7 +738,7 @@ # define Nregs 14 #endif alloc loc0=ar.pfs,2,Nregs-2,2,0 - shr.u loc1=r18,9 // RNaTslots <= dirtySize / (64*8) + 1 + shr.u loc1=r18,9 // RNaTslots <= floor(dirtySize / (64*8)) sub r17=r17,r18 // r17 = (physStackedSize + 8) - dirtySize ;; mov ar.rsc=r19 // load ar.rsc to be used for "loadrs" @@ -774,13 +785,13 @@ ;; mov loc3=0 mov loc4=0 - mov loc9=0 mov loc5=0 mov loc6=0 + mov loc7=0 (pRecurse) br.call.sptk.many b6=rse_clear_invalid ;; - mov loc7=0 mov loc8=0 + mov loc9=0 cmp.ne pReturn,p0=r0,in1 // if recursion count != 0, we need to do a br.ret mov loc10=0 mov loc11=0 @@ -810,15 +821,27 @@ .work_pending: tbit.z p6,p0=r18,TIF_NEED_RESCHED // current_thread_info()->need_resched==0? (p6) br.cond.sptk.few .notify +#ifdef CONFIG_PREEMPT +(pKStk) dep r21=-1,r0,PREEMPT_ACTIVE_BIT,1 + ;; +(pKStk) st4 [r20]=r21 + ssm psr.i // enable interrupts +#endif + #if __GNUC__ < 3 br.call.spnt.many rp=invoke_schedule #else br.call.spnt.many rp=schedule #endif .ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 - rsm psr.i + rsm psr.i // disable interrupts ;; adds r17=TI_FLAGS+IA64_TASK_SIZE,r13 +#if CONFIG_PREEMPT +(pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 + ;; +(pKStk) st4 [r20]=r0 // preempt_count() <- 0 +#endif br.cond.sptk.many .work_processed // re-check .notify: @@ -904,13 +927,14 @@ mov r9=ar.unat mov loc0=rp // save return address mov out0=0 // there is no "oldset" - adds out1=0,sp // out1=&sigscratch + adds out1=8,sp // out1=&sigscratch->ar_pfs (pSys) mov out2=1 // out2==1 => we're in a syscall ;; (pNonSys) mov out2=0 // out2==0 => not a syscall .fframe 16 .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) st8 [sp]=r9,-16 // allocate space for ar.unat and save it + st8 [out1]=loc1,-8 // save ar.pfs, out1=&sigscratch .body br.call.sptk.many rp=do_notify_resume_user .ret15: .restore sp @@ -931,11 +955,12 @@ mov loc0=rp // save return address mov out0=in0 // mask mov out1=in1 // sigsetsize - adds out2=0,sp // out2=&sigscratch + adds out2=8,sp // out2=&sigscratch->ar_pfs ;; .fframe 16 .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) st8 [sp]=r9,-16 // allocate space for ar.unat and save it + st8 [out2]=loc1,-8 // save ar.pfs, out2=&sigscratch .body br.call.sptk.many rp=ia64_rt_sigsuspend .ret17: .restore sp @@ -1242,7 +1267,7 @@ data8 sys_sched_setaffinity data8 sys_sched_getaffinity data8 sys_set_tid_address - data8 ia64_ni_syscall + data8 sys_fadvise64 data8 ia64_ni_syscall // 1235 data8 sys_exit_group data8 sys_lookup_dcookie @@ -1256,15 +1281,15 @@ data8 sys_epoll_wait // 1245 data8 sys_restart_syscall data8 sys_semtimedop - data8 ia64_ni_syscall - data8 ia64_ni_syscall - data8 ia64_ni_syscall // 1250 - data8 ia64_ni_syscall - data8 ia64_ni_syscall - data8 ia64_ni_syscall - data8 ia64_ni_syscall - data8 ia64_ni_syscall // 1255 - data8 ia64_ni_syscall + data8 sys_timer_create + data8 sys_timer_settime + data8 sys_timer_gettime // 1250 + data8 sys_timer_getoverrun + data8 sys_timer_delete + data8 sys_clock_settime + data8 sys_clock_gettime + data8 sys_clock_getres // 1255 + data8 sys_clock_nanosleep data8 ia64_ni_syscall data8 ia64_ni_syscall data8 ia64_ni_syscall diff -Nru a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S --- a/arch/ia64/kernel/fsys.S Tue Mar 11 22:06:14 2003 +++ b/arch/ia64/kernel/fsys.S Tue Mar 11 22:06:14 2003 @@ -3,11 +3,16 @@ * * Copyright (C) 2003 Hewlett-Packard Co * David Mosberger-Tang + * + * 18-Feb-03 louisk Implement fsys_gettimeofday(). + * 28-Feb-03 davidm Fixed several bugs in fsys_gettimeofday(). Tuned it some more, + * probably broke it along the way... ;-) */ #include #include #include +#include #include /* @@ -123,6 +128,183 @@ br.ret.sptk.many b6 END(fsys_set_tid_address) +/* + * Note 1: This routine uses floating-point registers, but only with registers that + * operate on integers. Because of that, we don't need to set ar.fpsr to the + * kernel default value. + * + * Note 2: For now, we will assume that all CPUs run at the same clock-frequency. + * If that wasn't the case, we would have to disable preemption (e.g., + * by disabling interrupts) between reading the ITC and reading + * local_cpu_data->nsec_per_cyc. + * + * Note 3: On platforms where the ITC-drift bit is set in the SAL feature vector, + * we ought to either skip the ITC-based interpolation or run an ntp-like + * daemon to keep the ITCs from drifting too far apart. + */ +ENTRY(fsys_gettimeofday) + add r9=TI_FLAGS+IA64_TASK_SIZE,r16 + movl r3=THIS_CPU(cpu_info) + + mov.m r31=ar.itc // put time stamp into r31 (ITC) == now (35 cyc) + movl r19=xtime // xtime is a timespec struct + ;; + +#ifdef CONFIG_SMP + movl r10=__per_cpu_offset + ;; + ld8 r10=[r10] // r10 <- __per_cpu_offset[0] + movl r21=cpu_info__per_cpu + ;; + add r10=r21, r10 // r10 <- &cpu_data(time_keeper_id) +#else + mov r10=r3 +#endif + ld4 r9=[r9] + movl r17=xtime_lock + ;; + + // r32, r33 should contain the 2 args of gettimeofday + adds r21=IA64_CPUINFO_ITM_NEXT_OFFSET, r10 + mov r2=-1 + tnat.nz p6,p7=r32 // guard against NaT args + ;; + + adds r10=IA64_CPUINFO_ITM_DELTA_OFFSET, r10 +(p7) tnat.nz p6,p0=r33 +(p6) br.cond.spnt.few .fail + + adds r8=IA64_CPUINFO_NSEC_PER_CYC_OFFSET, r3 + movl r24=2361183241434822607 // for division hack (only for / 1000) + ;; + + ldf8 f7=[r10] // f7 now contains itm_delta + setf.sig f11=r2 + adds r10=8, r32 + + adds r20=IA64_TIMESPEC_TV_NSEC_OFFSET, r19 // r20 = &xtime->tv_nsec + movl r26=jiffies + + setf.sig f9=r24 // f9 is used for division hack + movl r27=wall_jiffies + + and r9=TIF_ALLWORK_MASK,r9 + movl r25=last_nsec_offset + ;; + + /* + * Verify that we have permission to write to struct timeval. Note: + * Another thread might unmap the mapping before we actually get + * to store the result. That's OK as long as the stores are also + * protect by EX(). + */ +EX(.fail, probe.w.fault r32, 3) // this must come _after_ NaT-check +EX(.fail, probe.w.fault r10, 3) // this must come _after_ NaT-check + nop 0 + + ldf8 f10=[r8] // f10 <- local_cpu_data->nsec_per_cyc value + cmp.ne p8, p0=0, r9 +(p8) br.spnt.many fsys_fallback_syscall + ;; +.retry: // *** seq = read_seqbegin(&xtime_lock); *** + ld4.acq r23=[r17] // since &xtime_lock == &xtime_lock->sequence + ld8 r14=[r25] // r14 (old) = last_nsec_offset + + ld8 r28=[r26] // r28 = jiffies + ld8 r29=[r27] // r29 = wall_jiffies + ;; + + ldf8 f8=[r21] // f8 now contains itm_next + sub r28=r29, r28, 1 // r28 now contains "-(lost + 1)" + tbit.nz p9, p10=r23, 0 // p9 <- is_odd(r23), p10 <- is_even(r23) + ;; + + ld8 r2=[r19] // r2 = sec = xtime.tv_sec + ld8 r29=[r20] // r29 = nsec = xtime.tv_nsec + + setf.sig f6=r28 // f6 <- -(lost + 1) (6 cyc) + ;; + + mf + xma.l f8=f6, f7, f8 // f8 (last_tick) <- -(lost + 1)*itm_delta + itm_next (5 cyc) + nop 0 + + setf.sig f12=r31 // f12 <- ITC (6 cyc) + // *** if (unlikely(read_seqretry(&xtime_lock, seq))) continue; *** + ld4 r24=[r17] // r24 = xtime_lock->sequence (re-read) + nop 0 + ;; + + mov r31=ar.itc // re-read ITC in case we .retry (35 cyc) + xma.l f8=f11, f8, f12 // f8 (elapsed_cycles) <- (-1*last_tick + now) = (now - last_tick) + nop 0 + ;; + + getf.sig r18=f8 // r18 <- (now - last_tick) + xmpy.l f8=f8, f10 // f8 <- elapsed_cycles*nsec_per_cyc (5 cyc) + add r3=r29, r14 // r3 = (nsec + old) + ;; + + cmp.lt p7, p8=r18, r0 // if now < last_tick, set p7 = 1, p8 = 0 + getf.sig r18=f8 // r18 = elapsed_cycles*nsec_per_cyc (6 cyc) + nop 0 + ;; + +(p10) cmp.ne p9, p0=r23, r24 // if xtime_lock->sequence != seq, set p9 + shr.u r18=r18, IA64_NSEC_PER_CYC_SHIFT // r18 <- offset +(p9) br.spnt.many .retry + ;; + + mov ar.ccv=r14 // ar.ccv = old (1 cyc) + cmp.leu p7, p8=r18, r14 // if (offset <= old), set p7 = 1, p8 = 0 + ;; + +(p8) cmpxchg8.rel r24=[r25], r18, ar.ccv // compare-and-exchange (atomic!) +(p8) add r3=r29, r18 // r3 = (nsec + offset) + ;; + shr.u r3=r3, 3 // initiate dividing r3 by 1000 + ;; + setf.sig f8=r3 // (6 cyc) + mov r10=1000000 // r10 = 1000000 + ;; +(p8) cmp.ne.unc p9, p0=r24, r14 + xmpy.hu f6=f8, f9 // (5 cyc) +(p9) br.spnt.many .retry + ;; + + getf.sig r3=f6 // (6 cyc) + ;; + shr.u r3=r3, 4 // end of division, r3 is divided by 1000 (=usec) + ;; + +1: cmp.geu p7, p0=r3, r10 // while (usec >= 1000000) + ;; +(p7) sub r3=r3, r10 // usec -= 1000000 +(p7) adds r2=1, r2 // ++sec +(p7) br.spnt.many 1b + + // finally: r2 = sec, r3 = usec +EX(.fail, st8 [r32]=r2) + adds r9=8, r32 + mov r8=r0 // success + ;; +EX(.fail, st8 [r9]=r3) // store them in the timeval struct + mov r10=0 + MCKINLEY_E9_WORKAROUND + br.ret.sptk.many b6 // return to caller + /* + * Note: We are NOT clearing the scratch registers here. Since the only things + * in those registers are time-related variables and some addresses (which + * can be obtained from System.map), none of this should be security-sensitive + * and we should be fine. + */ + +.fail: adds r8=EINVAL, r0 // r8 = EINVAL + adds r10=-1, r0 // r10 = -1 + MCKINLEY_E9_WORKAROUND + br.ret.spnt.many b6 // return with r8 set to EINVAL +END(fsys_gettimeofday) + .rodata .align 8 .globl fsyscall_table @@ -190,7 +372,7 @@ data8 fsys_fallback_syscall // setrlimit data8 fsys_fallback_syscall // getrlimit // 1085 data8 fsys_fallback_syscall // getrusage - data8 fsys_fallback_syscall // gettimeofday + data8 fsys_gettimeofday // gettimeofday data8 fsys_fallback_syscall // settimeofday data8 fsys_fallback_syscall // select data8 fsys_fallback_syscall // poll // 1090 diff -Nru a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S --- a/arch/ia64/kernel/gate.S Tue Mar 11 22:06:19 2003 +++ b/arch/ia64/kernel/gate.S Tue Mar 11 22:06:19 2003 @@ -145,11 +145,12 @@ */ #define SIGTRAMP_SAVES \ - .unwabi @svr4, 's' // mark this as a sigtramp handler (saves scratch regs) \ - .savesp ar.unat, UNAT_OFF+SIGCONTEXT_OFF \ - .savesp ar.fpsr, FPSR_OFF+SIGCONTEXT_OFF \ - .savesp pr, PR_OFF+SIGCONTEXT_OFF \ - .savesp rp, RP_OFF+SIGCONTEXT_OFF \ + .unwabi @svr4, 's'; /* mark this as a sigtramp handler (saves scratch regs) */ \ + .savesp ar.unat, UNAT_OFF+SIGCONTEXT_OFF; \ + .savesp ar.fpsr, FPSR_OFF+SIGCONTEXT_OFF; \ + .savesp pr, PR_OFF+SIGCONTEXT_OFF; \ + .savesp rp, RP_OFF+SIGCONTEXT_OFF; \ + .savesp ar.pfs, CFM_OFF+SIGCONTEXT_OFF; \ .vframesp SP_OFF+SIGCONTEXT_OFF GLOBAL_ENTRY(ia64_sigtramp) @@ -173,9 +174,7 @@ .spillsp.p p8, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF (p8) br.cond.spnt setup_rbs // yup -> (clobbers r14, r15, and r16) back_from_setup_rbs: - - .spillreg ar.pfs, r8 - alloc r8=ar.pfs,0,0,3,0 // get CFM0, EC0, and CPL0 into r8 + alloc r8=ar.pfs,0,0,3,0 ld8 out0=[base0],16 // load arg0 (signum) adds base1=(ARG1_OFF-(RBS_BASE_OFF+SIGCONTEXT_OFF)),base1 ;; @@ -184,17 +183,12 @@ ;; ld8 out2=[base0] // load arg2 (sigcontextp) ld8 gp=[r17] // get signal handler's global pointer - adds base0=(BSP_OFF+SIGCONTEXT_OFF),sp ;; .spillsp ar.bsp, BSP_OFF+SIGCONTEXT_OFF - st8 [base0]=r9,(CFM_OFF-BSP_OFF) // save sc_ar_bsp - dep r8=0,r8,38,26 // clear EC0, CPL0 and reserved bits - adds base1=(FR6_OFF+16+SIGCONTEXT_OFF),sp - ;; - .spillsp ar.pfs, CFM_OFF+SIGCONTEXT_OFF - st8 [base0]=r8 // save CFM0 + st8 [base0]=r9 // save sc_ar_bsp adds base0=(FR6_OFF+SIGCONTEXT_OFF),sp + adds base1=(FR6_OFF+16+SIGCONTEXT_OFF),sp ;; stf.spill [base0]=f6,32 stf.spill [base1]=f7,32 @@ -217,7 +211,6 @@ ld8 r15=[base0],(CFM_OFF-BSP_OFF) // fetch sc_ar_bsp and advance to CFM_OFF mov r14=ar.bsp ;; - ld8 r8=[base0] // restore (perhaps modified) CFM0, EC0, and CPL0 cmp.ne p8,p0=r14,r15 // do we need to restore the rbs? (p8) br.cond.spnt restore_rbs // yup -> (clobbers r14-r18, f6 & f7) ;; diff -Nru a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c --- a/arch/ia64/kernel/init_task.c Tue Mar 11 22:06:20 2003 +++ b/arch/ia64/kernel/init_task.c Tue Mar 11 22:06:20 2003 @@ -17,6 +17,7 @@ static struct fs_struct init_fs = INIT_FS; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS(init_signals); +static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); struct mm_struct init_mm = INIT_MM(init_mm); /* diff -Nru a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c --- a/arch/ia64/kernel/iosapic.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/iosapic.c Tue Mar 11 22:06:17 2003 @@ -29,6 +29,9 @@ * 02/07/29 T. Kochi Allocate interrupt vectors dynamically * 02/08/04 T. Kochi Cleaned up terminology (irq, global system interrupt, vector, etc.) * 02/09/20 D. Mosberger Simplified by taking advantage of ACPI's pci_irq code. + * 03/02/19 B. Helgaas Make pcat_compat system-wide, not per-IOSAPIC. + * Remove iosapic_address & gsi_base from external interfaces. + * Rationalize __init/__devinit attributes. */ /* * Here is what the interrupt logic between a PCI device and the kernel looks like: @@ -111,16 +114,17 @@ char *addr; /* base address of IOSAPIC */ unsigned int gsi_base; /* first GSI assigned to this IOSAPIC */ unsigned short num_rte; /* number of RTE in this IOSAPIC */ - unsigned char pcat_compat; /* 8259 compatibility flag */ -} iosapic_lists[256] __devinitdata; +} iosapic_lists[256]; -static int num_iosapic = 0; +static int num_iosapic; + +static unsigned char pcat_compat __initdata; /* 8259 compatibility flag */ /* * Find an IOSAPIC associated with a GSI */ -static inline int __devinit +static inline int find_iosapic (unsigned int gsi) { int i; @@ -423,7 +427,7 @@ * if the given vector is already owned by other, * assign a new vector for the other and make the vector available */ -static void +static void __init iosapic_reassign_vector (int vector) { int new_vector; @@ -443,50 +447,36 @@ static void register_intr (unsigned int gsi, int vector, unsigned char delivery, - unsigned long polarity, unsigned long edge_triggered, - unsigned int gsi_base, char *iosapic_address) + unsigned long polarity, unsigned long trigger) { irq_desc_t *idesc; struct hw_interrupt_type *irq_type; int rte_index; + int index; + unsigned long gsi_base; + char *iosapic_address; + + index = find_iosapic(gsi); + if (index < 0) { + printk(KERN_WARNING "%s: No IOSAPIC for GSI 0x%x\n", __FUNCTION__, gsi); + return; + } + + iosapic_address = iosapic_lists[index].addr; + gsi_base = iosapic_lists[index].gsi_base; rte_index = gsi - gsi_base; iosapic_intr_info[vector].rte_index = rte_index; - iosapic_intr_info[vector].polarity = polarity ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW; + iosapic_intr_info[vector].polarity = polarity; iosapic_intr_info[vector].dmode = delivery; + iosapic_intr_info[vector].addr = iosapic_address; + iosapic_intr_info[vector].gsi_base = gsi_base; + iosapic_intr_info[vector].trigger = trigger; - /* - * In override, it may not provide addr/gsi_base. GSI is enough to - * locate iosapic addr, gsi_base and rte_index by examining - * gsi_base and num_rte of registered iosapics (tbd) - */ -#ifndef OVERRIDE_DEBUG - if (iosapic_address) { - iosapic_intr_info[vector].addr = iosapic_address; - iosapic_intr_info[vector].gsi_base = gsi_base; - } -#else - if (iosapic_address) { - if (iosapic_intr_info[vector].addr && (iosapic_intr_info[vector].addr != iosapic_address)) - printk(KERN_WARNING "warning: register_intr: diff IOSAPIC ADDRESS for " - "GSI 0x%x, vector %d\n", gsi, vector); - iosapic_intr_info[vector].addr = iosapic_address; - if (iosapic_intr_info[vector].gsi_base && (iosapic_intr_info[vector].gsi_base != gsi_base)) { - printk(KERN_WARNING "warning: register_intr: diff GSI base 0x%x for " - "GSI 0x%x, vector %d\n", gsi_base, gsi, vector); - } - iosapic_intr_info[vector].gsi_base = gsi_base; - } else if (!iosapic_intr_info[vector].addr) - printk(KERN_WARNING "warning: register_intr: invalid override for GSI 0x%x, " - "vector %d\n", gsi, vector); -#endif - if (edge_triggered) { - iosapic_intr_info[vector].trigger = IOSAPIC_EDGE; + if (trigger == IOSAPIC_EDGE) irq_type = &irq_type_iosapic_edge; - } else { - iosapic_intr_info[vector].trigger = IOSAPIC_LEVEL; + else irq_type = &irq_type_iosapic_level; - } idesc = irq_desc(vector); if (idesc->handler != irq_type) { @@ -504,8 +494,7 @@ */ int iosapic_register_intr (unsigned int gsi, - unsigned long polarity, unsigned long edge_triggered, - unsigned int gsi_base, char *iosapic_address) + unsigned long polarity, unsigned long trigger) { int vector; unsigned int dest = (ia64_get_lid() >> 16) & 0xffff; @@ -515,11 +504,11 @@ vector = ia64_alloc_vector(); register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, - polarity, edge_triggered, gsi_base, iosapic_address); + polarity, trigger); printk(KERN_INFO "GSI 0x%x(%s,%s) -> CPU 0x%04x vector %d\n", - gsi, (polarity ? "high" : "low"), - (edge_triggered ? "edge" : "level"), dest, vector); + gsi, (polarity == IOSAPIC_POL_HIGH ? "high" : "low"), + (trigger == IOSAPIC_EDGE ? "edge" : "level"), dest, vector); /* program the IOSAPIC routing table */ set_rte(vector, dest); @@ -530,11 +519,10 @@ * ACPI calls this when it finds an entry for a platform interrupt. * Note that the irq_base and IOSAPIC address must be set in iosapic_init(). */ -int +int __init iosapic_register_platform_intr (u32 int_type, unsigned int gsi, int iosapic_vector, u16 eid, u16 id, - unsigned long polarity, unsigned long edge_triggered, - unsigned int gsi_base, char *iosapic_address) + unsigned long polarity, unsigned long trigger) { unsigned char delivery; int vector; @@ -564,11 +552,11 @@ } register_intr(gsi, vector, delivery, polarity, - edge_triggered, gsi_base, iosapic_address); + trigger); printk(KERN_INFO "PLATFORM int 0x%x: GSI 0x%x(%s,%s) -> CPU 0x%04x vector %d\n", - int_type, gsi, (polarity ? "high" : "low"), - (edge_triggered ? "edge" : "level"), dest, vector); + int_type, gsi, (polarity == IOSAPIC_POL_HIGH ? "high" : "low"), + (trigger == IOSAPIC_EDGE ? "edge" : "level"), dest, vector); /* program the IOSAPIC routing table */ set_rte(vector, dest); @@ -580,54 +568,36 @@ * ACPI calls this when it finds an entry for a legacy ISA IRQ override. * Note that the gsi_base and IOSAPIC address must be set in iosapic_init(). */ -void +void __init iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, unsigned long polarity, - unsigned long edge_triggered) + unsigned long trigger) { - int index, vector; - unsigned int gsi_base; - char *addr; + int vector; unsigned int dest = (ia64_get_lid() >> 16) & 0xffff; - index = find_iosapic(gsi); - - if (index < 0) { - printk(KERN_ERR "ISA: No corresponding IOSAPIC found : ISA IRQ %u -> GSI 0x%x\n", - isa_irq, gsi); - return; - } - vector = isa_irq_to_vector(isa_irq); - addr = iosapic_lists[index].addr; - gsi_base = iosapic_lists[index].gsi_base; - register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, polarity, edge_triggered, - gsi_base, addr); + register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, polarity, trigger); DBG("ISA: IRQ %u -> GSI 0x%x (%s,%s) -> CPU 0x%04x vector %d\n", isa_irq, gsi, - polarity ? "high" : "low", edge_triggered ? "edge" : "level", + polarity == IOSAPIC_POL_HIGH ? "high" : "low", trigger == IOSAPIC_EDGE ? "edge" : "level", dest, vector); /* program the IOSAPIC routing table */ set_rte(vector, dest); } -void __devinit -iosapic_init (unsigned long phys_addr, unsigned int gsi_base, int pcat_compat) +void __init +iosapic_system_init (int system_pcat_compat) { - int num_rte, vector; - unsigned int isa_irq, ver; - char *addr; - static int first_time = 1; + int vector; - if (first_time) { - first_time = 0; - for (vector = 0; vector < IA64_NUM_VECTORS; ++vector) - iosapic_intr_info[vector].rte_index = -1; /* mark as unused */ - } + for (vector = 0; vector < IA64_NUM_VECTORS; ++vector) + iosapic_intr_info[vector].rte_index = -1; /* mark as unused */ + pcat_compat = system_pcat_compat; if (pcat_compat) { /* * Disable the compatibility mode interrupts (8259 style), needs IN/OUT support @@ -637,6 +607,14 @@ outb(0xff, 0xA1); outb(0xff, 0x21); } +} + +void __init +iosapic_init (unsigned long phys_addr, unsigned int gsi_base) +{ + int num_rte; + unsigned int isa_irq, ver; + char *addr; addr = ioremap(phys_addr, 0); ver = iosapic_version(addr); @@ -649,7 +627,6 @@ num_rte = ((ver >> 16) & 0xff) + 1; iosapic_lists[num_iosapic].addr = addr; - iosapic_lists[num_iosapic].pcat_compat = pcat_compat; iosapic_lists[num_iosapic].gsi_base = gsi_base; iosapic_lists[num_iosapic].num_rte = num_rte; num_iosapic++; @@ -658,30 +635,18 @@ (ver & 0xf0) >> 4, (ver & 0x0f), phys_addr, gsi_base, gsi_base + num_rte - 1); if ((gsi_base == 0) && pcat_compat) { - unsigned int dest = (ia64_get_lid() >> 16) & 0xffff; /* * Map the legacy ISA devices into the IOSAPIC data. Some of these may * get reprogrammed later on with data from the ACPI Interrupt Source * Override table. */ - for (isa_irq = 0; isa_irq < 16; ++isa_irq) { - vector = isa_irq_to_vector(isa_irq); - - register_intr(isa_irq, vector, IOSAPIC_LOWEST_PRIORITY, - /* IOSAPIC_POL_HIGH, IOSAPIC_EDGE */ - 1, 1, gsi_base, addr); - - DBG("ISA: IRQ %u -> GSI 0x%x (high,edge) -> CPU 0x%04x vector %d\n", - isa_irq, isa_irq, dest, vector); - - /* program the IOSAPIC routing table: */ - set_rte(vector, dest); - } + for (isa_irq = 0; isa_irq < 16; ++isa_irq) + iosapic_override_isa_irq(isa_irq, isa_irq, IOSAPIC_POL_HIGH, IOSAPIC_EDGE); } } -static void +static void __init fixup_vector (int vector, unsigned int gsi, const char *pci_id) { struct hw_interrupt_type *irq_type = &irq_type_iosapic_level; @@ -731,10 +696,9 @@ { struct acpi_prt_entry *entry; struct list_head *node; - unsigned int gsi, gsi_base; - int index, vector, pcat_compat; + unsigned int gsi; + int vector; char pci_id[16]; - char *addr; list_for_each(node, &acpi_prt.entries) { entry = list_entry(node, struct acpi_prt_entry, node); @@ -748,23 +712,13 @@ vector = gsi_to_vector(gsi); if (vector < 0) { /* allocate a vector for this interrupt line */ - index = find_iosapic(gsi); - - if (index < 0) { - printk(KERN_WARNING "IOSAPIC: GSI 0x%x has no IOSAPIC!\n", gsi); - continue; - } - addr = iosapic_lists[index].addr; - gsi_base = iosapic_lists[index].gsi_base; - pcat_compat = iosapic_lists[index].pcat_compat; - if (pcat_compat && (gsi < 16)) vector = isa_irq_to_vector(gsi); else /* new GSI; allocate a vector for it */ vector = ia64_alloc_vector(); - register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, 0, 0, gsi_base, addr); + register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW, IOSAPIC_LEVEL); } snprintf(pci_id, sizeof(pci_id), "%02x:%02x:%02x[%c]", entry->id.segment, entry->id.bus, entry->id.device, 'A' + entry->pin); diff -Nru a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c --- a/arch/ia64/kernel/irq.c Tue Mar 11 22:06:19 2003 +++ b/arch/ia64/kernel/irq.c Tue Mar 11 22:06:19 2003 @@ -154,6 +154,7 @@ int i, j; struct irqaction * action; irq_desc_t *idesc; + unsigned long flags; seq_puts(p, " "); for (j=0; jlock, flags); action = idesc->action; if (!action) - continue; + goto skip; seq_printf(p, "%3d: ",i); #ifndef CONFIG_SMP seq_printf(p, "%10u ", kstat_irqs(i)); @@ -176,10 +178,12 @@ #endif seq_printf(p, " %14s", idesc->handler->typename); seq_printf(p, " %s", action->name); - for (action=action->next; action; action = action->next) seq_printf(p, ", %s", action->name); + seq_putc(p, '\n'); +skip: + spin_unlock_irqrestore(&idesc->lock, flags); } seq_puts(p, "NMI: "); for (j = 0; j < NR_CPUS; j++) @@ -340,12 +344,14 @@ * 0 return value means that this irq is already being * handled by some other CPU. (or is disabled) */ - int cpu = smp_processor_id(); + int cpu; irq_desc_t *desc = irq_desc(irq); struct irqaction * action; unsigned int status; irq_enter(); + cpu = smp_processor_id(); + kstat_cpu(cpu).irqs[irq]++; if (desc->status & IRQ_PER_CPU) { diff -Nru a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S --- a/arch/ia64/kernel/ivt.S Tue Mar 11 22:06:15 2003 +++ b/arch/ia64/kernel/ivt.S Tue Mar 11 22:06:15 2003 @@ -848,7 +848,7 @@ alloc r15=ar.pfs,0,0,6,0 // must first in an insn group ;; ld4 r8=[r14],8 // r8 == eax (syscall number) - mov r15=230 // number of entries in ia32 system call table + mov r15=250 // number of entries in ia32 system call table ;; cmp.ltu.unc p6,p7=r8,r15 ld4 out1=[r14],8 // r9 == ecx diff -Nru a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c --- a/arch/ia64/kernel/machvec.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/machvec.c Tue Mar 11 22:06:17 2003 @@ -10,19 +10,6 @@ struct ia64_machine_vector ia64_mv; -/* - * Most platforms use this routine for mapping page frame addresses into a memory map - * index. - * - * Note: we can't use __pa() because map_nr_dense(X) MUST map to something >= max_mapnr if - * X is outside the identity mapped kernel space. - */ -unsigned long -map_nr_dense (unsigned long addr) -{ - return (addr - PAGE_OFFSET) >> PAGE_SHIFT; -} - static struct ia64_machine_vector * lookup_machvec (const char *name) { diff -Nru a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c --- a/arch/ia64/kernel/mca.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/mca.c Tue Mar 11 22:06:17 2003 @@ -825,7 +825,7 @@ plog_ptr=(ia64_err_rec_t *)IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_INIT); proc_ptr = &plog_ptr->proc_err; - ia64_process_min_state_save(&proc_ptr->processor_static_info.min_state_area); + ia64_process_min_state_save(&SAL_LPI_PSI_INFO(proc_ptr)->min_state_area); /* Clear the INIT SAL logs now that they have been saved in the OS buffer */ ia64_sal_clear_state_info(SAL_INFO_TYPE_INIT); @@ -1620,7 +1620,7 @@ * absent. Also, current implementations only allocate space for number of * elements used. So we walk the data pointer from here on. */ - p_data = &slpi->cache_check_info[0]; + p_data = &slpi->info[0]; /* Print the cache check information if any*/ for (i = 0 ; i < slpi->valid.num_cache_check; i++, p_data++) diff -Nru a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c --- a/arch/ia64/kernel/palinfo.c Tue Mar 11 22:06:15 2003 +++ b/arch/ia64/kernel/palinfo.c Tue Mar 11 22:06:15 2003 @@ -341,11 +341,11 @@ return 0; } - p += sprintf(p, "\nTLB walker : %s implemented\n" \ + p += sprintf(p, "\nTLB walker : %simplemented\n" \ "Number of DTR : %d\n" \ "Number of ITR : %d\n" \ "TLB insertable page sizes : ", - vm_info_1.pal_vm_info_1_s.vw ? "\b":"not", + vm_info_1.pal_vm_info_1_s.vw ? "" : "not ", vm_info_1.pal_vm_info_1_s.max_dtr_entry+1, vm_info_1.pal_vm_info_1_s.max_itr_entry+1); @@ -894,10 +894,12 @@ * in SMP mode, we may need to call another CPU to get correct * information. PAL, by definition, is processor specific */ - if (f->req_cpu == smp_processor_id()) + if (f->req_cpu == get_cpu()) len = (*palinfo_entries[f->func_id].proc_read)(page); else len = palinfo_handle_smp(f, page); + + put_cpu(); if (len <= off+count) *eof = 1; diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c --- a/arch/ia64/kernel/perfmon.c Tue Mar 11 22:06:19 2003 +++ b/arch/ia64/kernel/perfmon.c Tue Mar 11 22:06:19 2003 @@ -8,7 +8,7 @@ * Modifications by Stephane Eranian, Hewlett-Packard Co. * Modifications by David Mosberger-Tang, Hewlett-Packard Co. * - * Copyright (C) 1999-2002 Hewlett Packard Co + * Copyright (C) 1999-2003 Hewlett Packard Co * Stephane Eranian * David Mosberger-Tang */ @@ -230,9 +230,15 @@ unsigned int protected:1; /* allow access to creator of context only */ unsigned int using_dbreg:1; /* using range restrictions (debug registers) */ unsigned int excl_idle:1; /* exclude idle task in system wide session */ - unsigned int reserved:23; + unsigned int trap_reason:2; /* reason for going into pfm_block_ovfl_reset() */ + unsigned int reserved:21; } pfm_context_flags_t; +#define PFM_TRAP_REASON_NONE 0x0 /* default value */ +#define PFM_TRAP_REASON_BLOCKSIG 0x1 /* we need to block on overflow and signal user */ +#define PFM_TRAP_REASON_SIG 0x2 /* we simply need to signal user */ +#define PFM_TRAP_REASON_RESET 0x3 /* we need to reset PMDs */ + /* * perfmon context: encapsulates all the state of a monitoring session * XXX: probably need to change layout @@ -277,6 +283,7 @@ #define ctx_fl_protected ctx_flags.protected #define ctx_fl_using_dbreg ctx_flags.using_dbreg #define ctx_fl_excl_idle ctx_flags.excl_idle +#define ctx_fl_trap_reason ctx_flags.trap_reason /* * global information about all sessions @@ -1225,6 +1232,8 @@ ctx->ctx_fl_system = (ctx_flags & PFM_FL_SYSTEM_WIDE) ? 1: 0; ctx->ctx_fl_excl_idle = (ctx_flags & PFM_FL_EXCL_IDLE) ? 1: 0; ctx->ctx_fl_frozen = 0; + ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_NONE; + /* * setting this flag to 0 here means, that the creator or the task that the * context is being attached are granted access. Given that a context can only @@ -1505,7 +1514,7 @@ unsigned long value, hw_value; unsigned int cnum; int i; - int ret = 0; + int ret = -EINVAL; /* we don't quite support this right now */ if (task != current) return -EINVAL; @@ -1514,10 +1523,10 @@ * Cannot do anything before PMU is enabled */ if (!CTX_IS_ENABLED(ctx)) return -EINVAL; + preempt_disable(); /* XXX: ctx locking may be required here */ - ret = -EINVAL; for (i = 0; i < count; i++, req++) { @@ -1591,10 +1600,12 @@ ctx->ctx_used_pmds[0], ctx->ctx_soft_pmds[cnum].reset_pmds[0])); } - + preempt_enable(); return 0; abort_mission: + preempt_enable(); + /* * for now, we have only one possibility for error */ @@ -1639,6 +1650,7 @@ DBprintk(("ctx_last_cpu=%d for [%d]\n", atomic_read(&ctx->ctx_last_cpu), task->pid)); for (i = 0; i < count; i++, req++) { + int me; #if __GNUC__ < 3 foo = __get_user(cnum, &req->reg_num); if (foo) return -EFAULT; @@ -1666,13 +1678,16 @@ * PMU state is still in the local live register due to lazy ctxsw. * If true, then we read directly from the registers. */ - if (atomic_read(&ctx->ctx_last_cpu) == smp_processor_id()){ + me = get_cpu(); + if (atomic_read(&ctx->ctx_last_cpu) == me){ ia64_srlz_d(); val = ia64_get_pmd(cnum); DBprintk(("reading pmd[%u]=0x%lx from hw\n", cnum, val)); } else { val = th->pmd[cnum]; } + + if (PMD_IS_COUNTING(cnum)) { /* * XXX: need to check for overflow @@ -1694,6 +1709,8 @@ PFM_REG_RETFLAG_SET(reg_flags, ret); + put_cpu(); + DBprintk(("read pmd[%u] ret=%d value=0x%lx pmc=0x%lx\n", cnum, ret, val, ia64_get_pmc(cnum))); @@ -1831,6 +1848,7 @@ ctx->ctx_fl_frozen, ctx->ctx_ovfl_regs[0])); + preempt_disable(); pfm_reset_regs(ctx, ctx->ctx_ovfl_regs, PFM_PMD_LONG_RESET); ctx->ctx_ovfl_regs[0] = 0UL; @@ -1849,6 +1867,8 @@ /* simply unfreeze */ pfm_unfreeze_pmu(); + preempt_enable(); + return 0; } /* restart on another task */ @@ -1906,6 +1926,7 @@ ctx->ctx_fl_system, PMU_OWNER(), current)); + preempt_disable(); /* simply stop monitoring but not the PMU */ if (ctx->ctx_fl_system) { @@ -1933,6 +1954,7 @@ */ ia64_psr(regs)->up = 0; } + preempt_enable(); return 0; } @@ -1945,6 +1967,7 @@ if (!CTX_IS_ENABLED(ctx)) return -EINVAL; + preempt_disable(); /* * stop monitoring, freeze PMU, and save state in context * this call will clear IA64_THREAD_PM_VALID for per-task sessions. @@ -1965,6 +1988,7 @@ DBprintk(("enabling psr.sp for [%d]\n", current->pid)); ctx->ctx_flags.state = PFM_CTX_DISABLED; + preempt_enable(); return 0; } @@ -2314,6 +2338,7 @@ return -EINVAL; } + preempt_disable(); if (ctx->ctx_fl_system) { PFM_CPUINFO_SET(PFM_CPUINFO_DCR_PP); @@ -2331,6 +2356,7 @@ } else { if ((task->thread.flags & IA64_THREAD_PM_VALID) == 0) { + preempt_enable(); printk(KERN_DEBUG "perfmon: pfm_start task flag not set for [%d]\n", task->pid); return -EINVAL; @@ -2344,6 +2370,7 @@ ia64_srlz_i(); } + preempt_enable(); return 0; } @@ -2351,9 +2378,13 @@ pfm_enable(struct task_struct *task, pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) { + int me; + /* we don't quite support this right now */ if (task != current) return -EINVAL; + me = get_cpu(); /* make sure we're not migrated or preempted */ + if (ctx->ctx_fl_system == 0 && PMU_OWNER() && PMU_OWNER() != current) pfm_lazy_save_regs(PMU_OWNER()); @@ -2397,11 +2428,13 @@ SET_PMU_OWNER(task); ctx->ctx_flags.state = PFM_CTX_ENABLED; - atomic_set(&ctx->ctx_last_cpu, smp_processor_id()); + atomic_set(&ctx->ctx_last_cpu, me); /* simply unfreeze */ pfm_unfreeze_pmu(); + put_cpu(); + return 0; } @@ -2547,6 +2580,10 @@ task = find_task_by_pid(pid); + if (task) get_task_struct(task); + + read_unlock(&tasklist_lock); + if (!task) goto abort_call; ret = -EPERM; @@ -2584,16 +2621,116 @@ ret = (*pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_func)(task, ctx, arg, count, regs); abort_call: - if (task != current) read_unlock(&tasklist_lock); + if (task && task != current) put_task_struct(task); return ret; } +/* + * send SIGPROF to register task, must be invoked when it + * is safe to send a signal, e.g., not holding any runqueue + * related locks. + */ +static int +pfm_notify_user(pfm_context_t *ctx) +{ + struct siginfo si; + int ret; + + if (ctx->ctx_notify_task == NULL) { + DBprintk(("[%d] no notifier\n", current->pid)); + return -EINVAL; + } + + si.si_errno = 0; + si.si_addr = NULL; + si.si_pid = current->pid; /* who is sending */ + si.si_signo = SIGPROF; + si.si_code = PROF_OVFL; + + si.si_pfm_ovfl[0] = ctx->ctx_ovfl_regs[0]; + + /* + * when the target of the signal is not ourself, we have to be more + * careful. The notify_task may being cleared by the target task itself + * in release_thread(). We must ensure mutual exclusion here such that + * the signal is delivered (even to a dying task) safely. + */ + + if (ctx->ctx_notify_task != current) { + /* + * grab the notification lock for this task + * This guarantees that the sequence: test + send_signal + * is atomic with regards to the ctx_notify_task field. + * + * We need a spinlock and not just an atomic variable for this. + * + */ + spin_lock(&ctx->ctx_lock); + + /* + * now notify_task cannot be modified until we're done + * if NULL, they it got modified while we were in the handler + */ + if (ctx->ctx_notify_task == NULL) { + + spin_unlock(&ctx->ctx_lock); + + /* + * If we've lost the notified task, then we will run + * to completion wbut keep the PMU frozen. Results + * will be incorrect anyway. We do not kill task + * to leave it possible to attach perfmon context + * to already running task. + */ + printk("perfmon: pfm_notify_user() lost notify_task\n"); + DBprintk_ovfl(("notification task has disappeared !\n")); + + /* we cannot afford to block now */ + ctx->ctx_fl_block = 0; + + return -EINVAL; + } + + /* + * required by send_sig_info() to make sure the target + * task does not disappear on us. + */ + read_lock(&tasklist_lock); + } + /* + * in this case, we don't stop the task, we let it go on. It will + * necessarily go to the signal handler (if any) when it goes back to + * user mode. + */ + DBprintk_ovfl(("[%d] sending notification to [%d]\n", + current->pid, ctx->ctx_notify_task->pid)); + + /* + * this call is safe in an interrupt handler, so does read_lock() on tasklist_lock + */ + ret = send_sig_info(SIGPROF, &si, ctx->ctx_notify_task); + if (ret) { + printk("perfmon: send_sig_info(process %d, SIGPROF)=%d\n", + ctx->ctx_notify_task->pid, ret); + } + + /* + * now undo the protections in order + */ + if (ctx->ctx_notify_task != current) { + read_unlock(&tasklist_lock); + spin_unlock(&ctx->ctx_lock); + } + return ret; +} + void pfm_ovfl_block_reset(void) { struct thread_struct *th = ¤t->thread; pfm_context_t *ctx = current->thread.pfm_context; + unsigned int reason; int ret; /* @@ -2609,8 +2746,31 @@ printk(KERN_DEBUG "perfmon: [%d] has no PFM context\n", current->pid); return; } + /* + * extract reason for being here and clear + */ + reason = ctx->ctx_fl_trap_reason; + ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_NONE; - if (CTX_OVFL_NOBLOCK(ctx)) goto non_blocking; + DBprintk(("[%d] reason=%d\n", current->pid, reason)); + + /* + * just here for a reset (non-blocking context only) + */ + if (reason == PFM_TRAP_REASON_RESET) goto non_blocking; + + /* + * first notify user. This can fail if notify_task has disappeared. + */ + if (reason == PFM_TRAP_REASON_SIG || reason == PFM_TRAP_REASON_BLOCKSIG) { + ret = pfm_notify_user(ctx); + if (ret) return; + } + + /* + * came here just to signal (non-blocking) + */ + if (reason == PFM_TRAP_REASON_SIG) return; DBprintk(("[%d] before sleeping\n", current->pid)); @@ -2691,7 +2851,7 @@ * initialize entry header */ h->pid = current->pid; - h->cpu = smp_processor_id(); + h->cpu = get_cpu(); h->last_reset_value = ovfl_mask ? ctx->ctx_soft_pmds[ffz(~ovfl_mask)].lval : 0UL; h->ip = regs ? regs->cr_iip | ((regs->cr_ipsr >> 41) & 0x3): 0x0UL; h->regs = ovfl_mask; /* which registers overflowed */ @@ -2718,7 +2878,7 @@ DBprintk_ovfl(("e=%p pmd%d =0x%lx\n", (void *)e, j, *e)); e++; } - pfm_stats[smp_processor_id()].pfm_recorded_samples_count++; + pfm_stats[h->cpu].pfm_recorded_samples_count++; /* * make the new entry visible to user, needs to be atomic @@ -2735,9 +2895,11 @@ /* * XXX: must reset buffer in blocking mode and lost notified */ - pfm_stats[smp_processor_id()].pfm_full_smpl_buffer_count++; + pfm_stats[h->cpu].pfm_full_smpl_buffer_count++; + put_cpu(); return 1; } + put_cpu(); return 0; } @@ -2756,7 +2918,6 @@ unsigned long ovfl_notify = 0UL, ovfl_pmds = 0UL; int i; int ret = 1; - struct siginfo si; /* * It is never safe to access the task for which the overflow interrupt is destinated * using the current variable as the interrupt may occur in the middle of a context switch @@ -2770,6 +2931,8 @@ * valid one, i.e. the one that caused the interrupt. */ + preempt_disable(); + t = &task->thread; /* @@ -2779,6 +2942,7 @@ if ((t->flags & IA64_THREAD_PM_VALID) == 0 && ctx->ctx_fl_system == 0) { printk(KERN_DEBUG "perfmon: Spurious overflow interrupt: process %d not " "using perfmon\n", task->pid); + preempt_enable_no_resched(); return 0x1; } /* @@ -2787,6 +2951,7 @@ if ((pmc0 & 0x1) == 0) { printk(KERN_DEBUG "perfmon: pid %d pmc0=0x%lx assumption error for freeze bit\n", task->pid, pmc0); + preempt_enable_no_resched(); return 0x0; } @@ -2869,7 +3034,8 @@ if (ovfl_notify == 0UL) { if (ovfl_pmds) pfm_reset_regs(ctx, &ovfl_pmds, PFM_PMD_SHORT_RESET); - return 0x0; + preempt_enable_no_resched(); + return 0x0UL; } /* @@ -2877,142 +3043,35 @@ */ ctx->ctx_ovfl_regs[0] = ovfl_pmds; - /* - * we have come to this point because there was an overflow and that notification - * was requested. The notify_task may have disappeared, in which case notify_task - * is NULL. - */ - if (ctx->ctx_notify_task) { - - si.si_errno = 0; - si.si_addr = NULL; - si.si_pid = task->pid; /* who is sending */ - - si.si_signo = SIGPROF; - si.si_code = PROF_OVFL; /* indicates a perfmon SIGPROF signal */ - /* - * Shift the bitvector such that the user sees bit 4 for PMD4 and so on. - * We only use smpl_ovfl[0] for now. It should be fine for quite a while - * until we have more than 61 PMD available. - */ - si.si_pfm_ovfl[0] = ovfl_notify; - - /* - * when the target of the signal is not ourself, we have to be more - * careful. The notify_task may being cleared by the target task itself - * in release_thread(). We must ensure mutual exclusion here such that - * the signal is delivered (even to a dying task) safely. - */ - - if (ctx->ctx_notify_task != current) { - /* - * grab the notification lock for this task - * This guarantees that the sequence: test + send_signal - * is atomic with regards to the ctx_notify_task field. - * - * We need a spinlock and not just an atomic variable for this. - * - */ - spin_lock(&ctx->ctx_lock); - - /* - * now notify_task cannot be modified until we're done - * if NULL, they it got modified while we were in the handler - */ - if (ctx->ctx_notify_task == NULL) { - - spin_unlock(&ctx->ctx_lock); + DBprintk_ovfl(("block=%d notify [%d] current [%d]\n", + ctx->ctx_fl_block, + ctx->ctx_notify_task ? ctx->ctx_notify_task->pid: -1, + current->pid )); - /* - * If we've lost the notified task, then we will run - * to completion wbut keep the PMU frozen. Results - * will be incorrect anyway. We do not kill task - * to leave it possible to attach perfmon context - * to already running task. - */ - goto lost_notify; - } - /* - * required by send_sig_info() to make sure the target - * task does not disappear on us. - */ - read_lock(&tasklist_lock); - } - /* - * in this case, we don't stop the task, we let it go on. It will - * necessarily go to the signal handler (if any) when it goes back to - * user mode. - */ - DBprintk_ovfl(("[%d] sending notification to [%d]\n", - task->pid, ctx->ctx_notify_task->pid)); - - - /* - * this call is safe in an interrupt handler, so does read_lock() on tasklist_lock - */ - ret = send_sig_info(SIGPROF, &si, ctx->ctx_notify_task); - if (ret != 0) - printk(KERN_DEBUG "send_sig_info(process %d, SIGPROF)=%d\n", - ctx->ctx_notify_task->pid, ret); - /* - * now undo the protections in order - */ - if (ctx->ctx_notify_task != current) { - read_unlock(&tasklist_lock); - spin_unlock(&ctx->ctx_lock); - } - - /* - * if we block set the pfm_must_block bit - * when in block mode, we can effectively block only when the notified - * task is not self, otherwise we would deadlock. - * in this configuration, the notification is sent, the task will not - * block on the way back to user mode, but the PMU will be kept frozen - * until PFM_RESTART. - * Note that here there is still a race condition with notify_task - * possibly being nullified behind our back, but this is fine because - * it can only be changed to NULL which by construction, can only be - * done when notify_task != current. So if it was already different - * before, changing it to NULL will still maintain this invariant. - * Of course, when it is equal to current it cannot change at this point. - */ - DBprintk_ovfl(("block=%d notify [%d] current [%d]\n", - ctx->ctx_fl_block, - ctx->ctx_notify_task ? ctx->ctx_notify_task->pid: -1, - current->pid )); - - if (!CTX_OVFL_NOBLOCK(ctx) && ctx->ctx_notify_task != task) { - t->pfm_ovfl_block_reset = 1; /* will cause blocking */ - } + /* + * ctx_notify_task could already be NULL, checked in pfm_notify_user() + */ + if (CTX_OVFL_NOBLOCK(ctx) == 0 && ctx->ctx_notify_task != task) { + t->pfm_ovfl_block_reset = 1; /* will cause blocking */ + ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_BLOCKSIG; } else { -lost_notify: /* XXX: more to do here, to convert to non-blocking (reset values) */ - - DBprintk_ovfl(("notification task has disappeared !\n")); - /* - * for a non-blocking context, we make sure we do not fall into the - * pfm_overflow_notify() trap. Also in the case of a blocking context with lost - * notify process, then we do not want to block either (even though it is - * interruptible). In this case, the PMU will be kept frozen and the process will - * run to completion without monitoring enabled. - * - * Of course, we cannot loose notify process when self-monitoring. - */ - t->pfm_ovfl_block_reset = 0; - + t->pfm_ovfl_block_reset = 1; /* will cause blocking */ + ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_SIG; } + /* - * If notification was successful, then we rely on the pfm_restart() - * call to unfreeze and reset (in both blocking or non-blocking mode). - * - * If notification failed, then we will keep the PMU frozen and run - * the task to completion + * keep the PMU frozen until either pfm_restart() or + * task completes (non-blocking or notify_task gone). */ ctx->ctx_fl_frozen = 1; - DBprintk_ovfl(("return pmc0=0x%x must_block=%ld\n", - ctx->ctx_fl_frozen ? 0x1 : 0x0, t->pfm_ovfl_block_reset)); + DBprintk_ovfl(("return pmc0=0x%x must_block=%ld reason=%d\n", + ctx->ctx_fl_frozen ? 0x1 : 0x0, + t->pfm_ovfl_block_reset, + ctx->ctx_fl_trap_reason)); - return ctx->ctx_fl_frozen ? 0x1 : 0x0; + preempt_enable_no_resched(); + return 0x1UL; } static void @@ -3022,13 +3081,14 @@ struct task_struct *task; pfm_context_t *ctx; - pfm_stats[smp_processor_id()].pfm_ovfl_intr_count++; + pfm_stats[get_cpu()].pfm_ovfl_intr_count++; /* * if an alternate handler is registered, just bypass the default one */ if (pfm_alternate_intr_handler) { (*pfm_alternate_intr_handler->handler)(irq, arg, regs); + put_cpu(); return; } @@ -3053,6 +3113,7 @@ if (!ctx) { printk(KERN_DEBUG "perfmon: Spurious overflow interrupt: process %d has " "no PFM context\n", task->pid); + put_cpu(); return; } @@ -3060,17 +3121,25 @@ * assume PMC[0].fr = 1 at this point */ pmc0 = pfm_overflow_handler(task, ctx, pmc0, regs); - /* - * We always clear the overflow status bits and either unfreeze - * or keep the PMU frozen. + * we can only update pmc0 when the overflow + * is for the current context. In UP the current + * task may not be the one owning the PMU */ - ia64_set_pmc(0, pmc0); - ia64_srlz_d(); - + if (task == current) { + /* + * We always clear the overflow status bits and either unfreeze + * or keep the PMU frozen. + */ + ia64_set_pmc(0, pmc0); + ia64_srlz_d(); + } else { + task->thread.pmc[0] = pmc0; + } } else { pfm_stats[smp_processor_id()].pfm_spurious_ovfl_intr_count++; } + put_cpu_no_resched(); } /* for debug only */ @@ -3141,6 +3210,7 @@ unsigned long dcr; unsigned long dcr_pp; + preempt_disable(); dcr_pp = info & PFM_CPUINFO_DCR_PP ? 1 : 0; /* @@ -3151,6 +3221,7 @@ regs = (struct pt_regs *)((unsigned long) task + IA64_STK_OFFSET); regs--; ia64_psr(regs)->pp = is_ctxswin ? dcr_pp : 0; + preempt_enable(); return; } /* @@ -3166,6 +3237,7 @@ ia64_set_dcr(dcr & ~IA64_DCR_PP); pfm_clear_psr_pp(); ia64_srlz_i(); + preempt_enable(); return; } /* @@ -3179,6 +3251,7 @@ pfm_set_psr_pp(); ia64_srlz_i(); } + preempt_enable(); } void @@ -3189,6 +3262,8 @@ u64 psr; int i; + preempt_disable(); + ctx = task->thread.pfm_context; @@ -3242,6 +3317,7 @@ */ atomic_set(&ctx->ctx_last_cpu, -1); #endif + preempt_enable(); } static void @@ -3252,6 +3328,7 @@ unsigned long mask; int i; + preempt_disable(); DBprintk(("on [%d] by [%d]\n", task->pid, current->pid)); t = &task->thread; @@ -3278,6 +3355,7 @@ /* not owned by this CPU */ atomic_set(&ctx->ctx_last_cpu, -1); + preempt_enable(); } void @@ -3290,11 +3368,14 @@ u64 psr; int i; + preempt_disable(); + owner = PMU_OWNER(); ctx = task->thread.pfm_context; t = &task->thread; if (ctx == NULL) { + preempt_enable(); printk("perfmon: pfm_load_regs: null ctx for [%d]\n", task->pid); return; } @@ -3333,7 +3414,7 @@ psr = ctx->ctx_saved_psr; pfm_set_psr_l(psr); - + preempt_enable(); return; } @@ -3373,16 +3454,20 @@ if (mask & 0x1) ia64_set_pmc(i, t->pmc[i]); } + /* + * manually invoke core interrupt handler + * if the task had a pending overflow when it was ctxsw out. + * Side effect on ctx_fl_frozen is possible. + */ if (t->pmc[0] & ~0x1) { - pfm_overflow_handler(task, ctx, t->pmc[0], NULL); + t->pmc[0] = pfm_overflow_handler(task, ctx, t->pmc[0], NULL); } /* - * fl_frozen==1 when we are in blocking mode waiting for restart + * unfreeze PMU if possible */ - if (ctx->ctx_fl_frozen == 0) { - pfm_unfreeze_pmu(); - } + if (ctx->ctx_fl_frozen == 0) pfm_unfreeze_pmu(); + atomic_set(&ctx->ctx_last_cpu, smp_processor_id()); SET_PMU_OWNER(task); @@ -3391,6 +3476,7 @@ * restore the psr we changed in pfm_save_regs() */ psr = ctx->ctx_saved_psr; + preempt_enable(); pfm_set_psr_l(psr); } @@ -3408,6 +3494,7 @@ printk("perfmon: invalid task in pfm_reset_pmu()\n"); return; } + preempt_disable(); /* Let's make sure the PMU is frozen */ pfm_freeze_pmu(); @@ -3490,6 +3577,7 @@ ctx->ctx_used_dbrs[0] = 0UL; ia64_srlz_d(); + preempt_enable(); } /* @@ -3519,6 +3607,7 @@ */ if (ctx->ctx_flags.state == PFM_CTX_DISABLED) return; + preempt_disable(); /* * stop monitoring: * This is the only way to stop monitoring without destroying overflow @@ -3646,7 +3735,7 @@ * indicates that context has been saved */ atomic_set(&ctx->ctx_last_cpu, -1); - + preempt_enable(); } @@ -3669,6 +3758,7 @@ ctx = task->thread.pfm_context; thread = &task->thread; + preempt_disable(); /* * make sure child cannot mess up the monitoring session */ @@ -3723,6 +3813,8 @@ */ ia64_psr(regs)->up = 0; + preempt_enable(); + /* copy_thread() clears IA64_THREAD_PM_VALID */ return 0; } @@ -3770,8 +3862,9 @@ } } - nctx->ctx_fl_frozen = 0; - nctx->ctx_ovfl_regs[0] = 0UL; + nctx->ctx_fl_frozen = 0; + nctx->ctx_ovfl_regs[0] = 0UL; + nctx->ctx_fl_trap_reason = PFM_TRAP_REASON_NONE; atomic_set(&nctx->ctx_last_cpu, -1); /* @@ -3827,6 +3920,8 @@ thread->flags |= IA64_THREAD_PM_VALID; } + preempt_enable(); + return 0; } @@ -3848,6 +3943,7 @@ /* * check sampling buffer */ + preempt_disable(); if (ctx->ctx_psb) { pfm_smpl_buffer_desc_t *psb = ctx->ctx_psb; @@ -3940,6 +4036,7 @@ } UNLOCK_CTX(ctx); + preempt_enable(); pfm_unreserve_session(task, ctx->ctx_fl_system, 1UL << ctx->ctx_cpu); @@ -4118,17 +4215,27 @@ { int ret; + /* some sanity checks */ - if (hdl == NULL || hdl->handler == NULL) return -EINVAL; + if (hdl == NULL || hdl->handler == NULL) { + return -EINVAL; + } /* do the easy test first */ - if (pfm_alternate_intr_handler) return -EBUSY; + if (pfm_alternate_intr_handler) { + return -EBUSY; + } + preempt_disable(); /* reserve our session */ ret = pfm_reserve_session(NULL, 1, cpu_online_map); - if (ret) return ret; + if (ret) { + preempt_enable(); + return ret; + } if (pfm_alternate_intr_handler) { + preempt_enable(); printk(KERN_DEBUG "perfmon: install_alternate, intr_handler not NULL " "after reserve\n"); return -EINVAL; @@ -4136,17 +4243,21 @@ pfm_alternate_intr_handler = hdl; + preempt_enable(); return 0; } int pfm_remove_alternate_syswide_subsystem(pfm_intr_handler_desc_t *hdl) { - if (hdl == NULL) return -EINVAL; + if (hdl == NULL) + return -EINVAL; /* cannot remove someone else's handler! */ - if (pfm_alternate_intr_handler != hdl) return -EINVAL; + if (pfm_alternate_intr_handler != hdl) + return -EINVAL; + preempt_disable(); pfm_alternate_intr_handler = NULL; /* @@ -4154,6 +4265,8 @@ */ pfm_unreserve_session(NULL, 1, cpu_online_map); + preempt_enable(); + return 0; } @@ -4234,8 +4347,9 @@ pfm_init_percpu(void) { int i; + int me = get_cpu(); - if (smp_processor_id() == 0) + if (me == 0) register_percpu_irq(IA64_PERFMON_VECTOR, &perfmon_irqaction); ia64_set_pmv(IA64_PERFMON_VECTOR); @@ -4259,6 +4373,7 @@ if (PMD_IS_IMPL(i) == 0) continue; ia64_set_pmd(i, 0UL); } + put_cpu(); pfm_freeze_pmu(); } diff -Nru a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c --- a/arch/ia64/kernel/process.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/process.c Tue Mar 11 22:06:17 2003 @@ -746,7 +746,7 @@ memcpy(tsk, orig, sizeof(struct task_struct) + sizeof(struct thread_info)); tsk->thread_info = (struct thread_info *) ((char *) tsk + IA64_TASK_SIZE); - atomic_set(&tsk->usage, 1); + atomic_set(&tsk->usage, 2); return tsk; } diff -Nru a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c --- a/arch/ia64/kernel/ptrace.c Tue Mar 11 22:06:20 2003 +++ b/arch/ia64/kernel/ptrace.c Tue Mar 11 22:06:20 2003 @@ -1,7 +1,7 @@ /* * Kernel support for the ptrace() and syscall tracing interfaces. * - * Copyright (C) 1999-2002 Hewlett-Packard Co + * Copyright (C) 1999-2003 Hewlett-Packard Co * David Mosberger-Tang * * Derived from the x86 and Alpha versions. Most of the code in here @@ -1235,19 +1235,12 @@ ret = 0; goto out_tsk; - case PTRACE_GETSIGINFO: - ret = -EIO; - if (!access_ok(VERIFY_WRITE, data, sizeof (siginfo_t)) || !child->thread.siginfo) - goto out_tsk; - ret = copy_siginfo_to_user((siginfo_t *) data, child->thread.siginfo); + case PTRACE_OLD_GETSIGINFO: /* for backwards-compatibility */ + ret = ptrace_request(child, PTRACE_GETSIGINFO, addr, data); goto out_tsk; - case PTRACE_SETSIGINFO: - ret = -EIO; - if (!access_ok(VERIFY_READ, data, sizeof (siginfo_t)) - || child->thread.siginfo == 0) - goto out_tsk; - ret = copy_siginfo_from_user(child->thread.siginfo, (siginfo_t *) data); + case PTRACE_OLD_SETSIGINFO: /* for backwards-compatibility */ + ret = ptrace_request(child, PTRACE_SETSIGINFO, addr, data); goto out_tsk; case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ @@ -1349,15 +1342,12 @@ * The 0x80 provides a way for the tracing parent to distinguish between a syscall * stop and SIGTRAP delivery. */ - current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) - ? 0x80 : 0); - set_current_state(TASK_STOPPED); - notify_parent(current, SIGCHLD); - schedule(); + ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); + /* - * This isn't the same as continuing with a signal, but it - * will do for normal use. strace only continues with a - * signal if the stopping signal is not SIGTRAP. -brl + * This isn't the same as continuing with a signal, but it will do for normal use. + * strace only continues with a signal if the stopping signal is not SIGTRAP. + * -brl */ if (current->exit_code) { send_sig(current->exit_code, current, 1); diff -Nru a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c --- a/arch/ia64/kernel/setup.c Tue Mar 11 22:06:15 2003 +++ b/arch/ia64/kernel/setup.c Tue Mar 11 22:06:15 2003 @@ -363,7 +363,7 @@ #ifdef CONFIG_ACPI_BOOT /* Initialize the ACPI boot-time table parser */ - acpi_table_init(*cmdline_p); + acpi_table_init(); # ifdef CONFIG_ACPI_NUMA acpi_numa_init(); # endif @@ -422,7 +422,7 @@ cpu_init(); /* initialize the bootstrap CPU */ #ifdef CONFIG_ACPI_BOOT - acpi_boot_init(*cmdline_p); + acpi_boot_init(); #endif #ifdef CONFIG_SERIAL_HCDP if (efi.hcdp) { diff -Nru a/arch/ia64/kernel/sigframe.h b/arch/ia64/kernel/sigframe.h --- a/arch/ia64/kernel/sigframe.h Tue Mar 11 22:06:19 2003 +++ b/arch/ia64/kernel/sigframe.h Tue Mar 11 22:06:19 2003 @@ -1,6 +1,6 @@ struct sigscratch { unsigned long scratch_unat; /* ar.unat for the general registers saved in pt */ - unsigned long pad; + unsigned long ar_pfs; /* for syscalls, the user-level function-state */ struct pt_regs pt; }; diff -Nru a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c --- a/arch/ia64/kernel/signal.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/signal.c Tue Mar 11 22:06:17 2003 @@ -315,7 +315,7 @@ static long setup_sigcontext (struct sigcontext *sc, sigset_t *mask, struct sigscratch *scr) { - unsigned long flags = 0, ifs, nat; + unsigned long flags = 0, ifs, cfm, nat; long err; ifs = scr->pt.cr_ifs; @@ -325,7 +325,9 @@ if ((ifs & (1UL << 63)) == 0) { /* if cr_ifs isn't valid, we got here through a syscall */ flags |= IA64_SC_FLAG_IN_SYSCALL; - } + cfm = scr->ar_pfs & ((1UL << 38) - 1); + } else + cfm = ifs & ((1UL << 38) - 1); ia64_flush_fph(current); if ((current->thread.flags & IA64_THREAD_FPH_VALID)) { flags |= IA64_SC_FLAG_FPH_VALID; @@ -344,6 +346,7 @@ err |= __put_user(nat, &sc->sc_nat); err |= PUT_SIGSET(mask, &sc->sc_mask); + err |= __put_user(cfm, &sc->sc_cfm); err |= __put_user(scr->pt.cr_ipsr & IA64_PSR_UM, &sc->sc_um); err |= __put_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); @@ -422,6 +425,15 @@ scr->pt.ar_fpsr = FPSR_DEFAULT; /* reset fpsr for signal handler */ scr->pt.cr_iip = tramp_addr; ia64_psr(&scr->pt)->ri = 0; /* start executing in first slot */ + /* + * Force the interruption function mask to zero. This has no effect when a + * system-call got interrupted by a signal (since, in that case, scr->pt_cr_ifs is + * ignored), but it has the desirable effect of making it possible to deliver a + * signal with an incomplete register frame (which happens when a mandatory RSE + * load faults). Furthermore, it has no negative effect on the getting the user's + * dirty partition preserved, because that's governed by scr->pt.loadrs. + */ + scr->pt.cr_ifs = (1UL << 63); /* * Note: this affects only the NaT bits of the scratch regs (the ones saved in @@ -522,7 +534,7 @@ if (signr <= 0) break; - ka = ¤t->sig->action[signr - 1]; + ka = ¤t->sighand->action[signr - 1]; if (restart) { switch (errno) { diff -Nru a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c --- a/arch/ia64/kernel/smp.c Tue Mar 11 22:06:20 2003 +++ b/arch/ia64/kernel/smp.c Tue Mar 11 22:06:20 2003 @@ -90,7 +90,7 @@ void handle_IPI (int irq, void *dev_id, struct pt_regs *regs) { - int this_cpu = smp_processor_id(); + int this_cpu = get_cpu(); unsigned long *pending_ipis = &__get_cpu_var(ipi_operation); unsigned long ops; @@ -146,8 +146,12 @@ } while (ops); mb(); /* Order data access and bit testing. */ } + put_cpu(); } +/* + * Called with preeemption disabled + */ static inline void send_IPI_single (int dest_cpu, int op) { @@ -155,6 +159,9 @@ platform_send_ipi(dest_cpu, IA64_IPI_VECTOR, IA64_IPI_DM_INT, 0); } +/* + * Called with preeemption disabled + */ static inline void send_IPI_allbutself (int op) { @@ -166,6 +173,9 @@ } } +/* + * Called with preeemption disabled + */ static inline void send_IPI_all (int op) { @@ -176,12 +186,18 @@ send_IPI_single(i, op); } +/* + * Called with preeemption disabled + */ static inline void send_IPI_self (int op) { send_IPI_single(smp_processor_id(), op); } +/* + * Called with preeemption disabled + */ void smp_send_reschedule (int cpu) { @@ -197,12 +213,15 @@ smp_send_reschedule_all (void) { int i; + int cpu = get_cpu(); /* disable preemption */ for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i) && i != smp_processor_id()) + if (cpu_online(i) && i != cpu) smp_send_reschedule(i); + put_cpu(); } + void smp_flush_tlb_all (void) { @@ -247,9 +266,11 @@ { struct call_data_struct data; int cpus = 1; + int me = get_cpu(); /* prevent preemption and reschedule on another processor */ - if (cpuid == smp_processor_id()) { + if (cpuid == me) { printk("%s: trying to call self\n", __FUNCTION__); + put_cpu(); return -EBUSY; } @@ -276,6 +297,7 @@ call_data = NULL; spin_unlock_bh(&call_lock); + put_cpu(); return 0; } diff -Nru a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c --- a/arch/ia64/kernel/sys_ia64.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/sys_ia64.c Tue Mar 11 22:06:17 2003 @@ -33,17 +33,8 @@ return -ENOMEM; #ifdef CONFIG_HUGETLB_PAGE -#define COLOR_HALIGN(addr) ((addr + HPAGE_SIZE - 1) & ~(HPAGE_SIZE - 1)) -#define TASK_HPAGE_BASE ((REGION_HPAGE << REGION_SHIFT) | HPAGE_SIZE) - if (filp && is_file_hugepages(filp)) { - if ((REGION_NUMBER(addr) != REGION_HPAGE) || (addr & (HPAGE_SIZE -1))) - addr = TASK_HPAGE_BASE; - addr = COLOR_HALIGN(addr); - } - else { - if (REGION_NUMBER(addr) == REGION_HPAGE) - addr = 0; - } + if (REGION_NUMBER(addr) == REGION_HPAGE) + addr = 0; #endif if (!addr) addr = TASK_UNMAPPED_BASE; diff -Nru a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c --- a/arch/ia64/kernel/time.c Tue Mar 11 22:06:16 2003 +++ b/arch/ia64/kernel/time.c Tue Mar 11 22:06:16 2003 @@ -25,7 +25,7 @@ #include extern unsigned long wall_jiffies; -extern unsigned long last_time_offset; +extern unsigned long last_nsec_offset; u64 jiffies_64 = INITIAL_JIFFIES; @@ -74,13 +74,13 @@ - (lost + 1)*cpu_data(time_keeper_id)->itm_delta); now = ia64_get_itc(); - if ((long) (now - last_tick) < 0) { + if (unlikely((long) (now - last_tick) < 0)) { printk(KERN_ERR "CPU %d: now < last_tick (now=0x%lx,last_tick=0x%lx)!\n", smp_processor_id(), now, last_tick); - return last_time_offset; + return last_nsec_offset; } elapsed_cycles = now - last_tick; - return (elapsed_cycles*local_cpu_data->usec_per_cyc) >> IA64_USEC_PER_CYC_SHIFT; + return (elapsed_cycles*local_cpu_data->nsec_per_cyc) >> IA64_NSEC_PER_CYC_SHIFT; } void @@ -115,30 +115,55 @@ void do_gettimeofday (struct timeval *tv) { - unsigned long seq, usec, sec, old; + unsigned long seq, nsec, usec, sec, old, offset; - do { + while (1) { seq = read_seqbegin(&xtime_lock); - usec = gettimeoffset(); - + { + old = last_nsec_offset; + offset = gettimeoffset(); + sec = xtime.tv_sec; + nsec = xtime.tv_nsec; + } + if (unlikely(read_seqretry(&xtime_lock, seq))) + continue; /* - * Ensure time never goes backwards, even when ITC on - * different CPUs are not perfectly synchronized. + * Ensure that for any pair of causally ordered gettimeofday() calls, time + * never goes backwards (even when ITC on different CPUs are not perfectly + * synchronized). (A pair of concurrent calls to gettimeofday() is by + * definition non-causal and hence it makes no sense to talk about + * time-continuity for such calls.) + * + * Doing this in a lock-free and race-free manner is tricky. Here is why + * it works (most of the time): read_seqretry() just succeeded, which + * implies we calculated a consistent (valid) value for "offset". If the + * cmpxchg() below succeeds, we further know that last_nsec_offset still + * has the same value as at the beginning of the loop, so there was + * presumably no timer-tick or other updates to last_nsec_offset in the + * meantime. This isn't 100% true though: there _is_ a possibility of a + * timer-tick occurring right right after read_seqretry() and then getting + * zero or more other readers which will set last_nsec_offset to the same + * value as the one we read at the beginning of the loop. If this + * happens, we'll end up returning a slightly newer time than we ought to + * (the jump forward is at most "offset" nano-seconds). There is no + * danger of causing time to go backwards, though, so we are safe in that + * sense. We could make the probability of this unlucky case occurring + * arbitrarily small by encoding a version number in last_nsec_offset, but + * even without versioning, the probability of this unlucky case should be + * so small that we won't worry about it. */ - do { - old = last_time_offset; - if (usec <= old) { - usec = old; - break; - } - } while (cmpxchg(&last_time_offset, old, usec) != old); - - sec = xtime.tv_sec; - usec += xtime.tv_nsec / 1000; - } while (read_seqend(&xtime_lock, seq)); + if (offset <= old) { + offset = old; + break; + } else if (likely(cmpxchg(&last_nsec_offset, old, offset) == old)) + break; + + /* someone else beat us to updating last_nsec_offset; try again */ + } + usec = (nsec + offset) / 1000; - while (usec >= 1000000) { + while (unlikely(usec >= 1000000)) { usec -= 1000000; ++sec; } @@ -278,7 +303,7 @@ local_cpu_data->proc_freq = (platform_base_freq*proc_ratio.num)/proc_ratio.den; local_cpu_data->itc_freq = itc_freq; local_cpu_data->cyc_per_usec = (itc_freq + 500000) / 1000000; - local_cpu_data->usec_per_cyc = ((1000000UL<nsec_per_cyc = ((1000000000UL<> 4) & 0xf) == 2) { /* NaT page consumption */ sig = SIGSEGV; code = SEGV_ACCERR; + addr = (void *) ifa; } else { /* register NaT consumption */ sig = SIGILL; code = ILL_ILLOPN; + addr = (void *) (regs->cr_iip + ia64_psr(regs)->ri); } siginfo.si_signo = sig; siginfo.si_code = code; siginfo.si_errno = 0; - siginfo.si_addr = (void *) (regs->cr_iip + ia64_psr(regs)->ri); + siginfo.si_addr = addr; siginfo.si_imm = vector; siginfo.si_flags = __ISR_VALID; siginfo.si_isr = isr; diff -Nru a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c --- a/arch/ia64/kernel/unwind.c Tue Mar 11 22:06:20 2003 +++ b/arch/ia64/kernel/unwind.c Tue Mar 11 22:06:20 2003 @@ -51,18 +51,24 @@ #define UNW_LOG_HASH_SIZE (UNW_LOG_CACHE_SIZE + 1) #define UNW_HASH_SIZE (1 << UNW_LOG_HASH_SIZE) -#define UNW_DEBUG 0 #define UNW_STATS 0 /* WARNING: this disabled interrupts for long time-spans!! */ -#if UNW_DEBUG - static long unw_debug_level = 255; -# define debug(level,format...) if (unw_debug_level > level) printk(format) -# define dprintk(format...) printk(format) -# define inline -#else -# define debug(level,format...) -# define dprintk(format...) -#endif +#ifdef UNW_DEBUG + static unsigned int unw_debug_level = UNW_DEBUG; +# ifdef CONFIG_KDB +# include +# define UNW_DEBUG_ON(n) (unw_debug_level >= n && !KDB_IS_RUNNING()) +# define UNW_DPRINT(n, ...) if (UNW_DEBUG_ON(n)) kdb_printf(__VA_ARGS__) +# else /* !CONFIG_KDB */ +# define UNW_DEBUG_ON(n) unw_debug_level >= n + /* Do not code a printk level, not all debug lines end in newline */ +# define UNW_DPRINT(n, ...) if (UNW_DEBUG_ON(n)) printk(__VA_ARGS__) +# endif /* CONFIG_KDB */ +# define inline +#else /* !UNW_DEBUG */ +# define UNW_DEBUG_ON(n) 0 +# define UNW_DPRINT(n, ...) +#endif /* UNW_DEBUG */ #if UNW_STATS # define STAT(x...) x @@ -111,7 +117,7 @@ /* script cache: */ struct unw_script cache[UNW_CACHE_SIZE]; -# if UNW_DEBUG +# ifdef UNW_DEBUG const char *preg_name[UNW_NUM_REGS]; # endif # if UNW_STATS @@ -190,7 +196,7 @@ struct_offset(struct unw_frame_info, fr_loc[31 - 16])/8, }, .hash = { [0 ... UNW_HASH_SIZE - 1] = -1 }, -#if UNW_DEBUG +#ifdef UNW_DEBUG .preg_name = { "pri_unat_gr", "pri_unat_mem", "bsp", "bspstore", "ar.pfs", "ar.rnat", "psp", "rp", "r4", "r5", "r6", "r7", @@ -223,10 +229,22 @@ else if (reg <= 31) off = struct_offset(struct pt_regs, r16) + 8*(reg - 16); else - dprintk("unwind: bad scratch reg r%lu\n", reg); + UNW_DPRINT(0, "unwind.%s: bad scratch reg r%lu\n", __FUNCTION__, reg); return off; } +static inline struct pt_regs * +get_scratch_regs (struct unw_frame_info *info) +{ + if (!info->pt) { + /* This should not happen with valid unwind info. */ + UNW_DPRINT(0, "unwind.%s: bad unwind info: resetting info->pt\n", __FUNCTION__); + info->pt = info->sp - 16; + } + UNW_DPRINT(3, "unwind.%s: sp 0x%lx pt 0x%lx\n", __FUNCTION__, info->sp, info->pt); + return (struct pt_regs *) info->pt; +} + int unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char *nat, int write) { @@ -235,7 +253,8 @@ struct pt_regs *pt; if ((unsigned) regnum - 1 >= 127) { - dprintk("unwind: trying to access non-existent r%u\n", regnum); + UNW_DPRINT(0, "unwind.%s: trying to access non-existent r%u\n", + __FUNCTION__, regnum); return -1; } @@ -280,8 +299,9 @@ if ((unsigned long) addr < info->regstk.limit || (unsigned long) addr >= info->regstk.top) { - dprintk("unwind: %p outside of regstk " - "[0x%lx-0x%lx)\n", (void *) addr, + UNW_DPRINT(0, "unwind.%s: %p outside of regstk " + "[0x%lx-0x%lx)\n", + __FUNCTION__, (void *) addr, info->regstk.limit, info->regstk.top); return -1; @@ -298,11 +318,13 @@ } } else { /* access a scratch register */ - if (info->flags & UNW_FLAG_INTERRUPT_FRAME) - pt = (struct pt_regs *) info->psp - 1; - else - pt = (struct pt_regs *) info->sp - 1; - addr = (unsigned long *) ((long) pt + pt_regs_off(regnum)); + if (!info->pt) { + UNW_DPRINT(0, "unwind.%s: no pt-regs; cannot access r%d\n", + __FUNCTION__, regnum); + return -1; + } + pt = get_scratch_regs(info); + addr = (unsigned long *) (pt + pt_regs_off(regnum)); if (info->pri_unat_loc) nat_addr = info->pri_unat_loc; else @@ -316,7 +338,8 @@ if ((unsigned long) addr < info->regstk.limit || (unsigned long) addr >= info->regstk.top) { - dprintk("unwind: ignoring attempt to access register outside of rbs\n"); + UNW_DPRINT(0, "unwind.%s: ignoring attempt to access register outside " + "of rbs\n", __FUNCTION__); return -1; } if ((unsigned long) nat_addr >= info->regstk.top) @@ -348,10 +371,7 @@ unsigned long *addr; struct pt_regs *pt; - if (info->flags & UNW_FLAG_INTERRUPT_FRAME) - pt = (struct pt_regs *) info->psp - 1; - else - pt = (struct pt_regs *) info->sp - 1; + pt = get_scratch_regs(info); switch (regnum) { /* scratch: */ case 0: addr = &pt->b0; break; @@ -366,7 +386,8 @@ break; default: - dprintk("unwind: trying to access non-existent b%u\n", regnum); + UNW_DPRINT(0, "unwind.%s: trying to access non-existent b%u\n", + __FUNCTION__, regnum); return -1; } if (write) @@ -383,14 +404,12 @@ struct pt_regs *pt; if ((unsigned) (regnum - 2) >= 126) { - dprintk("unwind: trying to access non-existent f%u\n", regnum); + UNW_DPRINT(0, "unwind.%s: trying to access non-existent f%u\n", + __FUNCTION__, regnum); return -1; } - if (info->flags & UNW_FLAG_INTERRUPT_FRAME) - pt = (struct pt_regs *) info->psp - 1; - else - pt = (struct pt_regs *) info->sp - 1; + pt = get_scratch_regs(info); if (regnum <= 5) { addr = *(&info->f2_loc + (regnum - 2)); @@ -428,11 +447,7 @@ unsigned long *addr; struct pt_regs *pt; - if (info->flags & UNW_FLAG_INTERRUPT_FRAME) - pt = (struct pt_regs *) info->psp - 1; - else - pt = (struct pt_regs *) info->sp - 1; - + pt = get_scratch_regs(info); switch (regnum) { case UNW_AR_BSP: addr = info->bsp_loc; @@ -495,7 +510,8 @@ break; default: - dprintk("unwind: trying to access non-existent ar%u\n", regnum); + UNW_DPRINT(0, "unwind.%s: trying to access non-existent ar%u\n", + __FUNCTION__, regnum); return -1; } @@ -612,7 +628,7 @@ default: break; } - dprintk("unwind: bad abreg=0x%x\n", abreg); + UNW_DPRINT(0, "unwind.%s: bad abreg=0x%x\n", __FUNCTION__, abreg); return UNW_REG_LC; } @@ -652,7 +668,7 @@ return; } } - dprintk("unwind: excess spill!\n"); + UNW_DPRINT(0, "unwind.%s: excess spill!\n", __FUNCTION__); } static inline void @@ -720,7 +736,7 @@ desc_prologue (int body, unw_word rlen, unsigned char mask, unsigned char grsave, struct unw_state_record *sr) { - int i; + int i, region_start; if (!(sr->in_body || sr->first_region)) finish_prologue(sr); @@ -732,19 +748,20 @@ return; } + region_start = sr->region_start + sr->region_len; + for (i = 0; i < sr->epilogue_count; ++i) pop(sr); sr->epilogue_count = 0; sr->epilogue_start = UNW_WHEN_NEVER; - if (!body) - push(sr); - - sr->region_start += sr->region_len; + sr->region_start = region_start; sr->region_len = rlen; sr->in_body = body; if (!body) { + push(sr); + for (i = 0; i < 4; ++i) { if (mask & 0x8) set_reg(sr->curr.reg + unw.save_order[i], UNW_WHERE_GR, @@ -765,10 +782,13 @@ static inline void desc_abi (unsigned char abi, unsigned char context, struct unw_state_record *sr) { - if (abi == 0 && context == 'i') + if (abi == 0 && context == 'i') { sr->flags |= UNW_FLAG_INTERRUPT_FRAME; + UNW_DPRINT(3, "unwind.%s: interrupt frame\n", __FUNCTION__); + } else - dprintk("unwind: ignoring unwabi(abi=0x%x,context=0x%x)\n", abi, context); + UNW_DPRINT(0, "unwind%s: ignoring unwabi(abi=0x%x,context=0x%x)\n", + __FUNCTION__, abi, context); } static inline void @@ -1136,6 +1156,9 @@ unsigned short index; unsigned long ip, pr; + if (UNW_DEBUG_ON(0)) + return 0; /* Always regenerate scripts in debug mode */ + STAT(++unw.stat.cache.lookups); ip = info->ip; @@ -1260,8 +1283,8 @@ script_emit (struct unw_script *script, struct unw_insn insn) { if (script->count >= UNW_MAX_SCRIPT_LEN) { - dprintk("unwind: script exceeds maximum size of %u instructions!\n", - UNW_MAX_SCRIPT_LEN); + UNW_DPRINT(0, "unwind.%s: script exceeds maximum size of %u instructions!\n", + __FUNCTION__, UNW_MAX_SCRIPT_LEN); return; } script->insn[script->count++] = insn; @@ -1302,7 +1325,8 @@ break; default: - dprintk("unwind: don't know how to emit nat info for where = %u\n", r->where); + UNW_DPRINT(0, "unwind.%s: don't know how to emit nat info for where = %u\n", + __FUNCTION__, r->where); return; } insn.opc = opc; @@ -1339,8 +1363,9 @@ } val = unw.preg_index[UNW_REG_R4 + (rval - 4)]; } else { - opc = UNW_INSN_ADD_SP; - val = -sizeof(struct pt_regs) + pt_regs_off(rval); + /* register got spilled to a scratch register */ + opc = UNW_INSN_MOVE_SCRATCH; + val = pt_regs_off(rval); } break; @@ -1350,12 +1375,12 @@ else if (rval >= 16 && rval <= 31) val = unw.preg_index[UNW_REG_F16 + (rval - 16)]; else { - opc = UNW_INSN_ADD_SP; - val = -sizeof(struct pt_regs); + opc = UNW_INSN_MOVE_SCRATCH; if (rval <= 9) - val += struct_offset(struct pt_regs, f6) + 16*(rval - 6); + val = struct_offset(struct pt_regs, f6) + 16*(rval - 6); else - dprintk("unwind: kernel may not touch f%lu\n", rval); + UNW_DPRINT(0, "unwind.%s: kernel may not touch f%lu\n", + __FUNCTION__, rval); } break; @@ -1363,14 +1388,13 @@ if (rval >= 1 && rval <= 5) val = unw.preg_index[UNW_REG_B1 + (rval - 1)]; else { - opc = UNW_INSN_ADD_SP; - val = -sizeof(struct pt_regs); + opc = UNW_INSN_MOVE_SCRATCH; if (rval == 0) - val += struct_offset(struct pt_regs, b0); + val = struct_offset(struct pt_regs, b0); else if (rval == 6) - val += struct_offset(struct pt_regs, b6); + val = struct_offset(struct pt_regs, b6); else - val += struct_offset(struct pt_regs, b7); + val = struct_offset(struct pt_regs, b7); } break; @@ -1383,7 +1407,8 @@ break; default: - dprintk("unwind: register %u has unexpected `where' value of %u\n", i, r->where); + UNW_DPRINT(0, "unwind%s: register %u has unexpected `where' value of %u\n", + __FUNCTION__, i, r->where); break; } insn.opc = opc; @@ -1456,9 +1481,10 @@ r->when = UNW_WHEN_NEVER; sr.pr_val = info->pr; + UNW_DPRINT(3, "unwind.%s: ip 0x%lx\n", __FUNCTION__, ip); script = script_new(ip); if (!script) { - dprintk("unwind: failed to create unwind script\n"); + UNW_DPRINT(0, "unwind.%s: failed to create unwind script\n", __FUNCTION__); STAT(unw.stat.script.build_time += ia64_get_itc() - start); return 0; } @@ -1476,8 +1502,8 @@ } if (!e) { /* no info, return default unwinder (leaf proc, no mem stack, no saved regs) */ - dprintk("unwind: no unwind info for ip=0x%lx (prev ip=0x%lx)\n", ip, - unw.cache[info->prev_script].ip); + UNW_DPRINT(1, "unwind.%s: no unwind info for ip=0x%lx (prev ip=0x%lx)\n", + __FUNCTION__, ip, unw.cache[info->prev_script].ip); sr.curr.reg[UNW_REG_RP].where = UNW_WHERE_BR; sr.curr.reg[UNW_REG_RP].when = -1; sr.curr.reg[UNW_REG_RP].val = 0; @@ -1525,26 +1551,32 @@ sr.curr.reg[UNW_REG_RP].where = UNW_WHERE_BR; sr.curr.reg[UNW_REG_RP].when = -1; sr.curr.reg[UNW_REG_RP].val = sr.return_link_reg; + UNW_DPRINT(1, "unwind.%s: using default for rp at ip=0x%lx where=%d val=0x%lx\n", + __FUNCTION__, ip, sr.curr.reg[UNW_REG_RP].where, + sr.curr.reg[UNW_REG_RP].val); } -#if UNW_DEBUG - printk("unwind: state record for func 0x%lx, t=%u:\n", - table->segment_base + e->start_offset, sr.when_target); +#ifdef UNW_DEBUG + UNW_DPRINT(1, "unwind.%s: state record for func 0x%lx, t=%u:\n", + __FUNCTION__, table->segment_base + e->start_offset, sr.when_target); for (r = sr.curr.reg; r < sr.curr.reg + UNW_NUM_REGS; ++r) { if (r->where != UNW_WHERE_NONE || r->when != UNW_WHEN_NEVER) { - printk(" %s <- ", unw.preg_name[r - sr.curr.reg]); + UNW_DPRINT(1, " %s <- ", unw.preg_name[r - sr.curr.reg]); switch (r->where) { - case UNW_WHERE_GR: printk("r%lu", r->val); break; - case UNW_WHERE_FR: printk("f%lu", r->val); break; - case UNW_WHERE_BR: printk("b%lu", r->val); break; - case UNW_WHERE_SPREL: printk("[sp+0x%lx]", r->val); break; - case UNW_WHERE_PSPREL: printk("[psp+0x%lx]", r->val); break; + case UNW_WHERE_GR: UNW_DPRINT(1, "r%lu", r->val); break; + case UNW_WHERE_FR: UNW_DPRINT(1, "f%lu", r->val); break; + case UNW_WHERE_BR: UNW_DPRINT(1, "b%lu", r->val); break; + case UNW_WHERE_SPREL: UNW_DPRINT(1, "[sp+0x%lx]", r->val); break; + case UNW_WHERE_PSPREL: UNW_DPRINT(1, "[psp+0x%lx]", r->val); break; case UNW_WHERE_NONE: - printk("%s+0x%lx", unw.preg_name[r - sr.curr.reg], r->val); + UNW_DPRINT(1, "%s+0x%lx", unw.preg_name[r - sr.curr.reg], r->val); + break; + + default: + UNW_DPRINT(1, "BADWHERE(%d)", r->where); break; - default: printk("BADWHERE(%d)", r->where); break; } - printk("\t\t%d\n", r->when); + UNW_DPRINT(1, "\t\t%d\n", r->when); } } #endif @@ -1642,6 +1674,16 @@ s[dst] = s[val]; break; + case UNW_INSN_MOVE_SCRATCH: + if (state->pt) { + s[dst] = (unsigned long) get_scratch_regs(state) + val; + } else { + s[dst] = 0; + UNW_DPRINT(0, "unwind.%s: no state->pt, dst=%ld, val=%ld\n", + __FUNCTION__, dst, val); + } + break; + case UNW_INSN_MOVE_STACKED: s[dst] = (unsigned long) ia64_rse_skip_regs((unsigned long *)state->bsp, val); @@ -1667,11 +1709,12 @@ break; case UNW_INSN_LOAD: -#if UNW_DEBUG +#ifdef UNW_DEBUG if ((s[val] & (local_cpu_data->unimpl_va_mask | 0x7)) != 0 || s[val] < TASK_SIZE) { - debug(1, "unwind: rejecting bad psp=0x%lx\n", s[val]); + UNW_DPRINT(0, "unwind.%s: rejecting bad psp=0x%lx\n", + __FUNCTION__, s[val]); break; } #endif @@ -1704,7 +1747,8 @@ if ((info->ip & (local_cpu_data->unimpl_va_mask | 0xf)) || info->ip < TASK_SIZE) { /* don't let obviously bad addresses pollute the cache */ - debug(1, "unwind: rejecting bad ip=0x%lx\n", info->ip); + /* FIXME: should really be level 0 but it occurs too often. KAO */ + UNW_DPRINT(1, "unwind.%s: rejecting bad ip=0x%lx\n", __FUNCTION__, info->ip); info->rp_loc = 0; return -1; } @@ -1713,8 +1757,9 @@ if (!scr) { scr = build_script(info); if (!scr) { - dprintk("unwind: failed to locate/build unwind script for ip %lx\n", - info->ip); + UNW_DPRINT(0, + "unwind.%s: failed to locate/build unwind script for ip %lx\n", + __FUNCTION__, info->ip); return -1; } have_write_lock = 1; @@ -1747,7 +1792,9 @@ /* restore the ip */ if (!info->rp_loc) { - debug(1, "unwind: failed to locate return link (ip=0x%lx)!\n", info->ip); + /* FIXME: should really be level 0 but it occurs too often. KAO */ + UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", + __FUNCTION__, info->ip); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } @@ -1757,14 +1804,14 @@ * We don't have unwind info for the gate page, so we consider that part * of user-space for the purpose of unwinding. */ - debug(1, "unwind: reached user-space (ip=0x%lx)\n", ip); + UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } /* restore the cfm: */ if (!info->pfs_loc) { - dprintk("unwind: failed to locate ar.pfs!\n"); + UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } @@ -1774,16 +1821,18 @@ pr = info->pr; num_regs = 0; if ((info->flags & UNW_FLAG_INTERRUPT_FRAME)) { + info->pt = info->sp + 16; if ((pr & (1UL << pNonSys)) != 0) num_regs = *info->cfm_loc & 0x7f; /* size of frame */ info->pfs_loc = - (unsigned long *) (info->sp + 16 + struct_offset(struct pt_regs, ar_pfs)); + (unsigned long *) (info->pt + struct_offset(struct pt_regs, ar_pfs)); + UNW_DPRINT(3, "unwind.%s: interrupt_frame pt 0x%lx\n", __FUNCTION__, info->pt); } else num_regs = (*info->cfm_loc >> 7) & 0x7f; /* size of locals */ info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->bsp, -num_regs); if (info->bsp < info->regstk.limit || info->bsp > info->regstk.top) { - dprintk("unwind: bsp (0x%lx) out of range [0x%lx-0x%lx]\n", - info->bsp, info->regstk.limit, info->regstk.top); + UNW_DPRINT(0, "unwind.%s: bsp (0x%lx) out of range [0x%lx-0x%lx]\n", + __FUNCTION__, info->bsp, info->regstk.limit, info->regstk.top); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } @@ -1791,14 +1840,15 @@ /* restore the sp: */ info->sp = info->psp; if (info->sp < info->memstk.top || info->sp > info->memstk.limit) { - dprintk("unwind: sp (0x%lx) out of range [0x%lx-0x%lx]\n", - info->sp, info->memstk.top, info->memstk.limit); + UNW_DPRINT(0, "unwind.%s: sp (0x%lx) out of range [0x%lx-0x%lx]\n", + __FUNCTION__, info->sp, info->memstk.top, info->memstk.limit); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } if (info->ip == prev_ip && info->sp == prev_sp && info->bsp == prev_bsp) { - dprintk("unwind: ip, sp, bsp remain unchanged; stopping here (ip=0x%lx)\n", ip); + UNW_DPRINT(0, "unwind.%s: ip, sp, bsp unchanged; stopping here (ip=0x%lx)\n", + __FUNCTION__, ip); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } @@ -1822,7 +1872,8 @@ while (unw_unwind(info) >= 0) { if (unw_get_rp(info, &ip) < 0) { unw_get_ip(info, &ip); - dprintk("unwind: failed to read return pointer (ip=0x%lx)\n", ip); + UNW_DPRINT(0, "unwind.%s: failed to read return pointer (ip=0x%lx)\n", + __FUNCTION__, ip); return -1; } /* @@ -1833,7 +1884,7 @@ return 0; } unw_get_ip(info, &ip); - dprintk("unwind: failed to unwind to user-level (ip=0x%lx)\n", ip); + UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n", __FUNCTION__, ip); return -1; } @@ -1874,11 +1925,30 @@ info->task = t; info->sw = sw; info->sp = info->psp = (unsigned long) (sw + 1) - 16; + info->pt = 0; info->cfm_loc = &sw->ar_pfs; sol = (*info->cfm_loc >> 7) & 0x7f; info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->regstk.top, -sol); info->ip = sw->b0; info->pr = sw->pr; + UNW_DPRINT(3, + "unwind.%s\n" + " rbslimit 0x%lx\n" + " rbstop 0x%lx\n" + " stklimit 0x%lx\n" + " stktop 0x%lx\n" + " task 0x%lx\n" + " sw 0x%lx\n", + __FUNCTION__, rbslimit, rbstop, stklimit, stktop, + (unsigned long)(info->task), + (unsigned long)(info->sw)); + UNW_DPRINT(3, + " sp/psp 0x%lx\n" + " sol 0x%lx\n" + " bsp 0x%lx\n" + " ip 0x%lx\n" + " pr 0x%lx\n", + info->sp, sol, info->bsp, info->ip, info->pr); find_save_locs(info); STAT(unw.stat.api.init_time += ia64_get_itc() - start; local_irq_restore(flags)); @@ -1889,6 +1959,7 @@ { struct switch_stack *sw = (struct switch_stack *) (t->thread.ksp + 16); + UNW_DPRINT(1, "unwind.%s\n", __FUNCTION__); unw_init_frame_info(info, t, sw); } @@ -1916,7 +1987,8 @@ unsigned long flags; if (end - start <= 0) { - dprintk("unwind: ignoring attempt to insert empty unwind table\n"); + UNW_DPRINT(0, "unwind.%s: ignoring attempt to insert empty unwind table\n", + __FUNCTION__); return 0; } @@ -1946,13 +2018,15 @@ long index; if (!handle) { - dprintk("unwind: ignoring attempt to remove non-existent unwind table\n"); + UNW_DPRINT(0, "unwind.%s: ignoring attempt to remove non-existent unwind table\n", + __FUNCTION__); return; } table = handle; if (table == &unw.kernel_table) { - dprintk("unwind: sorry, freeing the kernel's unwind table is a no-can-do!\n"); + UNW_DPRINT(0, "unwind.%s: sorry, freeing the kernel's unwind table is a " + "no-can-do!\n", __FUNCTION__); return; } @@ -1964,7 +2038,8 @@ if (prev->next == table) break; if (!prev) { - dprintk("unwind: failed to find unwind table %p\n", (void *) table); + UNW_DPRINT(0, "unwind.%s: failed to find unwind table %p\n", + __FUNCTION__, (void *) table); spin_unlock_irqrestore(&unw.lock, flags); return; } diff -Nru a/arch/ia64/kernel/unwind_i.h b/arch/ia64/kernel/unwind_i.h --- a/arch/ia64/kernel/unwind_i.h Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/kernel/unwind_i.h Tue Mar 11 22:06:17 2003 @@ -137,7 +137,8 @@ UNW_INSN_SETNAT_MEMSTK, /* s[dst+1].nat.type = MEMSTK; s[dst+1].nat.off = *s.pri_unat - s[dst] */ UNW_INSN_SETNAT_TYPE, /* s[dst+1].nat.type = val */ - UNW_INSN_LOAD /* s[dst] = *s[val] */ + UNW_INSN_LOAD, /* s[dst] = *s[val] */ + UNW_INSN_MOVE_SCRATCH, /* s[dst] = scratch reg "val" */ }; struct unw_insn { diff -Nru a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c --- a/arch/ia64/mm/fault.c Tue Mar 11 22:06:19 2003 +++ b/arch/ia64/mm/fault.c Tue Mar 11 22:06:19 2003 @@ -55,7 +55,7 @@ /* * If we're in an interrupt or have no user context, we must not take the fault.. */ - if (in_interrupt() || !mm) + if (in_atomic() || !mm) goto no_context; down_read(&mm->mmap_sem); @@ -79,7 +79,7 @@ # if (((1 << VM_READ_BIT) != VM_READ || (1 << VM_WRITE_BIT) != VM_WRITE) \ || (1 << VM_EXEC_BIT) != VM_EXEC) -# error File is out of sync with . Pleaes update. +# error File is out of sync with . Please update. # endif mask = ( (((isr >> IA64_ISR_X_BIT) & 1UL) << VM_EXEC_BIT) diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c --- a/arch/ia64/mm/hugetlbpage.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/mm/hugetlbpage.c Tue Mar 11 22:06:17 2003 @@ -19,6 +19,8 @@ #include +#define TASK_HPAGE_BASE (REGION_HPAGE << REGION_SHIFT) + static long htlbpagemem; int htlbpage_max; static long htlbzone_pages; @@ -98,7 +100,6 @@ set_pte(page_table, entry); return; } - /* * This function checks for proper alignment of input addr and len parameters. */ @@ -108,6 +109,20 @@ return -EINVAL; if (addr & ~HPAGE_MASK) return -EINVAL; + if (REGION_NUMBER(addr) != REGION_HPAGE) + return -EINVAL; + + return 0; +} +/* This function checks if the address and address+len falls out of HugeTLB region. It + * return -EINVAL if any part of address range falls in HugeTLB region. + */ +int is_invalid_hugepage_range(unsigned long addr, unsigned long len) +{ + if (REGION_NUMBER(addr) == REGION_HPAGE) + return -EINVAL; + if (REGION_NUMBER(addr+len) == REGION_HPAGE) + return -EINVAL; return 0; } @@ -173,6 +188,39 @@ return i; } +struct vm_area_struct *hugepage_vma(struct mm_struct *mm, unsigned long addr) +{ + if (mm->used_hugetlb) { + if (REGION_NUMBER(addr) == REGION_HPAGE) { + struct vm_area_struct *vma = find_vma(mm, addr); + if (vma && is_vm_hugetlb_page(vma)) + return vma; + } + } + return NULL; +} + +struct page *follow_huge_addr(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, int write) +{ + struct page *page; + pte_t *ptep; + + ptep = huge_pte_offset(mm, addr); + page = pte_page(*ptep); + page += ((addr & ~HPAGE_MASK) >> PAGE_SHIFT); + get_page(page); + return page; +} +int pmd_huge(pmd_t pmd) +{ + return 0; +} +struct page * +follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) +{ + return NULL; +} + void free_huge_page(struct page *page) { BUG_ON(page_count(page)); @@ -204,8 +252,6 @@ BUG_ON(start & (HPAGE_SIZE - 1)); BUG_ON(end & (HPAGE_SIZE - 1)); - spin_lock(&htlbpage_lock); - spin_unlock(&htlbpage_lock); for (address = start; address < end; address += HPAGE_SIZE) { pte = huge_pte_offset(mm, address); if (pte_none(*pte)) @@ -257,8 +303,12 @@ ret = -ENOMEM; goto out; } - add_to_page_cache(page, mapping, idx, GFP_ATOMIC); + ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); unlock_page(page); + if (ret) { + free_huge_page(page); + goto out; + } } set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); } @@ -267,6 +317,29 @@ return ret; } +unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, + unsigned long pgoff, unsigned long flags) +{ + struct vm_area_struct *vmm; + + if (len > RGN_MAP_LIMIT) + return -ENOMEM; + if (len & ~HPAGE_MASK) + return -EINVAL; + /* This code assumes that REGION_HPAGE != 0. */ + if ((REGION_NUMBER(addr) != REGION_HPAGE) || (addr & (HPAGE_SIZE - 1))) + addr = TASK_HPAGE_BASE; + else + addr = ALIGN(addr, HPAGE_SIZE); + for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) { + /* At this point: (!vmm || addr < vmm->vm_end). */ + if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT) + return -ENOMEM; + if (!vmm || (addr + len) <= vmm->vm_start) + return addr; + addr = ALIGN(vmm->vm_end, HPAGE_SIZE); + } +} void update_and_free_page(struct page *page) { int j; @@ -302,8 +375,8 @@ break; } page = list_entry(p, struct page, list); - if ((page_zone(page))->name[0] != 'H') // Look for non-Highmem - map = page; + if (!PageHighMem(page)) + map = page; } if (map) { list_del(&map->list); @@ -317,8 +390,8 @@ int set_hugetlb_mem_size(int count) { - int j, lcount; - struct page *page, *map; + int lcount; + struct page *page ; extern long htlbzone_pages; extern struct list_head htlbpage_freelist; @@ -417,5 +490,4 @@ struct vm_operations_struct hugetlb_vm_ops = { .nopage = hugetlb_nopage, - .close = zap_hugetlb_resources, }; diff -Nru a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c --- a/arch/ia64/mm/tlb.c Tue Mar 11 22:06:18 2003 +++ b/arch/ia64/mm/tlb.c Tue Mar 11 22:06:18 2003 @@ -81,9 +81,13 @@ } read_unlock(&tasklist_lock); /* can't call flush_tlb_all() here because of race condition with O(1) scheduler [EF] */ - for (i = 0; i < NR_CPUS; ++i) - if (i != smp_processor_id()) - per_cpu(ia64_need_tlb_flush, i) = 1; + { + int cpu = get_cpu(); /* prevent preemption/migration */ + for (i = 0; i < NR_CPUS; ++i) + if (i != cpu) + per_cpu(ia64_need_tlb_flush, i) = 1; + put_cpu(); + } local_flush_tlb_all(); } diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c Tue Mar 11 22:06:17 2003 +++ b/arch/ia64/pci/pci.c Tue Mar 11 22:06:17 2003 @@ -272,3 +272,76 @@ return 0; } + +/** + * pci_cacheline_size - determine cacheline size for PCI devices + * @dev: void + * + * We want to use the line-size of the outer-most cache. We assume + * that this line-size is the same for all CPUs. + * + * Code mostly taken from arch/ia64/kernel/palinfo.c:cache_info(). + * + * RETURNS: An appropriate -ERRNO error value on eror, or zero for success. + */ +static unsigned long +pci_cacheline_size (void) +{ + u64 levels, unique_caches; + s64 status; + pal_cache_config_info_t cci; + static u8 cacheline_size; + + if (cacheline_size) + return cacheline_size; + + status = ia64_pal_cache_summary(&levels, &unique_caches); + if (status != 0) { + printk(KERN_ERR "%s: ia64_pal_cache_summary() failed (status=%ld)\n", + __FUNCTION__, status); + return SMP_CACHE_BYTES; + } + + status = ia64_pal_cache_config_info(levels - 1, /* cache_type (data_or_unified)= */ 2, + &cci); + if (status != 0) { + printk(KERN_ERR "%s: ia64_pal_cache_config_info() failed (status=%ld)\n", + __FUNCTION__, status); + return SMP_CACHE_BYTES; + } + cacheline_size = 1 << cci.pcci_line_size; + return cacheline_size; +} + +/** + * pcibios_prep_mwi - helper function for drivers/pci/pci.c:pci_set_mwi() + * @dev: the PCI device for which MWI is enabled + * + * For ia64, we can get the cacheline sizes from PAL. + * + * RETURNS: An appropriate -ERRNO error value on eror, or zero for success. + */ +int +pcibios_prep_mwi (struct pci_dev *dev) +{ + unsigned long desired_linesize, current_linesize; + int rc = 0; + u8 pci_linesize; + + desired_linesize = pci_cacheline_size(); + + pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &pci_linesize); + current_linesize = 4 * pci_linesize; + if (desired_linesize != current_linesize) { + printk(KERN_WARNING "PCI: slot %s has incorrect PCI cache line size of %lu bytes,", + dev->slot_name, current_linesize); + if (current_linesize > desired_linesize) { + printk(" expected %lu bytes instead\n", desired_linesize); + rc = -EINVAL; + } else { + printk(" correcting to %lu\n", desired_linesize); + pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, desired_linesize / 4); + } + } + return rc; +} diff -Nru a/arch/ia64/sn/io/Makefile b/arch/ia64/sn/io/Makefile --- a/arch/ia64/sn/io/Makefile Tue Mar 11 22:06:16 2003 +++ b/arch/ia64/sn/io/Makefile Tue Mar 11 22:06:16 2003 @@ -17,6 +17,6 @@ hcl.o labelcl.o invent.o sgi_io_sim.o \ klgraph_hack.o hcl_util.o cdl.o hubdev.o hubspc.o \ alenlist.o pci.o pci_dma.o ate_utils.o \ - ifconfig_net.o io.o ifconfig_bus.o + ifconfig_net.o io.o ioconfig_bus.o obj-$(CONFIG_PCIBA) += pciba.o diff -Nru a/arch/ia64/sn/io/ioconfig_bus.c b/arch/ia64/sn/io/ioconfig_bus.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ia64/sn/io/ioconfig_bus.c Tue Mar 11 22:06:20 2003 @@ -0,0 +1,402 @@ +/* $Id$ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * ioconfig_bus - SGI's Persistent PCI Bus Numbering. + * + * Copyright (C) 1992-1997, 2000-2003 Silicon Graphics, Inc. All rights reserved. + */ + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SGI_IOCONFIG_BUS "SGI-PERSISTENT PCI BUS NUMBERING" +#define SGI_IOCONFIG_BUS_VERSION "1.0" + +/* + * Some Global definitions. + */ +devfs_handle_t ioconfig_bus_handle = NULL; +unsigned long ioconfig_bus_debug = 0; + +#ifdef IOCONFIG_BUS_DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif + +u64 ioconfig_file = 0; +u64 ioconfig_file_size = 0; +u64 ioconfig_activated = 0; +char ioconfig_kernopts[128]; + +/* + * For debugging purpose .. hardcode a table .. + */ +struct ascii_moduleid *ioconfig_bus_table; +u64 ioconfig_bus_table_size = 0; + + +int free_entry = 0; +int new_entry = 0; + +int next_basebus_number = 0; + +void +ioconfig_get_busnum(char *io_moduleid, int *bus_num) +{ + struct ascii_moduleid *temp; + int index; + + DBG("ioconfig_get_busnum io_moduleid %s\n", io_moduleid); + + *bus_num = -1; + temp = ioconfig_bus_table; + for (index = 0; index < free_entry; temp++, index++) { + if ( (io_moduleid[0] == temp->io_moduleid[0]) && + (io_moduleid[1] == temp->io_moduleid[1]) && + (io_moduleid[2] == temp->io_moduleid[2]) && + (io_moduleid[4] == temp->io_moduleid[4]) && + (io_moduleid[5] == temp->io_moduleid[5]) ) { + *bus_num = index * 0x10; + return; + } + } + + /* + * New IO Brick encountered. + */ + if (((int)io_moduleid[0]) == 0) { + DBG("ioconfig_get_busnum: Invalid Module Id given %s\n", io_moduleid); + return; + } + + io_moduleid[3] = '#'; + strcpy((char *)&(ioconfig_bus_table[free_entry].io_moduleid), io_moduleid); + *bus_num = free_entry * 0x10; + free_entry++; +} + +void +dump_ioconfig_table() +{ + + int index = 0; + struct ascii_moduleid *temp; + + temp = ioconfig_bus_table; + while (index < free_entry) { + DBG("ASSCI Module ID %s\n", temp->io_moduleid); + temp++; + index++; + } +} + +/* + * nextline + * This routine returns the nextline in the buffer. + */ +int nextline(char *buffer, char **next, char *line) +{ + + char *temp; + + if (buffer[0] == 0x0) { + return(0); + } + + temp = buffer; + while (*temp != 0) { + *line = *temp; + if (*temp != '\n'){ + *line = *temp; + temp++; line++; + } else + break; + } + + if (*temp == 0) + *next = temp; + else + *next = ++temp; + + return(1); +} + +/* + * build_pcibus_name + * This routine parses the ioconfig contents read into + * memory by ioconfig command in EFI and builds the + * persistent pci bus naming table. + */ +void +build_moduleid_table(char *file_contents, struct ascii_moduleid *table) +{ + /* + * Read the whole file into memory. + */ + int rc; + char *name; + char *temp; + char *next; + char *current; + char *line; + struct ascii_moduleid *moduleid; + + line = kmalloc(256, GFP_KERNEL); + memset(line, 0,256); + name = kmalloc(125, GFP_KERNEL); + memset(name, 0, 125); + moduleid = table; + current = file_contents; + while (nextline(current, &next, line)){ + + DBG("current 0x%lx next 0x%lx\n", current, next); + + temp = line; + /* + * Skip all leading Blank lines .. + */ + while (isspace(*temp)) + if (*temp != '\n') + temp++; + else + break; + + if (*temp == '\n') { + current = next; + memset(line, 0, 256); + continue; + } + + /* + * Skip comment lines + */ + if (*temp == '#') { + current = next; + memset(line, 0, 256); + continue; + } + + /* + * Get the next free entry in the table. + */ + rc = sscanf(temp, "%s", name); + strcpy(&moduleid->io_moduleid[0], name); + DBG("Found %s\n", name); + moduleid++; + free_entry++; + current = next; + memset(line, 0, 256); + } + + new_entry = free_entry; + kfree(line); + kfree(name); + + return; +} + +void +ioconfig_bus_init(void) +{ + + struct ia64_sal_retval ret_stuff; + u64 *temp; + int cnode; + + DBG("ioconfig_bus_init called.\n"); + + for (cnode = 0; cnode < numnodes; cnode++) { + nasid_t nasid; + /* + * Make SAL call to get the address of the bus configuration table. + */ + ret_stuff.status = (uint64_t)0; + ret_stuff.v0 = (uint64_t)0; + ret_stuff.v1 = (uint64_t)0; + ret_stuff.v2 = (uint64_t)0; + nasid = COMPACT_TO_NASID_NODEID(cnode); + SAL_CALL(ret_stuff, SN_SAL_BUS_CONFIG, 0, nasid, 0, 0, 0, 0, 0); + temp = (u64 *)TO_NODE_CAC(nasid, ret_stuff.v0); + ioconfig_file = *temp; + DBG("ioconfig_bus_init: Nasid %d ret_stuff.v0 0x%lx\n", nasid, + ret_stuff.v0); + if (ioconfig_file) { + ioconfig_file_size = ret_stuff.v1; + ioconfig_file = (ioconfig_file | CACHEABLE_MEM_SPACE); + ioconfig_activated = 1; + break; + } + } + + DBG("ioconfig_bus_init: ret_stuff.v0 %p ioconfig_file %p %d\n", + ret_stuff.v0, (void *)ioconfig_file, (int)ioconfig_file_size); + + ioconfig_bus_table = kmalloc( 512, GFP_KERNEL ); + memset(ioconfig_bus_table, 0, 512); + + /* + * If ioconfig options are given on the bootline .. take it. + */ + if (*ioconfig_kernopts != '\0') { + /* + * ioconfig="..." kernel options given. + */ + DBG("ioconfig_bus_init: Kernel Options given.\n"); + (void) build_moduleid_table((char *)ioconfig_kernopts, ioconfig_bus_table); + (void) dump_ioconfig_table(ioconfig_bus_table); + return; + } + + if (ioconfig_activated) { + DBG("ioconfig_bus_init: ioconfig file given.\n"); + (void) build_moduleid_table((char *)ioconfig_file, ioconfig_bus_table); + (void) dump_ioconfig_table(ioconfig_bus_table); + } else { + DBG("ioconfig_bus_init: ioconfig command not executed in prom\n"); + } + +} + +void +ioconfig_bus_new_entries(void) +{ + + + int index = 0; + struct ascii_moduleid *temp; + + if ((ioconfig_activated) && (free_entry > new_entry)) { + printk("### Please add the following new IO Bricks Module ID \n"); + printk("### to your Persistent Bus Numbering Config File\n"); + } else + return; + + index = new_entry; + temp = &ioconfig_bus_table[index]; + while (index < free_entry) { + printk("%s\n", temp); + temp++; + index++; + } + printk("### End\n"); + +} +static int ioconfig_bus_ioctl(struct inode * inode, struct file * file, + unsigned int cmd, unsigned long arg) +{ + + struct ioconfig_parm parm; + + /* + * Copy in the parameters. + */ + copy_from_user(&parm, (char *)arg, sizeof(struct ioconfig_parm)); + parm.number = free_entry - new_entry; + parm.ioconfig_activated = ioconfig_activated; + copy_to_user((char *)arg, &parm, sizeof(struct ioconfig_parm)); + copy_to_user((char *)parm.buffer, &ioconfig_bus_table[new_entry], sizeof(struct ascii_moduleid) * (free_entry - new_entry)); + + return 0; +} + +/* + * ioconfig_bus_open - Opens the special device node "/dev/hw/.ioconfig_bus". + */ +static int ioconfig_bus_open(struct inode * inode, struct file * filp) +{ + if (ioconfig_bus_debug) { + DBG("ioconfig_bus_open called.\n"); + } + + return(0); + +} + +/* + * ioconfig_bus_close - Closes the special device node "/dev/hw/.ioconfig_bus". + */ +static int ioconfig_bus_close(struct inode * inode, struct file * filp) +{ + + if (ioconfig_bus_debug) { + DBG("ioconfig_bus_close called.\n"); + } + + return(0); +} + +struct file_operations ioconfig_bus_fops = { + ioctl:ioconfig_bus_ioctl, + open:ioconfig_bus_open, /* open */ + release:ioconfig_bus_close /* release */ +}; + + +/* + * init_ifconfig_bus() - Boot time initialization. Ensure that it is called + * after devfs has been initialized. + * + */ +int init_ioconfig_bus(void) +{ + ioconfig_bus_handle = NULL; + ioconfig_bus_handle = hwgraph_register(hwgraph_root, ".ioconfig_bus", + 0, DEVFS_FL_AUTO_DEVNUM, + 0, 0, + S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, 0, 0, + &ioconfig_bus_fops, NULL); + + if (ioconfig_bus_handle == NULL) { + panic("Unable to create SGI PERSISTENT BUS NUMBERING Driver.\n"); + } + + return(0); + +} + +static int __init ioconfig_bus_setup (char *str) +{ + + char *temp; + + DBG("ioconfig_bus_setup: Kernel Options %s\n", str); + + temp = (char *)ioconfig_kernopts; + memset(temp, 0, 128); + while ( (*str != '\0') && !isspace (*str) ) { + if (*str == ',') { + *temp = '\n'; + temp++; + str++; + continue; + } + *temp = *str; + temp++; + str++; + } + + return(0); + +} +__setup("ioconfig=", ioconfig_bus_setup); diff -Nru a/arch/ia64/sn/io/sn2/Makefile b/arch/ia64/sn/io/sn2/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ia64/sn/io/sn2/Makefile Tue Mar 11 22:06:20 2003 @@ -0,0 +1,19 @@ +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. +# +# Makefile for the sn2 specific io routines. + +EXTRA_CFLAGS := -DLITTLE_ENDIAN + +obj-y += bte_error.o geo_op.o klconflib.o klgraph.o l1.o \ + l1_command.o ml_iograph.o ml_SN_init.o ml_SN_intr.o module.o \ + pci_bus_cvlink.o pciio.o pic.o sgi_io_init.o shub.o shuberror.o \ + shub_intr.o shubio.o xbow.o xtalk.o + +obj-$(CONFIG_KDB) += kdba_io.o + +obj-$(CONFIG_SHUB_1_0_SPECIFIC) += efi-rtc.o diff -Nru a/arch/ia64/sn/io/sn2/geo_op.c b/arch/ia64/sn/io/sn2/geo_op.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ia64/sn/io/sn2/geo_op.c Tue Mar 11 22:06:20 2003 @@ -0,0 +1,314 @@ +/* $Id$ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved. + */ + +/* + * @doc file m:hwcfg + * DESCRIPTION: + * + * This file contains routines for manipulating and generating + * Geographic IDs. They are in a file by themself since they have + * no dependencies on other modules. + * + * ORIGIN: + * + * New for SN2 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/********** Global functions and data (visible outside the module) ***********/ + +/* + * @doc gf:geo_module + * + * moduleid_t geo_module(geoid_t g) + * + * DESCRIPTION: + * + * Return the moduleid component of a geoid. + * + * INTERNALS: + * + * Return INVALID_MODULE for an invalid geoid. Otherwise extract the + * moduleid from the structure, and return it. + * + * ORIGIN: + * + * New for SN2 + */ + +moduleid_t +geo_module(geoid_t g) +{ + if (g.any.type == GEO_TYPE_INVALID) + return INVALID_MODULE; + else + return g.any.module; +} + + +/* + * @doc gf:geo_slab + * + * slabid_t geo_slab(geoid_t g) + * + * DESCRIPTION: + * + * Return the slabid component of a geoid. + * + * INTERNALS: + * + * Return INVALID_SLAB for an invalid geoid. Otherwise extract the + * slabid from the structure, and return it. + * + * ORIGIN: + * + * New for SN2 + */ + +slabid_t +geo_slab(geoid_t g) +{ + if (g.any.type == GEO_TYPE_INVALID) + return INVALID_SLAB; + else + return g.any.slab; +} + + +/* + * @doc gf:geo_type + * + * geo_type_t geo_type(geoid_t g) + * + * DESCRIPTION: + * + * Return the type component of a geoid. + * + * INTERNALS: + * + * Extract the type from the structure, and return it. + * + * ORIGIN: + * + * New for SN2 + */ + +geo_type_t +geo_type(geoid_t g) +{ + return g.any.type; +} + + +/* + * @doc gf:geo_valid + * + * int geo_valid(geoid_t g) + * + * DESCRIPTION: + * + * Return nonzero if g has a valid geoid type. + * + * INTERNALS: + * + * Test the type against GEO_TYPE_INVALID, and return the result. + * + * ORIGIN: + * + * New for SN2 + */ + +int +geo_valid(geoid_t g) +{ + return g.any.type != GEO_TYPE_INVALID; +} + + +/* + * @doc gf:geo_cmp + * + * int geo_cmp(geoid_t g0, geoid_t g1) + * + * DESCRIPTION: + * + * Compare two geoid_t values, from the coarsest field to the finest. + * The comparison should be consistent with the physical locations of + * of the hardware named by the geoids. + * + * INTERNALS: + * + * First compare the module, then the slab, type, and type-specific fields. + * + * ORIGIN: + * + * New for SN2 + */ + +int +geo_cmp(geoid_t g0, geoid_t g1) +{ + int rv; + + /* Compare the common fields */ + rv = MODULE_CMP(geo_module(g0), geo_module(g1)); + if (rv != 0) + return rv; + + rv = geo_slab(g0) - geo_slab(g1); + if (rv != 0) + return rv; + + /* Within a slab, sort by type */ + rv = geo_type(g0) - geo_type(g1); + if (rv != 0) + return rv; + + switch(geo_type(g0)) { + case GEO_TYPE_CPU: + rv = g0.cpu.slice - g1.cpu.slice; + break; + + case GEO_TYPE_IOCARD: + rv = g0.pcicard.bus - g1.pcicard.bus; + if (rv) break; + rv = SLOTNUM_GETSLOT(g0.pcicard.slot) - + SLOTNUM_GETSLOT(g1.pcicard.slot); + break; + + case GEO_TYPE_MEM: + rv = g0.mem.membus - g1.mem.membus; + if (rv) break; + rv = g0.mem.memslot - g1.mem.memslot; + break; + + default: + rv = 0; + } + + return rv; +} + + +/* + * @doc gf:geo_new + * + * geoid_t geo_new(geo_type_t type, ...) + * + * DESCRIPTION: + * + * Generate a new geoid_t value of the given type from its components. + * Expected calling sequences: + * \@itemize \@bullet + * \@item + * \@code\{geo_new(GEO_TYPE_INVALID)\} + * \@item + * \@code\{geo_new(GEO_TYPE_MODULE, moduleid_t m)\} + * \@item + * \@code\{geo_new(GEO_TYPE_NODE, moduleid_t m, slabid_t s)\} + * \@item + * \@code\{geo_new(GEO_TYPE_RTR, moduleid_t m, slabid_t s)\} + * \@item + * \@code\{geo_new(GEO_TYPE_IOCNTL, moduleid_t m, slabid_t s)\} + * \@item + * \@code\{geo_new(GEO_TYPE_IOCARD, moduleid_t m, slabid_t s, char bus, slotid_t slot)\} + * \@item + * \@code\{geo_new(GEO_TYPE_CPU, moduleid_t m, slabid_t s, char slice)\} + * \@item + * \@code\{geo_new(GEO_TYPE_MEM, moduleid_t m, slabid_t s, char membus, char slot)\} + * \@end itemize + * + * Invalid types return a GEO_TYPE_INVALID geoid_t. + * + * INTERNALS: + * + * Use the type to determine which fields to expect. Write the fields into + * a new geoid_t and return it. Note: scalars smaller than an "int" are + * promoted to "int" by the "..." operator, so we need extra casts on "char", + * "slotid_t", and "slabid_t". + * + * ORIGIN: + * + * New for SN2 + */ + +geoid_t +geo_new(geo_type_t type, ...) +{ + va_list al; + geoid_t g; + memset(&g, 0, sizeof(g)); + + va_start(al, type); + + /* Make sure the type is sane */ + if (type >= GEO_TYPE_MAX) + type = GEO_TYPE_INVALID; + + g.any.type = type; + if (type == GEO_TYPE_INVALID) + goto done; /* invalid geoids have no components at all */ + + g.any.module = va_arg(al, moduleid_t); + if (type == GEO_TYPE_MODULE) + goto done; + + g.any.slab = (slabid_t)va_arg(al, int); + + /* Some types have additional components */ + switch(type) { + case GEO_TYPE_CPU: + g.cpu.slice = (char)va_arg(al, int); + break; + + case GEO_TYPE_IOCARD: + g.pcicard.bus = (char)va_arg(al, int); + g.pcicard.slot = (slotid_t)va_arg(al, int); + break; + + case GEO_TYPE_MEM: + g.mem.membus = (char)va_arg(al, int); + g.mem.memslot = (char)va_arg(al, int); + break; + + default: + break; + } + + done: + va_end(al); + return g; +} diff -Nru a/arch/ia64/sn/io/sn2/klconflib.c b/arch/ia64/sn/io/sn2/klconflib.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ia64/sn/io/sn2/klconflib.c Tue Mar 11 22:06:20 2003 @@ -0,0 +1,933 @@ +/* $Id$ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define printf printk +int hasmetarouter; + +#define LDEBUG 0 +#define NIC_UNKNOWN ((nic_t) -1) + +#undef DEBUG_KLGRAPH +#ifdef DEBUG_KLGRAPH +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif /* DEBUG_KLGRAPH */ + +static void sort_nic_names(lboard_t *) ; + +u64 klgraph_addr[MAX_COMPACT_NODES]; +int module_number = 0; + +lboard_t * +find_lboard(lboard_t *start, unsigned char brd_type) +{ + /* Search all boards stored on this node. */ + while (start) { + if (start->brd_type == brd_type) + return start; + start = KLCF_NEXT(start); + } + + /* Didn't find it. */ + return (lboard_t *)NULL; +} + +lboard_t * +find_lboard_class(lboard_t *start, unsigned char brd_type) +{ + /* Search all boards stored on this node. */ + while (start) { + if (KLCLASS(start->brd_type) == KLCLASS(brd_type)) + return start; + start = KLCF_NEXT(start); + } + + /* Didn't find it. */ + return (lboard_t *)NULL; +} + +klinfo_t * +find_component(lboard_t *brd, klinfo_t *kli, unsigned char struct_type) +{ + int index, j; + + if (kli == (klinfo_t *)NULL) { + index = 0; + } else { + for (j = 0; j < KLCF_NUM_COMPS(brd); j++) { + if (kli == KLCF_COMP(brd, j)) + break; + } + index = j; + if (index == KLCF_NUM_COMPS(brd)) { + DBG("find_component: Bad pointer: 0x%p\n", kli); + return (klinfo_t *)NUL