# 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.62 -> 1.1038 # arch/i386/kernel/process.c 1.45 -> 1.46 # drivers/acpi/namespace/nsxfobj.c 1.17 -> 1.19 # arch/sparc/Kconfig 1.8 -> 1.9 # include/acpi/acglobal.h 1.19 -> 1.20 # fs/binfmt_flat.c 1.2 -> 1.4 # fs/nfsd/nfs3xdr.c 1.29 -> 1.32 # drivers/i2c/i2c-frodo.c 1.5 -> 1.6 # arch/alpha/kernel/entry.S 1.26 -> 1.27 # drivers/hotplug/ibmphp_pci.c 1.5 -> 1.6 # drivers/char/ipmi/ipmi_kcs_intf.c 1.1 -> 1.3 # drivers/net/znet.c 1.9 -> 1.10 # include/asm-i386/desc.h 1.12 -> 1.13 # net/rose/sysctl_net_rose.c 1.2 -> 1.3 # arch/ia64/sn/io/xbow.c 1.5 -> 1.6 # include/asm-i386/delay.h 1.1 -> 1.2 # include/acpi/acpixf.h 1.17 -> 1.19 # drivers/acpi/resources/rsio.c 1.12 -> 1.13 # drivers/scsi/megaraid.c 1.34 -> 1.35 # arch/sparc64/kernel/smp.c 1.47 -> 1.48 # drivers/pcmcia/cs_internal.h 1.3 -> 1.5 # fs/cifs/file.c 1.6 -> 1.7 # arch/i386/kernel/cpu/cpufreq/speedstep.c 1.11 -> 1.12 # include/asm-x86_64/smp.h 1.5 -> 1.6 # include/asm-i386/mmu_context.h 1.14 -> 1.15 # drivers/i2c/chips/lm75.c 1.4 -> 1.5 # drivers/ide/pci/via82cxxx.c 1.8 -> 1.9 # drivers/net/aironet4500_core.c 1.11 -> (deleted) # drivers/ide/legacy/macide.c 1.3 -> 1.4 # drivers/net/tc35815.c 1.8 -> 1.9 # drivers/scsi/sym53c8xx_2/sym_hipd.c 1.4 -> 1.5 # drivers/acpi/namespace/nsdumpdv.c 1.7 -> 1.8 # drivers/char/esp.c 1.13 -> 1.14 # drivers/scsi/ips.c 1.47 -> 1.48 # drivers/pnp/Makefile 1.11 -> 1.12 # drivers/net/pcmcia/Makefile 1.13 -> 1.14 # drivers/pnp/names.c 1.3 -> 1.5 # drivers/acpi/executer/exoparg3.c 1.9 -> 1.10 # net/bluetooth/rfcomm/core.c 1.7.1.2 -> 1.13 # drivers/scsi/scsi_error.c 1.34 -> 1.38 # include/asm-i386/system.h 1.23 -> 1.24 # drivers/acpi/hardware/hwacpi.c 1.14 -> 1.15 # include/acpi/acutils.h 1.23 -> 1.24 # drivers/ieee1394/raw1394.c 1.17 -> 1.18 # arch/ppc64/boot/zImage.lds 1.2 -> 1.3 # include/asm-ppc64/unistd.h 1.17 -> 1.19 # kernel/ksyms.c 1.183 -> 1.184 # drivers/usb/class/Makefile.lib 1.3 -> 1.5 drivers/usb/Makefile.lib (moved) # include/acpi/acpiosxf.h 1.21 -> 1.24 # arch/ppc64/kernel/entry.S 1.20 -> 1.22 # include/asm-x86_64/signal.h 1.6 -> 1.7 # Documentation/sonypi.txt 1.10 -> 1.11 # include/linux/cdrom.h 1.11 -> 1.12 # drivers/i2c/chips/adm1021.c 1.4 -> 1.5 # drivers/acpi/hardware/hwgpe.c 1.14 -> 1.16 # drivers/acpi/dispatcher/dsobject.c 1.22 -> 1.23 # arch/parisc/kernel/ioctl32.c 1.3 -> 1.4 # drivers/scsi/pci2220i.c 1.15 -> 1.18 # fs/nfsd/nfsxdr.c 1.22 -> 1.23 # arch/mips/philips/nino/int-handler.S 1.1 -> 1.2 # fs/cifs/cifsproto.h 1.6 -> 1.7 # drivers/video/Kconfig 1.13 -> 1.14 # drivers/scsi/eata_dma.c 1.9 -> (deleted) # include/linux/swap.h 1.70 -> 1.71 # drivers/serial/8250_pnp.c 1.7 -> 1.10 # drivers/net/irda/vlsi_ir.c 1.14 -> 1.15 # drivers/char/isicom.c 1.12 -> 1.13 # drivers/bluetooth/hci_uart.h 1.5 -> 1.6 # drivers/pnp/pnpbios/core.c 1.23 -> 1.25 # drivers/message/fusion/mptctl.c 1.11 -> 1.13 # fs/xfs/pagebuf/page_buf.c 1.38 -> 1.40 # arch/alpha/mm/numa.c 1.10 -> 1.11 # include/net/dn_route.h 1.3 -> 1.4 # include/asm-i386/processor.h 1.39 -> 1.40 # drivers/acpi/executer/exconvrt.c 1.19 -> 1.20 # arch/x86_64/kernel/setup.c 1.9 -> 1.10 # drivers/parisc/dino.c 1.4 -> 1.5 # net/ipv6/exthdrs.c 1.5 -> 1.6 # include/linux/init.h 1.23 -> 1.24 # arch/i386/kernel/cpu/common.c 1.17 -> 1.18 # fs/file_table.c 1.16 -> 1.17 # drivers/scsi/aha152x.c 1.21 -> 1.22 # include/linux/raid/md_k.h 1.49 -> 1.51 # arch/ia64/sn/io/sn2/pcibr/pcibr_error.c 1.2 -> 1.3 # net/ipv4/ipconfig.c 1.21 -> 1.22 # include/video/sgivw.h 1.3 -> 1.4 # drivers/acpi/parser/psscope.c 1.10 -> 1.11 # drivers/acpi/executer/exfield.c 1.17 -> 1.18 # drivers/scsi/hosts.c 1.51 -> 1.53 # lib/Makefile 1.18 -> 1.20 # drivers/net/natsemi.c 1.46 -> 1.47 # fs/open.c 1.35 -> 1.36 # drivers/char/ip2/i2ellis.h 1.4 -> 1.5 # include/linux/i2c-id.h 1.8 -> 1.9 # arch/i386/mach-visws/visws_apic.c 1.5 -> 1.6 # drivers/acpi/toshiba_acpi.c 1.7 -> 1.8 # drivers/scsi/cpqfcTSinit.c 1.30 -> 1.31 # drivers/ide/pci/serverworks.c 1.11 -> 1.14 # drivers/scsi/53c700.h 1.8 -> 1.10 # net/ipv6/ip6_output.c 1.9 -> 1.10 # drivers/ide/pci/piix.c 1.10 -> 1.12 # net/ipv4/ip_input.c 1.12 -> 1.13 # arch/sparc64/lib/Makefile 1.7 -> 1.8 # drivers/scsi/psi_chip.h 1.1 -> 1.2 # include/linux/raid/md.h 1.22 -> 1.23 # drivers/scsi/aic7xxx/aic7xxx_osm.c 1.17 -> 1.19 # drivers/scsi/scsi_proc.c 1.16 -> 1.17 # include/asm-ppc64/processor.h 1.23 -> 1.26 # include/acpi/acexcep.h 1.13 -> 1.14 # arch/ppc/8260_io/uart.c 1.10 -> 1.11 # include/asm-sparc64/psrcompat.h 1.2 -> 1.3 # drivers/acpi/utilities/uteval.c 1.16 -> 1.17 # drivers/acpi/resources/rsutils.c 1.13 -> 1.14 # drivers/acpi/dispatcher/dswload.c 1.21 -> 1.22 # arch/alpha/kernel/alpha_ksyms.c 1.31 -> 1.32 # drivers/parisc/power.c 1.3 -> 1.4 # drivers/acpi/utilities/utmisc.c 1.21 -> 1.22 # drivers/ide/pci/cs5520.c 1.3 -> 1.4 # include/asm-ppc64/iSeries/ItLpNaca.h 1.1 -> 1.2 # drivers/acpi/hardware/hwsleep.c 1.15 -> 1.16 # drivers/acpi/events/evrgnini.c 1.14 -> 1.15 # drivers/input/serio/i8042.c 1.23 -> 1.24 # arch/sparc/kernel/sparc_ksyms.c 1.13 -> 1.14 # arch/m68knommu/platform/68328/entry.S 1.2 -> 1.3 # arch/alpha/kernel/sys_sable.c 1.6 -> 1.7 # drivers/acpi/pci_link.c 1.12 -> 1.14 # drivers/acpi/executer/exdump.c 1.18 -> 1.19 # include/asm-i386/ide.h 1.10 -> 1.11 # arch/m68k/ifpsp060/src/pfpsp.S 1.4 -> 1.5 # include/linux/init_task.h 1.21 -> 1.23 # sound/drivers/serial-u16550.c 1.12 -> 1.13 # include/acpi/acstruct.h 1.13 -> 1.14 # arch/i386/kernel/head.S 1.22 -> 1.25 # include/asm-i386/mach-visws/irq_vectors.h 1.3 -> 1.4 # include/linux/sched.h 1.133 -> 1.135 # kernel/fork.c 1.105 -> 1.108 # net/sunrpc/svcsock.c 1.39 -> 1.40 # drivers/ide/ppc/pmac.c 1.6 -> 1.7 # drivers/net/aironet4500_proc.c 1.13 -> (deleted) # drivers/acpi/namespace/nsparse.c 1.6 -> 1.7 # fs/xfs/support/debug.c 1.8 -> 1.9 # arch/alpha/lib/ev6-memcpy.S 1.1 -> 1.2 # scripts/checkhelp.pl 1.1 -> (deleted) # drivers/acpi/events/evregion.c 1.15 -> 1.16 # drivers/acpi/dispatcher/dsfield.c 1.16 -> 1.17 # drivers/net/wireless/airo.c 1.31 -> 1.32 # drivers/acpi/utilities/utglobal.c 1.22 -> 1.24 # drivers/acpi/executer/exstoren.c 1.16 -> 1.17 # include/acpi/acnamesp.h 1.17 -> 1.18 # drivers/i2c/i2c-philips-par.c 1.9 -> 1.10 # include/asm-i386/cobalt.h 1.2 -> 1.3 include/asm-i386/mach-visws/cobalt.h (moved) # fs/befs/ChangeLog 1.3 -> 1.4 # drivers/acpi/hardware/hwtimer.c 1.13 -> 1.14 # include/acpi/acobject.h 1.16 -> 1.17 # include/acpi/acresrc.h 1.11 -> 1.12 # drivers/acpi/utilities/utalloc.c 1.14 -> 1.15 # include/asm-alpha/machvec.h 1.9 -> 1.10 # drivers/serial/amba.c 1.14 -> 1.16 # drivers/acpi/utilities/utxface.c 1.15 -> 1.16 # drivers/net/lasi_82596.c 1.17 -> 1.18 # Documentation/vm/hugetlbpage.txt 1.2 -> 1.3 # drivers/isdn/hardware/eicon/divasmain.c 1.6 -> 1.7 # sound/pci/rme9652/hammerfall_mem.c 1.11 -> 1.12 # net/ipv4/af_inet.c 1.37 -> 1.38 # Documentation/pnp.txt 1.1 -> 1.2 # drivers/ide/legacy/q40ide.c 1.3 -> 1.4 # drivers/acpi/executer/exregion.c 1.14 -> 1.15 # arch/ppc64/Makefile 1.22 -> 1.23 # drivers/serial/sa1100.c 1.15 -> 1.16 # arch/um/include/sysdep-i386/checksum.h 1.1 -> 1.2 # arch/arm/mm/alignment.c 1.6 -> 1.7 # arch/x86_64/kernel/apic.c 1.10 -> 1.11 # include/acpi/actbl1.h 1.10 -> 1.11 # drivers/pnp/interface.c 1.8 -> 1.12 # drivers/net/sk98lin/skge.c 1.12 -> 1.13 # arch/i386/mach-visws/setup.c 1.5 -> 1.6 # arch/ia64/sn/io/xtalk.c 1.5 -> 1.6 # arch/i386/Kconfig 1.40 -> 1.42 # drivers/acpi/parser/psopcode.c 1.18 -> 1.20 # drivers/sbus/char/aurora.c 1.18 -> 1.19 # drivers/block/floppy.c 1.67 -> 1.68 # include/linux/genhd.h 1.45 -> 1.46 # include/linux/nfsd/xdr4.h 1.8 -> 1.9 # include/linux/flat.h 1.2 -> 1.3 # drivers/scsi/53c700.c 1.24 -> 1.26 # drivers/acpi/events/evxfregn.c 1.13 -> 1.14 # include/acpi/acdebug.h 1.17 -> 1.18 # arch/x86_64/kernel/x8664_ksyms.c 1.11 -> 1.13 # drivers/acpi/parser/psparse.c 1.20 -> 1.21 # include/asm-i386/signal.h 1.6 -> 1.7 # drivers/message/fusion/mptbase.h 1.8 -> 1.10 # drivers/pnp/base.h 1.3 -> 1.4 # arch/v850/kernel/process.c 1.3 -> 1.4 # arch/i386/kernel/traps.c 1.44 -> 1.46 # arch/sparc64/kernel/sys32.S 1.3 -> 1.4 # drivers/ide/pci/cy82c693.c 1.10 -> 1.12 # arch/i386/kernel/Makefile 1.34 -> 1.36 # include/linux/i2c.h 1.11 -> 1.12 # include/asm-ppc64/hardirq.h 1.10 -> 1.11 # include/linux/signal.h 1.9 -> 1.10 # kernel/pm.c 1.7 -> 1.8 # arch/s390/kernel/entry.S 1.23 -> 1.24 # include/net/bluetooth/l2cap.h 1.4 -> 1.5 # scripts/modpost.c 1.7 -> 1.8 # net/bluetooth/af_bluetooth.c 1.12 -> 1.13 # drivers/ide/legacy/umc8672.c 1.4 -> 1.5 # arch/v850/kernel/init_task.c 1.1 -> 1.2 # drivers/ide/legacy/qd65xx.c 1.3 -> 1.4 # Documentation/s390/Debugging390.txt 1.7 -> 1.8 # drivers/ieee1394/hosts.h 1.11 -> 1.12 # include/asm-ppc/unistd.h 1.22 -> 1.23 # drivers/acpi/executer/exprep.c 1.16 -> 1.17 # arch/sparc64/kernel/Makefile 1.19 -> 1.21 # drivers/pnp/core.c 1.6 -> 1.7 # include/asm-x86_64/mtrr.h 1.4 -> 1.5 # drivers/ide/legacy/ali14xx.c 1.3 -> 1.4 # drivers/acpi/executer/exutils.c 1.18 -> 1.19 # drivers/scsi/scsi_sysfs.c 1.6 -> 1.7 # arch/i386/vmlinux.lds.S 1.24 -> 1.25 # include/linux/ioport.h 1.6 -> 1.7 # include/asm-ia64/sn/pci/bridge.h 1.4 -> 1.5 # fs/cifs/cifsglob.h 1.4 -> 1.5 # drivers/pcmcia/pci_socket.h 1.3 -> 1.4 # drivers/serial/sunsu.c 1.29 -> 1.30 # Documentation/rpc-cache.txt 1.5 -> 1.6 # drivers/md/raid5.c 1.57 -> 1.59 # drivers/net/pcmcia/rayctl.h 1.1 -> 1.2 drivers/net/wireless/rayctl.h (moved) # kernel/Makefile 1.26 -> 1.27 # arch/i386/kernel/cpu/cyrix.c 1.7 -> 1.8 # Documentation/i2c/writing-clients 1.3 -> 1.4 # drivers/char/synclinkmp.c 1.6 -> 1.7 # drivers/serial/anakin.c 1.11 -> 1.12 # arch/ppc64/kernel/ppc_ksyms.c 1.21 -> 1.22 # drivers/char/cyclades.c 1.13 -> 1.14 # net/netrom/sysctl_net_netrom.c 1.2 -> 1.3 # fs/cifs/cifssmb.c 1.7 -> 1.8 # arch/m68k/ifpsp060/src/isp.S 1.3 -> 1.4 # include/acpi/platform/acenv.h 1.15 -> 1.17 # include/linux/blkdev.h 1.97 -> 1.98 # drivers/video/pm3fb.c 1.4 -> 1.5 # arch/i386/pci/direct.c 1.12 -> 1.14 # drivers/isdn/hardware/eicon/capimain.c 1.2 -> 1.3 # drivers/block/cciss_scsi.c 1.8.1.3 -> 1.10 # drivers/acpi/tables/tbinstal.c 1.17 -> 1.18 # drivers/acpi/namespace/nsxfname.c 1.14 -> 1.15 # drivers/acpi/executer/exresnte.c 1.19 -> 1.20 # drivers/message/fusion/mptbase.c 1.8 -> 1.9 # drivers/ide/pci/trm290.c 1.9 -> 1.11 # arch/alpha/kernel/irq_alpha.c 1.10 -> 1.11 # arch/i386/kernel/cpu/mtrr/if.c 1.4 -> 1.5 # drivers/scsi/3w-xxxx.h 1.17 -> 1.18 # arch/x86_64/kernel/ioport.c 1.4 -> 1.5 # drivers/usb/core/message.c 1.20 -> 1.21 # drivers/net/wireless/Kconfig 1.3 -> 1.4 # net/bluetooth/sco.c 1.8 -> 1.11 # arch/s390x/kernel/entry.S 1.25 -> 1.26 # net/key/af_key.c 1.20 -> 1.21 # arch/x86_64/kernel/smp.c 1.11 -> 1.12 # drivers/net/tulip/interrupt.c 1.14 -> 1.15 # drivers/scsi/scsi.h 1.60 -> 1.64 # fs/jfs/jfs_metapage.c 1.22 -> 1.23 # include/linux/i2c-dev.h 1.6 -> 1.7 # fs/jffs2/wbuf.c 1.5 -> 1.6 # drivers/isdn/hardware/eicon/io.c 1.1 -> 1.2 # arch/i386/mach-visws/mpparse.c 1.3 -> 1.4 # net/bluetooth/hci_core.c 1.12.1.1 -> 1.17 # drivers/pcmcia/cs.c 1.13 -> 1.16 # include/linux/fs.h 1.219 -> 1.220 # drivers/usb/misc/atmsar.c 1.5.1.1 -> 1.10 # include/asm-i386/segment.h 1.5 -> 1.6 # Documentation/networking/bonding.txt 1.6 -> 1.7 # arch/i386/kernel/entry.S 1.54 -> 1.57 # drivers/pcmcia/cardbus.c 1.16 -> 1.22 # include/linux/delay.h 1.1 -> 1.2 # drivers/acpi/resources/rsmisc.c 1.10 -> 1.11 # drivers/oprofile/buffer_sync.c 1.7 -> 1.8 # arch/ppc64/defconfig 1.25 -> 1.27 # drivers/video/q40fb.c 1.20 -> 1.21 # net/bluetooth/hci_proc.c 1.1 -> 1.2 # include/asm-alpha/core_marvel.h 1.3 -> 1.4 # include/linux/meye.h 1.2 -> 1.3 # include/acpi/actables.h 1.14 -> 1.15 # drivers/net/Makefile 1.54 -> 1.56 # drivers/acpi/events/evxfevnt.c 1.13 -> 1.14 # arch/x86_64/kernel/setup64.c 1.9 -> 1.10 # net/ipv4/ip_fragment.c 1.7 -> 1.8 # arch/sparc64/kernel/profile.c 1.1 -> (deleted) # fs/cifs/transport.c 1.4 -> 1.5 # drivers/md/md.c 1.135 -> 1.139 # drivers/serial/clps711x.c 1.11 -> 1.12 # drivers/ide/ide.c 1.48 -> 1.51 # drivers/scsi/advansys.c 1.26 -> 1.27 # drivers/ide/pci/cy82c693.h 1.5 -> 1.6 # include/asm-generic/siginfo.h 1.4 -> 1.5 # drivers/ide/legacy/dtc2278.c 1.3 -> 1.4 # kernel/kmod.c 1.23 -> 1.24 # drivers/acpi/parser/pstree.c 1.12 -> 1.13 # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 1.3 -> 1.4 # include/net/sctp/ulpqueue.h 1.5 -> 1.6 # net/ipv6/icmp.c 1.14 -> 1.15 # drivers/scsi/cpqioctl.c 1.1 -> (deleted) # drivers/acpi/parser/psargs.c 1.15 -> 1.16 # arch/m68knommu/kernel/init_task.c 1.1 -> 1.2 # drivers/acpi/executer/exnames.c 1.12 -> 1.13 # drivers/scsi/u14-34f.c 1.23 -> 1.24 # arch/x86_64/kernel/ptrace.c 1.9 -> 1.10 # arch/mips/au1000/common/serial.c 1.6 -> 1.7 # include/asm-i386/mach-visws/do_timer.h 1.5 -> 1.6 # drivers/scsi/pcmcia/nsp_message.c 1.5 -> 1.6 # arch/i386/kernel/mpparse.c 1.32.1.2 -> 1.35 # arch/parisc/kernel/Makefile 1.9 -> 1.10 # drivers/pcmcia/cistpl.c 1.7 -> 1.8 # net/ipv6/reassembly.c 1.8 -> 1.9 # drivers/acpi/executer/exfldio.c 1.20 -> 1.21 # arch/x86_64/kernel/mpparse.c 1.6 -> 1.7 # drivers/scsi/hosts.h 1.52 -> 1.56 # drivers/usb/media/ov511.c 1.39 -> 1.40 # arch/v850/kernel/rte_cb_multi.c 1.1 -> 1.3 # drivers/scsi/eata_dma_proc.h 1.1 -> (deleted) # include/asm-sparc/posix_types.h 1.1 -> 1.2 # drivers/message/fusion/linux_compat.h 1.7 -> 1.8 # arch/i386/kernel/io_apic.c 1.45 -> 1.48 # drivers/ide/ide-tape.c 1.16 -> 1.17 # drivers/ide/pci/sl82c105.c 1.9 -> 1.11 # drivers/acorn/block/fd1772.c 1.30 -> 1.31 # mm/filemap.c 1.179 -> 1.180 # drivers/scsi/pluto.c 1.9 -> 1.10 # drivers/net/aironet4500_rid.c 1.2 -> (deleted) # drivers/acpi/resources/rscreate.c 1.16 -> 1.17 # drivers/ide/ide-iops.c 1.4 -> 1.7 # drivers/char/pcmcia/synclink_cs.c 1.7 -> 1.8 # drivers/ide/pci/cs5530.c 1.9 -> 1.11 # drivers/ide/pci/adma100.c 1.3 -> 1.4 # fs/xfs/xfs_mount.c 1.16 -> 1.17 # drivers/ieee1394/pcilynx.c 1.24 -> 1.25 # arch/i386/Makefile 1.44 -> 1.47 # arch/x86_64/kernel/entry.S 1.9 -> 1.10 # include/asm-parisc/irq.h 1.3 -> 1.4 # drivers/ide/pci/rz1000.c 1.7 -> 1.9 # drivers/char/synclink.c 1.24 -> 1.25 # include/acpi/acoutput.h 1.14 -> 1.15 # drivers/char/ftape/zftape/zftape-ctl.c 1.6 -> 1.7 # drivers/ide/pci/alim15x3.c 1.8 -> 1.10 # drivers/acpi/namespace/nsinit.c 1.19 -> 1.20 # drivers/ide/pci/siimage.c 1.8 -> 1.10 # arch/cris/drivers/eeprom.c 1.8 -> 1.9 # sound/pci/ac97/ac97_codec.c 1.27 -> 1.29 # sound/oss/rme96xx.c 1.10 -> 1.11 # drivers/acpi/dispatcher/dsmthdat.c 1.18 -> 1.19 # drivers/net/e1000/e1000_main.c 1.46 -> 1.47 # drivers/isdn/hardware/eicon/divasi.c 1.4 -> 1.5 # fs/nfsd/nfs3proc.c 1.20 -> 1.21 # include/asm-x86_64/pda.h 1.7 -> 1.8 # include/asm-sparc64/ide.h 1.14 -> 1.15 # include/linux/sonypi.h 1.8 -> 1.9 # include/asm-m68knommu/machdep.h 1.1 -> 1.2 # arch/x86_64/lib/delay.c 1.1 -> 1.2 # fs/exec.c 1.70 -> 1.71 # arch/i386/mach-voyager/voyager_smp.c 1.6 -> 1.7 # drivers/scsi/nsp32.c 1.6 -> 1.7 # include/linux/ide.h 1.33 -> 1.39 # drivers/ide/pci/hpt34x.c 1.9 -> 1.11 # drivers/char/ftape/zftape/zftape-vtbl.h 1.2 -> 1.3 # arch/ppc64/xmon/ansidecl.h 1.1 -> 1.2 # drivers/scsi/aacraid/linit.c 1.8 -> 1.10 # drivers/usb/storage/transport.c 1.62 -> 1.63 # drivers/ide/pci/opti621.c 1.8 -> 1.10 # drivers/ide/legacy/buddha.c 1.3 -> 1.4 # net/ipv4/netfilter/ip_fw_compat.c 1.10 -> 1.11 # drivers/acpi/namespace/nsobject.c 1.16 -> 1.17 # drivers/acpi/executer/exresolv.c 1.18 -> 1.19 # drivers/net/pcmcia/ray_cs.c 1.14 -> 1.15 drivers/net/wireless/ray_cs.c (moved) # arch/i386/kernel/trampoline.S 1.6 -> 1.7 # drivers/ieee1394/hosts.c 1.13 -> 1.14 # arch/parisc/kernel/irq.c 1.10 -> 1.11 # include/asm-alpha/delay.h 1.3 -> 1.4 # kernel/signal.c 1.73 -> 1.75 # drivers/video/fm2fb.c 1.22 -> 1.23 # drivers/bluetooth/dtl1_cs.c 1.5 -> 1.7 # include/linux/sys.h 1.2 -> 1.3 # drivers/acpi/tables/tbconvrt.c 1.18 -> 1.19 # drivers/bluetooth/Kconfig 1.1.2.1 -> 1.6 # arch/parisc/kernel/time.c 1.5 -> 1.6 # arch/parisc/kernel/profile.c 1.1 -> (deleted) # drivers/message/fusion/mptscsih.c 1.18 -> 1.20 # include/asm-m68knommu/m68360_enet.h 1.1 -> 1.2 # drivers/char/sx.c 1.19 -> 1.20 # net/netsyms.c 1.48 -> 1.49 # drivers/acpi/namespace/nseval.c 1.18 -> 1.19 # arch/alpha/kernel/sys_wildfire.c 1.6 -> 1.7 # drivers/ide/setup-pci.c 1.11 -> 1.12 # include/asm-x86_64/bitops.h 1.7 -> 1.8 # arch/i386/pci/common.c 1.34 -> 1.35 # net/rxrpc/sysctl.c 1.1 -> 1.2 # include/linux/pci_ids.h 1.81 -> 1.82 # drivers/scsi/aic7xxx_old.c 1.42 -> 1.43 # drivers/usb/serial/usb-serial.c 1.70 -> 1.72 # include/asm-ppc/system.h 1.16 -> 1.17 # arch/m68knommu/vmlinux.lds.S 1.4 -> 1.5 # arch/x86_64/boot/compressed/misc.c 1.4 -> 1.5 # drivers/md/linear.c 1.22 -> 1.23 # Documentation/scsi/ChangeLog.sym53c8xx_2 1.4 -> 1.5 # drivers/char/ftape/zftape/zftape-vtbl.c 1.4 -> 1.5 # drivers/acpi/utilities/utcopy.c 1.21 -> 1.22 # arch/alpha/kernel/Makefile 1.23 -> 1.25 # arch/x86_64/ia32/sys_ia32.c 1.19 -> 1.20 # drivers/acpi/executer/exstore.c 1.22 -> 1.23 # arch/sparc64/kernel/systbls.S 1.30 -> 1.31 # fs/befs/linuxvfs.c 1.5 -> 1.6 # drivers/serial/mcfserial.c 1.2 -> 1.3 # include/linux/usb.h 1.69 -> 1.71 # drivers/net/sis900.c 1.31 -> 1.32 # include/asm-ppc/posix_types.h 1.4 -> 1.5 # drivers/media/radio/radio-cadet.c 1.10 -> 1.11 # include/asm-v850/asm.h 1.2 -> 1.3 # drivers/usb/misc/atmsar.h 1.3 -> 1.6 # drivers/ide/ide-cd.c 1.35 -> 1.38 # include/asm-m68knommu/mcfmbus.h 1.1 -> 1.2 # drivers/acpi/pci_irq.c 1.15 -> 1.16 # drivers/bluetooth/hci_h4.c 1.11 -> 1.12 # drivers/ide/pci/ns87415.c 1.8 -> 1.10 # drivers/md/multipath.c 1.42 -> 1.43 # arch/x86_64/kernel/nmi.c 1.7 -> 1.8 # drivers/char/riscom8.c 1.9 -> 1.10 # arch/v850/Kconfig 1.6 -> 1.7 # drivers/scsi/sg.c 1.47 -> 1.48 # fs/xfs/xfs_trans.c 1.4 -> 1.5 # drivers/s390/block/dasd.c 1.47 -> 1.48 # net/sched/sch_atm.c 1.6 -> 1.7 # arch/ppc64/boot/addSystemMap.c 1.1 -> 1.2 # drivers/net/dgrs_plx9060.h 1.1 -> 1.2 # net/sunrpc/auth_gss/auth_gss.c 1.2 -> 1.3 # include/asm-ppc64/semaphore.h 1.4 -> 1.5 # drivers/ide/Kconfig 1.7 -> 1.8 # drivers/acpi/dispatcher/dsutils.c 1.18 -> 1.19 # drivers/scsi/aic7xxx/aic79xx_pci.c 1.4 -> 1.5 # include/linux/profile.h 1.3 -> 1.4 # drivers/char/watchdog/sc520_wdt.c 1.4 -> 1.5 # arch/i386/kernel/setup.c 1.67 -> 1.68 # arch/ppc/kernel/process.c 1.30 -> 1.31 # drivers/bluetooth/bluecard_cs.c 1.7 -> 1.9 # drivers/acpi/utilities/utdelete.c 1.16 -> 1.17 # drivers/scsi/AM53C974.c 1.10 -> 1.11 # drivers/video/sgivwfb.c 1.24 -> 1.25 # net/ipv4/ipmr.c 1.14 -> 1.15 # drivers/acpi/dispatcher/dsmethod.c 1.15 -> 1.16 # Documentation/sysrq.txt 1.6 -> 1.7 # include/asm-x86_64/ide.h 1.10 -> 1.11 # drivers/char/tpqic02.c 1.19 -> 1.20 # arch/x86_64/mm/pageattr.c 1.1 -> 1.2 # arch/i386/kernel/time.c 1.26 -> 1.27 # Documentation/networking/alias.txt 1.2 -> 1.3 # drivers/ide/pci/sis5513.c 1.10 -> 1.12 # drivers/scsi/scsi_syms.c 1.26 -> 1.28 # drivers/ide/ide-floppy.c 1.24 -> 1.25 # drivers/message/fusion/isense.c 1.5 -> 1.7 # drivers/scsi/scsi_lib.c 1.68 -> 1.73 # arch/sparc64/kernel/time.c 1.20 -> 1.21 # drivers/message/fusion/mptctl.h 1.4 -> 1.5 # drivers/message/fusion/mptlan.c 1.7 -> 1.8 # drivers/message/fusion/lsi/mpi_raid.h 1.2 -> 1.4 # include/asm-alpha/bitops.h 1.7 -> 1.8 # drivers/acpi/namespace/nsutils.c 1.20 -> 1.21 # include/acpi/acpi.h 1.8 -> 1.10 # include/acpi/actbl.h 1.12 -> 1.13 # include/asm-s390x/cio.h 1.2 -> 1.3 # drivers/ide/arm/icside.c 1.4 -> 1.5 # include/asm-x86_64/i387.h 1.6 -> 1.7 # drivers/ide/Makefile 1.9 -> 1.10 # net/ipv4/xfrm_policy.c 1.14 -> 1.15 # arch/x86_64/kernel/io_apic.c 1.4 -> 1.5 # arch/ppc64/kernel/profile.c 1.1 -> (deleted) # drivers/ide/ide-dma.c 1.7 -> 1.9 # drivers/ide/legacy/pdc4030.c 1.5 -> 1.6 # drivers/acpi/executer/exoparg2.c 1.20 -> 1.21 # drivers/scsi/scsi.c 1.90 -> 1.96 # include/asm-sparc/ide.h 1.13 -> 1.14 # drivers/usb/core/usb.c 1.114 -> 1.115 # drivers/acpi/namespace/nsalloc.c 1.15 -> 1.16 # arch/ppc64/kernel/head.S 1.22 -> 1.24 # net/ipv4/netfilter/ipt_esp.c 1.3 -> 1.4 # drivers/i2c/i2c-proc.c 1.14 -> 1.15 # include/asm-ia64/sn/eeprom.h 1.4 -> 1.5 # drivers/isdn/hardware/eicon/divamnt.c 1.4 -> 1.5 # drivers/scsi/aha1542.c 1.19.1.1 -> 1.21 # net/sunrpc/auth.c 1.10 -> 1.11 # fs/xfs/linux/xfs_iomap.c 1.4 -> 1.5 # drivers/ide/pci/generic.c 1.6 -> 1.8 # drivers/net/aironet4500.h 1.6 -> (deleted) # arch/x86_64/ia32/ia32_ioctl.c 1.14 -> 1.15 # drivers/i2c/i2c-algo-bit.c 1.11 -> 1.12 # arch/v850/kernel/intv.S 1.2 -> 1.3 # arch/x86_64/mm/hugetlbpage.c 1.8 -> (deleted) # include/linux/sunrpc/auth.h 1.7 -> 1.8 # include/linux/binfmts.h 1.6 -> 1.7 # include/asm-i386/mach-visws/setup_arch_post.h 1.7 -> 1.8 # arch/x86_64/kernel/profile.c 1.2 -> (deleted) # Documentation/DocBook/kernel-hacking.tmpl 1.12 -> 1.13 # scripts/Makefile 1.30 -> 1.31 # drivers/net/sk98lin/skgeinit.c 1.4 -> 1.6 # include/asm-sparc64/irq.h 1.11 -> 1.12 # include/net/bluetooth/hci_core.h 1.8 -> 1.10 # drivers/net/arlan-proc.c 1.6 -> 1.7 drivers/net/wireless/arlan-proc.c (moved) # drivers/acpi/resources/rsaddr.c 1.11 -> 1.13 # drivers/isdn/hardware/eicon/mi_pc.h 1.2 -> 1.3 # include/asm-arm/arch-integrator/platform.h 1.1 -> 1.2 # drivers/acpi/resources/rscalc.c 1.15 -> 1.16 # net/bluetooth/rfcomm/Kconfig 1.1.1.1 -> 1.3 # drivers/net/au1000_eth.c 1.9 -> 1.11 # drivers/ide/pci/siimage.h 1.5 -> 1.6 # drivers/media/video/meye.h 1.6 -> 1.7 # drivers/ide/ide-proc.c 1.6 -> 1.8 # fs/xfs/xfs_log_recover.c 1.9 -> 1.10 # drivers/md/raid1.c 1.50 -> 1.52 # net/bluetooth/rfcomm/tty.c 1.8 -> 1.13 # include/linux/sunrpc/svc.h 1.18 -> 1.19 # net/bluetooth/bnep/bnep.h 1.2 -> 1.4 # include/acpi/acmacros.h 1.19 -> 1.20 # drivers/pnp/isapnp/core.c 1.29 -> 1.31 # fs/xfs/support/spin.h 1.1 -> 1.2 # drivers/s390/cio/chsc.c 1.7 -> 1.8 # arch/alpha/math-emu/Makefile 1.7 -> 1.9 # arch/ppc64/kernel/xics.c 1.18 -> 1.19 # sound/oss/vwsnd.c 1.8 -> 1.9 # drivers/scsi/aic7xxx/aic79xx_osm.c 1.17.1.2 -> 1.22 # arch/x86_64/kernel/process.c 1.13 -> 1.14 # fs/nfsd/nfssvc.c 1.33 -> 1.34 # drivers/pcmcia/tcic.c 1.14 -> 1.15 # drivers/acpi/resources/rsdump.c 1.13 -> 1.15 # drivers/net/arlan.h 1.4 -> 1.5 drivers/net/wireless/arlan.h (moved) # drivers/char/ipmi/ipmi_msghandler.c 1.1 -> 1.2 # net/ipv6/af_inet6.c 1.19 -> 1.21 # arch/i386/pci/Makefile 1.14 -> 1.15 # net/bluetooth/hci_sock.c 1.14 -> 1.17 # fs/proc/task_nommu.c 1.1 -> 1.2 # drivers/pcmcia/hd64465_ss.c 1.9 -> 1.10 # arch/sparc64/kernel/signal.c 1.25 -> 1.27 # net/ipv4/xfrm_user.c 1.8 -> 1.10 # arch/sparc/kernel/time.c 1.12 -> 1.13 # drivers/ide/pci/hpt366.c 1.12 -> 1.14 # net/bluetooth/syms.c 1.7 -> 1.8 # arch/ppc64/boot/addRamDisk.c 1.1 -> 1.2 # fs/buffer.c 1.185 -> 1.186 # drivers/pnp/resource.c 1.6 -> 1.9 # drivers/acpi/utilities/utinit.c 1.14 -> 1.15 # drivers/acpi/parser/psutils.c 1.15 -> 1.16 # drivers/acpi/events/evxface.c 1.16 -> 1.18 # fs/nfsd/export.c 1.69 -> 1.70 # drivers/ide/ide-probe.c 1.31 -> 1.32 # include/linux/i2c-proc.h 1.3 -> 1.4 # drivers/scsi/dmx3191d.c 1.9 -> 1.10 # drivers/acpi/events/evmisc.c 1.17 -> 1.19 # arch/ppc64/kernel/htab.c 1.29 -> 1.31 # include/acpi/acevents.h 1.12 -> 1.14 # include/acpi/actypes.h 1.20 -> 1.22 # include/asm-alpha/system.h 1.14.1.1 -> 1.17 # arch/ppc64/mm/init.c 1.39 -> 1.40 # drivers/char/epca.c 1.13 -> 1.14 # drivers/media/video/meye.c 1.13 -> 1.14 # arch/ppc64/kernel/open_pic.c 1.10 -> 1.11 # Documentation/networking/8139too.txt 1.14 -> 1.15 # include/linux/raid/raid1.h 1.14 -> 1.15 # include/asm-x86_64/delay.h 1.1 -> 1.2 # drivers/scsi/ppa.c 1.17.1.1 -> 1.19 # drivers/acpi/events/evgpe.c 1.6 -> 1.8 # net/sunrpc/auth_unix.c 1.9 -> 1.10 # include/linux/skbuff.h 1.18 -> 1.19 # fs/xfs/pagebuf/page_buf.h 1.20 -> 1.22 # drivers/char/sonypi.h 1.14 -> 1.15 # drivers/char/tty_io.c 1.58 -> 1.62 # drivers/acpi/executer/exconfig.c 1.15 -> 1.17 # arch/ppc64/kernel/process.c 1.26.1.1 -> 1.29 # include/acpi/achware.h 1.11 -> 1.12 # fs/bio.c 1.37 -> 1.38 # drivers/usb/core/urb.c 1.10 -> 1.11 # fs/ntfs/mst.c 1.6 -> 1.7 # arch/ppc64/boot/crt0.S 1.1 -> 1.2 # MAINTAINERS 1.120 -> 1.124 # include/linux/oprofile.h 1.2.1.3 -> 1.5 # include/asm-v850/page.h 1.1 -> 1.2 # drivers/ide/pci/sc1200.c 1.3 -> 1.5 # arch/sparc64/kernel/sys_sunos32.c 1.27 -> 1.28 # arch/ia64/ia32/sys_ia32.c 1.42 -> 1.43 # include/acpi/actbl2.h 1.14 -> 1.15 # drivers/char/rio/rio_linux.c 1.12 -> 1.13 # drivers/pcmcia/sa1100_generic.c 1.16 -> 1.17 # include/linux/in6.h 1.2 -> 1.3 # include/acpi/aclocal.h 1.24 -> 1.25 # drivers/ide/ide-pnp.c 1.4 -> 1.6 # fs/partitions/msdos.c 1.17 -> 1.18 # drivers/acpi/tables/tbrsdt.c 1.9 -> 1.10 # arch/ia64/hp/sim/simeth.c 1.4 -> 1.5 # arch/mips64/kernel/linux32.c 1.10 -> 1.11 # include/asm-m68knommu/mcfpci.h 1.1 -> 1.2 # drivers/char/watchdog/w83877f_wdt.c 1.14 -> 1.15 # arch/alpha/Makefile 1.18.1.5 -> 1.23 # Documentation/i2c/summary 1.3 -> 1.4 # drivers/acpi/utilities/utdebug.c 1.15 -> 1.16 # include/linux/time.h 1.8 -> 1.9 # drivers/video/sstfb.c 1.18 -> 1.19 # arch/sparc64/kernel/sys_sparc32.c 1.64 -> 1.65 # drivers/net/arlan.c 1.14 -> 1.15 drivers/net/wireless/arlan.c (moved) # arch/v850/vmlinux.lds.S 1.6 -> 1.7 # drivers/net/aironet4500_card.c 1.14 -> (deleted) # net/ipv4/netfilter/ipt_ah.c 1.3 -> 1.4 # drivers/usb/class/cdc-acm.c 1.33 -> 1.34 # include/linux/compiler.h 1.10 -> 1.11 # arch/mips/baget/vacserial.c 1.7 -> 1.8 # arch/m68knommu/kernel/signal.c 1.5 -> 1.6 # sound/oss/sb_card.c 1.14 -> 1.15 # net/bluetooth/rfcomm/sock.c 1.9 -> 1.12 # drivers/acpi/tables/tbget.c 1.17 -> 1.18 # include/asm-i386/unistd.h 1.23 -> 1.24 # drivers/scsi/eata_pio.c 1.12 -> 1.13 # include/acpi/acparser.h 1.14 -> 1.15 # include/linux/nfsd/nfsfh.h 1.11 -> 1.12 # drivers/acpi/utilities/utobject.c 1.16 -> 1.17 # drivers/usb/host/ehci-hcd.c 1.43 -> 1.44 # include/acpi/amlcode.h 1.15 -> 1.17 # include/linux/ipmi_smi.h 1.1 -> 1.2 # include/asm-alpha/compiler.h 1.4 -> 1.6 # drivers/scsi/pci2000.c 1.12 -> 1.13 # drivers/net/ac3200.c 1.10 -> 1.11 # drivers/acpi/events/evsci.c 1.11 -> 1.12 # arch/cris/drivers/serial.c 1.10 -> 1.11 # drivers/scsi/sym53c8xx.c 1.23 -> 1.24 # drivers/ide/legacy/falconide.c 1.4 -> 1.5 # drivers/scsi/aic7xxx/aic79xx.h 1.3 -> 1.4 # drivers/acpi/executer/exsystem.c 1.11 -> 1.12 # include/asm-x86_64/unistd.h 1.11 -> 1.12 # arch/x86_64/kernel/time.c 1.11 -> 1.12 # net/bluetooth/bnep/core.c 1.9.1.1 -> 1.14 # include/asm-ppc/delay.h 1.5 -> 1.6 # arch/i386/mach-visws/traps.c 1.2 -> 1.3 # fs/ntfs/unistr.c 1.17 -> 1.18 # drivers/media/video/bt832.h 1.1 -> 1.2 # net/bluetooth/l2cap.c 1.13 -> 1.18 # drivers/oprofile/oprofile_stats.c 1.1 -> 1.2 # drivers/acpi/resources/rsxface.c 1.11 -> 1.12 # arch/v850/kernel/bug.c 1.2 -> 1.3 # drivers/ide/legacy/ide-cs.c 1.7 -> 1.8 # include/asm-alpha/posix_types.h 1.2 -> 1.3 # arch/alpha/lib/udelay.c 1.1 -> 1.2 # arch/m68knommu/Kconfig 1.5 -> 1.6 # arch/ppc64/kernel/syscalls.c 1.8 -> 1.9 # include/asm-x86_64/thread_info.h 1.7 -> 1.8 # arch/alpha/kernel/core_irongate.c 1.9 -> 1.10 # arch/m68knommu/platform/68360/entry.S 1.2 -> 1.3 # arch/ppc64/kernel/sys_ppc32.c 1.48 -> 1.49 # sound/pci/es1968.c 1.16 -> 1.18 # drivers/parisc/lba_pci.c 1.5 -> 1.6 # arch/sparc64/oprofile/timer_int.c 1.3 -> 1.4 # CREDITS 1.76 -> 1.77 # drivers/scsi/fdomain.c 1.16 -> 1.17 # drivers/pci/probe.c 1.26 -> 1.29 # arch/mips/kernel/pci.c 1.3 -> 1.4 # drivers/net/strip.c 1.8 -> 1.9 drivers/net/wireless/strip.c (moved) # arch/i386/kernel/cpu/cpufreq/longrun.c 1.8 -> 1.9 # drivers/char/sonypi.c 1.13 -> 1.14 # net/ipv6/ipv6_syms.c 1.6 -> 1.7 # drivers/usb/net/kaweth.c 1.36 -> 1.38 # drivers/char/tipar.c 1.4 -> 1.5 # fs/xfs/xfs_error.h 1.2 -> 1.3 # drivers/scsi/eata_dma_proc.c 1.2 -> (deleted) # arch/sparc64/mm/ultra.S 1.21 -> 1.22 # arch/s390x/kernel/linux32.c 1.37 -> 1.38 # drivers/acpi/parser/pswalk.c 1.11 -> 1.12 # include/asm-x86_64/pgtable.h 1.12 -> 1.13 # drivers/usb/serial/Kconfig 1.5 -> 1.6 # drivers/scsi/qlogicfc.c 1.25 -> 1.26 # include/asm-ppc64/elf.h 1.7 -> 1.8 # include/acpi/acdispat.h 1.12 -> 1.13 # arch/ppc/8xx_io/uart.c 1.17 -> 1.18 # drivers/ide/legacy/pdc4030.h 1.3 -> 1.4 # fs/quota_v1.c 1.6 -> 1.7 # drivers/ide/pci/pdc202xx_new.c 1.10 -> 1.12 # drivers/acpi/executer/exoparg6.c 1.7 -> 1.8 # arch/x86_64/kernel/Makefile 1.16 -> 1.17 # drivers/net/pcmcia/Kconfig 1.2 -> 1.3 # drivers/media/video/bt832.c 1.1 -> 1.2 # net/ipv6/ip6_input.c 1.5 -> 1.6 # arch/i386/mach-visws/pci-visws.c 1.7 -> 1.9 arch/i386/pci/visws.c (moved) # include/asm-i386/pgtable.h 1.25 -> 1.26 # drivers/acpi/tables/tbxfroot.c 1.16 -> 1.17 # arch/x86_64/mm/Makefile 1.8 -> 1.9 # drivers/pnp/driver.c 1.10 -> 1.12 # drivers/acpi/tables/tbgetall.c 1.8 -> 1.9 # include/acpi/acconfig.h 1.31 -> 1.32 # drivers/serial/21285.c 1.12 -> 1.13 # drivers/media/dvb/av7110/saa7146_core.c 1.4 -> 1.5 # Documentation/video4linux/meye.txt 1.5 -> 1.6 # drivers/isdn/hardware/eicon/divasproc.c 1.3 -> 1.4 # sound/oss/mad16.c 1.7 -> 1.8 # include/asm-arm/arch-iop310/dma.h 1.1 -> 1.2 # net/ipv6/xfrm_policy.c 1.1 -> (deleted) # drivers/usb/input/Kconfig 1.2.1.2 -> 1.4 # net/sunrpc/svcauth.c 1.10 -> 1.11 # net/ipv6/Makefile 1.8 -> 1.9 # drivers/ide/pci/slc90e66.c 1.8 -> 1.10 # drivers/serial/8250_pci.c 1.14 -> 1.15 # drivers/bluetooth/hci_ldisc.c 1.6 -> 1.8 # drivers/acpi/numa.c 1.4 -> 1.5 # arch/alpha/Kconfig 1.6.1.9 -> 1.10 # drivers/ide/pci/pdcadma.c 1.9 -> 1.11 # drivers/net/am79c961a.c 1.8 -> 1.9 # include/acpi/platform/aclinux.h 1.18 -> 1.20 # arch/x86_64/kernel/vsyscall.c 1.8 -> 1.10 # drivers/i2c/i2c-dev.c 1.21 -> 1.22 # drivers/i2c/i2c-algo-pcf.c 1.7 -> 1.8 # arch/v850/kernel/irq.c 1.3 -> 1.4 # Documentation/scsi/scsi_mid_low_api.txt 1.9 -> 1.11 # mm/slab.c 1.61 -> 1.62 # include/linux/module.h 1.50 -> 1.51 # drivers/scsi/sym53c8xx_defs.h 1.7 -> 1.8 # drivers/scsi/eata_pio_proc.c 1.3 -> (deleted) # include/linux/socket.h 1.5 -> 1.6 # drivers/acpi/tables/tbutils.c 1.16 -> 1.17 # fs/xfs/xfsidbg.c 1.18 -> 1.19 # drivers/ide/pci/it8172.c 1.8 -> 1.9 # drivers/ide/legacy/gayle.c 1.3 -> 1.4 # arch/x86_64/Kconfig 1.14 -> 1.15 # drivers/scsi/scsi_scan.c 1.58 -> 1.60 # arch/sparc64/mm/Makefile 1.8 -> 1.9 # kernel/sched.c 1.159 -> 1.161 # drivers/acpi/executer/exmutex.c 1.10 -> 1.11 # Documentation/s390/cds.txt 1.6 -> 1.7 # include/asm-i386/lithium.h 1.2 -> 1.3 include/asm-i386/mach-visws/lithium.h (moved) # drivers/acpi/parser/psxface.c 1.15 -> 1.16 # drivers/ide/arm/rapide.c 1.3 -> 1.4 # include/asm-parisc/pdcpat.h 1.1 -> 1.2 # drivers/scsi/Makefile 1.37 -> 1.38 # fs/quota_v2.c 1.9 -> 1.10 # drivers/ide/legacy/ht6560b.c 1.3 -> 1.4 # drivers/acpi/osl.c 1.24 -> 1.27 # drivers/ide/pci/aec62xx.c 1.9 -> 1.11 # drivers/i2c/i2c-elv.c 1.9 -> 1.10 # drivers/scsi/sim710.c 1.8 -> 1.11 # drivers/i2c/i2c-velleman.c 1.7 -> 1.8 # drivers/acpi/resources/rsmemory.c 1.10 -> 1.11 # arch/sparc64/prom/Makefile 1.8 -> 1.9 # include/linux/atmdev.h 1.6 -> 1.7 # drivers/char/drm/drm_drv.h 1.11 -> 1.12 # drivers/acpi/dispatcher/dsopcode.c 1.18 -> 1.19 # include/asm-x86_64/system.h 1.11 -> 1.12 # sound/oss/Kconfig 1.4 -> 1.5 # arch/sparc64/kernel/sparc64_ksyms.c 1.36 -> 1.37 # drivers/usb/serial/console.c 1.1 -> 1.2 # arch/i386/pci/legacy.c 1.7 -> 1.8 # sound/pci/via82xx.c 1.25 -> 1.26 # kernel/timer.c 1.40 -> 1.42 # fs/nfsd/nfs4xdr.c 1.8 -> 1.9 # drivers/acpi/executer/exmisc.c 1.19 -> 1.20 # drivers/acpi/events/evevent.c 1.21 -> 1.22 # drivers/char/agp/via-agp.c 1.27 -> 1.28 # arch/i386/mach-visws/Makefile 1.5 -> 1.6 # arch/ppc64/kernel/sys32.S 1.10 -> 1.11 # drivers/acpi/hardware/hwregs.c 1.17 -> 1.18 # drivers/serial/nb85e_uart.c 1.7 -> 1.9 # include/linux/raid/raid5.h 1.13 -> 1.14 # drivers/scsi/sym53c8xx_2/sym_malloc.c 1.1 -> 1.2 # arch/mips/kernel/irixsig.c 1.6 -> 1.7 # drivers/pnp/quirks.c 1.7 -> 1.8 # arch/m68knommu/platform/68360/commproc.c 1.1 -> 1.2 # drivers/ieee1394/ohci1394.c 1.19 -> 1.20 # drivers/usb/host/ehci.h 1.17 -> 1.18 # drivers/net/Kconfig 1.16 -> 1.18 # drivers/char/sysrq.c 1.25 -> 1.26 # arch/ppc64/boot/Makefile 1.9 -> 1.10 # drivers/net/pcmcia/ray_cs.h 1.1 -> 1.2 drivers/net/wireless/ray_cs.h (moved) # drivers/scsi/eata.c 1.27 -> 1.28 # net/bluetooth/Kconfig 1.1.1.1 -> 1.3 # include/asm-alpha/ide.h 1.10 -> 1.11 # arch/i386/kernel/profile.c 1.1 -> (deleted) # arch/cris/boot/compressed/misc.c 1.5 -> 1.6 # drivers/acpi/dispatcher/dswstate.c 1.18 -> 1.19 # arch/ppc64/kernel/misc.S 1.49 -> 1.50 # include/asm-sparc64/posix_types.h 1.4 -> 1.5 # drivers/message/fusion/mptlan.h 1.8 -> 1.9 # kernel/exit.c 1.94 -> 1.98 # fs/cifs/CHANGES 1.4 -> 1.5 # sound/oss/maestro.c 1.17 -> 1.18 # include/linux/types.h 1.8 -> 1.9 # include/asm-parisc/pgtable.h 1.9 -> 1.10 # README 1.6 -> 1.7 # arch/ppc/kernel/entry.S 1.25 -> 1.26 # drivers/ide/pci/cmd64x.c 1.8 -> 1.10 # drivers/acpi/executer/exresop.c 1.19 -> 1.21 # drivers/char/specialix.c 1.9 -> 1.10 # include/asm-s390/cio.h 1.2 -> 1.3 # fs/xfs/xfs_dir_leaf.c 1.3 -> 1.4 # drivers/pcmcia/i82365.c 1.21 -> 1.22 # arch/alpha/kernel/ptrace.c 1.12 -> 1.13 # include/acpi/acinterp.h 1.20 -> 1.21 # drivers/net/tulip/dmfe.c 1.25 -> 1.26 # arch/sparc64/kernel/ioctl32.c 1.46.1.4 -> 1.52 # drivers/scsi/pcmcia/aha152x_stub.c 1.11 -> 1.12 # arch/i386/lib/delay.c 1.3 -> 1.4 # drivers/acpi/tables/tbxface.c 1.15 -> 1.16 # drivers/scsi/Kconfig 1.12 -> 1.15 # fs/xfs/linux/xfs_aops.c 1.23 -> 1.24 # include/asm-ppc/ppcboot.h 1.3 -> 1.4 # fs/cifs/connect.c 1.8 -> 1.9 # include/net/bluetooth/hci.h 1.8 -> 1.11 # include/asm-ppc/ide.h 1.17 -> 1.18 # drivers/acpi/namespace/nsdump.c 1.18 -> 1.19 # drivers/acpi/executer/exoparg1.c 1.20 -> 1.21 # arch/i386/kernel/cpu/cpufreq/p4-clockmod.c 1.10 -> 1.11 # arch/ppc64/kernel/signal32.c 1.37 -> 1.38 # drivers/pci/Makefile 1.22 -> 1.23 # drivers/message/i2o/i2o_config.c 1.13 -> 1.14 # include/asm-alpha/byteorder.h 1.1 -> 1.2 # arch/ppc/kernel/misc.S 1.39 -> 1.41 # drivers/char/mwave/3780i.c 1.2 -> 1.3 # drivers/pci/hotplug.c 1.10 -> 1.11 # arch/v850/kernel/entry.S 1.5 -> 1.6 # fs/xfs/linux/xfs_super.c 1.27 -> 1.28 # arch/i386/mm/hugetlbpage.c 1.31 -> 1.32 # drivers/acpi/namespace/nsload.c 1.17 -> 1.18 # drivers/char/genrtc.c 1.4 -> 1.6 # drivers/net/setup.c 1.5 -> 1.6 # drivers/acpi/dispatcher/dsinit.c 1.7 -> 1.8 # arch/ppc64/kernel/time.c 1.17 -> 1.19 # arch/i386/kernel/i8259.c 1.19 -> 1.20 # drivers/ide/pci/cmd640.c 1.4 -> 1.5 # include/asm-m68knommu/cacheflush.h 1.1 -> 1.2 # drivers/input/joystick/grip_mp.c 1.2 -> 1.3 # drivers/net/bonding.c 1.16 -> 1.17 # Documentation/i2c/i2c-protocol 1.1 -> 1.2 # drivers/usb/input/usbmouse.c 1.21.1.1 -> 1.23 # drivers/scsi/3w-xxxx.c 1.22 -> 1.24 # drivers/bluetooth/hci_usb.c 1.19.1.1 -> 1.21 # sound/pci/als4000.c 1.9 -> 1.10 # net/ipv6/addrconf.c 1.21 -> 1.22 # fs/xfs/support/qsort.c 1.1 -> 1.2 # arch/ia64/sn/io/l1.c 1.5 -> 1.6 # drivers/char/watchdog/wafer5823wdt.c 1.4 -> 1.5 # drivers/acpi/executer/excreate.c 1.16 -> 1.17 # net/sctp/ulpqueue.c 1.8 -> 1.9 # drivers/pnp/card.c 1.5 -> 1.8 # arch/sparc64/kernel/sunos_ioctl32.c 1.2 -> 1.3 # kernel/profile.c 1.3 -> 1.4 # drivers/bluetooth/hci_vhci.c 1.11 -> 1.12 # include/asm-i386/posix_types.h 1.1 -> 1.2 # include/pcmcia/ss.h 1.5 -> 1.7 # drivers/acpi/executer/exstorob.c 1.17 -> 1.18 # sound/pci/cs4281.c 1.21 -> 1.22 # include/asm-ia64/sn/sn2/shub_md.h 1.2 -> 1.3 # drivers/acpi/utilities/utmath.c 1.7 -> 1.8 # arch/m68knommu/platform/68360/uCquicc/crt0_rom.S 1.2 -> 1.3 # net/decnet/dn_route.c 1.11 -> 1.12 # drivers/usb/input/usbkbd.c 1.24.1.1 -> 1.26 # fs/cifs/misc.c 1.4 -> 1.5 # drivers/acpi/namespace/nsaccess.c 1.16 -> 1.19 # drivers/acpi/namespace/nssearch.c 1.17 -> 1.18 # drivers/usb/misc/Kconfig 1.4 -> 1.5 # drivers/serial/68360serial.c 1.5 -> 1.6 # arch/alpha/lib/Makefile 1.12 -> 1.14 # drivers/scsi/wd7000.h 1.8 -> (deleted) # drivers/net/skfp/pmf.c 1.1 -> 1.2 # drivers/ide/ppc/mpc8xx.c 1.3 -> 1.4 # include/linux/i2c-algo-bit.h 1.2 -> 1.3 # drivers/i2c/i2c-rpx.c 1.4 -> 1.5 # drivers/isdn/hardware/eicon/i4lididrv.c 1.5 -> 1.6 # drivers/parport/parport_pc.c 1.32 -> 1.33 # include/asm-x86_64/hw_irq.h 1.4 -> 1.5 # drivers/net/wireless/airport.c 1.11 -> 1.12 # drivers/char/ppdev.c 1.18 -> 1.19 # Documentation/i2c/smbus-protocol 1.3 -> 1.4 # drivers/pci/setup-bus.c 1.12 -> 1.13 # arch/m68knommu/platform/68328/pilot/crt0_rom.S 1.1 -> 1.2 # arch/m68k/ifpsp060/src/fpsp.S 1.4 -> 1.5 # arch/ppc64/kernel/Makefile 1.20 -> 1.21 # drivers/acpi/dispatcher/dswexec.c 1.17 -> 1.18 # include/asm-x86_64/processor.h 1.11 -> 1.12 # drivers/ide/pci/pdc202xx_old.c 1.10 -> 1.12 # include/acpi/platform/acgcc.h 1.15 -> 1.16 # drivers/usb/net/pegasus.h 1.22 -> 1.23 # drivers/scsi/eata_dma.h 1.3 -> (deleted) # drivers/bluetooth/Makefile 1.9.1.1 -> 1.11 # net/decnet/dn_nsp_out.c 1.4 -> 1.5 # drivers/scsi/qlogicisp.c 1.17 -> 1.18 # include/asm-ppc64/hw_irq.h 1.7 -> 1.8 # include/linux/i2c-algo-pcf.h 1.1 -> 1.2 # drivers/acpi/namespace/nsxfeval.c 1.9 -> 1.10 # include/linux/pnp.h 1.12 -> 1.14 # drivers/scsi/pcmcia/nsp_cs.c 1.15 -> 1.16 # drivers/scsi/eata_pio.h 1.4 -> 1.5 # net/ipv4/igmp.c 1.12 -> 1.13 # include/asm-x86_64/posix_types.h 1.1 -> 1.2 # drivers/isdn/eicon/divalog.h 1.3 -> 1.4 # drivers/scsi/wd7000.c 1.16.1.1 -> 1.19 # arch/alpha/mm/Makefile 1.5 -> 1.7 # arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c 1.2 -> 1.3 # arch/mips/ddb5xxx/common/pci.c 1.2 -> 1.3 # drivers/pcmcia/pci_socket.c 1.11 -> 1.13 # drivers/serial/sunzilog.c 1.24 -> 1.26 # include/asm-i386/hw_irq.h 1.19 -> 1.20 # drivers/bluetooth/bt3c_cs.c 1.6.1.2 -> 1.10 # drivers/scsi/imm.c 1.16.1.1 -> 1.18 # drivers/acpi/dispatcher/dswscope.c 1.12 -> 1.13 # net/bluetooth/bnep/Kconfig 1.1.1.1 -> 1.3 # net/ipv4/route.c 1.38 -> 1.40 # arch/m68knommu/mm/Makefile 1.2 -> 1.3 # net/bluetooth/hci_conn.c 1.6 -> 1.7 # arch/ppc64/kernel/align.c 1.5 -> 1.6 # drivers/acpi/resources/rsirq.c 1.13 -> 1.14 # include/asm-ppc64/system.h 1.16 -> 1.17 # include/net/sctp/structs.h 1.33 -> 1.34 # arch/i386/kernel/i386_ksyms.c 1.43 -> 1.45 # drivers/ide/legacy/qd65xx.h 1.2 -> 1.3 # include/asm-arm/hardware/iomd.h 1.3 -> 1.4 # arch/ppc/xmon/ansidecl.h 1.3 -> 1.4 # include/linux/tty_ldisc.h 1.2 -> 1.3 # drivers/scsi/sym53c8xx_2/sym_glue.h 1.8 -> 1.9 # fs/nfsctl.c 1.5 -> 1.6 # Documentation/sound/oss/PSS-updates 1.2 -> 1.3 # drivers/ide/pci/amd74xx.c 1.13 -> 1.14 # fs/nfsd/nfs4proc.c 1.6 -> 1.8 # arch/m68k/kernel/head.S 1.10 -> 1.11 # drivers/acpi/namespace/nswalk.c 1.11 -> 1.12 # arch/ppc64/kernel/ioctl32.c 1.23 -> 1.24 # drivers/scsi/qla1280.c 1.30 -> 1.31 # arch/parisc/kernel/parisc_ksyms.c 1.7 -> 1.8 # drivers/message/fusion/mptscsih.h 1.14 -> 1.15 # drivers/char/amiserial.c 1.11 -> 1.12 # arch/ppc64/kernel/pSeries_lpar.c 1.17 -> 1.18 # drivers/acpi/resources/rslist.c 1.12 -> 1.13 # arch/v850/kernel/signal.c 1.7 -> 1.8 # arch/i386/kernel/apic.c 1.31 -> 1.33 # drivers/usb/misc/speedtouch.c 1.44 -> 1.60 # Documentation/DocBook/videobook.tmpl 1.3 -> 1.4 # fs/xfs/xfs_log.c 1.9 -> 1.10 # fs/ntfs/attrib.c 1.84 -> 1.85 # drivers/pcmcia/i82092.c 1.12 -> 1.13 # drivers/acpi/namespace/nsnames.c 1.16 -> 1.17 # arch/x86_64/kernel/smpboot.c 1.12 -> 1.13 # arch/ppc64/oprofile/timer_int.c 1.3 -> 1.4 # drivers/net/wireless/orinoco.c 1.19 -> 1.20 # arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c 1.4 -> 1.5 # include/asm-ppc64/posix_types.h 1.3 -> 1.4 # arch/m68knommu/platform/68360/uCquicc/crt0_ram.S 1.2 -> 1.3 # drivers/char/ip2main.c 1.23 -> 1.24 # drivers/pnp/system.c 1.4 -> 1.6 # arch/ppc64/boot/main.c 1.3 -> 1.5 # drivers/scsi/53c7xx.c 1.13 -> 1.14 # include/asm-v850/entry.h 1.1 -> 1.2 # net/bluetooth/bnep/sock.c 1.4 -> 1.7 # drivers/scsi/sym53c8xx_2/sym_glue.c 1.13 -> 1.15 # drivers/net/wireless/Makefile 1.9 -> 1.10 # fs/xfs/xfs_log.h 1.2 -> 1.3 # net/sunrpc/auth_null.c 1.9 -> 1.10 # drivers/scsi/tmscsim.c 1.16 -> 1.17 # drivers/usb/serial/usb-serial.h 1.24 -> 1.25 # net/atm/common.c 1.11 -> 1.12 # scripts/header.tk 1.3 -> (deleted) # drivers/char/ftape/zftape/zftape-eof.c 1.1 -> 1.2 # (new) -> 1.1 arch/ppc64/boot/string.S # (new) -> 1.1 include/asm-i386/mach-visws/mach_apic.h # (new) -> 1.2 include/linux/idr.h # (new) -> 1.5 arch/alpha/oprofile/common.c # (new) -> 1.1 arch/ppc64/boot/ppc32-types.h # (new) -> 1.1 arch/i386/kernel/doublefault.c # (new) -> 1.1 arch/m68knommu/mm/extable.c # (new) -> 1.1 include/asm-v850/bug.h # (new) -> 1.1 arch/i386/kernel/cpu/cpufreq/Kconfig # (new) -> 1.2 drivers/pnp/support.c # (new) -> 1.1 arch/ppc64/boot/README # (new) -> 1.1 arch/m68knommu/platform/68VZ328/ucdimm/config.c # (new) -> 1.1 include/asm-i386/i8259.h # (new) -> 1.1 include/asm-v850/flat.h # (new) -> 1.4 arch/alpha/oprofile/op_model_ev5.c # (new) -> 1.4 arch/alpha/oprofile/op_model_ev4.c # (new) -> 1.2 lib/idr.c # (new) -> 1.1 include/asm-i386/mach-visws/piix4.h # (new) -> 1.1 arch/alpha/oprofile/Kconfig # (new) -> 1.1 include/linux/posix-timers.h # (new) -> 1.3 kernel/posix-timers.c # (new) -> 1.1 sound/oss/sb_card.h # (new) -> 1.5 arch/alpha/oprofile/op_model_ev6.c # (new) -> 1.1 include/asm-generic/ide_iops.h # (new) -> 1.1 arch/i386/mach-visws/reboot.c # (new) -> 1.1 arch/m68knommu/platform/5307/vectors.c # (new) -> 1.1 arch/ppc64/boot/prom.c # (new) -> 1.1 include/asm-m68knommu/flat.h # (new) -> 1.3 arch/alpha/oprofile/op_impl.h # (new) -> 1.4 drivers/pnp/manager.c # (new) -> 1.4 arch/alpha/oprofile/op_model_ev67.c # (new) -> 1.4 arch/alpha/oprofile/Makefile # (new) -> 1.4 drivers/bluetooth/btuart_cs.c # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/02/17 torvalds@home.transmeta.com 1.914.102.107 # Linux 2.5.62 # -------------------------------------------- # 03/02/17 jgarzik@redhat.com 1.914.175.1 # [netdrvr 8139too] add to the list of supported boards # -------------------------------------------- # 03/02/18 anton@samba.org 1.914.102.108 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/sfr # -------------------------------------------- # 03/02/17 jgarzik@redhat.com 1.914.176.1 # Merge redhat.com:/garz/repo/linus-2.5 # into redhat.com:/garz/repo/net-drivers-2.5 # -------------------------------------------- # 03/02/17 jgarzik@redhat.com 1.914.176.2 # [netdrvr] Remove superceded wireless driver aironet4500 # # From the maintainer, Elmer Joandi(sp?): # aironet4500 is superseded by cisco340 drivers (airo.c) by Ben Reed # and the only strenght of my driver is that it allows to access absolutely # all registers on card. Which is useful for developers only. Besides there # is no normal interface to configure crypto in my driver, as the general # interface is not userfriendly at all. So in fact, I use Bens driver for my # ISP bussiness in general cases and my driver for troubleshooting. # -------------------------------------------- # 03/02/17 willy@debian.org 1.914.176.3 # [wireless airo] call pci_enable_device, pci_set_master as needed # -------------------------------------------- # 03/02/17 jejb@raven.il.steeleye.com 1.914.177.1 # 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/02/17 neilb@cse.unsw.edu.au 1.914.177.2 # [PATCH] Bounds checking for NFSv3 readdirplus # # From Ted Phelps # # The NFSv3 readdirplus path doesn't check to see if maxcount is less # than the size of a page before it fills it up, possibly overwriting # random bits of memory. At least, it makes my Solaris NFSv3 client # work. # # The attached patch, against 2.5.58, adds this check in a way which is # consistent with the way readdir does under both NFSv2 andNFSv3. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.3 # [PATCH] Keep track of which page is the 'tail' of an NFSd reply # # NFS replies can have a 'tail' after a 'data' component # (for read, readlink, readdir). # # For nfsv2 and v3 this tail is in the same page as the head. # For nfsv4, this tail is in a separate page. # # We need to keep track of which page so that it right one # gets sent. This patch does that. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.4 # [PATCH] Fix handling of error code in NFSv4 replies # # As nfsv4 does some reply encoding while processing # requests, the code which tries to put the overall status # at the head of the reply fails. # # With this patch, we take the address for the overall # status very early so NFSv4's encoding wont confuse us. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.5 # [PATCH] Fix problem where knfsd wouldn't release filesystem on unexport. # # Problem was that the cache was being updated inplace, rather # than swapping in a new entry, so old filesystem pointers # were overwritten without being released. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.6 # [PATCH] Make kNFSd pre/post_[acm]time use struct timespec # # From Trond: # # When the nanosecond resolution on [acm]time was introduced to 2.5.x, # the knfsd GETATTR responses were converted to make use of the # nanosecond field, but the pre/post WCC attributes were not. This will # lead to a lot of unnecessary cache invalidations on the clients. # # The following trivial patch should fix up knfsd so that it stores and # encodes the full 'struct timespec' in both pre and post attribute # fields. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.7 # [PATCH] Convert fs/nfsctl.c to use C99 named initiailzers # # From Art Haas : # # This converts the file to use C99 named initializers. These change make # the file compile with fewer warnings if '-W' is added to the compile # flags, and may enhance code readability. Let me know if you think this # should be sent to Linus. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.8 # [PATCH] Fix bug in md superblock sanity checking. # # This call the super_90_load is meant to make sure that the new # superblock is consistant with a pre-exisitnig one (on rdev0)... but # rdev0 was not passed :-( # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.9 # [PATCH] linear.c fix for gcc bug # # From Andrew Morton : # # gcc-2.95.3 is getting an internal compiler error with CONFIG_LBD=y. Reorganising # the code a bit made it go away. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.10 # [PATCH] Small bug fix for multipath. # # by the nature of multipath, already be in-sync, so we should set the # in-sync flag. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.11 # [PATCH] C99 initializers for drivers/md/md.c # # From Art Haas : # # This converts md.c to use C99 initializers to improve readability and # remove warnings if '-W' is used. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.12 # [PATCH] Add name of md device to name of thread managing that device. # # This allows the thread to easily identified and signalled. # The point of signalling will appear in the next patch. # -------------------------------------------- # 03/02/17 neilb@cse.unsw.edu.au 1.914.177.13 # [PATCH] Provide a 'safe-mode' for soft raid. # # When a raid1 or raid5 array is in 'safe-mode', then the array # is marked clean whenever there are no outstanding write requests, # and is marked dirty again before allowing any write request to # proceed. # # This means than an unclean shutdown while no write activity is happening # will NOT cause a resync to be required. However it does mean extra # updates to the superblock. # # Currently safe-mode is turned on by sending SIGKILL to the raid thread # as would happen at a normal shutdown. This should mean that the # reboot notifier is no longer needed. # # After looking more at performance issues I may make safemode be on # all the time. I will almost certainly make it on when RAID5 is degraded # as an unclean shutdown of a degraded RAID5 means data loss. # # This code was provided by Angus Sawyer # -------------------------------------------- # 03/02/17 davem@nuts.ninka.net 1.914.178.1 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/02/18 anton@samba.org 1.914.102.109 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/sfr # -------------------------------------------- # 03/02/18 tinglett@vnet.ibm.com 1.914.1.39 # Merge bk://ppc.bkbits.net/for-linus-ppc64 # into vnet.ibm.com:/u1/tinglett/bk/for-linus-ppc64 # -------------------------------------------- # 03/02/18 hch@lab343.munich.sgi.com 1.914.177.14 # Merge http://linux.bkbits.net/linux-2.5 # into lab343.munich.sgi.com:/home/hch/repo/bkbits/linux-2.5 # -------------------------------------------- # 03/02/18 baldrick@wanadoo.fr 1.914.169.21 # [PATCH] USB speedtouch: replace speedtouch crc routines # # Use the kernel CRC routines rather than a do-it-yourself version. # By the way, I created a common USB Makefile.lib, rather than having # one for the class drivers, and one for speedtouch. # -------------------------------------------- # 03/02/18 Andries.Brouwer@cwi.nl 1.914.179.1 # [PATCH] remove BSD_PARTITION # # There is no reason to have both BSD_PARTITION and FREEBSD_PARTITION # denoting the same partition type. # -------------------------------------------- # 03/02/18 baldrick@wanadoo.fr 1.914.169.22 # [PATCH] USB speedtouch: speedtouch stability fix fix # # It's usually considered stupid to stuff-up like this. However, # for this once we'll just call it "inspired". # -------------------------------------------- # 03/02/18 baldrick@wanadoo.fr 1.914.169.23 # [PATCH] USB speedtouch: speedtouch cleanups # # Grab bag of minor cleanups. # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.1 # Merge groveronline.com:/root/bk/linux-2.5 # into groveronline.com:/root/bk/linux-acpi # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.2 # [PATCH] ide resync # # Ok this first piece eliminates some of the use of ide_ioreg_t, which # actually only works as a ulong anyway. Its a dysfunctional abstraction. # # We also need the ide pci stuff if we have IDE PCI not if we have PCI but # only legacy mode IDE support # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.3 # [PATCH] add generic ide iops # # This abstracts out the mmio copies as PPC at least has better ways to # this and there are other issues on other platforms. It keeps DaveM happy # too 8) # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.4 # [PATCH] eliminate use of ide_ioreg_t on ARM # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.5 # [PATCH] update ide.c # # Remove ide_ioreg_t # Add locking on the ide setting lists # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.6 # [PATCH] remove old style and unused bad drive list # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.7 # [PATCH] clean up the IDE iops, add ones for a dead iface # # Also adds the new OUTBSYNC iop # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.8 # [PATCH] fix ide_ioreg_t and ifdefs in iops # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.9 # [PATCH] add ide_execute_command but do not use it yet # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.10 # [PATCH] remove ide_ioreg_t # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.11 # [PATCH] ide-probe updates # # Fix crash with slave and no master # Fix crash with hdb=noprobe hdb=cdrom # Fix crash with pre ATA devices refusing IDENTIFY # Fix flash slave making master disappear # Add interfaces that the PPC uses to do disk spin up when the BIOS has not # Add framework to allow hdparm -d1 on a box built with IDE_DMA_ONLYDISK # Fix identify framework so we can fix the proc identify crash too # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.12 # [PATCH] ide-proc - fix crash on identify # # We cannot do an identify on a drive with no driver loaded. The kernel # has a ton of half backed "if no driver" cases but they dont cover all # cases and its a mess. # # For now we rely on the probe time identify unless a driver is loaded. A # proper fix (an 'ide-unassigned' driver) will follow later # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.13 # [PATCH] add new settings locks to ide-proc # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.14 # [PATCH] ide-tape no longer needs this ifdef # # Now handled at runtime # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.15 # [PATCH] fix path of file # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.16 # [PATCH] path/ide_ioreg_t fixes for legacy drivers # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.17 # [PATCH] fix int for i/o in pcmcia ide_cs # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.18 # [PATCH] fix the rest of the names/ide_ioreg_t in ide legacy # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.19 # [PATCH] rmeove ide_ioreg_t from PCI ide # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.20 # [PATCH] fix path names and printks in IDE pci # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.21 # [PATCH] add a 'NO_IRQ' definition to IDE # # (second hunk just makes 2.4/2.5 header match format) # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.22 # [PATCH] exterminate unused io_ops structures and switch to ulong # # The iops struct may be a good idea in the longer run but right now its # unused and its mess that can be restored neatly later on. # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.23 # [PATCH] add pio_speed # # Some drivers need this. Its in the core as the core eventually needs to # be doing the tracking here # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.24 # [PATCH] kill more ioregs, add OUTBSYNC # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.25 # [PATCH] resync externs, add execute command remove is_flashcard # # (is_flashcard is unneeded outside ide_probe as we have a drive->flash check) # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.26 # [PATCH] copy idesync # # We need to copy the new io op. Actually we need to shoot the entire mess # in this function and make the drivers always set it but not today. # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.27 # [PATCH] use ide_execute_command for CD # # This is the only user I'll feed you this time. As with 2.4 I want it to # run for a bit on read only media first 8) # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.28 # [PATCH] add a reminder for vdma on non disk # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.29 # [PATCH] clean up DMA reference, new style ONLYDISK # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.30 # [PATCH] ide-dma, fix bogus inc of waiting_for_dma # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.31 # [PATCH] update ide-floppy for new style onlydisk # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.32 # [PATCH] fix ALi 32bitisms, fix ALi FIFO, fix ALi IRQ crash # # also Enable ATI IGP/ALi combo # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.33 # [PATCH] fix some escaped globals # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.34 # [PATCH] don't force enable generic IDE controllers # # Fixes hangs on Micron Samurai boards # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.35 # [PATCH] part fix the highpoint timing/overclock bug # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.36 # [PATCH] clean up siimage, use generic mmio ops # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.37 # [PATCH] update sis driver # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.179.38 # [PATCH] make the sl82c105 work again # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.2 # ACPI: Change NUMA maintainer email # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.3 # ACPI: Eliminate use of acpi_gpl_gpe_number_info (Matthew Wilcox) # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.4 # ACPI: Support translation attribute (Bjorn Helgaas) # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.5 # ACPI: Add ability to override predefined object values (Ducrot Bruno) # -------------------------------------------- # 03/02/18 george@mvista.com 1.914.179.39 # [PATCH] POSIX clocks & timers # # This is version 23 or so of the POSIX timer code. # # Internal changelog: # # - Changed the signals code to match the new order of things. Also the # new xtime_lock code needed to be picked up. It made some things a lot # simpler. # # - Fixed a spin lock hand off problem in locking timers (thanks # to Randy). # # - Fixed nanosleep to test for out of bound nanoseconds # (thanks to Julie). # # - Fixed a couple of id deallocation bugs that left old ids # laying around (hey I get this one). # # - This version has a new timer id manager. Andrew Morton # suggested elimination of recursion (done) and I added code # to allow it to release unused nodes. The prior version only # released the leaf nodes. (The id manager uses radix tree # type nodes.) Also added is a reuse count so ids will not # repeat for at least 256 alloc/ free cycles. # # - The changes for the new sys_call restart now allow one # restart function to handle both nanosleep and clock_nanosleep. # Saves a bit of code, nice. # # - All the requested changes and Lindent too :). # # - I also broke clock_nanosleep() apart much the same way # nanosleep() was with the 2.5.50-bk5 changes. # # TIMER STORMS # # The POSIX clocks and timers code prevents "timer storms" by # not putting repeating timers back in the timer list until # the signal is delivered for the prior expiry. Timer events # missed by this delay are accounted for in the timer overrun # count. The net result is MUCH lower system overhead while # presenting the same info to the user as would be the case if # an interrupt and timer processing were required for each # increment in the overrun count. # -------------------------------------------- # 03/02/18 torvalds@penguin.transmeta.com 1.914.179.40 # Add ndelay() compatibility macro. If the architecture # doesn't define ndelay(), fall back on udelay(). # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.6 # ACPI: Decrease size of override's static array, add a define for the length, # and print a msg if used # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.7 # ACPI: Fix printk output (Jochen Hein) # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.8 # ACPI: Misc interpreter improvements # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.9 # ACPI: misc cleanups # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.10 # ACPI: Change license from GPL to dual GPL and BSD-style # -------------------------------------------- # 03/02/18 ink@jurassic.park.msu.ru 1.914.179.41 # [PATCH] numa fixes # # As Jeff pointed out, reserve_bootmem() in core_irongate.c # breaks build of generic discontiguous memory kernels because # this function doesn't exist in such kernels. # Ditto free_bootmem(). # Also, here's fixes for NUMA+initrd and memory info printk. # # Ivan. # -------------------------------------------- # 03/02/18 greg@kroah.com 1.914.169.24 # [PATCH] USB: add "present" flag to usb_device structure. # # This solves lots of races when drivers hold a reference to the usb_device # after the device is physically removed from the system (like when a user # has a open handle.) This now prevents any new urbs being submitted or # canceled for the device. # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.180.11 # ACPI: Toshiba ACPI device update (John Belmonte) # -------------------------------------------- # 03/02/18 agrover@groveronline.com 1.914.181.1 # Merge groveronline.com:/root/bk/linux-2.5 # into groveronline.com:/root/bk/linux-acpi # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.918 # Merge ssh://are.twiddle.net/BK/op-2.5 # into dorothy.sfbay.redhat.com:/dorothy/rth/linux/op-2.5 # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.919 # Merge # -------------------------------------------- # 03/02/18 greg@kroah.com 1.914.169.25 # [PATCH] USB serial: fix locking logic # # This gets rid of the port semaphore, and the serialization caused by # that, and replaces it with the proper reference counting logic for # the usb serial object. # -------------------------------------------- # 03/02/18 greg@kroah.com 1.914.169.26 # [PATCH] USB: serial core fix to solve ordering issues when destroying our objects. # -------------------------------------------- # 03/02/18 greg@kroah.com 1.914.182.1 # Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/02/18 greg@kroah.com 1.914.182.2 # [PATCH] USB: added sched.h to usb.h # # Thanks to Matt Wilcox for the info. # -------------------------------------------- # 03/02/18 greg@kroah.com 1.914.182.3 # USB: usbnet driver also needs the crc32 code. # # Thanks to David Brownell for this. # -------------------------------------------- # 03/02/18 alan@lxorguk.ukuu.org.uk 1.914.181.2 # [PATCH] ndelay() for x86 # # The implementation is not ideal. Thats something to tidy up. # -------------------------------------------- # 03/02/18 torvalds@home.transmeta.com 1.914.181.3 # Merge bk://linuxusb.bkbits.net/linus-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/18 jgarzik@redhat.com 1.914.176.4 # Move the old wireless drivers into drivers/net/wireless: # arlan, ray_cs, and strip. # # Contributed by Randy Dunlap. # -------------------------------------------- # 03/02/18 jgarzik@redhat.com 1.914.176.5 # Merge redhat.com:/garz/repo/linus-2.5 # into redhat.com:/garz/repo/net-drivers-2.5 # -------------------------------------------- # 03/02/18 torvalds@home.transmeta.com 1.914.176.6 # Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.914.179.42 # [ALPHA] Mirror i386 change to include asm-generic/ide_iops.h. # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.914.179.43 # [ALPHA] Add clockid_t and timer_t for posix clocks. # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.920 # [OPROF] Update for change to cpu_type interface. # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.914.176.7 # Merge dorothy.sfbay.redhat.com:/dorothy/rth/linux/linus-2.5 # into dorothy.sfbay.redhat.com:/dorothy/rth/linux/axp-2.5 # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.921 # [OPROF] Fix arguments to oprofile_add_sample. # -------------------------------------------- # 03/02/18 rth@dorothy.sfbay.redhat.com 1.922 # Merge dorothy.sfbay.redhat.com:/dorothy/rth/linux/linus-2.5 # into dorothy.sfbay.redhat.com:/dorothy/rth/linux/op-2.5 # -------------------------------------------- # 03/02/18 stevef@smfhome1.austin.rr.com 1.914.183.1 # Remove compiler warnings and allow reconnection of tids after temporary tcp session failure # -------------------------------------------- # 03/02/18 torvalds@home.transmeta.com 1.914.176.8 # Merge bk://are.twiddle.net/pci-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/18 kaber@trash.net 1.914.178.2 # [IPV{4,6}]: lru queue for ip_fragment evictor. # The current ip_fragment evictor kills the oldest entry of each hash bucket # starting with 0 instead of killing the oldest entry of all buckets. This # leads # to unfair behaviour if one of the higher hash slots carries alot of # fragments. # This patch holds the frag heads in a lru queue so we can kills the least # recently used first. Each arriving fragment counts as usage. # -------------------------------------------- # 03/02/18 torvalds@home.transmeta.com 1.923 # Merge bk://are.twiddle.net/op-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/18 elenstev@mesatop.com 1.924 # [PATCH] spelling fix accessable -> accessible # # This provides the following spelling fix. # # accessable -> accessible # -------------------------------------------- # 03/02/18 elenstev@mesatop.com 1.925 # [PATCH] spelling fix adress/addres -> address # # This patch provides the following spelling fixes. # # adress -> address # addres -> address # # except for cases in two files which appear to be in French and German. # These were left as is. # -------------------------------------------- # 03/02/18 elenstev@mesatop.com 1.926 # [PATCH] spelling fix for interupt -> interrupt # # This patch provides the following spelling fix. # # interupt -> interrupt # -------------------------------------------- # 03/02/18 elenstev@mesatop.com 1.927 # [PATCH] spelling fix for compatable -> compatible # # This patch provides the following spelling fixes. # # compatable -> compatible # compatability -> compatibility # -------------------------------------------- # 03/02/18 elenstev@mesatop.com 1.928 # [PATCH] spelling fix for propogate -> propagate # # This patch provides the following spelling fix. # # propogate -> propagate # -------------------------------------------- # 03/02/18 elenstev@mesatop.com 1.929 # [PATCH] various spelling fixes # # This provides the following spelling fixes. # # posible -> possible # messsage -> message # reqeuest -> request # exeption -> exception # seqeunce -> sequence # loggger -> logger # resposible -> responsible # qeueu -> queue # microsecnds -> microseconds # positiion -> position # feilds -> fields # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.930 # [PATCH] signal warning and uninitialised variable fix # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.931 # [PATCH] MPT Fusion build fix # # Patch from Hugh Dickins # # 2.5.62's removal of scsi_set_pci_device broke the MPT Fusion build. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.932 # [PATCH] fix for uninitialized timer in drm_drv.h # # Patch from Martin Josefsson # # Here's a fix for an uninitialized timer in drm_drv.h, for some reason it # initilizes the timer when the device is opened, not at init. It moves # the initilization for the waitqueue to init aswell. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.933 # [PATCH] export add_to_page_cache() and __pagevec_lru_add to # # CIFS is using these. # # Given that the readpages() address_space op is supposed to add the pages to # pagecache, it makes sense to make these functions available to modules. # # I can't say that I put a lot of though into the readpages API. It was # designed as just enough functionality to be able to stuff a bunch of # readahead pages into a single BIO. The only reason I made it an a_op at all # was because we have toi enter the fs to pick up the ->get_block callback's # address. # # But a couple of filesystems seem to be making use of it now. Reiser4 will # need access at the do_page_cache_readahead() level too. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.934 # [PATCH] Move mk_pte_huge() into pgtable.h # # Patch from Andi Kleen # # This simple patch allow me to symlink hugetlbpage.c for x86-64. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.935 # [PATCH] fix kirq for clustered apic mode # # Patch from Dave Hansen # # The new kirq patch assumes flat addressing APIC mode where apicid = (1 # << cpu). This isn't true for clustered mode. # # - Change name/type of irq_balance_mask. The type of apicid seems to # be int. # - Change instance of (1< # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.938 # [PATCH] Fix warnings for NTFS # # Patch from Stephen Hemminger # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.939 # [PATCH] allow SMP kernel build without io_apic.c # # Patch from Andrey Panin # # I'm here again, starting another hopeless attempt to submmit # visws subarch support for 2.5. This series of patches was tested # by me and brave people from linux-visws-devel mailing list and # our beloved workstations seem to work well under 2.5.xx. # # This patch moves enable_NMI_through_LVT0() function from io_apic.c # to apic.c to allow SMP kernel build without io_apic.c included. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.940 # [PATCH] export some functions from i8259.c # # Patch from Andrey Panin # # This trivial patch exports some functions from 8259.c file. # Visws subarch needs them to handle interrupts from legacy devices # connected to PIIX4 i8259s, which are in turn connected to SGI # Cobalt APIC. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.941 # [PATCH] make startup_32 kernel entry point # # Patch from Andrey Panin # # This patch marks startup_32 (in head.S) as kernel entry point, # visws kernel loader uses raw elf kernel images and entry point # at stext causes jump to wrong address. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.942 # [PATCH] export boottime gdt descriptor # # Patch from Andrey Panin # # This simple patch exports boottime gdt descriptor from trampoline.S. # Visws uses it to initialize bootup cpu before running the rest of head.S # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.943 # [PATCH] visws: boot changes # # Patch from Andrey Panin # # This simple patch adds some additional code into head.S. # # On visws bootup cpu starts in protected mode (so we don't need # setup.S), but setting up pagetables and gdt is required before # running rest of head.S. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.944 # [PATCH] visws: move header file into asm/arch-visws # # Patch from Andrey Panin # # This trivial patch moves visws related header files into asm/mach-visws. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.945 # [PATCH] visws: add missing mach_apic.h file # # Patch from Andrey Panin # # This patch adds misiing mach_apic.h file. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.946 # [PATCH] visws: pci support # # Patch from Andrey Panin # # This patch contains update of pci support for visws. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.947 # [PATCH] visws: core # # Patch from Andrey Panin # # This patch contains core support for visws subarch. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.948 # [PATCH] visws: framebuffer driver update # # Patch from Andrey Panin # # This patch contains SGI visws framebuffer update. Patch makes it # compile again and brings flatpanel monitor support back. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.949 # [PATCH] visws: sound update # # Patch from Andrey Panin # # This patch contains SGI visws OSS sound driver update. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.950 # [PATCH] visws: MAINTAINERS file update # # Patch from Andrey Panin # # Looks like I'm a maintainer of visws support now :)) # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.951 # [PATCH] visws: i386/KConfig update # # Patch from Andrey Panin # # And finally, attached patch enables visws subarch support # in kernel config. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.952 # [PATCH] fix a visws compile warning # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.953 # [PATCH] consolidate and cleanup profiling code. # # Patch from Nikita Danilov # # this moves functions from identical per-architecture # arch/*/kernel/profile.c into generic kernel/profile.c. Also, identical # {x86,parisc,ppc64,sparc64}_profile_hook()'s are all replaced by the # single kernel/profile.c:profile_hook(), which is #defined to noop in # include/linux/profile.h if CONFIG_PROFILING is not set. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.954 # [PATCH] more ia32 profiler cleanups # # Make the prof_counter and prof_old_counter arrays use per-cpu data, and give # them static scope. # # Also fix a signedness bug in the voyager implementation (from James) # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.955 # [PATCH] TTY module refcounting fix # # Patch from Max Krasnyansky # # This changeset adds module refcounting for TTY line disciplines. I've sent # the patch to LKM earlier. No negative comments (actually most people didn't # seem to care). This is needed at least for Bluetooth and IrDA (Jean is ok # with the patch). # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.956 # [PATCH] remove (start|end)_lazy_tlb() # # Patch from William Lee Irwin III # # Remove start_lazy_tlb() and end_lazy_tlb(), as they are unused. # -------------------------------------------- # 03/02/18 akpm@digeo.com 1.957 # [PATCH] lib/idr.c 64-bit fixes # # Various overflow problems compiling the lib/idr.c code for ppc64 # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.958 # [PATCH] Handle null OLD argument in nb85e_uart's nb85e_uart_set_termios function # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.959 # [PATCH] Fix up some left-over sig->sighand issues on the v850 # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.960 # [PATCH] Add v850 version of `init_irq_proc' for sysctl # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.961 # [PATCH] Set child process initial stack-pointers correctly on the v850 # # Previously the v850's copy_thread function didn't set the child's stack # pointer at all, with the result that it accidentally worked for vfork # (where the child has the same SP as the parent), but not for user # threads; kernel threads also accidentally worked, for a different # reason. # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.962 # [PATCH] Remove unused compile-time configuration options on v850 # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.963 # [PATCH] Use .balign rather than .align for v850 asm funcs # # Removes a bunch of unnecessary nops... :-) # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.964 # [PATCH] v850 kernel entry fixes and cleanup # # 1) Preserve the v850 system-call-number register when handling a signal; # otherwise system calls will not be correctly restarted afterwards # 2) Correctly handle illegal insn exceptions, which need a special # instruction to return (not reti), and save PC/PSW to a different place # 2) Remove some unnecessary register saving in the trap handler # 3) Consolidate various places that use the register save/restore macros # 4) Eliminate some unused compile-time configuration stuff # 5) A bit of whitespace and other syntactic cleanup # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.965 # [PATCH] Implement for v850 # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.966 # [PATCH] Add a v850 config option to pass illegal insn traps to the kernel # # On the v850 RTE-MA1-CB-MULTI platform, these are normally intercepted by # the monitor for the use of an external debugger, but if you want to use # a linux-resident debugger, the kernel has to see them. # -------------------------------------------- # 03/02/18 miles@lsi.nec.co.jp 1.967 # [PATCH] Force v850 interrupt vector parts into their correct locations # # Otherwise a if one them is partially empty, the following input section # can end up in the wrong place. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.968 # [PATCH] init sighand in m68knommu init_task # # Add initialization of init_sighand for m68knommu architectures. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.969 # [PATCH] add exception table support for m68knommu architecture # # This patch adds exception table support for the m68knommu architecture. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.970 # [PATCH] m68knommu cacheflush.h cleanup # # This patch overhauls the cache support routines for the m68knommu # architecture. It removes depricated functions, and fixes those required # to operate as per Documentation/cachetlb.txt. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.971 # [PATCH] fixup use of sighand in m68knommu signal.c # # This patch fixes the use of sighand for the m68knommu architecture. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.972 # [PATCH] bounds check and no argv/envp support for binfmt_flat load # # This patch to the MMUless flat loader does 2 important things: # # 1. Allow for architectures that do not want argv and envp on # the initial process stack (v850 is an example of this) # 2. Does some bounds checking on the zipped flat header when # processing it. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.973 # [PATCH] add extable.c to Makefile for m68knommu architecture # # Add exception table support to Makefile build list for m68knommu. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.974 # [PATCH] fix m68knommu/ColdFire serial port hang # # This patches fixes a serial port "hang" on the m68knommu ColdFire # serial driver. It was erroneoulsy looking for a state bit that # is never set. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.975 # [PATCH] add m68knommu serial console support into tty_io.c # # This patch initializes the m68knommu specific serial drivers (68328serial.c, # mcfserial.c and 68360serial.c) when used as consoles. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.976 # [PATCH] add missing m68knommu/68VZ328/ucdimm/config.c # # This adds the missing config.c file for the m68knommu/68VZ328/ucdimm # target. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.977 # [PATCH] reformat m68knommu 68360/uCquicc crt0_rom.S # # This patch reformats the 68360 crt_rom.S file to make it consistent # with the other m68knommu assembler files, and generally to good # style standards :-) # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.978 # [PATCH] create common vector setup code for m68knommu/ColdFire # # This patch creates a common set of vector code for the ColdFire # sub-architecture of the m68knommu architecture. The basic setup # code for all ColdFire CPU's is the same. Some more patches will # follow this that remove theis common code from each of the # ColdFire CPU configs. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.979 # [PATCH] reformat m68knommu 68328/pilot crt0_rom.S # # This patch reformats the 68328/pilot crt_rom.S file to make it consistent # with the other m68knommu assembler files, and generally to good style # standards :-) # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.980 # [PATCH] create an architecture specific flat header for v850 # # This patch adds a v850 architecture specific flat file header. # It supports the stack layout define needed by the flat format # load binfmt_flat.c (for MMUless CPU's). # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.981 # [PATCH] include the architecture flat file header in common flat header # # This patch adds support into the common flat.h header to include # the architecture specific flat.h header. This is modelled on the # same scheme as the elf include header file support. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.982 # [PATCH] inline unsued functions for MMUless configuration # # This patch adds inline versions of init_emergency_isa_pool() and # blk_queue_bounce() for MMUless builds. This patch was originally # from Christoph Hellwig, as part of the MMUless merge. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.983 # [PATCH] reformat m68knommu 68360/uCquicc crt0_ram.S # # This patch reformats the 68360 crt_ram.S file to make it consistent # with the other m68knommu assembler files, and generally to good # style standards :-) # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.984 # [PATCH] use local RODATA setup for m68knommu linker script # # This patch removes the use of the common RODATA define in the m68knommu # architecture. It cannot be used the same way for the m68knommu target. # For starters just inserting it here is syntactically wrong. All the read # only parts are grouped into a single "text" segment, and this is the root # cause of the problem. So for the m68knommu arch it makes sense to not # use the generic RODATA setup, but to list them locally. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.985 # [PATCH] clean up compiler warnings in m68knommu machdep.h # # This patch includes seq_file.h in the m68knommu machdep.h header. # Cleans up warnings caused by function prototypes. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.986 # [PATCH] remove duplicate memory size option in m68knommu Kconfig # # This patch removes a duplicate menu option in the m68knommu Kconfig. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.987 # [PATCH] fix text and data sizing in MMUless task_nommu.c # # This patch does a couple of things to the MMUless proc support: # # 1. change current->sig to current->sighand # 2. initialize vsize var in task_vsize() function # 3. correctly set *text and *data values in task_vsize() function # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.988 # [PATCH] create an architecture specific flat header for m68knommu # # Add a per-architecture flat.h flat format executable header. The idea is # to support the different options required in a clean way. For starters # we need to be able to configure the initial stack layout, and this # differs for different CPU types. # # This first patch adds the header for the m68knommu architecture. # -------------------------------------------- # 03/02/18 gerg@snapgear.com 1.989 # [PATCH] add missing page_referenced() for MMUless configs # # This patch adds the missing page_reference() macro for the no swap # case. With no rmap this is trivially a call to TestClearPageReferenced(). # -------------------------------------------- # 03/02/18 Petri.Koistinen@iki.fi 1.990 # [PATCH] update README file to current realities. # # Document "patch -p1" behaviour of modern patches, and remove make dep # phase that isn't needed any more. # -------------------------------------------- # 03/02/18 rth@kanga.twiddle.net 1.991 # Merge ssh://are/BK/axp-2.5 # into kanga.twiddle.net:/home/rth/linux/axp-2.5 # -------------------------------------------- # 03/02/18 sfr@canb.auug.org.au 1.990.1.1 # [COMPAT]: compat_sys_futex sparc64. # -------------------------------------------- # 03/02/18 davem@nuts.ninka.net 1.990.1.2 # [SPARC]: Add timer_t and clockid_t. # -------------------------------------------- # 03/02/19 rob@osinvestor.com 1.990.1.3 # [SPARC] Fix compilation of sunsu.c and sunzilog.c # -------------------------------------------- # 03/02/19 paulus@samba.org 1.990.2.1 # PPC32: add system calls for POSIX timer stuff # -------------------------------------------- # 03/02/19 paulus@samba.org 1.990.2.2 # PPC32: provide __ide_mm_insw etc. # -------------------------------------------- # 03/02/19 paulus@samba.org 1.990.2.3 # PPC32: Add definition of ndelay() # -------------------------------------------- # 03/02/19 hch@lab343.munich.sgi.com 1.990.3.1 # Merge http://linux.bkbits.net/linux-2.5 # into lab343.munich.sgi.com:/home/hch/repo/bkbits/linux-2.5 # -------------------------------------------- # 03/02/19 akpm@digeo.com 1.990.4.1 # [PATCH] posix-timers: fix callback address truncation # # Casting a 64-bit address to int, then to unsigned long will truncate it. # -------------------------------------------- # 03/02/19 tinglett@vnet.ibm.com 1.914.1.40 # ignore files for new zImage build # -------------------------------------------- # 03/02/19 lord@sgi.com 1.990.3.2 # [XFS] cleanup delayed allocate write path a little and fix some # small bugs in there. # # SGI Modid: 2.5.x-xfs:slinx:138445a # -------------------------------------------- # 03/02/19 lord@sgi.com 1.990.3.3 # [XFS] fix a couple of memory leaks found by stanford checker # # SGI Modid: 2.5.x-xfs:slinx:138812a # -------------------------------------------- # 03/02/19 hch@sgi.com 1.990.3.4 # [XFS] make pagebuf_delwri_queue static # # SGI Modid: 2.5.x-xfs:slinx:138828a # -------------------------------------------- # 03/02/19 nathans@sgi.com 1.990.3.5 # [XFS] Extra check on the mount path - ensure we don't attempt to mount XFS fs's # with sector sizes smaller than those the device supports. Tripped a BUG # in pagebuf, should now be resolved. # # SGI Modid: 2.5.x-xfs:slinx:139328a # -------------------------------------------- # 03/02/19 kaos@sgi.com 1.990.3.6 # [XFS] XFS patches from 2.5.60-mm1 # # SGI Modid: 2.5.x-xfs:slinx:139330a # -------------------------------------------- # 03/02/19 overby@sgi.com 1.990.3.7 # [XFS] fix one more set of transaction callback ordering issues, # this was always there, but exposed by the last change in # this area and made much more likely. # # SGI Modid: 2.5.x-xfs:slinx:139655a # -------------------------------------------- # 03/02/19 sandeen@sgi.com 1.990.3.8 # [XFS] Remove unused init_spinlock #define # # SGI Modid: 2.5.x-xfs:slinx:139854a # -------------------------------------------- # 03/02/19 rth@twiddle.net 1.990.4.2 # [PATCH] eliminate warnings in generated module files # # The compiler.h fragment should describe the problem well enough. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.3 # Preparations and Cleanups # # Required for the remaining patches in this series. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.4 # This patch contains an improved resource management algorithm. It is # capable of resolving nearly any conflict between two or more PnP devices. # It also contains better error reporting and a manual override capability. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.5 # Moves the resource parsing functions to a new location "support.c". These # resource parsing functions contain many improvements including the ability # to set resources according to actual value rather than dependent functions. # The interface changes will be able to take advantage of this. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.6 # Interface Updates # # Includes the ability to report exactly where conflicts are occuring and # several set resource improvements. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.7 # ISAPnP Updates # # Adds support for reading currently set resources. Also a few other updates. # -------------------------------------------- # 03/02/19 hch@sgi.com 1.990.3.9 # [XFS] insert dirty buffers at the tail of the inode queue # # SGI Modid: 2.5.x-xfs:slinx:139992a # -------------------------------------------- # 03/02/19 hch@sgi.com 1.990.3.10 # [XFS] Under heavy load, there are not enough hash buckets to deal with # the number of metadata buffers. Use the same techniques as the # regular linux buffer cache here. # # use more hash buckets for holding xfs metadata, and use the same # hash algorithm as the regular buffer cache. # # SGI Modid: 2.5.x-xfs:slinx:139997a # -------------------------------------------- # 03/02/19 tinglett@vnet.ibm.com 1.914.1.41 # Cset exclude: tinglett@vnet.ibm.com|ChangeSet|20030207200510|30566 # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.8 # PnPBIOS Updates # # Fixes a very tricky GPF bug that caused crashes on a few buggy systems, # especially laptops. For those interested, PnPBIOS now reserves # segement 0x40 before any call. Also it updates the driver to use the # new parsing functions. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.9 # Trivial Card Service Fix # # This was pointed out by Ruslan Zakirov. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.10 # Radio-Cadet PnP Update # # Converts the Radio-Cadet driver to the new PnP API. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.11 # IDE PnP Update # # Updates the IDE PnP driver to the new PnP API. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.12 # Trivial C99 Update # # Patch from Art Haas. # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.13 # PnP Bug Fixes # -------------------------------------------- # 03/02/19 ambx1@neo.rr.com 1.990.4.14 # OSS Sound Blaster Update from Paul Laufer # -------------------------------------------- # 03/02/19 hch@hera.kernel.org 1.990.3.11 # Merge # -------------------------------------------- # 03/02/19 rth@kanga.twiddle.net 1.992 # [ALPHA] Implement ndelay. # -------------------------------------------- # 03/02/19 rth@kanga.twiddle.net 1.993 # [ALPHA] Collection of warning fixes. # -------------------------------------------- # 03/02/19 rth@kanga.twiddle.net 1.994 # [ALPHA] Turn on -Werror in alpha subdirectories. # -------------------------------------------- # 03/02/19 rth@kanga.twiddle.net 1.995 # [ALPHA] Use more compiler builtins instead of inline assembly. # -------------------------------------------- # 03/02/19 rth@kanga.twiddle.net 1.996 # Merge kanga.twiddle.net:/home/rth/linux/linus-2.5 # into kanga.twiddle.net:/home/rth/linux/axp-2.5 # -------------------------------------------- # 03/02/20 paulus@samba.org 1.990.2.4 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/02/19 yoshfuji@linux-ipv6.org 1.914.178.3 # [AF_KEY]: Add missing credit. # -------------------------------------------- # 03/02/19 yoshfuji@linux-ipv6.org 1.914.178.4 # [NET]: Convert dst->{input,output}() fully to dst_{input,output}(). # -------------------------------------------- # 03/02/19 mk@linux-ipv6.org 1.914.178.5 # [IPSEC]: Add missing credit and include to xfrm_user ipv6 changes. # -------------------------------------------- # 03/02/19 linux-bt.adm@hostme.bitkeeper.com 1.990.5.1 # Merge bk://linux.bkbits.net/linux-2.5 # into hostme.bitkeeper.com:/ua/repos/l/linux-bt/bt-2.5 # -------------------------------------------- # 03/02/19 davem@nuts.ninka.net 1.990.1.4 # [SOUND]: ac97_codec.c needs linux/pci.h # -------------------------------------------- # 03/02/19 davem@nuts.ninka.net 1.990.1.5 # [SPARC]: Fixup asm/ide.h headers for Alans recent IDE merge. # -------------------------------------------- # 03/02/19 davem@nuts.ninka.net 1.914.178.6 # [IPSEC]: Move xfrm6 policy code to net/ipv4/xfrm_policy.c # -------------------------------------------- # 03/02/19 davem@nuts.ninka.net 1.914.178.7 # [IPSEC]: Export xfrm6 type registry interfaces. # -------------------------------------------- # 03/02/19 davem@nuts.ninka.net 1.914.178.8 # [IPSEC]: Remove xfrm6 exports from ipv6_syms.c # -------------------------------------------- # 03/02/20 anton@samba.org 1.990.6.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/sfr # -------------------------------------------- # 03/02/19 davem@kernel.bkbits.net 1.990.7.1 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/02/19 davem@nuts.ninka.net 1.990.1.6 # [SPARC64]: oprofile/timer_int.c needs linux/profile.h # -------------------------------------------- # 03/02/19 davem@kernel.bkbits.net 1.990.1.7 # Merge davem@nuts.ninka.net:/home/davem/src/BK/sparc-2.5 # into kernel.bkbits.net:/home/davem/sparc-2.5 # -------------------------------------------- # 03/02/19 zaitcev@redhat.com 1.990.8.1 # [SPARC]: Kconfig help update. # -------------------------------------------- # 03/02/19 zaitcev@redhat.com 1.990.8.2 # [SPARC]: Add rtc_lock. # -------------------------------------------- # 03/02/19 davem@kernel.bkbits.net 1.990.1.8 # Merge davem@nuts.ninka.net:/home/davem/src/BK/sparc-2.5 # into kernel.bkbits.net:/home/davem/sparc-2.5 # -------------------------------------------- # 03/02/19 torvalds@home.transmeta.com 1.990.1.9 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/19 torvalds@home.transmeta.com 1.990.1.10 # Merge master.kernel.org:/home/hch/BK/xfs/linux-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/19 torvalds@home.transmeta.com 1.990.1.11 # Merge bk://cifs.bkbits.net/linux-2.5cifs # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/19 torvalds@home.transmeta.com 1.997 # Merge bk://are.twiddle.net/axp-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/19 hch@sgi.com 1.998 # [PATCH] i2c sanity # # small updates to bring us nearer the lm_Sensors CVS (docs, comments, # missing statics, named initializers). I still need to review their # actual code changes before submitting those.. # -------------------------------------------- # 03/02/19 hch@sgi.com 1.999 # [PATCH] get rid of some kdevname abuse # # Use cdevname instead in the serial driver printk cut & pasted into about # a dozend places. # -------------------------------------------- # 03/02/19 hch@lst.de 1.1000 # [PATCH] remove some dead mtrr code # # This patch removes the devfs interface code in mtrr that has been # stubbed out by an ifdef forever. It's one of the few remaining users # of regular files on devfs so there's some urge for me to get rid of it :) # -------------------------------------------- # 03/02/19 hch@sgi.com 1.1001 # [PATCH] kill EXPORT_NO_SYMBOLS # # it's a noop in 2.5 now that the behvaiour of implicitly exporting # all symbols is gone. # -------------------------------------------- # 03/02/19 torvalds@home.transmeta.com 1.1002 # Add doublefault handling with a task gate. # # This potentially helps debugging, since otherwise a double fault # would generate a triple fault and then reboot the machine. Now # instead it can print out a note about where the problem happened, # unless all the kernel data structures are truly buggered. # -------------------------------------------- # 03/02/19 maxk@qualcomm.com 1.990.5.2 # [Bluetooth] # Cleanup and fix __init and __exit functions. # /proc/bluetooth initialization fixes. # -------------------------------------------- # 03/02/19 maxk@qualcomm.com 1.990.5.3 # Merge bk://linux-bt.bkbits.net/marcel-2.5 # into qualcomm.com:/usr/src/linux-2.5 # -------------------------------------------- # 03/02/19 chas@locutus.cmf.nrl.navy.mil 1.1003 # [ATM]: use sock timestamp # -------------------------------------------- # 03/02/19 hirofumi@mail.parknet.co.jp 1.1004 # [IPV4]: rt_cache_stat initialization fix. # # This patch adds initialization for forgotten rt_cache_stat. # However, kmalloc_percpu() may need things like kmalloc_percpu_zeroed(). # -------------------------------------------- # 03/02/19 sri@us.ibm.com 1.1005 # [IPV4/IPV6]: Fix to avoid overriding TCP/UDP with a new protocol of same type. # # Registering a new protocol of type SOCK_STREAM with a protocol value other # than IPPROTO_TCP will override TCP if the application passes 0 as the protocol # to the socket() call. # socket(AF_INET, SOCK_STREAM, 0) # I guess many applications follow this syntax as they assume TCP is the default # protocol for SOCK_STREAM type. # The same holds true for SOCK_DGRAM type sockets assuing UDP as the default. # # This is due to the insertion of a new inet_protosw entry into the inetsw list # of a particular type at the head of the list. inet_create() uses the first # entry in the list if a wild-card protocol is passed. # # The following patch fixes the insertion of a new entry so that it is added # after the last permanent entry in the list. This makes sure that the new # entries do not override any existing permanent entries. # -------------------------------------------- # 03/02/19 ahaas@airmail.net 1.1006 # [PATCH] C99 initializer for net/ipv6/icmp.c # -------------------------------------------- # 03/02/19 ahaas@airmail.net 1.1007 # [PATCH] C99 initializer for net/rose/sysctl_net_rose.c # -------------------------------------------- # 03/02/19 ahaas@airmail.net 1.1008 # [PATCH] C99 initializer for net/netrom/sysctl_net_netrom.c # -------------------------------------------- # 03/02/19 ahaas@airmail.net 1.1009 # [PATCH] C99 initializer for net/rxrpc/sysctl.c # -------------------------------------------- # 03/02/19 davem@nuts.ninka.net 1.1002.1.1 # [SPARC64]: Be like Alpha and turn on -Werror in sparc64 subdirectories. # -------------------------------------------- # 03/02/20 levon@movementarian.org 1.1002.2.1 # [PATCH] oprofile author needs to learn C # # Manifested as X profile appearing as /dev/mem ... # -------------------------------------------- # 03/02/20 akpm@digeo.com 1.1002.2.2 # [PATCH] Keep interrupts enabled in exit path # # We are leaving local interrupts disabled coming out of exit_notify(). # # But we are about to call wait_task_inactive() which spins, waiting for # another CPU to end a task. If that CPU has issued smp_call_function() to # this CPU, deadlock. # # So the patch enables interrupts again before returning from exit_notify(). # # Also, exit_notify() returns with preemption disabled, so there is no # need to perform another preempt_disable() in do_exit(). # -------------------------------------------- # 03/02/20 akpm@digeo.com 1.1002.2.3 # [PATCH] Don't call mmdrop under a spinlock # # We're calling mmdrop() under spin_lock_irq(&rq->lock). But mmdrop # calls vfree(), which calls smp_call_function(). # # It is not legal to call smp_call_function() with irq's off. Because # another CPU may be running smp_call_function() against _this_ CPU, which # deadlocks. # # So the patch arranges for mmdrop() to not be called under # spin_lock_irq(&rq->lock). # -------------------------------------------- # 03/02/20 haveblue@us.ibm.com 1.1002.2.4 # [PATCH] make io_apic.c use named initializers # # Bill Irwin was talking about hw_interrupt_type.set_affinity and kirq. # When I went looking, I failed to find this initialization. # # Here are some nice, easy-to-find, named initializers. # -------------------------------------------- # 03/02/20 greg@kroah.com 1.1002.3.1 # [PATCH] PCI: remove large stack usage in pci_do_scan_bus() # -------------------------------------------- # 03/02/20 greg@kroah.com 1.1002.3.2 # [PATCH] PCI i386: remove large stack usage in pci_sanity_check() # -------------------------------------------- # 03/02/20 greg@kroah.com 1.1002.3.3 # [PATCH] PCI i386: remove large stack usage in pcibios_fixup_peer_bridges() # -------------------------------------------- # 03/02/21 paulus@samba.org 1.1002.2.5 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/02/20 louis.zhuang@linux.co.intel.com 1.1002.3.4 # [PATCH] PCI: list code cleanup # # Cleans up the list handling in a few places within the pci core. # -------------------------------------------- # 03/02/20 gregkh@kernel.bkbits.net 1.1002.4.1 # Merge # -------------------------------------------- # 03/02/21 akpm@digeo.com 1.990.6.2 # ppc64: Someone removed NR_syscalls from # -------------------------------------------- # 03/02/21 akpm@digeo.com 1.990.6.3 # ppc64: fix the build for posix timer changes # -------------------------------------------- # 03/02/21 anton@samba.org 1.990.6.4 # ppc64: fix compile warning # -------------------------------------------- # 03/02/20 torvalds@home.transmeta.com 1.1002.5.1 # Fix x86 "switch_to()" to properly set the previous task information, # which is needed to keep track of process usage counts correctly and # efficiently. # -------------------------------------------- # 03/02/20 bde@bwlink.com 1.1002.1.2 # [SPARC64]: Fix ocndition code handling in do_rt_sigreturn. # -------------------------------------------- # 03/02/20 chas@cmf.nrl.navy.mil 1.1010 # [ATM]: Add MAINTAINERS entry. # -------------------------------------------- # 03/02/21 anton@samba.org 1.1002.6.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/sfr # -------------------------------------------- # 03/02/20 torvalds@home.transmeta.com 1.1002.5.2 # Fix "make clean" to remove scripts/elfconfig.h # -------------------------------------------- # 03/02/21 paulus@samba.org 1.1002.2.6 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/02/21 jejb@raven.il.steeleye.com 1.1002.7.1 # Merge raven.il.steeleye.com:/home/jejb/BK/scsi-error-2.5 # into raven.il.steeleye.com:/home/jejb/BK/scsi-error-new-2.5 # -------------------------------------------- # 03/02/21 andmike@us.ibm.com 1.1002.7.2 # [PATCH] scsi_error update take 2 # # This is an update of a previous patch I posted. # http://marc.theaimsgroup.com/?l=linux-scsi&m=104495114103628&w=2 # # This patch is against scsi-misc-2.5 # # The updates from the last patch include: # - Names changes: # eh_cmd_list => eh_cmd_q # eh_list => eh_entry # # - Move shost->in_recovery = 0 # # - Switch from scsi_retry_command to scsi_queue_insert for retry # to solve fast completions / serial start of retries. # # - Use list_splice_init in scsi_unjam_host. # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.3 # [PATCH] handles possible failures in scsi initialization # # .. and unwind properly to avoid leaks # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.4 # [PATCH] ]PATCH] two new device list entries # # The NEC one is from the PC98 folks, the Sun one from feral's isp driver # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.5 # [PATCH] wd7000 updates # # Move the host template to the actual source file and get rid of wd7000.h # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.6 # [PATCH] remove an escaped __MOD_DEC_USE_COUNT # # we should be using module_put really, __MOD_DEC_USE_COUNT will die soon # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.7 # [PATCH] eata_pio updates # # (1) don't include eata_dma_proc.h - it's gone and we don't need it # (2) remove eata_pio_proc.c - it's #included in the main source file, # so the functions can be there aswell # (3) move host template away from eata_pio.h # # # ===== drivers/scsi/eata_pio.c 1.4 vs edited ===== # -------------------------------------------- # 03/02/21 dougg@torque.net 1.1002.5.8 # [PATCH] scsi_mid_low_api.txt # # Attached is an update for this document following on from # the changes that Christoph made around bk2 (changing # scsi_set_pci_device() to scsi_set_device() ). # -------------------------------------------- # 03/02/21 jejb@raven.il.steeleye.com 1.1002.5.9 # Merge raven.il.steeleye.com:/home/jejb/BK/scsi-error-2.5 # into raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5 # -------------------------------------------- # 03/02/21 pam.delaney@lsil.com 1.1002.8.1 # [PATCH] Fusion Driver 2.05.00.03 against 2.5.62bk3 # # Please accept this large patch against 2.5.62bk4 to update the # Fusion-MPT driver from 2.03.01.01 to 2.05.00.03. # # This version contains full 2.5 kernel support (add, configuration & # removal of disks, new module hooks), performance enhancements, removal # of obsolete code that is 2.4 (or earlier) specific and removal of blank # spaces at end of lines. Tested overnight on 2.5.62bk3 and ran some # tests against bk4 this morning on both machines. Things appear to be # fine - have not tested the two failure conditions today. # # The driver has been tested on two different platforms: # # - P4 4-processor # o boot controller # o built into kernel # o disk add, configure, remove # o bus, target reset # o device offline cases # o cross channel I/O stress tests w/ Fibre and SCSI # # - Athlon uniprocessor, IDE boot # o Ran a test that repeatedly loads the driver, mounts disks, runs a # short I/O test (20mins) then unload the driver components in a # different order # # Failures: # o Unable to boot if boot controller is built as a module - pivot_root # fails (Happens if IDE or SCSI boot) # # o Problems when formatting large SCSI disks. On P4 w/ 2.5.60, there # were no difficulties formatting a 36GB disk. On Athlon, mkfs.ext2 # would never send a write command to the driver (verified w/ SCSI # trace and driver debug). Reads completed successfully. mkfs.ext2 # would not exit and is shown as a running process. # # Smaller partitions were formatted correctly. W/ 2.5.62 failures on # P4 and Athlon. # # Same error with other drivers. 100% reproducible. # -------------------------------------------- # 03/02/21 torvalds@home.transmeta.com 1.1002.8.2 # We don't need to wait for task in-activity in release_task() any more, # since we now properly reference-count the allocations and thus can't # be freeing the thread structures from underneath the task running on # another CPU. # # Move "free_uid(p->user)" and "security_task_free()" to __put_task_struct(), # so that we're guaranteed to always have a user structure pointer. # -------------------------------------------- # 03/02/21 jgarzik@pobox.com 1.1002.5.10 # [PATCH] report luns default # # dledford is my cube-mate, and always recommends that I enable this, # so... # # ===== drivers/scsi/Kconfig 1.14 vs edited ===== # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.11 # [PATCH] fix that devfs mess # -------------------------------------------- # 03/02/21 hch@sgi.com 1.1002.8.3 # [PATCH] try_module_get(THIS_MODULE) is bogus # # In most cases the fix is to add an struct module * member to the operations # vector instead and manipulate the refcounts in the callers context. # # For the ALSA cases it was completly superflous (when will people get it that # using an exported symbol will make it's module unloadable?..) # -------------------------------------------- # 03/02/21 hch@sgi.com 1.1002.8.4 # [PATCH] fix module refcounting of pcmcia socket drivers # -------------------------------------------- # 03/02/21 jejb@raven.il.steeleye.com 1.1002.5.12 # Add back SCSI subsystem initialisation prints # -------------------------------------------- # 03/02/21 stelian@popies.net 1.1002.8.5 # [PATCH] sonypi and input subsystem # # This makes the sonypi driver forward the VAIO jog-dial events directly # to the input subsystem as mouse wheel events. This way one is not # required anymore to have an external daemon polling /dev/sonypi if # interested only in jogdial events. # -------------------------------------------- # 03/02/21 stelian@popies.net 1.1002.8.6 # [PATCH] meye suspend/resume capabilities # # This adds suspend/resume capabilities to the meye driver. # -------------------------------------------- # 03/02/21 stelian@popies.net 1.1002.8.7 # [PATCH] use correct gcc flags when compiling for Crusoe # # This makes use of 'check_gcc' facility when compiling for a Crusoe # processor in order to choose the correct -falign or -malign compiler # flags. # -------------------------------------------- # 03/02/21 torvalds@penguin.transmeta.com 1.1002.9.1 # Merge bk://ppc.bkbits.net/for-linus-ppc # into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux # -------------------------------------------- # 03/02/21 torvalds@penguin.transmeta.com 1.1002.9.2 # Merge bk://linux-pnp.bkbits.net/linus-2.5 # into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux # -------------------------------------------- # 03/02/21 torvalds@penguin.transmeta.com 1.1002.9.3 # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.5 # into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux # -------------------------------------------- # 03/02/21 akpm@digeo.com 1.1002.9.4 # [PATCH] pnp compile fix # # fix two tpyos # -------------------------------------------- # 03/02/21 bgerst@didntduck.org 1.1002.9.5 # [PATCH] Use mempool_alloc/free_slab # # Convert fs/bio.c and fs/jfs/jfs_metapage.c to use the mempool_alloc_slab # and mempool_free_slab helper functions. # -------------------------------------------- # 03/02/21 bgerst@didntduck.org 1.1002.9.6 # [PATCH] Clean up list head usage in sysrq.c # # Use list_for_each_entry() instead of open code. # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.13 # drop scsi_register_blocked_host() # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.14 # [PATCH] move over exposing host attributes from sg/procfs to sysfs # # This patch moves over printing of the various struct Scsi_Host # attributes from procfs functions in the sg driver to sysfs. # # Not only is this the much more logical place for them, but with some # more work on the pcmcia drivers this will allow us to make # scsi_host_get_next() private to the midlayer for implementing # refcounting and cleaning up locking in that area. # -------------------------------------------- # 03/02/21 hch@lst.de 1.1002.5.15 # [PATCH] Coding Style police for scsi_error.c # -------------------------------------------- # 03/02/22 paulus@samba.org 1.1002.2.7 # PPC32: Make switch_to return the previous task in the `last' argument # -------------------------------------------- # 03/02/22 paulus@samba.org 1.1002.2.8 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/02/21 torvalds@home.transmeta.com 1.1002.9.7 # Merge bk://linux-bt.bkbits.net/bt-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/21 bgerst@didntduck.org 1.1002.9.8 # [PATCH] Trival patch to i386 enter_lazy_tlb() # # Moves the #ifdef into the function to improve readability. # -------------------------------------------- # 03/02/21 bgerst@didntduck.org 1.1002.9.9 # [PATCH] Remove checkhelp.pl and header.tk # # Changes in the config system have obsoleted these files. # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.10.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/sfr # -------------------------------------------- # 03/02/21 torvalds@home.transmeta.com 1.1002.2.9 # Merge bk://ppc.bkbits.net/for-linus-ppc # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/21 bgerst@didntduck.org 1.1002.2.10 # [PATCH] remove old double fault handler # # Removes the now unused trap handler for double faults. Also removes the # never used handler for fpu not available. # -------------------------------------------- # 03/02/21 bgerst@didntduck.org 1.1002.2.11 # [PATCH] Unused variable warning in ac97_codec.c # # Kill unused variable. # -------------------------------------------- # 03/02/21 bgerst@didntduck.org 1.1002.2.12 # [PATCH] Better test for GCC alignment options # # Do the test for -falign-xxx vs. -malign-xxx only once. # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.10.2 # ppc64: update for recent changes that require switch_to to return prev # -------------------------------------------- # 03/02/21 jakub@redhat.com 1.1002.1.3 # [SPARC64]: Fix typo in sparc64_get_context (G7 register is saved wrongly). # -------------------------------------------- # 03/02/21 bwa@us.ibm.com 1.1011 # [SCTP/IPV6]: Move sockaddr storage and in6addr_{any,loopback} to generic places. # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.2.13 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/sfr # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.2.14 # ppc64: add some bluetooth ioctls and clean up some warnings # -------------------------------------------- # 03/02/22 davem@nuts.ninka.net 1.1002.1.4 # [SPARC64]: Implement STICK synchronization using ia64 port algorithms. # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.2.15 # ppc64: Add posix timer syscalls # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.2.16 # Merge ppc64@brule.rchland.ibm.com:/home/tinglett/bk/for-linus-ppc64 # into samba.org:/scratch/anton/linux-2.5_ppc64_tmp # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.2.17 # ppc64: zero all registers in ELF_PLAT_INIT now we dont in start_thread # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.2.18 # ppc64: quieten new boot wrapper to match old 2.5 one. # -------------------------------------------- # 03/02/22 anton@samba.org 1.1002.2.19 # ppc64: defconfig update # -------------------------------------------- # 03/02/22 davem@kernel.bkbits.net 1.1002.1.5 # Merge davem@nuts.ninka.net:/home/davem/src/BK/sparc-2.5 # into kernel.bkbits.net:/home/davem/sparc-2.5 # -------------------------------------------- # 03/02/22 davem@kernel.bkbits.net 1.1012 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/02/22 jejb@malley.(none) 1.1002.5.16 # Remove dead code from 53c700 # -------------------------------------------- # 03/02/22 jejb@malley.(none) 1.1002.5.17 # Update 53c700 error handling # -------------------------------------------- # 03/02/22 jejb@malley.(none) 1.1002.5.18 # Correct uninitialised timer in scsi_error.c # -------------------------------------------- # 03/02/22 jejb@malley.(none) 1.1002.5.19 # update sim710.c for new eisa sysfs registration returns # -------------------------------------------- # 03/02/22 jejb@raven.il.steeleye.com 1.1002.11.1 # 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/02/22 torvalds@home.transmeta.com 1.1013 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/22 torvalds@home.transmeta.com 1.1014 # Merge http://ppc.bkbits.net/for-linus-ppc64 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/22 torvalds@home.transmeta.com 1.1015 # Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/22 bgerst@didntduck.org 1.1016 # [PATCH] Fix up slabinfo code # # Move printing the header to s_start, removing the need for the special # pointer value. # -------------------------------------------- # 03/02/22 bunk@fs.tum.de 1.1017 # [PATCH] remove an unneeded #if from net/ipv6/af_inet6.c # # The patch below removes an unneeded #if from net/ipv6/af_inet6.c: # - kernel 2.0 is too ancient to check for # - the MODULE_* macros have empty definitions #if !MODULE # -------------------------------------------- # 03/02/22 rmk@arm.linux.org.uk 1.1018 # [PATCH] Alternative tty fasync fix # # Instead of detecting when filp->private_data becomes NULL in # do_tty_hangup and check_tty_count, we remove the file descriptor # from the list of descriptors associated with the tty. We use the # same method that dentry_open() uses. # # (It also cleans that up to use a "file_kill()" instead of using a dummy # "kill_list()" that leaves pointers to stale stack entries that are never # used) # # In addition, we change the for() loops into real list_for_each() # or list_for_each_entry loops as appropriate. # -------------------------------------------- # 03/02/22 torvalds@home.transmeta.com 1.1019 # Fix up incorrect __exit marking for SCSI functions that are called from # non-exit code. # -------------------------------------------- # 03/02/22 akpm@digeo.com 1.1020 # [PATCH] make drivers/pnp/interface.c compile # # Older compilers require that automatic variable declarations appear at the # start of a block. # -------------------------------------------- # 03/02/22 ak@muc.de 1.1021 # [PATCH] x86-64 update for 2.5.62-bk4 # # This still has a few problems; e.g. posix-timers.c seems to be miscompiled # by many x86-64 compilers when compiled with -O1. But overall it is better # than before. # # - Disable numa again that was enabled by mistake # - Fix CPU detection in early boot. Force SSE when needed. # - Hack for nested NMIs. # - Fix typo in vsyscall code that lead to broken time reporting # - Merge with 2.5.62-bk4 (new switch_to, printk cleanups, new timer calls etc.) # - Fix bug in strace - don't assume syscall_trace doesn't clobber %rcx # - Fix gs load workaround # - Fix return value of ioperm (found by new LTP test) # - Remove some unecessary boot output # - Remove some obsolete code in setup.c # - Report more in /proc/cpuinfo, fix extended cpu family computation # - Fix thread_info access from interrupt/exception stacks - this # fixes many problems that especially showed on SMP (lost reschedule # interrupts etc.) # - Fix UP compilation # - Symlink hugetlbpage.c from i386 # - Fix buggy lazy fpu handling # -------------------------------------------- # 03/02/22 ak@muc.de 1.1022 # [PATCH] Fix some 64bit warnings # # Fix some annoying warnings that happen on x86-64. # # - Predeclare pt_regs in binfmts.h. For some reason it isn't included # implicitely there. # - use unsigned long, not long for interrupt flags in posix-timers.c # -------------------------------------------- # 03/02/22 ak@muc.de 1.1023 # [PATCH] Allow xtime_lock declaration in arch specific code for x86-64 # # x86-64 vsyscalls require mapping the sequence number used by # gettimeofday in a magic way, so that userland can access it via # vsyscalls for user space time-of-day access. # # Instead of putting the magic into generic code I just allowed to move it # into architecture specific files. # -------------------------------------------- # 03/02/22 ambx1@neo.rr.com 1.1024 # Large Stack Usage Fix # # Reduces the stack memory usage in the following PnP Functions: # pnp_printf # pnp_set_current_resources # pnp_manual_config_dev # pnp_activate_dev # -------------------------------------------- # 03/02/22 ambx1@neo.rr.com 1.1025 # Resource Management Performance Fix # # Fixes a typo in pnp_check_*_conflicts functions. Without this fix the # resource algorithm will work but will take longer to assign resources. # # Also contains some minor reordering in pnp_activate_dev. # -------------------------------------------- # 03/02/22 rth@kanga.twiddle.net 1.1002.12.1 # [ALPHA] Fix typo in __kernel_cmpbge. # -------------------------------------------- # 03/02/22 sam@ravnborg.org 1.1002.12.2 # [PATCH] Alpha CFLAGS fix # # Hi Richard. # # I noticed you have set -Werror in all alpha architecture # specific makefiles - good initiative. I wish we could do that in general. # # But the correct way to alter CFLAGS in kbuild makefiles is to use # EXTRA_CFLAGS. # The following patch fixes this. # You could argue that this is a stylistic issue, but in this way # you follow Documentation/kbuild/makefiles.txt # # I stumbled over: # EXTRA_AFLAGS := $(CFLAGS) # I could not realise the purpose with this assignment, and I noticed # that it did not include -Werror, becuse you did hat assignment in # the following line. # Wanted to inform you about it but I see no problem. It is just that # I did not understand it. # # In math-emu I see this: # EXTRA_CFLAGS := -Iinclude/math-emu -w # Grepping the src I see no reason to have the -Iinclude/math-emu # Relevant files are prefixed with math-emu (soft-fp, single, double) # I did not fix it, because I cannot compile alpha. # # Sam (the Makefile nitpicker) # # ===== arch/alpha/kernel/Makefile 1.24 vs edited ===== # -------------------------------------------- # 03/02/22 rth@kanga.twiddle.net 1.1002.12.3 # [ALPHA] More CFLAGS a-la Sam. # -------------------------------------------- # 03/02/22 rth@kanga.twiddle.net 1.1002.12.4 # [ALPHA] Fix switch_to semantics wrt LAST. # -------------------------------------------- # 03/02/22 rth@kanga.twiddle.net 1.1023.1.1 # Merge kanga.twiddle.net:/home/rth/linux/linus-2.5 # into kanga.twiddle.net:/home/rth/linux/axp-2.5 # -------------------------------------------- # 03/02/23 torvalds@home.transmeta.com 1.1026 # Merge bk://are.twiddle.net/axp-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/02/23 rmk@arm.linux.org.uk 1.1027 # [PATCH] kernel/pm.c requires # -------------------------------------------- # 03/02/23 rmk@arm.linux.org.uk 1.1028 # [PATCH] Remove dummy cb_config() and cb_release() # # cb_config() and cb_release() are just simple dummy functions that are # only used in the internals of the PCMCIA code. We inline them where # used. # -------------------------------------------- # 03/02/23 rmk@arm.linux.org.uk 1.1029 # [PATCH] Remove unused "dev" argument from cb_setup_cis_mem # # cb_setup_cis_mem doesn't reference the pci device. Remove this unused # argument. # -------------------------------------------- # 03/02/23 rmk@arm.linux.org.uk 1.1030 # [PATCH] Remove "fn" argument from read_cb_mem() # # read_cb_mem is only ever called with its "fn" argument set to zero. # We therefore do not need to pass it. # -------------------------------------------- # 03/02/23 rmk@arm.linux.org.uk 1.1031 # [PATCH] Remove pci_{read,write}[bwl] # # cardbus.c uses its own names for our PCI config space functions. # Make it use our names. # -------------------------------------------- # 03/02/23 rmk@arm.linux.org.uk 1.1032 # [PATCH] Remove stack allocation of struct pci_dev # # cb_alloc() allocated a pci_dev on the stack to access PCI space. This # is unnecessary since we have pci_bus_*_config_* functions. Use these # functions instead. # -------------------------------------------- # 03/02/23 rmk@arm.linux.org.uk 1.1033 # [PATCH] Always re-read vendor for each function # # We should probably always read the vendor ID from each function # rather than assuming that it is identical to function 0. # -------------------------------------------- # 03/02/23 ak@muc.de 1.1034 # [PATCH] Fix x86-64 loose ends # # - Make MTRR driver compatible with 2.4/x86-64 again. This fixes an # endless loop in the XFree86 4.3pre server. # - Fix the boot code that rejected earlier: rewrote early CPU detection # and SSE is forced now # - Always force inlining in vsyscalls # -------------------------------------------- # 03/02/23 linux@brodo.de 1.1035 # [PATCH] cpufreq: move Kconfig entries (Marc-Christian Petersen) # # Move x86 CPU_FREQ config choices to extra file & menu. (Marc-Christian Petersen) # -------------------------------------------- # 03/02/23 linux@brodo.de 1.1036 # [PATCH] cpufreq: x86 driver updates (speedstep, longrun, p4-clockmod) # # - switch the Intel x86 speedstep/Pentium 4/Xeon drivers and the # Transmeta Crusoe Longrun driver to use the advanced cpufreq_driver # registration process # - cleanups # - spelling fixes (Petri Koistinen) - thanks! # -------------------------------------------- # 03/02/23 linux@brodo.de 1.1037 # [PATCH] pcmcia: add socket_offset for multiple pci_sockets, correct suspend&resume # # - suspend & remove for pci_socket was broken -- thanks to Paul # Mackerras for noting this # - to correctly initialize multiple pci_socket devices, a sock_offset is # needed. # - s_info doesn't need to be an array. # -------------------------------------------- # 03/02/23 rusty@rustcorp.com.au 1.1038 # [PATCH] Enable signals for usermode helpers # # Stelian Pop reported that all signals are blocked in processes # execed from the kernel as usermode helpers. # -------------------------------------------- # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS Sun Feb 23 22:25:25 2003 +++ b/CREDITS Sun Feb 23 22:25:25 2003 @@ -2746,6 +2746,14 @@ E: wsalamon@nai.com D: portions of the Linux Security Module (LSM) framework and security modules +N: Duncan Sands +E: duncan.sands@wanadoo.fr +W: http://topo.math.u-psud.fr/~sands +D: Alcatel SpeedTouch USB driver +S: 69 rue Dunois +S: 75013 Paris +S: France + N: Robert Sanders E: gt8134b@prism.gatech.edu D: Dosemu diff -Nru a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl --- a/Documentation/DocBook/kernel-hacking.tmpl Sun Feb 23 22:25:24 2003 +++ b/Documentation/DocBook/kernel-hacking.tmpl Sun Feb 23 22:25:24 2003 @@ -993,25 +993,6 @@ - - <symbol>EXPORT_NO_SYMBOLS</symbol> - <filename class=headerfile>include/linux/module.h</filename> - - - If a module exports no symbols then you can specify - -EXPORT_NO_SYMBOLS; - - anywhere in the module. - In kernel 2.4 and earlier, if a module contains neither - EXPORT_SYMBOL() nor - EXPORT_NO_SYMBOLS then the module defaults to - exporting all non-static global symbols. - In kernel 2.5 onwards you must explicitly specify whether a module - exports symbols or not. - - - <function>EXPORT_SYMBOL_GPL()</function> <filename class=headerfile>include/linux/module.h</filename> diff -Nru a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl --- a/Documentation/DocBook/videobook.tmpl Sun Feb 23 22:25:27 2003 +++ b/Documentation/DocBook/videobook.tmpl Sun Feb 23 22:25:27 2003 @@ -739,8 +739,6 @@ MODULE_PARM(io, "i"); MODULE_PARM_DESC(io, "I/O address of the card."); -EXPORT_NO_SYMBOLS; - int init_module(void) { if(io==-1) diff -Nru a/Documentation/i2c/i2c-protocol b/Documentation/i2c/i2c-protocol --- a/Documentation/i2c/i2c-protocol Sun Feb 23 22:25:26 2003 +++ b/Documentation/i2c/i2c-protocol Sun Feb 23 22:25:26 2003 @@ -52,10 +52,10 @@ We have found some I2C devices that needs the following modifications: Flag I2C_M_NOSTART: - In a combined transaction, no 'S Addr' is generated at some point. - For example, setting I2C_M_NOSTART on the second partial message + In a combined transaction, no 'S Addr Wr/Rd [A]' is generated at some + point. For example, setting I2C_M_NOSTART on the second partial message generates something like: - S Addr Rd [A] [Data] NA Wr [A] Data [A] P + S Addr Rd [A] [Data] NA Data [A] P If you set the I2C_M_NOSTART variable for the first partial message, we do not generate Addr, but we do generate the startbit S. This will probably confuse all other clients on your bus, so don't try this. @@ -65,4 +65,12 @@ need to emit an Rd instead of a Wr, or vice versa, you set this flag. For example: S Addr Rd [A] Data [A] Data [A] ... [A] Data [A] P - + + Flags I2C_M_IGNORE_NAK + Normally message is interrupted immediately if there is [NA] from the + client. Setting this flag treats any [NA] as [A], and all of + message is sent. + These messages may still fail to SCL lo->hi timeout. + + Flags I2C_M_NO_RD_ACK + In a read message, master A/NA bit is skipped. diff -Nru a/Documentation/i2c/smbus-protocol b/Documentation/i2c/smbus-protocol --- a/Documentation/i2c/smbus-protocol Sun Feb 23 22:25:26 2003 +++ b/Documentation/i2c/smbus-protocol Sun Feb 23 22:25:26 2003 @@ -61,7 +61,7 @@ This is the reverse of Read Byte: it sends a single byte to a device. See Read Byte for more information. -S Addr Wr [A] Data NA P +S Addr Wr [A] Data [A] P SMBus Read Byte Data diff -Nru a/Documentation/i2c/summary b/Documentation/i2c/summary --- a/Documentation/i2c/summary Sun Feb 23 22:25:25 2003 +++ b/Documentation/i2c/summary Sun Feb 23 22:25:25 2003 @@ -4,7 +4,7 @@ ============= I2C (pronounce: I squared C) is a protocol developed by Philips. It is a -slow two-wire protocol (10-100 kHz), but it suffices for many types of +slow two-wire protocol (10-400 kHz), but it suffices for many types of devices. SMBus (System Management Bus) is a subset of the I2C protocol. Many @@ -43,15 +43,15 @@ Included Bus Drivers ==================== -Note that not only stable drivers are patched into the kernel by 'mkpatch'. +Note that only stable drivers are patched into the kernel by 'mkpatch'. Base modules ------------ -i2c-core: The basic I2C code, including the /proc interface -i2c-dev: The /dev interface -i2c-proc: The /proc interface for device (client) drivers +i2c-core: The basic I2C code, including the /proc/bus/i2c* interface +i2c-dev: The /dev/i2c-* interface +i2c-proc: The /proc/sys/dev/sensors interface for device (client) drivers Algorithm drivers ----------------- @@ -59,7 +59,7 @@ i2c-algo-8xx: An algorithm for CPM's I2C device in Motorola 8xx processors (NOT BUILT BY DEFAULT) i2c-algo-bit: A bit-banging algorithm i2c-algo-pcf: A PCF 8584 style algorithm -i2c-algo-ibmocp: An algorithm for the I2C device in IBM 4xx processors (NOT BUILT BY DEFAULT) +i2c-algo-ibm_ocp: An algorithm for the I2C device in IBM 4xx processors (NOT BUILT BY DEFAULT) Adapter drivers --------------- @@ -68,7 +68,7 @@ i2c-elv: ELV parallel port adapter (uses i2c-algo-bit) i2c-pcf-epp: PCF8584 on a EPP parallel port (uses i2c-algo-pcf) (NOT mkpatched) i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit) -i2c-adap_ibmocp: IBM 4xx processor I2C device (uses i2c-algo-ibmocp) (NOT BUILT BY DEFAULT) +i2c-adap-ibm_ocp: IBM 4xx processor I2C device (uses i2c-algo-ibm_ocp) (NOT BUILT BY DEFAULT) i2c-pport: Primitive parallel port adapter (uses i2c-algo-bit) i2c-rpx: RPX board Motorola 8xx I2C device (uses i2c-algo-8xx) (NOT BUILT BY DEFAULT) i2c-velleman: Velleman K9000 parallel port adapter (uses i2c-algo-bit) diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients --- a/Documentation/i2c/writing-clients Sun Feb 23 22:25:22 2003 +++ b/Documentation/i2c/writing-clients Sun Feb 23 22:25:22 2003 @@ -448,9 +448,9 @@ /* Note that we reserve some space for foo_data too. If you don't need it, remove it. We do it here to help to lessen memory fragmentation. */ - if (! (new_client = kmalloc(sizeof(struct i2c_client)) + + if (! (new_client = kmalloc(sizeof(struct i2c_client) + sizeof(struct foo_data), - GFP_KERNEL)) { + GFP_KERNEL))) { err = -ENOMEM; goto ERROR0; } diff -Nru a/Documentation/networking/8139too.txt b/Documentation/networking/8139too.txt --- a/Documentation/networking/8139too.txt Sun Feb 23 22:25:25 2003 +++ b/Documentation/networking/8139too.txt Sun Feb 23 22:25:25 2003 @@ -93,6 +93,8 @@ --------------- AOpen ALN-325C AT-2500TX 10/100 PCI Fast Ethernet Network Adapter Card +Cnet CNF401 'SinglePoint' 10/100 Base-TX +Genius GF 100TXR4 Fast Ethernet 10/100M PCI Network Card KTI KF-230TX KTI KF-230TX/2 Lantech FastNet TX diff -Nru a/Documentation/networking/alias.txt b/Documentation/networking/alias.txt --- a/Documentation/networking/alias.txt Sun Feb 23 22:25:24 2003 +++ b/Documentation/networking/alias.txt Sun Feb 23 22:25:24 2003 @@ -2,7 +2,7 @@ IP-Aliasing: ============ -IP-aliases are additional IP-adresses/masks hooked up to a base +IP-aliases are additional IP-addresses/masks hooked up to a base interface by adding a colon and a string when running ifconfig. This string is usually numeric, but this is not a must. diff -Nru a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt --- a/Documentation/networking/bonding.txt Sun Feb 23 22:25:22 2003 +++ b/Documentation/networking/bonding.txt Sun Feb 23 22:25:22 2003 @@ -258,7 +258,7 @@ Specifies the ip addresses to use when arp_interval is > 0. These are the targets of the ARP request sent to determine the health of the link to the targets. Specify these values in ddd.ddd.ddd.ddd format. - Multiple ip adresses must be separated by a comma. At least one ip + Multiple ip addresses must be separated by a comma. At least one ip address needs to be given for ARP monitoring to work. The maximum number of targets that can be specified is set at 16. diff -Nru a/Documentation/pnp.txt b/Documentation/pnp.txt --- a/Documentation/pnp.txt Sun Feb 23 22:25:22 2003 +++ b/Documentation/pnp.txt Sun Feb 23 22:25:22 2003 @@ -233,7 +233,7 @@ The Old Way ........... -a series of compatability functions have been created to make it easy to convert +a series of compatibility functions have been created to make it easy to convert ISAPNP drivers. They should serve as a temporary solution only. diff -Nru a/Documentation/rpc-cache.txt b/Documentation/rpc-cache.txt --- a/Documentation/rpc-cache.txt Sun Feb 23 22:25:22 2003 +++ b/Documentation/rpc-cache.txt Sun Feb 23 22:25:22 2003 @@ -146,7 +146,7 @@ Note: If a cache has no active readers on the channel, and has had not active readers for more than 60 seconds, further requests will not be added to the channel but instead all looks that do not find a valid -entry will fail. This is partly for backward compatability: The +entry will fail. This is partly for backward compatibility: The previous nfs exports table was deemed to be authoritative and a failed lookup meant a definite 'no'. diff -Nru a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt --- a/Documentation/s390/Debugging390.txt Sun Feb 23 22:25:22 2003 +++ b/Documentation/s390/Debugging390.txt Sun Feb 23 22:25:22 2003 @@ -97,7 +97,7 @@ 6 6 Input/Output interrupt Mask 7 7 External interrupt Mask used primarily for interprocessor signalling & - clock interupts. + clock interrupts. 8-11 8-11 PSW Key used for complex memory protection mechanism not used under linux @@ -2423,7 +2423,7 @@ There is a new device layer for channel devices, some drivers e.g. lcs are registered with this layer. If the device uses the channel device layer you'll be -able to find what interupts it uses & the current state +able to find what interrupts it uses & the current state of the device. See the manpage chandev.8 &type cat /proc/chandev for more info. diff -Nru a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt --- a/Documentation/s390/cds.txt Sun Feb 23 22:25:26 2003 +++ b/Documentation/s390/cds.txt Sun Feb 23 22:25:26 2003 @@ -286,7 +286,7 @@ struct ccw1 { __u8 cmd_code;/* command code */ - __u8 flags; /* flags, like IDA adressing, etc. */ + __u8 flags; /* flags, like IDA addressing, etc. */ __u16 count; /* byte count */ __u32 cda; /* data address */ } __attribute__ ((packed,aligned(8))); diff -Nru a/Documentation/scsi/ChangeLog.sym53c8xx_2 b/Documentation/scsi/ChangeLog.sym53c8xx_2 --- a/Documentation/scsi/ChangeLog.sym53c8xx_2 Sun Feb 23 22:25:24 2003 +++ b/Documentation/scsi/ChangeLog.sym53c8xx_2 Sun Feb 23 22:25:24 2003 @@ -102,7 +102,7 @@ Sun Sep 9 18:00 2001 Gerard Roudier * version sym-2.1.12-20010909 - Change my email address. - - Add infrastructure for the forthcoming 64 bit DMA adressing support. + - Add infrastructure for the forthcoming 64 bit DMA addressing support. (Based on PCI 64 bit patch from David S. Miller) - Donnot use anymore vm_offset_t type. diff -Nru a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt --- a/Documentation/scsi/scsi_mid_low_api.txt Sun Feb 23 22:25:25 2003 +++ b/Documentation/scsi/scsi_mid_low_api.txt Sun Feb 23 22:25:25 2003 @@ -22,13 +22,28 @@ a SCSI host and a PCI device is common but not required (e.g. with ISA or MCA adapters).] +This version of the document roughly matches linux kernel version 2.5.63 . + +Documentation +============= +There is a SCSI documentation directory within the kernel source tree. +That directory is typically /usr/src/linux/Documentation/scsi . Most +documents are in plain (i.e. ASCII) text. This file can be found in that +directory, named scsi_mid_low_api.txt . Many LLDs are documented there +(e.g. aic7xxx.txt). The SCSI mid-level is briefly described in scsi.txt +(with a url to a document describing the SCSI subsystem in the lk 2.4 +series). Two upper level drivers have documents in that directory: +st.txt (SCSI tape driver) and scsi-generic.txt . + +Some documentation (or urls) for LLDs may be in the C source code or +in the same directory. For example to find a url about the USB mass +storage driver see the /usr/src/linux/drivers/usb/storage directory. + The Linux kernel source Documentation/DocBook/scsidrivers.tmpl file refers to this file. With the appropriate DocBook toolset, this permits users to generate html, ps and pdf renderings of information within this file (e.g. the interface functions). -This version of the document roughly matches lk 2.5.50 . - Driver structure ================ Traditionally a LLD for the SCSI subsystem has been at least two files in @@ -100,12 +115,11 @@ since the effected disk can be "cleaned up" the next time it is seen. During LLD initialization the driver should register itself with the -appropriate IO bus that it expects to find HBA(s) (e.g. the PCI bus). This -can probably be done via sysfs (formerly known as driverfs). Any driver -parameters (especially those that are writeable after the driver is -loaded) could also be registered with sysfs at this point. At the end of -driver initialization the SCSI mid level is typically not aware of its -presence. +appropriate IO bus on which it expects to find HBA(s) (e.g. the PCI bus). +This can probably be done via sysfs. Any driver parameters (especially +those that are writeable after the driver is loaded) could also be +registered with sysfs at this point. At the end of driver initialization +the SCSI mid level is typically not aware of its presence. At some later time, the LLD becomes aware of a HBA and what follows is a typical sequence of calls between the LLD and the mid level. @@ -149,7 +163,7 @@ (a pointer is returned by scsi_register() ) and struct scsi_device instances (a pointer is passed as the parameter to slave_alloc() and slave_configure() ). Both classes of instances are "owned" by the -mid-level. struct scsi_devices instances are freed after slave_destroy(). +mid-level. struct scsi_device instances are freed after slave_destroy(). struct Scsi_Host instances are freed after scsi_unregister(). @@ -249,6 +263,8 @@ /** * scsi_add_host - perform sysfs registration and SCSI bus scan. * @shost: pointer to scsi host instance + * @dev: pointer to struct device host instance of class type scsi + * (or related) * * Returns 0 on success, negative errno of failure (e.g. -ENOMEM) * @@ -256,7 +272,24 @@ * successful call to scsi_register(). * Defined in drivers/scsi/hosts.c **/ -int scsi_add_host(struct Scsi_Host *shost) +int scsi_add_host(struct Scsi_Host *shost, struct device * dev) + + +/** + * scsi_add_timer - (re-)start timer on a SCSI command. + * @scmd: pointer to scsi command instance + * @timeout: duration of timeout in "jiffies" + * @complete: pointer to function to call if timeout expires + * + * Returns nothing + * + * Notes: All commands issued by upper levels already have a timeout + * associated with them. A LLD can use this function to change + * the existing timeout value. + * Defined in drivers/scsi/scsi_error.c + **/ +void scsi_add_timer(Scsi_Cmnd *scmd, int timeout, void (*complete) + (Scsi_Cmnd *)) /** @@ -322,6 +355,21 @@ /** + * scsi_delete_timer - cancel timer on a SCSI command. + * @scmd: pointer to scsi command instance + * + * Returns 1 if able to cancel timer else 0 (i.e. too late or already + * cancelled). + * + * Notes: All commands issued by upper levels already have a timeout + * associated with them. A LLD can use this function to cancel the + * timer. + * Defined in drivers/scsi/scsi_error.c + **/ +int scsi_delete_timer(Scsi_Cmnd *scmd) + + +/** * scsi_partsize - parse partition table into cylinders, heads + sectors * @buf: pointer to partition table * @capacity: size of (total) disk in 512 byte sectors @@ -404,15 +452,15 @@ /** - * scsi_set_pci_device - place PCI device reference in host structure + * scsi_set_device - place device reference in host structure * @shost: a pointer to a scsi host instance - * @pdev: pointer to PCI device instance to assign + * @pdev: pointer to device instance to assign * * Returns nothing * * Notes: Defined in drivers/scsi/hosts.h . **/ -void scsi_set_pci_device(struct Scsi_Host * shost, struct pci_dev * pdev) +void scsi_set_device(struct Scsi_Host * shost, struct device * dev) /** @@ -430,6 +478,26 @@ /** + * scsi_track_queue_full - track successive QUEUE_FULL events on given + * device to determine if and when there is a need + * to adjust the queue depth on the device. + * @SDptr: pointer to SCSI device instance + * @depth: Current number of outstanding SCSI commands on this device, + * not counting the one returned as QUEUE_FULL. + * + * Returns 0 - no change needed + * >0 - adjust queue depth to this new depth + * -1 - drop back to untagged operation using host->cmd_per_lun + * as the untagged command depth + * + * Notes: LLDs may call this at any time and we will do "The Right + * Thing"; interrupt context safe. + * Defined in drivers/scsi/scsi.c . + **/ +int scsi_track_queue_full(Scsi_Device *SDptr, int depth) + + +/** * scsi_unblock_requests - allow further commands to be queued to given host * * @SHpnt: pointer to host to unblock commands on @@ -1008,4 +1076,4 @@ Douglas Gilbert dgilbert@interlog.com -29th November 2002 +21st February 2003 diff -Nru a/Documentation/sonypi.txt b/Documentation/sonypi.txt --- a/Documentation/sonypi.txt Sun Feb 23 22:25:21 2003 +++ b/Documentation/sonypi.txt Sun Feb 23 22:25:21 2003 @@ -1,6 +1,6 @@ Sony Programmable I/O Control Device Driver Readme -------------------------------------------------- - Copyright (C) 2001-2002 Stelian Pop + Copyright (C) 2001-2003 Stelian Pop Copyright (C) 2001-2002 Alcôve Copyright (C) 2001 Michael Ashley Copyright (C) 2001 Junichi Morita @@ -44,7 +44,7 @@ to /etc/modules.conf file, when the driver is compiled as a module or by adding the following to the kernel command line (in your bootloader): - sonypi=minor[,verbose[,fnkeyinit[,camera[,compat[,mask]]]]] + sonypi=minor[,verbose[,fnkeyinit[,camera[,compat[,mask[,useinput]]]]]] where: @@ -96,6 +96,11 @@ SONYPI_THUMBPHRASE_MASK 0x0200 SONYPI_MEYE_MASK 0x0400 SONYPI_MEMORYSTICK_MASK 0x0800 + + useinput: if set (which is the default) jogdial events are + forwarded to the input subsystem as mouse wheel + events. + Module use: ----------- 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 Sun Feb 23 22:25:23 2003 +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl Sun Feb 23 22:25:23 2003 @@ -1377,8 +1377,6 @@ module_init(alsa_card_mychip_init) module_exit(alsa_card_mychip_exit) - - EXPORT_NO_SYMBOLS; /* for old kernels only */ ]]> diff -Nru a/Documentation/sound/oss/PSS-updates b/Documentation/sound/oss/PSS-updates --- a/Documentation/sound/oss/PSS-updates Sun Feb 23 22:25:27 2003 +++ b/Documentation/sound/oss/PSS-updates Sun Feb 23 22:25:27 2003 @@ -10,7 +10,7 @@ This parameter is basically a flag. A 0 will leave the joystick port disabled, while a non-zero value would enable the joystick port. The default -setting is pss_enable_joystick=0 as this keeps this driver fully compatable +setting is pss_enable_joystick=0 as this keeps this driver fully compatible with systems that were using previous versions of this driver. If you wish to enable the joystick port you will have to add pss_enable_joystick=1 as an argument to the driver. To actually use the joystick port you will then have @@ -31,7 +31,7 @@ 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 -compatability with systems using previous versions of this driver. +compatibility with systems using previous versions of this driver. Other options have also been added for the added convenience and utility of the user. These options are only available if this driver is loaded as a @@ -49,7 +49,7 @@ 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 by the sound drivers. This default setting of this parameter is 0 to retain -full behavioral compatability with previous versions of this driver. +full behavioral compatibility with previous versions of this driver. pss_keep_settings @@ -60,7 +60,7 @@ emulations by default on the driver's unloading (as it probably should), so specifying it now will ensure that all future versions of this driver will continue to work as expected. The default value of this parameter is 1 to -retain full behavioral compatability with previous versions of this driver. +retain full behavioral compatibility with previous versions of this driver. pss_firmware diff -Nru a/Documentation/sysrq.txt b/Documentation/sysrq.txt --- a/Documentation/sysrq.txt Sun Feb 23 22:25:24 2003 +++ b/Documentation/sysrq.txt Sun Feb 23 22:25:24 2003 @@ -164,7 +164,7 @@ If for some reason you feel the need to call the handle_sysrq function from within a function called by handle_sysrq, you must be aware that you are in -a lock (you are also in an interupt handler, which means don't sleep!), so +a lock (you are also in an interrupt handler, which means don't sleep!), so you must call __handle_sysrq_nolock instead. * I have more questions, who can I ask? diff -Nru a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt --- a/Documentation/video4linux/meye.txt Sun Feb 23 22:25:25 2003 +++ b/Documentation/video4linux/meye.txt Sun Feb 23 22:25:25 2003 @@ -1,6 +1,6 @@ Vaio Picturebook Motion Eye Camera Driver Readme ------------------------------------------------ - Copyright (C) 2001-2002 Stelian Pop + Copyright (C) 2001-2003 Stelian Pop Copyright (C) 2001-2002 Alcôve Copyright (C) 2000 Andrew Tridgell diff -Nru a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt --- a/Documentation/vm/hugetlbpage.txt Sun Feb 23 22:25:22 2003 +++ b/Documentation/vm/hugetlbpage.txt Sun Feb 23 22:25:22 2003 @@ -66,7 +66,7 @@ /proc/sys/vm_nr_hugepages indicates the current number of configured hugetlb pages in the kernel. Super user privileges are required for modification of -this value. The allocation of hugetlb pages is posible only if there are +this value. The allocation of hugetlb pages is possible only if there are enough physically contiguous free pages in system OR if there are enough hugetlb pages free that can be transfered back to regular memory pool. diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Sun Feb 23 22:25:25 2003 +++ b/MAINTAINERS Sun Feb 23 22:25:25 2003 @@ -215,6 +215,14 @@ L: linux-scsi@vger.kernel.org S: Maintained +ALCATEL SPEEDTOUCH USB DRIVER +P: Duncan Sands +M: duncan.sands@wanadoo.fr +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +W: http://www.linux-usb.org/SpeedTouch/ +S: Maintained + ALPHA PORT P: Richard Henderson M: rth@twiddle.net @@ -266,6 +274,13 @@ L: linux-net@vger.kernel.org S: Maintained +ATM +P: Chas Williams +M: chas@cmf.nrl.navy.mil +L: linux-atm-general@lists.sourceforge.net +W: http://linux-atm.sourceforge.net +S: Maintained + AX.25 NETWORK LAYER P: Ralf Baechle M: ralf@linux-mips.org @@ -308,6 +323,15 @@ W: http://www.holtmann.org/linux/bluetooth/ S: Maintained +BONDING DRIVER +P: Chad Tindel +M: ctindel@users.sourceforge.net +P: Jay Vosburgh +M: fubar@us.ibm.com +L: bonding-devel@lists.sourceforge.net +W: http://sourceforge.net/projects/bonding/ +S: Supported + BTTV VIDEO4LINUX DRIVER P: Gerd Knorr M: kraxel@bytesex.org @@ -1565,11 +1589,11 @@ S: Supported SGI VISUAL WORKSTATION 320 AND 540 -P: Bent Hagemark -M: bh@sgi.com -P: Ingo Molnar -M: mingo@redhat.com -S: Maintained +P: Andrey Panin +M: pazke@orbita1.ru +L: linux-visws@lists.sf.net +W: http://linux-visws.sf.net +S: Maintained for 2.5. SIS 5513 IDE CONTROLLER DRIVER P: Lionel Bouton diff -Nru a/README b/README --- a/README Sun Feb 23 22:25:26 2003 +++ b/README Sun Feb 23 22:25:26 2003 @@ -67,12 +67,12 @@ - You can also upgrade between 2.5.xx releases by patching. Patches are distributed in the traditional gzip and the new bzip2 format. To install by patching, get all the newer patch files, enter the - directory in which you unpacked the kernel source and execute: + top level directory of the kernel source (linux-2.5.xx) and execute: - gzip -cd patchXX.gz | patch -p0 + gzip -cd ../patch-2.5.xx.gz | patch -p1 or - bzip2 -dc patchXX.bz2 | patch -p0 + bzip2 -dc ../patch-2.5.xx.bz2 | patch -p1 (repeat xx for all versions bigger than the version of your current source tree, _in_order_) and you should be ok. You may want to remove @@ -148,8 +148,6 @@ - Check the top Makefile for further site-dependent configuration (default SVGA mode etc). - - - Finally, do a "make dep" to set up all the dependencies correctly. COMPILING the kernel: diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig --- a/arch/alpha/Kconfig Sun Feb 23 22:25:25 2003 +++ b/arch/alpha/Kconfig Sun Feb 23 22:25:25 2003 @@ -935,6 +935,7 @@ source "net/bluetooth/Kconfig" +source "arch/alpha/oprofile/Kconfig" menu "Kernel hacking" diff -Nru a/arch/alpha/Makefile b/arch/alpha/Makefile --- a/arch/alpha/Makefile Sun Feb 23 22:25:25 2003 +++ b/arch/alpha/Makefile Sun Feb 23 22:25:25 2003 @@ -92,9 +92,10 @@ head-y := arch/alpha/kernel/head.o -core-y += arch/alpha/kernel/ arch/alpha/mm/ -core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/ -libs-y += arch/alpha/lib/ +core-y += arch/alpha/kernel/ arch/alpha/mm/ +core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/ +drivers-$(CONFIG_OPROFILE) += arch/alpha/oprofile/ +libs-y += arch/alpha/lib/ # export what is needed by arch/alpha/boot/Makefile LIBS_Y := $(patsubst %/, %/lib.a, $(libs-y)) diff -Nru a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile --- a/arch/alpha/kernel/Makefile Sun Feb 23 22:25:24 2003 +++ b/arch/alpha/kernel/Makefile Sun Feb 23 22:25:24 2003 @@ -3,8 +3,8 @@ # EXTRA_TARGETS := head.o - EXTRA_AFLAGS := $(CFLAGS) +EXTRA_CFLAGS := -Werror -Wno-sign-compare obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \ diff -Nru a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c --- a/arch/alpha/kernel/alpha_ksyms.c Sun Feb 23 22:25:21 2003 +++ b/arch/alpha/kernel/alpha_ksyms.c Sun Feb 23 22:25:21 2003 @@ -119,10 +119,6 @@ EXPORT_SYMBOL(copy_page); EXPORT_SYMBOL(clear_page); -EXPORT_SYMBOL(__delay); -EXPORT_SYMBOL(__udelay); -EXPORT_SYMBOL(udelay); - EXPORT_SYMBOL(__direct_map_base); EXPORT_SYMBOL(__direct_map_size); diff -Nru a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c --- a/arch/alpha/kernel/core_irongate.c Sun Feb 23 22:25:25 2003 +++ b/arch/alpha/kernel/core_irongate.c Sun Feb 23 22:25:25 2003 @@ -236,14 +236,15 @@ unsigned long size; size = initrd_end - initrd_start; - free_bootmem(__pa(initrd_start), PAGE_ALIGN(size)); + free_bootmem_node(NODE_DATA(0), __pa(initrd_start), + PAGE_ALIGN(size)); if (!move_initrd(pci_mem)) printk("irongate_init_arch: initrd too big " "(%ldK)\ndisabling initrd\n", size / 1024); } #endif - reserve_bootmem(pci_mem, memtop - pci_mem); + reserve_bootmem_node(NODE_DATA(0), pci_mem, memtop - pci_mem); printk("irongate_init_arch: temporarily reserving " "region %08lx-%08lx for PCI\n", pci_mem, memtop - 1); } diff -Nru a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S --- a/arch/alpha/kernel/entry.S Sun Feb 23 22:25:21 2003 +++ b/arch/alpha/kernel/entry.S Sun Feb 23 22:25:21 2003 @@ -582,6 +582,7 @@ lda $8, 0x3fff bsr $1, undo_switch_stack bic $sp, $8, $8 + mov $17, $0 ret .end alpha_switch_to diff -Nru a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c --- a/arch/alpha/kernel/irq_alpha.c Sun Feb 23 22:25:22 2003 +++ b/arch/alpha/kernel/irq_alpha.c Sun Feb 23 22:25:22 2003 @@ -74,7 +74,7 @@ alpha_mv.device_interrupt(vector, regs); return; case 4: - perf_irq(vector, regs); + perf_irq(la_ptr, regs); return; default: printk(KERN_CRIT "Hardware intr %ld %lx? Huh?\n", diff -Nru a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c --- a/arch/alpha/kernel/ptrace.c Sun Feb 23 22:25:26 2003 +++ b/arch/alpha/kernel/ptrace.c Sun Feb 23 22:25:26 2003 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -255,6 +256,8 @@ struct pt_regs *regs) { struct task_struct *child; + unsigned long tmp; + size_t copied; long ret; lock_kernel(); @@ -265,6 +268,9 @@ /* are we already being traced? */ if (current->ptrace & PT_PTRACED) goto out_notsk; + ret = security_ptrace(current->parent, current); + if (ret) + goto out_notsk; /* set the ptrace bit in the process ptrace flags. */ current->ptrace |= PT_PTRACED; ret = 0; @@ -272,6 +278,7 @@ } if (pid == 1) /* you may not mess with init */ goto out_notsk; + ret = -ESRCH; read_lock(&tasklist_lock); child = find_task_by_pid(pid); @@ -280,77 +287,65 @@ read_unlock(&tasklist_lock); if (!child) goto out_notsk; + if (request == PTRACE_ATTACH) { ret = ptrace_attach(child); goto out; } - ret = -ESRCH; - if (!(child->ptrace & PT_PTRACED)) { - DBG(DBG_MEM, ("child not traced\n")); - goto out; - } - if (child->state != TASK_STOPPED) { - DBG(DBG_MEM, ("child process not stopped\n")); - if (request != PTRACE_KILL) - goto out; - } - if (child->parent != current) { - DBG(DBG_MEM, ("child not parent of this process\n")); + + ret = ptrace_check_attach(child, request == PTRACE_KILL); + if (ret < 0) goto out; - } switch (request) { /* When I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ - case PTRACE_PEEKDATA: { - unsigned long tmp; - int copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); + case PTRACE_PEEKDATA: + copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); ret = -EIO; if (copied != sizeof(tmp)) - goto out; + break; regs->r0 = 0; /* special return: no errors */ ret = tmp; - goto out; - } + break; /* Read register number ADDR. */ case PTRACE_PEEKUSR: regs->r0 = 0; /* special return: no errors */ ret = get_reg(child, addr); DBG(DBG_MEM, ("peek $%ld->%#lx\n", addr, ret)); - goto out; + break; /* When I and D space are separate, this will have to be fixed. */ case PTRACE_POKETEXT: /* write the word at location addr. */ - case PTRACE_POKEDATA: { - unsigned long tmp = data; - int copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 1); + case PTRACE_POKEDATA: + tmp = data; + copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 1); ret = (copied == sizeof(tmp)) ? 0 : -EIO; - goto out; - } + break; case PTRACE_POKEUSR: /* write the specified register */ DBG(DBG_MEM, ("poke $%ld<-%#lx\n", addr, data)); ret = put_reg(child, addr, data); - goto out; + break; - case PTRACE_SYSCALL: /* continue and stop at next - (return from) syscall */ + case PTRACE_SYSCALL: + /* continue and stop at next (return from) syscall */ case PTRACE_CONT: /* restart after signal. */ ret = -EIO; if ((unsigned long) data > _NSIG) - goto out; + break; if (request == PTRACE_SYSCALL) set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); else clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); child->exit_code = data; - wake_up_process(child); /* make sure single-step breakpoint is gone. */ ptrace_cancel_bpt(child); - ret = data; - goto out; + wake_up_process(child); + ret = 0; + break; /* * Make the child exit. Best I can do is send it a sigkill. @@ -358,19 +353,19 @@ * exit. */ case PTRACE_KILL: - if (child->state != TASK_ZOMBIE) { - wake_up_process(child); - child->exit_code = SIGKILL; - } + ret = 0; + if (child->state == TASK_ZOMBIE) + break; + child->exit_code = SIGKILL; /* make sure single-step breakpoint is gone. */ ptrace_cancel_bpt(child); - ret = 0; + wake_up_process(child); goto out; case PTRACE_SINGLESTEP: /* execute single instruction. */ ret = -EIO; if ((unsigned long) data > _NSIG) - goto out; + break; /* Mark single stepping. */ child->thread_info->bpt_nsaved = -1; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); diff -Nru a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c --- a/arch/alpha/kernel/sys_sable.c Sun Feb 23 22:25:21 2003 +++ b/arch/alpha/kernel/sys_sable.c Sun Feb 23 22:25:21 2003 @@ -268,7 +268,7 @@ { 32+3, 32+3, 32+3, 32+3, 32+3}, /* IdSel 7, slot 1 */ { 32+4, 32+4, 32+4, 32+4, 32+4}, /* IdSel 8, slot 2 */ }; - const long min_idsel = 0, max_idsel = 8, irqs_per_slot = 5; + long min_idsel = 0, max_idsel = 8, irqs_per_slot = 5; return COMMON_TABLE_LOOKUP; } diff -Nru a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c --- a/arch/alpha/kernel/sys_wildfire.c Sun Feb 23 22:25:23 2003 +++ b/arch/alpha/kernel/sys_wildfire.c Sun Feb 23 22:25:23 2003 @@ -314,7 +314,7 @@ { 56, 56, 56+1, 56+2, 56+3}, /* IdSel 6 PCI 1 slot 6 */ { 60, 60, 60+1, 60+2, 60+3}, /* IdSel 7 PCI 1 slot 7 */ }; - const long min_idsel = 0, max_idsel = 7, irqs_per_slot = 5; + long min_idsel = 0, max_idsel = 7, irqs_per_slot = 5; struct pci_controller *hose = dev->sysdata; int irq = COMMON_TABLE_LOOKUP; diff -Nru a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile --- a/arch/alpha/lib/Makefile Sun Feb 23 22:25:26 2003 +++ b/arch/alpha/lib/Makefile Sun Feb 23 22:25:26 2003 @@ -3,6 +3,8 @@ # EXTRA_AFLAGS := $(CFLAGS) +EXTRA_CFLAGS := -Werror + L_TARGET := lib.a # Many of these routines have implementations tuned for ev6. diff -Nru a/arch/alpha/lib/ev6-memcpy.S b/arch/alpha/lib/ev6-memcpy.S --- a/arch/alpha/lib/ev6-memcpy.S Sun Feb 23 22:25:22 2003 +++ b/arch/alpha/lib/ev6-memcpy.S Sun Feb 23 22:25:22 2003 @@ -243,6 +243,6 @@ .end memcpy -/* For backwards module compatability. */ +/* For backwards module compatibility. */ __memcpy = memcpy .globl __memcpy diff -Nru a/arch/alpha/lib/udelay.c b/arch/alpha/lib/udelay.c --- a/arch/alpha/lib/udelay.c Sun Feb 23 22:25:25 2003 +++ b/arch/alpha/lib/udelay.c Sun Feb 23 22:25:25 2003 @@ -1,15 +1,16 @@ -#include -#include /* for udelay's use of smp_processor_id */ -#include -#include -#include - /* * Copyright (C) 1993, 2000 Linus Torvalds * * Delay routines, using a pre-computed "loops_per_jiffy" value. */ +#include +#include +#include /* for udelay's use of smp_processor_id */ +#include +#include +#include + /* * Use only for very small delays (< 1 msec). * @@ -18,7 +19,8 @@ * a 1GHz box, that's about 2 seconds. */ -void __delay(int loops) +void +__delay(int loops) { int tmp; __asm__ __volatile__( @@ -30,18 +32,24 @@ : "=&r" (tmp), "=r" (loops) : "1"(loops)); } -void __udelay(unsigned long usecs, unsigned long lpj) +#ifdef CONFIG_SMP +#define LPJ cpu_data[smp_processor_id()].loops_per_jiffy +#else +#define LPJ loops_per_jiffy +#endif + +void +udelay(unsigned long usecs) { - usecs *= (((unsigned long)HZ << 32) / 1000000) * lpj; + usecs *= (((unsigned long)HZ << 32) / 1000000) * LPJ; __delay((long)usecs >> 32); } +EXPORT_SYMBOL(udelay); -void udelay(unsigned long usecs) +void +ndelay(unsigned long nsecs) { -#ifdef CONFIG_SMP - __udelay(usecs, cpu_data[smp_processor_id()].loops_per_jiffy); -#else - __udelay(usecs, loops_per_jiffy); -#endif + nsecs *= (((unsigned long)HZ << 32) / 1000000000) * LPJ; + __delay((long)nsecs >> 32); } - +EXPORT_SYMBOL(ndelay); diff -Nru a/arch/alpha/math-emu/Makefile b/arch/alpha/math-emu/Makefile --- a/arch/alpha/math-emu/Makefile Sun Feb 23 22:25:24 2003 +++ b/arch/alpha/math-emu/Makefile Sun Feb 23 22:25:24 2003 @@ -2,6 +2,6 @@ # Makefile for the FPU instruction emulation. # -CFLAGS += -Iinclude/math-emu -w +EXTRA_CFLAGS := -w obj-$(CONFIG_MATHEMU) += math.o qrnnd.o diff -Nru a/arch/alpha/mm/Makefile b/arch/alpha/mm/Makefile --- a/arch/alpha/mm/Makefile Sun Feb 23 22:25:27 2003 +++ b/arch/alpha/mm/Makefile Sun Feb 23 22:25:27 2003 @@ -2,6 +2,8 @@ # Makefile for the linux alpha-specific parts of the memory manager. # +EXTRA_CFLAGS := -Werror + obj-y := init.o fault.o extable.o remap.o obj-$(CONFIG_DISCONTIGMEM) += numa.o diff -Nru a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c --- a/arch/alpha/mm/numa.c Sun Feb 23 22:25:21 2003 +++ b/arch/alpha/mm/numa.c Sun Feb 23 22:25:21 2003 @@ -279,7 +279,8 @@ initrd_end, phys_to_virt(PFN_PHYS(max_low_pfn))); } else { - reserve_bootmem_node(NODE_DATA(KVADDR_TO_NID(initrd_start)), + nid = NODE_DATA(kvaddr_to_nid(initrd_start)); + reserve_bootmem_node(nid, virt_to_phys((void *)initrd_start), INITRD_SIZE); } @@ -349,8 +350,8 @@ initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, " - "%luk data, %luk init)\n", - nr_free_pages() << (PAGE_SHIFT-10), + "%luk data, %luk init)\n", + (unsigned long)nr_free_pages() << (PAGE_SHIFT-10), num_physpages << (PAGE_SHIFT-10), codesize >> 10, reservedpages << (PAGE_SHIFT-10), diff -Nru a/arch/alpha/oprofile/Kconfig b/arch/alpha/oprofile/Kconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/Kconfig Sun Feb 23 22:25:27 2003 @@ -0,0 +1,23 @@ + +menu "Profiling support" + depends on EXPERIMENTAL + +config PROFILING + bool "Profiling support (EXPERIMENTAL)" + help + Say Y here to enable the extended profiling support mechanisms used + by profilers such as OProfile. + + +config OPROFILE + tristate "OProfile system profiling (EXPERIMENTAL)" + depends on PROFILING + help + OProfile is a profiling system capable of profiling the + whole system, include the kernel, kernel modules, libraries, + and applications. + + If unsure, say N. + +endmenu + diff -Nru a/arch/alpha/oprofile/Makefile b/arch/alpha/oprofile/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/Makefile Sun Feb 23 22:25:27 2003 @@ -0,0 +1,18 @@ +EXTRA_CFLAGS := -Werror -Wno-sign-compare + +obj-$(CONFIG_OPROFILE) += oprofile.o + +DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \ + oprof.o cpu_buffer.o buffer_sync.o \ + event_buffer.o oprofile_files.o \ + oprofilefs.o oprofile_stats.o ) + +oprofile-y := $(DRIVER_OBJS) common.o +oprofile-$(CONFIG_ALPHA_GENERIC) += op_model_ev4.o \ + op_model_ev5.o \ + op_model_ev6.o \ + op_model_ev67.o +oprofile-$(CONFIG_ALPHA_EV4) += op_model_ev4.o +oprofile-$(CONFIG_ALPHA_EV5) += op_model_ev5.o +oprofile-$(CONFIG_ALPHA_EV6) += op_model_ev6.o \ + op_model_ev67.o diff -Nru a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/common.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,188 @@ +/** + * @file arch/alpha/oprofile/common.c + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author Richard Henderson + */ + +#include +#include +#include +#include +#include +#include + +#include "op_impl.h" + +extern struct op_axp_model op_model_ev4 __attribute__((weak)); +extern struct op_axp_model op_model_ev5 __attribute__((weak)); +extern struct op_axp_model op_model_pca56 __attribute__((weak)); +extern struct op_axp_model op_model_ev6 __attribute__((weak)); +extern struct op_axp_model op_model_ev67 __attribute__((weak)); + +static struct op_axp_model *model; + +extern void (*perf_irq)(unsigned long, struct pt_regs *); +static void (*save_perf_irq)(unsigned long, struct pt_regs *); + +static struct op_counter_config ctr[20]; +static struct op_system_config sys; +static struct op_register_config reg; + +/* Called from do_entInt to handle the performance monitor interrupt. */ + +static void +op_handle_interrupt(unsigned long which, struct pt_regs *regs) +{ + model->handle_interrupt(which, regs, ctr); + + /* If the user has selected an interrupt frequency that is + not exactly the width of the counter, write a new value + into the counter such that it'll overflow after N more + events. */ + if ((reg.need_reset >> which) & 1) + model->reset_ctr(®, which); +} + +static int +op_axp_setup(void) +{ + unsigned long i, e; + + /* Install our interrupt handler into the existing hook. */ + save_perf_irq = perf_irq; + perf_irq = op_handle_interrupt; + + /* Compute the mask of enabled counters. */ + for (i = e = 0; i < model->num_counters; ++i) + if (ctr[0].enabled) + e |= 1 << i; + reg.enable = e; + + /* Pre-compute the values to stuff in the hardware registers. */ + model->reg_setup(®, ctr, &sys); + + /* Configure the registers on all cpus. */ + smp_call_function(model->cpu_setup, ®, 0, 1); + model->cpu_setup(®); + return 0; +} + +static void +op_axp_shutdown(void) +{ + /* Remove our interrupt handler. We may be removing this module. */ + perf_irq = save_perf_irq; +} + +static void +op_axp_cpu_start(void *dummy) +{ + wrperfmon(1, reg.enable); +} + +static int +op_axp_start(void) +{ + smp_call_function(op_axp_cpu_start, NULL, 0, 1); + op_axp_cpu_start(NULL); + return 0; +} + +static inline void +op_axp_cpu_stop(void *dummy) +{ + /* Disable performance monitoring for all counters. */ + wrperfmon(0, -1); +} + +static void +op_axp_stop(void) +{ + smp_call_function(op_axp_cpu_stop, NULL, 0, 1); + op_axp_cpu_stop(NULL); +} + +static int +op_axp_create_files(struct super_block * sb, struct dentry * root) +{ + int i; + + for (i = 0; i < model->num_counters; ++i) { + struct dentry *dir; + char buf[3]; + + snprintf(buf, sizeof buf, "%d", i); + dir = oprofilefs_mkdir(sb, root, buf); + + oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); + oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); + oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); + /* Dummies. */ + oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); + oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); + oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); + } + + if (model->can_set_proc_mode) { + oprofilefs_create_ulong(sb, root, "enable_pal", + &sys.enable_pal); + oprofilefs_create_ulong(sb, root, "enable_kernel", + &sys.enable_kernel); + oprofilefs_create_ulong(sb, root, "enable_user", + &sys.enable_user); + } + + return 0; +} + +static struct oprofile_operations oprof_axp_ops = { + .create_files = op_axp_create_files, + .setup = op_axp_setup, + .shutdown = op_axp_shutdown, + .start = op_axp_start, + .stop = op_axp_stop, + .cpu_type = NULL /* To be filled in below. */ +}; + +int __init +oprofile_arch_init(struct oprofile_operations **ops) +{ + struct op_axp_model *lmodel = NULL; + + switch (implver()) { + case IMPLVER_EV4: + lmodel = &op_model_ev4; + break; + case IMPLVER_EV5: + /* 21164PC has a slightly different set of events. + Recognize the chip by the presence of the MAX insns. */ + if (!amask(AMASK_MAX)) + lmodel = &op_model_pca56; + else + lmodel = &op_model_ev5; + break; + case IMPLVER_EV6: + /* 21264A supports ProfileMe. + Recognize the chip by the presence of the CIX insns. */ + if (!amask(AMASK_CIX)) + lmodel = &op_model_ev67; + else + lmodel = &op_model_ev6; + break; + } + + if (!lmodel) + return ENODEV; + model = lmodel; + + oprof_axp_ops.cpu_type = lmodel->cpu_type; + *ops = &oprof_axp_ops; + + printk(KERN_INFO "oprofile: using %s performance monitoring.\n", + lmodel->cpu_type); + + return 0; +} diff -Nru a/arch/alpha/oprofile/op_impl.h b/arch/alpha/oprofile/op_impl.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/op_impl.h Sun Feb 23 22:25:27 2003 @@ -0,0 +1,55 @@ +/** + * @file arch/alpha/oprofile/op_impl.h + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author Richard Henderson + */ + +#ifndef OP_IMPL_H +#define OP_IMPL_H 1 + +/* Per-counter configuration as set via oprofilefs. */ +struct op_counter_config { + unsigned long enabled; + unsigned long event; + unsigned long count; + /* Dummies because I am too lazy to hack the userspace tools. */ + unsigned long kernel; + unsigned long user; + unsigned long unit_mask; +}; + +/* System-wide configuration as set via oprofilefs. */ +struct op_system_config { + unsigned long enable_pal; + unsigned long enable_kernel; + unsigned long enable_user; +}; + +/* Cached values for the various performance monitoring registers. */ +struct op_register_config { + unsigned long enable; + unsigned long mux_select; + unsigned long proc_mode; + unsigned long freq; + unsigned long reset_values; + unsigned long need_reset; +}; + +/* Per-architecture configury and hooks. */ +struct op_axp_model { + void (*reg_setup) (struct op_register_config *, + struct op_counter_config *, + struct op_system_config *); + void (*cpu_setup) (void *); + void (*reset_ctr) (struct op_register_config *, unsigned long); + void (*handle_interrupt) (unsigned long, struct pt_regs *, + struct op_counter_config *); + char *cpu_type; + unsigned char num_counters; + unsigned char can_set_proc_mode; +}; + +#endif diff -Nru a/arch/alpha/oprofile/op_model_ev4.c b/arch/alpha/oprofile/op_model_ev4.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/op_model_ev4.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,117 @@ +/** + * @file arch/alpha/oprofile/op_model_ev4.c + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author Richard Henderson + */ + +#include +#include +#include +#include +#include + +#include "op_impl.h" + + +/* Compute all of the registers in preparation for enabling profiling. */ + +static void +ev4_reg_setup(struct op_register_config *reg, + struct op_counter_config *ctr, + struct op_system_config *sys) +{ + unsigned long ctl = 0, count, hilo; + + /* Select desired events. We've mapped the event numbers + such that they fit directly into the event selection fields. + + Note that there is no "off" setting. In both cases we select + the EXTERNAL event source, hoping that it'll be the lowest + frequency, and set the frequency counter to LOW. The interrupts + for these "disabled" counter overflows are ignored by the + interrupt handler. + + This is most irritating, becuase the hardware *can* enable and + disable the interrupts for these counters independently, but the + wrperfmon interface doesn't allow it. */ + + ctl |= (ctr[0].enabled ? ctr[0].event << 8 : 14 << 8); + ctl |= (ctr[1].enabled ? (ctr[1].event - 16) << 32 : 7ul << 32); + + /* EV4 can not read or write its counter registers. The only + thing one can do at all is see if you overflow and get an + interrupt. We can set the width of the counters, to some + extent. Take the interrupt count selected by the user, + map it onto one of the possible values, and write it back. */ + + count = ctr[0].count; + if (count <= 4096) + count = 4096, hilo = 1; + else + count = 65536, hilo = 0; + ctr[0].count = count; + ctl |= (ctr[0].enabled && hilo) << 3; + + count = ctr[1].count; + if (count <= 256) + count = 256, hilo = 1; + else + count = 4096, hilo = 0; + ctr[1].count = count; + ctl |= (ctr[1].enabled && hilo); + + reg->mux_select = ctl; + + /* Select performance monitoring options. */ + /* ??? Need to come up with some mechanism to trace only + selected processes. EV4 does not have a mechanism to + select kernel or user mode only. For now, enable always. */ + reg->proc_mode = 0; + + /* Frequency is folded into mux_select for EV4. */ + reg->freq = 0; + + /* See above regarding no writes. */ + reg->reset_values = 0; + reg->need_reset = 0; + +} + +/* Program all of the registers in preparation for enabling profiling. */ + +static void +ev4_cpu_setup(void *x) +{ + struct op_register_config *reg = x; + + wrperfmon(2, reg->mux_select); + wrperfmon(3, reg->proc_mode); +} + +static void +ev4_handle_interrupt(unsigned long which, struct pt_regs *regs, + struct op_counter_config *ctr) +{ + /* EV4 can't properly disable counters individually. + Discard "disabled" events now. */ + if (!ctr[which].enabled) + return; + + /* Record the sample. */ + oprofile_add_sample(regs->pc, !user_mode(regs), + which, smp_processor_id()); +} + + +struct op_axp_model op_model_ev4 = { + .reg_setup = ev4_reg_setup, + .cpu_setup = ev4_cpu_setup, + .reset_ctr = NULL, + .handle_interrupt = ev4_handle_interrupt, + .cpu_type = "alpha/ev4", + .num_counters = 2, + .can_set_proc_mode = 0, +}; diff -Nru a/arch/alpha/oprofile/op_model_ev5.c b/arch/alpha/oprofile/op_model_ev5.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/op_model_ev5.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,212 @@ +/** + * @file arch/alpha/oprofile/op_model_ev5.c + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author Richard Henderson + */ + +#include +#include +#include +#include +#include + +#include "op_impl.h" + + +/* Compute all of the registers in preparation for enabling profiling. + + The 21164 (EV5) and 21164PC (PCA65) vary in the bit placement and + meaning of the "CBOX" events. Given that we don't care about meaning + at this point, arrange for the difference in bit placement to be + handled by common code. */ + +static void +common_reg_setup(struct op_register_config *reg, + struct op_counter_config *ctr, + struct op_system_config *sys, + int cbox1_ofs, int cbox2_ofs) +{ + int i, ctl, reset, need_reset; + + /* Select desired events. The event numbers are selected such + that they map directly into the event selection fields: + + PCSEL0: 0, 1 + PCSEL1: 24-39 + CBOX1: 40-47 + PCSEL2: 48-63 + CBOX2: 64-71 + + There are two special cases, in that CYCLES can be measured + on PCSEL[02], and SCACHE_WRITE can be measured on CBOX[12]. + These event numbers are canonicalizes to their first appearance. */ + + ctl = 0; + for (i = 0; i < 3; ++i) { + unsigned long event = ctr[i].event; + if (!ctr[i].enabled) + continue; + + /* Remap the duplicate events, as described above. */ + if (i == 2) { + if (event == 0) + event = 12+48; + else if (event == 2+41) + event = 4+65; + } + + /* Convert the event numbers onto mux_select bit mask. */ + if (event < 2) + ctl |= event << 31; + else if (event < 24) + /* error */; + else if (event < 40) + ctl |= (event - 24) << 4; + else if (event < 48) + ctl |= (event - 40) << cbox1_ofs | 15 << 4; + else if (event < 64) + ctl |= event - 48; + else if (event < 72) + ctl |= (event - 64) << cbox2_ofs | 15; + } + reg->mux_select = ctl; + + /* Select processor mode. */ + /* ??? Need to come up with some mechanism to trace only selected + processes. For now select from pal, kernel and user mode. */ + ctl = 0; + ctl |= !sys->enable_pal << 9; + ctl |= !sys->enable_kernel << 8; + ctl |= !sys->enable_user << 30; + reg->proc_mode = ctl; + + /* Select interrupt frequencies. Take the interrupt count selected + by the user, and map it onto one of the possible counter widths. + If the user value is in between, compute a value to which the + counter is reset at each interrupt. */ + + ctl = reset = need_reset = 0; + for (i = 0; i < 3; ++i) { + unsigned long max, hilo, count = ctr[i].count; + if (!ctr[i].enabled) + continue; + + if (count <= 256) + count = 256, hilo = 3, max = 256; + else { + max = (i == 2 ? 16384 : 65536); + hilo = 2; + if (count > max) + count = max; + } + ctr[i].count = count; + + ctl |= hilo << (8 - i*2); + reset |= (max - count) << (48 - 16*i); + if (count != max) + need_reset |= 1 << i; + } + reg->freq = ctl; + reg->reset_values = reset; + reg->need_reset = need_reset; +} + +static void +ev5_reg_setup(struct op_register_config *reg, + struct op_counter_config *ctr, + struct op_system_config *sys) +{ + common_reg_setup(reg, ctr, sys, 19, 22); +} + +static void +pca56_reg_setup(struct op_register_config *reg, + struct op_counter_config *ctr, + struct op_system_config *sys) +{ + common_reg_setup(reg, ctr, sys, 8, 11); +} + +/* Program all of the registers in preparation for enabling profiling. */ + +static void +ev5_cpu_setup (void *x) +{ + struct op_register_config *reg = x; + + wrperfmon(2, reg->mux_select); + wrperfmon(3, reg->proc_mode); + wrperfmon(4, reg->freq); + wrperfmon(6, reg->reset_values); +} + +/* CTR is a counter for which the user has requested an interrupt count + in between one of the widths selectable in hardware. Reset the count + for CTR to the value stored in REG->RESET_VALUES. + + For EV5, this means disabling profiling, reading the current values, + masking in the value for the desired register, writing, then turning + profiling back on. + + This can be streamlined if profiling is only enabled for user mode. + In that case we know that the counters are not currently incrementing + (due to being in kernel mode). */ + +static void +ev5_reset_ctr(struct op_register_config *reg, unsigned long ctr) +{ + unsigned long values, mask, not_pk, reset_values; + + mask = (ctr == 0 ? 0xfffful << 48 + : ctr == 1 ? 0xfffful << 32 + : 0x3fff << 16); + + not_pk = 1 << 9 | 1 << 8; + + reset_values = reg->reset_values; + + if ((reg->proc_mode & not_pk) == not_pk) { + values = wrperfmon(5, 0); + values = (reset_values & mask) | (values & ~mask & -2); + wrperfmon(6, values); + } else { + wrperfmon(0, -1); + values = wrperfmon(5, 0); + values = (reset_values & mask) | (values & ~mask & -2); + wrperfmon(6, values); + wrperfmon(1, reg->enable); + } +} + +static void +ev5_handle_interrupt(unsigned long which, struct pt_regs *regs, + struct op_counter_config *ctr) +{ + /* Record the sample. */ + oprofile_add_sample(regs->pc, !user_mode(regs), + which, smp_processor_id()); +} + + +struct op_axp_model op_model_ev5 = { + .reg_setup = ev5_reg_setup, + .cpu_setup = ev5_cpu_setup, + .reset_ctr = ev5_reset_ctr, + .handle_interrupt = ev5_handle_interrupt, + .cpu_type = "alpha/ev5", + .num_counters = 3, + .can_set_proc_mode = 1, +}; + +struct op_axp_model op_model_pca56 = { + .reg_setup = pca56_reg_setup, + .cpu_setup = ev5_cpu_setup, + .reset_ctr = ev5_reset_ctr, + .handle_interrupt = ev5_handle_interrupt, + .cpu_type = "alpha/pca56", + .num_counters = 3, + .can_set_proc_mode = 1, +}; diff -Nru a/arch/alpha/oprofile/op_model_ev6.c b/arch/alpha/oprofile/op_model_ev6.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/op_model_ev6.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,104 @@ +/** + * @file arch/alpha/oprofile/op_model_ev6.c + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author Richard Henderson + */ + +#include +#include +#include +#include +#include + +#include "op_impl.h" + + +/* Compute all of the registers in preparation for enabling profiling. */ + +static void +ev6_reg_setup(struct op_register_config *reg, + struct op_counter_config *ctr, + struct op_system_config *sys) +{ + unsigned long ctl, reset, need_reset, i; + + /* Select desired events. We've mapped the event numbers + such that they fit directly into the event selection fields. */ + ctl = 0; + if (ctr[0].enabled && ctr[0].event) + ctl |= (ctr[0].event & 1) << 4; + if (ctr[1].enabled) + ctl |= (ctr[1].event - 2) & 15; + reg->mux_select = ctl; + + /* Select logging options. */ + /* ??? Need to come up with some mechanism to trace only + selected processes. EV6 does not have a mechanism to + select kernel or user mode only. For now, enable always. */ + reg->proc_mode = 0; + + /* EV6 cannot change the width of the counters as with the + other implementations. But fortunately, we can write to + the counters and set the value such that it will overflow + at the right time. */ + reset = need_reset = 0; + for (i = 0; i < 2; ++i) { + unsigned long count = ctr[i].count; + if (!ctr[i].enabled) + continue; + + if (count > 0x100000) + count = 0x100000; + ctr[i].count = count; + reset |= (0x100000 - count) << (i ? 6 : 28); + if (count != 0x100000) + need_reset |= 1 << i; + } + reg->reset_values = reset; + reg->need_reset = need_reset; +} + +/* Program all of the registers in preparation for enabling profiling. */ + +static void +ev6_cpu_setup (void *x) +{ + struct op_register_config *reg = x; + + wrperfmon(2, reg->mux_select); + wrperfmon(3, reg->proc_mode); + wrperfmon(6, reg->reset_values | 3); +} + +/* CTR is a counter for which the user has requested an interrupt count + in between one of the widths selectable in hardware. Reset the count + for CTR to the value stored in REG->RESET_VALUES. */ + +static void +ev6_reset_ctr(struct op_register_config *reg, unsigned long ctr) +{ + wrperfmon(6, reg->reset_values | (1 << ctr)); +} + +static void +ev6_handle_interrupt(unsigned long which, struct pt_regs *regs, + struct op_counter_config *ctr) +{ + /* Record the sample. */ + oprofile_add_sample(regs->pc, !user_mode(regs), + which, smp_processor_id()); +} + + +struct op_axp_model op_model_ev6 = { + .reg_setup = ev6_reg_setup, + .cpu_setup = ev6_cpu_setup, + .reset_ctr = ev6_reset_ctr, + .handle_interrupt = ev6_handle_interrupt, + .cpu_type = "alpha/ev6", + .num_counters = 2, + .can_set_proc_mode = 0, +}; diff -Nru a/arch/alpha/oprofile/op_model_ev67.c b/arch/alpha/oprofile/op_model_ev67.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/alpha/oprofile/op_model_ev67.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,265 @@ +/** + * @file arch/alpha/oprofile/op_model_ev67.c + * + * @remark Copyright 2002 OProfile authors + * @remark Read the file COPYING + * + * @author Richard Henderson + * @author Falk Hueffner + */ + +#include +#include +#include +#include +#include + +#include "op_impl.h" + + +/* Compute all of the registers in preparation for enabling profiling. */ + +static void +ev67_reg_setup(struct op_register_config *reg, + struct op_counter_config *ctr, + struct op_system_config *sys) +{ + unsigned long ctl, reset, need_reset, i; + + /* Select desired events. */ + ctl = 1UL << 4; /* Enable ProfileMe mode. */ + + /* The event numbers are chosen so we can use them directly if + PCTR1 is enabled. */ + if (ctr[1].enabled) { + ctl |= (ctr[1].event & 3) << 2; + } else { + if (ctr[0].event == 0) /* cycles */ + ctl |= 1UL << 2; + } + reg->mux_select = ctl; + + /* Select logging options. */ + /* ??? Need to come up with some mechanism to trace only + selected processes. EV67 does not have a mechanism to + select kernel or user mode only. For now, enable always. */ + reg->proc_mode = 0; + + /* EV67 cannot change the width of the counters as with the + other implementations. But fortunately, we can write to + the counters and set the value such that it will overflow + at the right time. */ + reset = need_reset = 0; + for (i = 0; i < 2; ++i) { + unsigned long count = ctr[i].count; + if (!ctr[i].enabled) + continue; + + if (count > 0x100000) + count = 0x100000; + ctr[i].count = count; + reset |= (0x100000 - count) << (i ? 6 : 28); + if (count != 0x100000) + need_reset |= 1 << i; + } + reg->reset_values = reset; + reg->need_reset = need_reset; +} + +/* Program all of the registers in preparation for enabling profiling. */ + +static void +ev67_cpu_setup (void *x) +{ + struct op_register_config *reg = x; + + wrperfmon(2, reg->mux_select); + wrperfmon(3, reg->proc_mode); + wrperfmon(6, reg->reset_values | 3); +} + +/* CTR is a counter for which the user has requested an interrupt count + in between one of the widths selectable in hardware. Reset the count + for CTR to the value stored in REG->RESET_VALUES. */ + +static void +ev67_reset_ctr(struct op_register_config *reg, unsigned long ctr) +{ + wrperfmon(6, reg->reset_values | (1 << ctr)); +} + +/* ProfileMe conditions which will show up as counters. We can also + detect the following, but it seems unlikely that anybody is + interested in counting them: + * Reset + * MT_FPCR (write to floating point control register) + * Arithmetic trap + * Dstream Fault + * Machine Check (ECC fault, etc.) + * OPCDEC (illegal opcode) + * Floating point disabled + * Differentiate between DTB single/double misses and 3 or 4 level + page tables + * Istream access violation + * Interrupt + * Icache Parity Error. + * Instruction killed (nop, trapb) + + Unfortunately, there seems to be no way to detect Dcache and Bcache + misses; the latter could be approximated by making the counter + count Bcache misses, but that is not precise. + + We model this as 20 counters: + * PCTR0 + * PCTR1 + * 9 ProfileMe events, induced by PCTR0 + * 9 ProfileMe events, induced by PCTR1 +*/ + +enum profileme_counters { + PM_STALLED, /* Stalled for at least one cycle + between the fetch and map stages */ + PM_TAKEN, /* Conditional branch taken */ + PM_MISPREDICT, /* Branch caused mispredict trap */ + PM_ITB_MISS, /* ITB miss */ + PM_DTB_MISS, /* DTB miss */ + PM_REPLAY, /* Replay trap */ + PM_LOAD_STORE, /* Load-store order trap */ + PM_ICACHE_MISS, /* Icache miss */ + PM_UNALIGNED, /* Unaligned Load/Store */ + PM_NUM_COUNTERS +}; + +static inline void +op_add_pm(unsigned long pc, int kern, unsigned long counter, + struct op_counter_config *ctr, unsigned long event) +{ + unsigned long fake_counter = 2 + event; + if (counter == 1) + fake_counter += PM_NUM_COUNTERS; + if (ctr[fake_counter].enabled) + oprofile_add_sample(pc, kern, fake_counter, + smp_processor_id()); +} + +static void +ev67_handle_interrupt(unsigned long which, struct pt_regs *regs, + struct op_counter_config *ctr) +{ + unsigned long pmpc, pctr_ctl; + int kern = !user_mode(regs); + int mispredict = 0; + union { + unsigned long v; + struct { + unsigned reserved: 30; /* 0-29 */ + unsigned overcount: 3; /* 30-32 */ + unsigned icache_miss: 1; /* 33 */ + unsigned trap_type: 4; /* 34-37 */ + unsigned load_store: 1; /* 38 */ + unsigned trap: 1; /* 39 */ + unsigned mispredict: 1; /* 40 */ + } fields; + } i_stat; + + enum trap_types { + TRAP_REPLAY, + TRAP_INVALID0, + TRAP_DTB_DOUBLE_MISS_3, + TRAP_DTB_DOUBLE_MISS_4, + TRAP_FP_DISABLED, + TRAP_UNALIGNED, + TRAP_DTB_SINGLE_MISS, + TRAP_DSTREAM_FAULT, + TRAP_OPCDEC, + TRAP_INVALID1, + TRAP_MACHINE_CHECK, + TRAP_INVALID2, + TRAP_ARITHMETIC, + TRAP_INVALID3, + TRAP_MT_FPCR, + TRAP_RESET + }; + + pmpc = wrperfmon(9, 0); + /* ??? Don't know how to handle physical-mode PALcode address. */ + if (pmpc & 1) + return; + pmpc &= ~2; /* clear reserved bit */ + + i_stat.v = wrperfmon(8, 0); + if (i_stat.fields.trap) { + switch (i_stat.fields.trap_type) { + case TRAP_INVALID1: + case TRAP_INVALID2: + case TRAP_INVALID3: + /* Pipeline redirection ocurred. PMPC points + to PALcode. Recognize ITB miss by PALcode + offset address, and get actual PC from + EXC_ADDR. */ + oprofile_add_sample(regs->pc, kern, which, + smp_processor_id()); + if ((pmpc & ((1 << 15) - 1)) == 581) + op_add_pm(regs->pc, kern, which, + ctr, PM_ITB_MISS); + /* Most other bit and counter values will be + those for the first instruction in the + fault handler, so we're done. */ + return; + case TRAP_REPLAY: + op_add_pm(pmpc, kern, which, ctr, + (i_stat.fields.load_store + ? PM_LOAD_STORE : PM_REPLAY)); + break; + case TRAP_DTB_DOUBLE_MISS_3: + case TRAP_DTB_DOUBLE_MISS_4: + case TRAP_DTB_SINGLE_MISS: + op_add_pm(pmpc, kern, which, ctr, PM_DTB_MISS); + break; + case TRAP_UNALIGNED: + op_add_pm(pmpc, kern, which, ctr, PM_UNALIGNED); + break; + case TRAP_INVALID0: + case TRAP_FP_DISABLED: + case TRAP_DSTREAM_FAULT: + case TRAP_OPCDEC: + case TRAP_MACHINE_CHECK: + case TRAP_ARITHMETIC: + case TRAP_MT_FPCR: + case TRAP_RESET: + break; + } + + /* ??? JSR/JMP/RET/COR or HW_JSR/HW_JMP/HW_RET/HW_COR + mispredicts do not set this bit but can be + recognized by the presence of one of these + instructions at the PMPC location with bit 39 + set. */ + if (i_stat.fields.mispredict) { + mispredict = 1; + op_add_pm(pmpc, kern, which, ctr, PM_MISPREDICT); + } + } + + oprofile_add_sample(pmpc, kern, which, smp_processor_id()); + + pctr_ctl = wrperfmon(5, 0); + if (pctr_ctl & (1UL << 27)) + op_add_pm(pmpc, kern, which, ctr, PM_STALLED); + + /* Unfortunately, TAK is undefined on mispredicted branches. + ??? It is also undefined for non-cbranch insns, should + check that. */ + if (!mispredict && pctr_ctl & (1UL << 0)) + op_add_pm(pmpc, kern, which, ctr, PM_TAKEN); +} + +struct op_axp_model op_model_ev67 = { + .reg_setup = ev67_reg_setup, + .cpu_setup = ev67_cpu_setup, + .reset_ctr = ev67_reset_ctr, + .handle_interrupt = ev67_handle_interrupt, + .cpu_type = "alpha/ev67", + .num_counters = 20, + .can_set_proc_mode = 0, +}; diff -Nru a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c --- a/arch/arm/mm/alignment.c Sun Feb 23 22:25:22 2003 +++ b/arch/arm/mm/alignment.c Sun Feb 23 22:25:22 2003 @@ -400,7 +400,7 @@ * For alignment faults on the ARM922T/ARM920T the MMU makes * the FSR (and hence addr) equal to the updated base address * of the multiple access rather than the restored value. - * Switch this messsage off if we've got a ARM92[02], otherwise + * Switch this message off if we've got a ARM92[02], otherwise * [ls]dm alignment faults are noisy! */ #if !(defined CONFIG_CPU_ARM922T) && !(defined CONFIG_CPU_ARM920T) diff -Nru a/arch/cris/boot/compressed/misc.c b/arch/cris/boot/compressed/misc.c --- a/arch/cris/boot/compressed/misc.c Sun Feb 23 22:25:26 2003 +++ b/arch/cris/boot/compressed/misc.c Sun Feb 23 22:25:26 2003 @@ -13,7 +13,7 @@ */ /* where the piggybacked kernel image expects itself to live. - * it is the same adress we use when we network load an uncompressed + * it is the same address we use when we network load an uncompressed * image into DRAM, and it is the address the kernel is linked to live * at by etrax100.ld. */ diff -Nru a/arch/cris/drivers/eeprom.c b/arch/cris/drivers/eeprom.c --- a/arch/cris/drivers/eeprom.c Sun Feb 23 22:25:23 2003 +++ b/arch/cris/drivers/eeprom.c Sun Feb 23 22:25:23 2003 @@ -802,7 +802,7 @@ return 1; } -/* Reads from current adress. */ +/* Reads from current address. */ static int read_from_eeprom(char * buf, int count) { diff -Nru a/arch/cris/drivers/serial.c b/arch/cris/drivers/serial.c --- a/arch/cris/drivers/serial.c Sun Feb 23 22:25:25 2003 +++ b/arch/cris/drivers/serial.c Sun Feb 23 22:25:25 2003 @@ -1904,7 +1904,7 @@ } #ifdef SERIAL_DEBUG_INTR - printk("** OK, disabling ser_interupts\n"); + printk("** OK, disabling ser_interrupts\n"); #endif e100_disable_serial_data_irq(info); diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Sun Feb 23 22:25:22 2003 +++ b/arch/i386/Kconfig Sun Feb 23 22:25:22 2003 @@ -83,18 +83,16 @@ If you don't have such a system, you should say N here. -# Visual Workstation support is utterly broken. -# If you want to see it working mail an VW540 to hch@infradead.org 8) -#config X86_VISWS -# bool "SGI 320/540 (Visual Workstation)" -# help -# The SGI Visual Workstation series is an IA32-based workstation -# based on SGI systems chips with some legacy PC hardware attached. -# -# Say Y here to create a kernel to run on the SGI 320 or 540. -# -# A kernel compiled for the Visual Workstation will not run on PCs -# and vice versa. See for details. +config X86_VISWS + bool "SGI 320/540 (Visual Workstation)" + help + The SGI Visual Workstation series is an IA32-based workstation + based on SGI systems chips with some legacy PC hardware attached. + + Say Y here to create a kernel to run on the SGI 320 or 540. + + A kernel compiled for the Visual Workstation will not run on PCs + and vice versa. See for details. endchoice @@ -433,7 +431,7 @@ config X86_UP_APIC bool "Local APIC support on uniprocessors" if !SMP - depends on !X86_VOYAGER + depends on !(X86_VISWS || X86_VOYAGER) ---help--- A local APIC (Advanced Programmable Interrupt Controller) is an integrated interrupt controller in the CPU. If you have a single-CPU @@ -956,158 +954,7 @@ a work-around for a number of buggy BIOSes. Switch this option on if your computer crashes instead of powering off properly. -config CPU_FREQ - bool "CPU Frequency scaling" - help - Clock scaling allows you to change the clock speed of CPUs on the - fly. This is a nice method to save battery power on notebooks, - because the lower the clock speed, the less power the CPU consumes. - - For more information, take a look at linux/Documentation/cpufreq or - at - - If in doubt, say N. - -config CPU_FREQ_PROC_INTF - 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. - -config CPU_FREQ_24_API - bool "/proc/sys/cpu/ interface (2.4. / OLD)" - depends on CPU_FREQ - help - This enables the /proc/sys/cpu/ sysctl interface for controlling - CPUFreq, as known from the 2.4.-kernel patches for CPUFreq. 2.5 - uses a sysfs interface instead. Please note that some drivers do - not work well with the 2.4. /proc/sys/cpu sysctl interface, - so if in doubt, say N here. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config CPU_FREQ_TABLE - tristate "CPU frequency table helpers" - depends on CPU_FREQ - default y - help - Many CPUFreq drivers use these helpers, so only say N here if - the CPUFreq driver of your choice doesn't need these helpers. - - If in doubt, say Y. - -config X86_ACPI_CPUFREQ - tristate "ACPI Processor P-States driver" - depends on CPU_FREQ_TABLE && ACPI_PROCESSOR - help - This driver adds a CPUFreq driver which utilizes the ACPI - Processor Performance States. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config X86_POWERNOW_K6 - tristate "AMD Mobile K6-2/K6-3 PowerNow!" - depends on CPU_FREQ_TABLE - help - This adds the CPUFreq driver for mobile AMD K6-2+ and mobile - AMD K6-3+ processors. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config X86_POWERNOW_K7 - tristate "AMD Mobile Athlon/Duron PowerNow!" - depends on CPU_FREQ_TABLE - help - This adds the CPUFreq driver for mobile AMD K7 mobile processors. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config ELAN_CPUFREQ - tristate "AMD Elan" - depends on CPU_FREQ_TABLE && MELAN - ---help--- - This adds the CPUFreq driver for AMD Elan SC400 and SC410 - processors. - - You need to specify the processor maximum speed as boot - parameter: elanfreq=maxspeed (in kHz) or as module - parameter "max_freq". - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config X86_LONGHAUL - tristate "VIA Cyrix III Longhaul" - depends on CPU_FREQ - help - This adds the CPUFreq driver for VIA Samuel/CyrixIII, - VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T - processors. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config X86_SPEEDSTEP - tristate "Intel Speedstep" - depends on CPU_FREQ_TABLE - help - This adds the CPUFreq driver for certain mobile Intel Pentium III - (Coppermine), all mobile Intel Pentium III-M (Tulatin) and all - mobile Intel Pentium 4 P4-Ms. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config X86_P4_CLOCKMOD - tristate "Intel Pentium 4 clock modulation" - depends on CPU_FREQ_TABLE - help - This adds the CPUFreq driver for Intel Pentium 4 / XEON - processors. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config X86_LONGRUN - tristate "Transmeta LongRun" - depends on CPU_FREQ - help - This adds the CPUFreq driver for Transmeta Crusoe processors which - support LongRun. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - -config X86_GX_SUSPMOD - tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" - depends on CPU_FREQ - help - This add the CPUFreq driver for NatSemi Geode processors which - support suspend modulation. - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - +source "arch/i386/kernel/cpu/cpufreq/Kconfig" endmenu @@ -1180,7 +1027,7 @@ config PCI_DIRECT bool - depends on !X86_VISWS && PCI && (PCI_GODIRECT || PCI_GOANY) + depends on PCI && ((PCI_GODIRECT || PCI_GOANY) || X86_VISWS) default y config SCx200 @@ -1673,7 +1520,7 @@ config X86_MPPARSE bool - depends on X86_LOCAL_APIC + depends on X86_LOCAL_APIC && !X86_VISWS default y endmenu @@ -1691,15 +1538,15 @@ config X86_HT bool - depends on SMP && !X86_VOYAGER + depends on SMP && !(X86_VISWS || X86_VOYAGER) default y config X86_BIOS_REBOOT bool - depends on !X86_VOYAGER + depends on !(X86_VISWS || X86_VOYAGER) default y config X86_TRAMPOLINE bool - depends on SMP + depends on SMP || X86_VISWS default y diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile --- a/arch/i386/Makefile Sun Feb 23 22:25:23 2003 +++ b/arch/i386/Makefile Sun Feb 23 22:25:23 2003 @@ -17,7 +17,7 @@ LDFLAGS := -m elf_i386 OBJCOPYFLAGS := -O binary -R .note -R .comment -S -LDFLAGS_vmlinux := -e stext +LDFLAGS_vmlinux := LDFLAGS_BLOB := --format binary --oformat elf32-i386 CFLAGS += -pipe @@ -27,6 +27,8 @@ # prevent gcc from keeping the stack 16 byte aligned CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,) +align := $(subst -functions=0,,$(call check_gcc,-falign-functions=0,-malign-functions=0)) + cflags-$(CONFIG_M386) += -march=i386 cflags-$(CONFIG_M486) += -march=i486 cflags-$(CONFIG_M586) += -march=i586 @@ -37,15 +39,13 @@ cflags-$(CONFIG_MPENTIUMIII) += $(call check_gcc,-march=pentium3,-march=i686) cflags-$(CONFIG_MPENTIUM4) += $(call check_gcc,-march=pentium4,-march=i686) cflags-$(CONFIG_MK6) += $(call check_gcc,-march=k6,-march=i586) -cflags-$(CONFIG_MK7) += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4) -cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,$(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)) -cflags-$(CONFIG_MCRUSOE) += -march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0 +cflags-$(CONFIG_MK7) += $(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4) +cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,$(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4)) +cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 cflags-$(CONFIG_MWINCHIPC6) += $(call check_gcc,-march=winchip-c6,-march=i586) cflags-$(CONFIG_MWINCHIP2) += $(call check_gcc,-march=winchip2,-march=i586) cflags-$(CONFIG_MWINCHIP3D) += -march=i586 -cflags-$(CONFIG_MCYRIXIII) += $(call check_gcc,-march=c3,-march=i486) -# The alignment flags change with gcc 3.2 -cflags-$(CONFIG_MCYRIXIII) += $(call check_gcc,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0) +cflags-$(CONFIG_MCYRIXIII) += $(call check_gcc,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 cflags-$(CONFIG_MVIAC3_2) += $(call check_gcc,-march=c3-2,-march=i686) CFLAGS += $(cflags-y) diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile Sun Feb 23 22:25:22 2003 +++ b/arch/i386/kernel/Makefile Sun Feb 23 22:25:22 2003 @@ -6,7 +6,8 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \ - pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o + pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ + doublefault.o obj-y += cpu/ obj-y += timers/ @@ -24,7 +25,6 @@ obj-$(CONFIG_X86_IO_APIC) += io_apic.o obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o suspend_asm.o obj-$(CONFIG_X86_NUMAQ) += numaq.o -obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_EDD) += edd.o obj-$(CONFIG_MODULES) += module.o obj-y += sysenter.o diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c Sun Feb 23 22:25:27 2003 +++ b/arch/i386/kernel/apic.c Sun Feb 23 22:25:27 2003 @@ -50,9 +50,21 @@ /* Using APIC to generate smp_local_timer_interrupt? */ int using_apic_timer = 0; -int prof_multiplier[NR_CPUS] = { 1, }; -int prof_old_multiplier[NR_CPUS] = { 1, }; -DEFINE_PER_CPU(int, prof_counter) = 1; +static DEFINE_PER_CPU(int, prof_multiplier) = 1; +static DEFINE_PER_CPU(int, prof_old_multiplier) = 1; +static DEFINE_PER_CPU(int, prof_counter) = 1; + +void enable_NMI_through_LVT0 (void * dummy) +{ + unsigned int v, ver; + + ver = apic_read(APIC_LVR); + ver = GET_APIC_VERSION(ver); + v = APIC_DM_NMI; /* unmask and set to NMI */ + if (!APIC_INTEGRATED(ver)) /* 82489DX */ + v |= APIC_LVT_LEVEL_TRIGGER; + apic_write_around(APIC_LVT0, v); +} int get_maxlvt(void) { @@ -974,7 +986,7 @@ * accordingly. */ for (i = 0; i < NR_CPUS; ++i) - prof_multiplier[i] = multiplier; + per_cpu(prof_multiplier, i) = multiplier; return 0; } @@ -1006,12 +1018,14 @@ * * Interrupts are already masked off at this point. */ - per_cpu(prof_counter, cpu) = prof_multiplier[cpu]; - if (per_cpu(prof_counter, cpu) != prof_old_multiplier[cpu]) { + per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu); + if (per_cpu(prof_counter, cpu) != + per_cpu(prof_old_multiplier, cpu)) { __setup_APIC_LVTT( calibration_result/ per_cpu(prof_counter, cpu)); - prof_old_multiplier[cpu] = per_cpu(prof_counter, cpu); + per_cpu(prof_old_multiplier, cpu) = + per_cpu(prof_counter, cpu); } #ifdef CONFIG_SMP diff -Nru a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c --- a/arch/i386/kernel/cpu/common.c Sun Feb 23 22:25:21 2003 +++ b/arch/i386/kernel/cpu/common.c Sun Feb 23 22:25:21 2003 @@ -490,6 +490,10 @@ load_TR_desc(); load_LDT(&init_mm.context); + /* Set up doublefault TSS pointer in the GDT */ + __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss); + cpu_gdt_table[cpu][GDT_ENTRY_DOUBLEFAULT_TSS].b &= 0xfffffdff; + /* Clear %fs and %gs. */ asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs"); diff -Nru a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig Sun Feb 23 22:25:27 2003 @@ -0,0 +1,152 @@ +# +# CPU Frequency scaling +# + +menu "CPU Frequency scaling" + +config CPU_FREQ + bool "CPU Frequency scaling" + help + Clock scaling allows you to change the clock speed of CPUs on the + fly. This is a nice method to save battery power on notebooks, + because the lower the clock speed, the less power the CPU consumes. + + For more information, take a look at linux/Documentation/cpufreq or + at + + If in doubt, say N. + +source "drivers/cpufreq/Kconfig" + +config CPU_FREQ_24_API + bool "/proc/sys/cpu/ interface (2.4. / OLD)" + depends on CPU_FREQ + help + This enables the /proc/sys/cpu/ sysctl interface for controlling + CPUFreq, as known from the 2.4.-kernel patches for CPUFreq. 2.5 + uses a sysfs interface instead. Please note that some drivers do + not work well with the 2.4. /proc/sys/cpu sysctl interface, + so if in doubt, say N here. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config CPU_FREQ_TABLE + tristate "CPU frequency table helpers" + depends on CPU_FREQ + default y + help + Many CPUFreq drivers use these helpers, so only say N here if + the CPUFreq driver of your choice doesn't need these helpers. + + If in doubt, say Y. + +comment "CPUFreq processor drivers" + depends on CPU_FREQ + +config X86_ACPI_CPUFREQ + tristate "ACPI Processor P-States driver" + depends on CPU_FREQ_TABLE && ACPI_PROCESSOR + help + This driver adds a CPUFreq driver which utilizes the ACPI + Processor Performance States. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config ELAN_CPUFREQ + tristate "AMD Elan" + depends on CPU_FREQ_TABLE && MELAN + ---help--- + This adds the CPUFreq driver for AMD Elan SC400 and SC410 + processors. + + You need to specify the processor maximum speed as boot + parameter: elanfreq=maxspeed (in kHz) or as module + parameter "max_freq". + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config X86_POWERNOW_K6 + tristate "AMD Mobile K6-2/K6-3 PowerNow!" + depends on CPU_FREQ_TABLE + help + This adds the CPUFreq driver for mobile AMD K6-2+ and mobile + AMD K6-3+ processors. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config X86_POWERNOW_K7 + tristate "AMD Mobile Athlon/Duron PowerNow!" + depends on CPU_FREQ_TABLE + help + This adds the CPUFreq driver for mobile AMD K7 mobile processors. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config X86_GX_SUSPMOD + tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" + depends on CPU_FREQ + help + This add the CPUFreq driver for NatSemi Geode processors which + support suspend modulation. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config X86_SPEEDSTEP + tristate "Intel Speedstep" + depends on CPU_FREQ_TABLE + help + This adds the CPUFreq driver for certain mobile Intel Pentium III + (Coppermine), all mobile Intel Pentium III-M (Tulatin) and all + mobile Intel Pentium 4 P4-Ms. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config X86_P4_CLOCKMOD + tristate "Intel Pentium 4 clock modulation" + depends on CPU_FREQ_TABLE + help + This adds the CPUFreq driver for Intel Pentium 4 / XEON + processors. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config X86_LONGRUN + tristate "Transmeta LongRun" + depends on CPU_FREQ + help + This adds the CPUFreq driver for Transmeta Crusoe processors which + support LongRun. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +config X86_LONGHAUL + tristate "VIA Cyrix III Longhaul" + depends on CPU_FREQ + help + This adds the CPUFreq driver for VIA Samuel/CyrixIII, + VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T + processors. + + For details, take a look at linux/Documentation/cpufreq. + + If in doubt, say N. + +endmenu 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 Sun Feb 23 22:25:25 2003 +++ b/arch/i386/kernel/cpu/cpufreq/longrun.c Sun Feb 23 22:25:25 2003 @@ -1,7 +1,7 @@ /* - * $Id: longrun.c,v 1.14 2002/10/31 21:17:40 db Exp $ + * $Id: longrun.c,v 1.22 2003/02/10 17:31:50 db Exp $ * - * (C) 2002 Dominik Brodowski + * (C) 2002 - 2003 Dominik Brodowski * * Licensed under the terms of the GNU GPL License version 2. * @@ -18,7 +18,7 @@ #include #include -static struct cpufreq_driver *longrun_driver; +static struct cpufreq_driver longrun_driver; /** * longrun_{low,high}_freq is needed for the conversion of cpufreq kHz @@ -39,9 +39,6 @@ { u32 msr_lo, msr_hi; - if (!longrun_driver) - return; - rdmsr(MSR_TMTA_LONGRUN_FLAGS, msr_lo, msr_hi); if (msr_lo & 0x01) policy->policy = CPUFREQ_POLICY_PERFORMANCE; @@ -72,7 +69,7 @@ u32 msr_lo, msr_hi; u32 pctg_lo, pctg_hi; - if (!longrun_driver || !policy) + if (!policy) return -EINVAL; pctg_lo = (policy->min - longrun_low_freq) / @@ -117,13 +114,16 @@ */ static int longrun_verify_policy(struct cpufreq_policy *policy) { - if (!policy || !longrun_driver) + if (!policy) return -EINVAL; policy->cpu = 0; cpufreq_verify_within_limits(policy, - longrun_driver->policy[0].cpuinfo.min_freq, - longrun_driver->policy[0].cpuinfo.max_freq); + policy->cpuinfo.min_freq, + policy->cpuinfo.max_freq); + + if (policy->policy == CPUFREQ_POLICY_GOVERNOR) + policy->policy = longrun_driver.policy[0].policy; return 0; } @@ -221,59 +221,59 @@ } -/** - * longrun_init - initializes the Transmeta Crusoe LongRun CPUFreq driver - * - * Initializes the LongRun support. - */ -static int __init longrun_init(void) +static int longrun_cpu_init(struct cpufreq_policy *policy) { - int result; - struct cpufreq_driver *driver; + int result = 0; struct cpuinfo_x86 *c = cpu_data; + /* capability check */ + if (policy->cpu != 0) + return -ENODEV; if (c->x86_vendor != X86_VENDOR_TRANSMETA || !cpu_has(c, X86_FEATURE_LONGRUN)) - return 0; + return -ENODEV; - /* initialization of main "cpufreq" code*/ - driver = kmalloc(sizeof(struct cpufreq_driver) + - NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL); - if (!driver) - return -ENOMEM; - memset(driver, 0, sizeof(struct cpufreq_driver) + - NR_CPUS * sizeof(struct cpufreq_policy)); - - driver->policy = (struct cpufreq_policy *) (driver + 1); - - if (longrun_determine_freqs(&longrun_low_freq, &longrun_high_freq)) { - kfree(driver); - return -EIO; - } - driver->policy[0].cpuinfo.min_freq = longrun_low_freq; - driver->policy[0].cpuinfo.max_freq = longrun_high_freq; - driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL; + /* detect low and high frequency */ + result = longrun_determine_freqs(&longrun_low_freq, &longrun_high_freq); + if (result) + return result; + + /* cpuinfo and default policy values */ + policy->cpuinfo.min_freq = longrun_low_freq; + policy->cpuinfo.max_freq = longrun_high_freq; + policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; + longrun_get_policy(policy); + +#ifdef CONFIG_CPU_FREQ_24_API + longrun_driver.cpu_cur_freq[policy->cpu] = longrun_low_freq; /* dummy value */ +#endif - strncpy(driver->name, "longrun", CPUFREQ_NAME_LEN); + return 0; +} - longrun_get_policy(&driver->policy[0]); -#ifdef CONFIG_CPU_FREQ_24_API - driver->cpu_cur_freq[0] = longrun_high_freq; /* dummy value */ -#endif +static struct cpufreq_driver longrun_driver = { + .verify = longrun_verify_policy, + .setpolicy = longrun_set_policy, + .init = longrun_cpu_init, + .name = "longrun", +}; - driver->verify = &longrun_verify_policy; - driver->setpolicy = &longrun_set_policy; - longrun_driver = driver; +/** + * longrun_init - initializes the Transmeta Crusoe LongRun CPUFreq driver + * + * Initializes the LongRun support. + */ +static int __init longrun_init(void) +{ + struct cpuinfo_x86 *c = cpu_data; - result = cpufreq_register(driver); - if (result) { - longrun_driver = NULL; - kfree(driver); - } + if (c->x86_vendor != X86_VENDOR_TRANSMETA || + !cpu_has(c, X86_FEATURE_LONGRUN)) + return -ENODEV; - return result; + return cpufreq_register_driver(&longrun_driver); } @@ -282,15 +282,13 @@ */ static void __exit longrun_exit(void) { - if (longrun_driver) { - cpufreq_unregister(); - kfree(longrun_driver); - } + cpufreq_unregister_driver(&longrun_driver); } MODULE_AUTHOR ("Dominik Brodowski "); MODULE_DESCRIPTION ("LongRun driver for Transmeta Crusoe processors."); MODULE_LICENSE ("GPL"); + module_init(longrun_init); module_exit(longrun_exit); 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 Sun Feb 23 22:25:26 2003 +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c Sun Feb 23 22:25:26 2003 @@ -1,5 +1,6 @@ /* * Pentium 4/Xeon CPU on demand clock modulation/speed scaling + * (C) 2002 - 2003 Dominik Brodowski * (C) 2002 Zwane Mwaikambo * (C) 2002 Arjan van de Ven * (C) 2002 Tora T. Engstad @@ -45,11 +46,10 @@ #define DC_ENTRIES 8 -static int has_N44_O17_errata; +static int has_N44_O17_errata[NR_CPUS]; static int stock_freq; -MODULE_PARM(stock_freq, "i"); -static struct cpufreq_driver *cpufreq_p4_driver; +static struct cpufreq_driver p4clockmod_driver; static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate) @@ -107,17 +107,17 @@ rdmsr(MSR_IA32_THERM_STATUS, l, h); if (l & 0x01) - printk(KERN_DEBUG PFX "CPU#%d currently thermal throttled\n", cpu); +// printk(KERN_DEBUG PFX "CPU#%d currently thermal throttled\n", cpu); - if (has_N44_O17_errata && (newstate == DC_25PT || newstate == DC_DFLT)) + if (has_N44_O17_errata[cpu] && (newstate == DC_25PT || newstate == DC_DFLT)) newstate = DC_38PT; rdmsr(MSR_IA32_THERM_CONTROL, l, h); if (newstate == DC_DISABLE) { - printk(KERN_INFO PFX "CPU#%d disabling modulation\n", cpu); +// printk(KERN_INFO PFX "CPU#%d disabling modulation\n", cpu); wrmsr(MSR_IA32_THERM_CONTROL, l & ~(1<<4), h); } else { - printk(KERN_INFO PFX "CPU#%d setting duty cycle to %d%%\n", cpu, ((125 * newstate) / 10)); +// printk(KERN_INFO PFX "CPU#%d setting duty cycle to %d%%\n", cpu, ((125 * newstate) / 10)); /* bits 63 - 5 : reserved * bit 4 : enable/disable * bits 3-1 : duty cycle @@ -155,14 +155,16 @@ }; -static int cpufreq_p4_setpolicy(struct cpufreq_policy *policy) +static int cpufreq_p4_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) { unsigned int newstate = DC_RESV; - if (cpufreq_frequency_table_setpolicy(policy, &p4clockmod_table[0], &newstate)) + if (cpufreq_frequency_table_target(policy, &p4clockmod_table[0], target_freq, relation, &newstate)) return -EINVAL; - cpufreq_p4_setdc(policy->cpu, newstate); + cpufreq_p4_setdc(policy->cpu, p4clockmod_table[newstate].index); return 0; } @@ -174,39 +176,30 @@ } -static int __init cpufreq_p4_init(void) -{ - struct cpuinfo_x86 *c = cpu_data; - int cpuid; - int ret; - struct cpufreq_driver *driver; +static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) +{ + struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; + int cpuid = 0; unsigned int i; - /* - * THERM_CONTROL is architectural for IA32 now, so - * we can rely on the capability checks - */ + /* capability check */ if (c->x86_vendor != X86_VENDOR_INTEL) return -ENODEV; - if (!test_bit(X86_FEATURE_ACPI, c->x86_capability) || - !test_bit(X86_FEATURE_ACC, c->x86_capability)) + !test_bit(X86_FEATURE_ACC, c->x86_capability)) return -ENODEV; - - /* Errata workarounds */ + + /* Errata workaround */ cpuid = (c->x86 << 8) | (c->x86_model << 4) | c->x86_mask; switch (cpuid) { - case 0x0f07: - case 0x0f0a: - case 0x0f11: - case 0x0f12: - has_N44_O17_errata = 1; - default: - break; + case 0x0f07: + case 0x0f0a: + case 0x0f11: + case 0x0f12: + has_N44_O17_errata[policy->cpu] = 1; } - - printk(KERN_INFO PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n"); - + + /* get frequency */ if (!stock_freq) { if (cpu_khz) stock_freq = cpu_khz; @@ -216,70 +209,68 @@ } } - driver = kmalloc(sizeof(struct cpufreq_driver) + - NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL); - if (!driver) - return -ENOMEM; - memset(driver, 0, sizeof(struct cpufreq_driver) + - NR_CPUS * sizeof(struct cpufreq_policy)); - - driver->policy = (struct cpufreq_policy *) (driver + 1); - /* table init */ for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { - if ((i<2) && (has_N44_O17_errata)) + if ((i<2) && (has_N44_O17_errata[policy->cpu])) p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; else p4clockmod_table[i].frequency = (stock_freq * i)/8; } - + /* cpuinfo and default policy values */ + policy->policy = CPUFREQ_POLICY_PERFORMANCE; + policy->cpuinfo.transition_latency = 1000; #ifdef CONFIG_CPU_FREQ_24_API - for (i=0;icpu_cur_freq[i] = stock_freq; - } + p4clockmod_driver.cpu_cur_freq[policy->cpu] = stock_freq; #endif - driver->verify = &cpufreq_p4_verify; - driver->setpolicy = &cpufreq_p4_setpolicy; - strncpy(driver->name, "p4-clockmod", CPUFREQ_NAME_LEN); - - for (i=0;ipolicy[i].cpu = i; - ret = cpufreq_frequency_table_cpuinfo(&driver->policy[i], &p4clockmod_table[0]); - if (ret) { - kfree(driver); - return ret; - } - driver->policy[i].policy = CPUFREQ_POLICY_PERFORMANCE; - driver->policy[i].cpuinfo.transition_latency = CPUFREQ_ETERNAL; - } + return cpufreq_frequency_table_cpuinfo(policy, &p4clockmod_table[0]); +} - cpufreq_p4_driver = driver; - - ret = cpufreq_register(driver); - if (ret) { - cpufreq_p4_driver = NULL; - kfree(driver); - } - return ret; +static int cpufreq_p4_cpu_exit(struct cpufreq_policy *policy) +{ + return cpufreq_p4_setdc(policy->cpu, DC_DISABLE); +} + + +static struct cpufreq_driver p4clockmod_driver = { + .verify = cpufreq_p4_verify, + .target = cpufreq_p4_target, + .init = cpufreq_p4_cpu_init, + .exit = cpufreq_p4_cpu_exit, + .name = "p4-clockmod", +}; + + +static int __init cpufreq_p4_init(void) +{ + struct cpuinfo_x86 *c = cpu_data; + + /* + * THERM_CONTROL is architectural for IA32 now, so + * we can rely on the capability checks + */ + if (c->x86_vendor != X86_VENDOR_INTEL) + return -ENODEV; + + if (!test_bit(X86_FEATURE_ACPI, c->x86_capability) || + !test_bit(X86_FEATURE_ACC, c->x86_capability)) + return -ENODEV; + + printk(KERN_INFO PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n"); + + return cpufreq_register_driver(&p4clockmod_driver); } static void __exit cpufreq_p4_exit(void) { - unsigned int i; - - if (cpufreq_p4_driver) { - for (i=0; i"); MODULE_DESCRIPTION ("cpufreq driver for Pentium(TM) 4/Xeon(TM)"); 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 Sun Feb 23 22:25:21 2003 +++ b/arch/i386/kernel/cpu/cpufreq/speedstep.c Sun Feb 23 22:25:21 2003 @@ -1,8 +1,8 @@ /* - * $Id: speedstep.c,v 1.58 2002/11/11 15:35:46 db Exp $ + * $Id: speedstep.c,v 1.68 2003/01/20 17:31:47 db Exp $ * * (C) 2001 Dave Jones, Arjan van de ven. - * (C) 2002 Dominik Brodowski + * (C) 2002 - 2003 Dominik Brodowski * * Licensed under the terms of the GNU GPL License version 2. * Based upon reverse engineered information, and on Intel documentation @@ -30,7 +30,7 @@ #include -static struct cpufreq_driver *speedstep_driver; +static struct cpufreq_driver speedstep_driver; /* speedstep_chipset: * It is necessary to know which chipset is used. As accesses to @@ -208,7 +208,7 @@ pm2_blk &= 0xfe; outb(pm2_blk, (pmbase + 0x20)); - /* check if transition was sucessful */ + /* check if transition was successful */ value = inb(pmbase + 0x50); /* Enable IRQs */ @@ -217,7 +217,7 @@ dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); if (state == (value & 0x1)) { - dprintk (KERN_INFO "cpufreq: change to %u MHz succeded\n", (freqs.new / 1000)); + dprintk (KERN_INFO "cpufreq: change to %u MHz succeeded\n", (freqs.new / 1000)); } else { printk (KERN_ERR "cpufreq: change failed - I/O error\n"); } @@ -311,7 +311,7 @@ pci_read_config_byte(hostbridge, PCI_REVISION_ID, &rev); if (rev < 5) { - dprintk(KERN_INFO "cpufreq: hostbrige does not support speedstep\n"); + dprintk(KERN_INFO "cpufreq: hostbridge does not support speedstep\n"); speedstep_chipset_dev = NULL; return 0; } @@ -573,11 +573,13 @@ * * Sets a new CPUFreq policy. */ -static int speedstep_setpolicy (struct cpufreq_policy *policy) +static int speedstep_target (struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) { unsigned int newstate = 0; - if (cpufreq_frequency_table_setpolicy(policy, &speedstep_freqs[0], &newstate)) + if (cpufreq_frequency_table_target(policy, &speedstep_freqs[0], target_freq, relation, &newstate)) return -EINVAL; speedstep_set_state(newstate, 1); @@ -599,6 +601,42 @@ } +static int speedstep_cpu_init(struct cpufreq_policy *policy) +{ + int result = 0; + unsigned int speed; + + /* capability check */ + if (policy->cpu != 0) + return -ENODEV; + + /* detect low and high frequency */ + result = speedstep_detect_speeds(); + if (result) + return result; + + /* get current speed setting */ + result = speedstep_get_state(&speed); + if (result) + return result; + + speed = (speed == SPEEDSTEP_LOW) ? speedstep_low_freq : speedstep_high_freq; + dprintk(KERN_INFO "cpufreq: currently at %s speed setting - %i MHz\n", + (speed == speedstep_low_freq) ? "low" : "high", + (speed / 1000)); + + /* cpuinfo and default policy values */ + policy->policy = (speed == speedstep_low_freq) ? + CPUFREQ_POLICY_POWERSAVE : CPUFREQ_POLICY_PERFORMANCE; + policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; +#ifdef CONFIG_CPU_FREQ_24_API + speedstep_driver.cpu_cur_freq[policy->cpu] = speed; +#endif + + return cpufreq_frequency_table_cpuinfo(policy, &speedstep_freqs[0]); +} + + #ifndef MODULE /** * speedstep_setup speedstep command line parameter parsing @@ -608,7 +646,7 @@ * if the CPU in your notebook is a SpeedStep-capable Intel * Pentium III Coppermine. These processors cannot be detected * automatically, as Intel continues to consider the detection - * alogrithm as proprietary material. + * algorithm as proprietary material. */ static int __init speedstep_setup(char *str) { @@ -618,6 +656,15 @@ __setup("speedstep_coppermine=", speedstep_setup); #endif + +static struct cpufreq_driver speedstep_driver = { + .name = "speedstep", + .verify = speedstep_verify, + .target = speedstep_target, + .init = speedstep_cpu_init, +}; + + /** * speedstep_init - initializes the SpeedStep CPUFreq driver * @@ -627,11 +674,6 @@ */ static int __init speedstep_init(void) { - int result; - unsigned int speed; - struct cpufreq_driver *driver; - - /* detect chipset */ speedstep_chipset = speedstep_detect_chipset(); @@ -644,70 +686,13 @@ return -ENODEV; } - dprintk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.58 $\n"); - dprintk(KERN_DEBUG "cpufreq: chipset 0x%x - processor 0x%x\n", - speedstep_chipset, speedstep_processor); + dprintk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.68 $\n"); /* activate speedstep support */ - result = speedstep_activate(); - if (result) - return result; - - /* detect low and high frequency */ - result = speedstep_detect_speeds(); - if (result) - return result; - - /* get current speed setting */ - result = speedstep_get_state(&speed); - if (result) - return result; - - speed = (speed == SPEEDSTEP_LOW) ? speedstep_low_freq : speedstep_high_freq; - - dprintk(KERN_INFO "cpufreq: currently at %s speed setting - %i MHz\n", - (speed == speedstep_low_freq) ? "low" : "high", - (speed / 1000)); - - /* initialization of main "cpufreq" code*/ - driver = kmalloc(sizeof(struct cpufreq_driver) + - NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL); - if (!driver) - return -ENOMEM; - memset(driver, 0, sizeof(struct cpufreq_driver) + - NR_CPUS * sizeof(struct cpufreq_policy)); - - driver->policy = (struct cpufreq_policy *) (driver + 1); - - driver->policy[0].cpu = 0; - result = cpufreq_frequency_table_cpuinfo(&driver->policy[0], &speedstep_freqs[0]); - if (result) { - kfree(driver); - return result; - } - -#ifdef CONFIG_CPU_FREQ_24_API - driver->cpu_cur_freq[0] = speed; -#endif - - driver->verify = &speedstep_verify; - driver->setpolicy = &speedstep_setpolicy; - strncpy(driver->name, "speedstep", CPUFREQ_NAME_LEN); - - driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL; - - driver->policy[0].policy = (speed == speedstep_low_freq) ? - CPUFREQ_POLICY_POWERSAVE : CPUFREQ_POLICY_PERFORMANCE; - - speedstep_driver = driver; - - result = cpufreq_register(driver); - if (result) { - speedstep_driver = NULL; - kfree(driver); - } + if (speedstep_activate()) + return -EINVAL; - return result; + return cpufreq_register_driver(&speedstep_driver); } @@ -718,17 +703,15 @@ */ static void __exit speedstep_exit(void) { - if (speedstep_driver) { - cpufreq_unregister(); - kfree(speedstep_driver); - } + cpufreq_unregister_driver(&speedstep_driver); } +MODULE_PARM (speedstep_coppermine, "i"); + MODULE_AUTHOR ("Dave Jones , Dominik Brodowski "); MODULE_DESCRIPTION ("Speedstep driver for Intel mobile processors."); MODULE_LICENSE ("GPL"); + module_init(speedstep_init); module_exit(speedstep_exit); - -MODULE_PARM (speedstep_coppermine, "i"); diff -Nru a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c --- a/arch/i386/kernel/cpu/cyrix.c Sun Feb 23 22:25:22 2003 +++ b/arch/i386/kernel/cpu/cyrix.c Sun Feb 23 22:25:22 2003 @@ -74,7 +74,7 @@ /* * Reset the slow-loop (SLOP) bit on the 686(L) which is set by some old - * BIOSes for compatability with DOS games. This makes the udelay loop + * BIOSes for compatibility with DOS games. This makes the udelay loop * work correctly, and improves performance. * * FIXME: our newer udelay uses the tsc. We dont need to frob with SLOP diff -Nru a/arch/i386/kernel/cpu/mtrr/if.c b/arch/i386/kernel/cpu/mtrr/if.c --- a/arch/i386/kernel/cpu/mtrr/if.c Sun Feb 23 22:25:22 2003 +++ b/arch/i386/kernel/cpu/mtrr/if.c Sun Feb 23 22:25:22 2003 @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -300,8 +299,6 @@ # endif /* CONFIG_PROC_FS */ -static devfs_handle_t devfs_handle; - char * attrib_to_str(int x) { return (x <= 6) ? mtrr_strings[x] : "?"; @@ -337,7 +334,6 @@ attrib_to_str(type), usage_table[i]); } } - devfs_set_file_size(devfs_handle, len); return 0; } @@ -350,11 +346,6 @@ proc_root_mtrr->owner = THIS_MODULE; proc_root_mtrr->proc_fops = &mtrr_fops; } -#endif -#ifdef USERSPACE_INTERFACE - devfs_handle = devfs_register(NULL, "cpu/mtrr", DEVFS_FL_DEFAULT, 0, 0, - S_IFREG | S_IRUGO | S_IWUSR, - &mtrr_fops, NULL); #endif return 0; } diff -Nru a/arch/i386/kernel/doublefault.c b/arch/i386/kernel/doublefault.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/kernel/doublefault.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,65 @@ +#include +#include +#include +#include +#include + +#include +#include +#include + +#define DOUBLEFAULT_STACKSIZE (1024) +static unsigned long doublefault_stack[DOUBLEFAULT_STACKSIZE]; +#define STACK_START (unsigned long)(doublefault_stack+DOUBLEFAULT_STACKSIZE) + +#define ptr_ok(x) ((x) > 0xc0000000 && (x) < 0xc1000000) + +static void doublefault_fn(void) +{ + struct Xgt_desc_struct gdt_desc = {0, 0}; + unsigned long gdt, tss; + + __asm__ __volatile__("sgdt %0": "=m" (gdt_desc): :"memory"); + gdt = gdt_desc.address; + + printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size); + + if (ptr_ok(gdt)) { + gdt += GDT_ENTRY_TSS << 3; + tss = *(u16 *)(gdt+2); + tss += *(u8 *)(gdt+4) << 16; + tss += *(u8 *)(gdt+7) << 24; + printk("double fault, tss at %08lx\n", tss); + + if (ptr_ok(tss)) { + struct tss_struct *t = (struct tss_struct *)tss; + + printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp); + + printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n", + t->eax, t->ebx, t->ecx, t->edx); + printk("esi = %08lx, edi = %08lx\n", + t->esi, t->edi); + } + } + + for (;;) /* nothing */; +} + +struct tss_struct doublefault_tss __cacheline_aligned = { + .esp0 = STACK_START, + .ss0 = __KERNEL_DS, + .ldt = 0, + .bitmap = INVALID_IO_BITMAP_OFFSET, + .io_bitmap = { [0 ... IO_BITMAP_SIZE ] = ~0 }, + + .eip = (unsigned long) doublefault_fn, + .eflags = 0x00000082, + .esp = STACK_START, + .es = __USER_DS, + .cs = __KERNEL_CS, + .ss = __KERNEL_DS, + .ds = __USER_DS, + + .__cr3 = __pa(swapper_pg_dir) +}; diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S Sun Feb 23 22:25:22 2003 +++ b/arch/i386/kernel/entry.S Sun Feb 23 22:25:22 2003 @@ -41,7 +41,6 @@ */ #include -#include #include #include #include @@ -174,9 +173,10 @@ ENTRY(ret_from_fork) - # NOTE: this function takes a parameter but it's unused on x86. + pushl %eax call schedule_tail GET_THREAD_INFO(%ebp) + popl %eax jmp syscall_exit /* @@ -252,7 +252,7 @@ pushl %eax SAVE_ALL GET_THREAD_INFO(%ebp) - cmpl $(NR_syscalls), %eax + cmpl $(nr_syscalls), %eax jae syscall_badsys testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp) @@ -276,7 +276,7 @@ pushl %eax # save orig_eax SAVE_ALL GET_THREAD_INFO(%ebp) - cmpl $(NR_syscalls), %eax + cmpl $(nr_syscalls), %eax jae syscall_badsys # system call tracing in operation testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp) @@ -339,7 +339,7 @@ xorl %edx,%edx call do_syscall_trace movl ORIG_EAX(%esp), %eax - cmpl $(NR_syscalls), %eax + cmpl $(nr_syscalls), %eax jnae syscall_call jmp syscall_exit @@ -500,10 +500,6 @@ pushl $do_coprocessor_segment_overrun jmp error_code -ENTRY(double_fault) - pushl $do_double_fault - jmp error_code - ENTRY(invalid_TSS) pushl $do_invalid_TSS jmp error_code @@ -801,8 +797,15 @@ .long sys_epoll_wait .long sys_remap_file_pages .long sys_set_tid_address - - - .rept NR_syscalls-(.-sys_call_table)/4 - .long sys_ni_syscall - .endr + .long sys_timer_create + .long sys_timer_settime /* 260 */ + .long sys_timer_gettime + .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime + .long sys_clock_gettime /* 265 */ + .long sys_clock_getres + .long sys_clock_nanosleep + + +nr_syscalls=(.-sys_call_table)/4 diff -Nru a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S --- a/arch/i386/kernel/head.S Sun Feb 23 22:25:22 2003 +++ b/arch/i386/kernel/head.S Sun Feb 23 22:25:22 2003 @@ -38,11 +38,37 @@ #define X86_VENDOR_ID CPU_PARAMS+28 /* + * Initialize page tables + */ +#define INIT_PAGE_TABLES \ + movl $pg0 - __PAGE_OFFSET, %edi; \ + /* "007" doesn't mean with license to kill, but PRESENT+RW+USER */ \ + movl $007, %eax; \ +2: stosl; \ + add $0x1000, %eax; \ + cmp $empty_zero_page - __PAGE_OFFSET, %edi; \ + jne 2b; + +/* * swapper_pg_dir is the main page directory, address 0x00101000 * * On entry, %esi points to the real-mode code as a 32-bit pointer. */ -startup_32: +ENTRY(startup_32) + +#ifdef CONFIG_X86_VISWS +/* + * On SGI Visual Workstations boot CPU starts in protected mode. + */ + orw %bx, %bx + jnz 1f + INIT_PAGE_TABLES + movl $swapper_pg_dir - __PAGE_OFFSET, %eax + movl %eax, %cr3 + lgdt boot_gdt +1: +#endif + /* * Set segments to known values */ @@ -79,17 +105,7 @@ jmp 3f 1: #endif -/* - * Initialize page tables - */ - movl $pg0-__PAGE_OFFSET,%edi /* initialize page tables */ - movl $007,%eax /* "007" doesn't mean with license to kill, but - PRESENT+RW+USER */ -2: stosl - add $0x1000,%eax - cmp $empty_zero_page-__PAGE_OFFSET,%edi - jne 2b - + INIT_PAGE_TABLES /* * Enable paging */ @@ -412,7 +428,7 @@ /* * The Global Descriptor Table contains 28 quadwords, per-CPU. */ -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) || defined(CONFIG_X86_VISWS) /* * The boot_gdt_table must mirror the equivalent in setup.S and is * used only by the trampoline for booting other CPUs @@ -459,6 +475,13 @@ .quad 0x00409a0000000000 /* 0xb8 APM CS code */ .quad 0x00009a0000000000 /* 0xc0 APM CS 16 code (16 bit) */ .quad 0x0040920000000000 /* 0xc8 APM DS data */ + + .quad 0x0000000000000000 /* 0xd0 - unused */ + .quad 0x0000000000000000 /* 0xd8 - unused */ + .quad 0x0000000000000000 /* 0xe0 - unused */ + .quad 0x0000000000000000 /* 0xe8 - unused */ + .quad 0x0000000000000000 /* 0xf0 - unused */ + .quad 0x0000000000000000 /* 0xf8 - GDT entry 31: double-fault TSS */ #if CONFIG_SMP .fill (NR_CPUS-1)*GDT_ENTRIES,8,0 /* other CPU's GDT */ diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c --- a/arch/i386/kernel/i386_ksyms.c Sun Feb 23 22:25:27 2003 +++ b/arch/i386/kernel/i386_ksyms.c Sun Feb 23 22:25:27 2003 @@ -104,6 +104,7 @@ /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy_generic); /* Delay loops */ +EXPORT_SYMBOL(__ndelay); EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__delay); EXPORT_SYMBOL(__const_udelay); @@ -182,8 +183,6 @@ EXPORT_SYMBOL(rtc_lock); -EXPORT_SYMBOL_GPL(register_profile_notifier); -EXPORT_SYMBOL_GPL(unregister_profile_notifier); EXPORT_SYMBOL_GPL(set_nmi_callback); EXPORT_SYMBOL_GPL(unset_nmi_callback); diff -Nru a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c --- a/arch/i386/kernel/i8259.c Sun Feb 23 22:25:26 2003 +++ b/arch/i386/kernel/i8259.c Sun Feb 23 22:25:26 2003 @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -47,7 +48,7 @@ void mask_and_ack_8259A(unsigned int); -static unsigned int startup_8259A_irq(unsigned int irq) +unsigned int startup_8259A_irq(unsigned int irq) { enable_8259A_irq(irq); return 0; /* never anything pending */ @@ -71,11 +72,7 @@ /* * This contains the irq mask for both 8259A irq controllers, */ -static unsigned int cached_irq_mask = 0xffff; - -#define __byte(x,y) (((unsigned char *)&(y))[x]) -#define cached_21 (__byte(0,cached_irq_mask)) -#define cached_A1 (__byte(1,cached_irq_mask)) +unsigned int cached_irq_mask = 0xffff; /* * Not all IRQs can be routed through the IO-APIC, eg. on certain (older) diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c Sun Feb 23 22:25:23 2003 +++ b/arch/i386/kernel/io_apic.c Sun Feb 23 22:25:23 2003 @@ -222,7 +222,7 @@ # endif extern unsigned long irq_affinity [NR_IRQS]; -unsigned long __cacheline_aligned irq_balance_mask [NR_IRQS]; +int __cacheline_aligned pending_irq_balance_apicid [NR_IRQS]; static int irqbalance_disabled __initdata = 0; static int physical_balance = 0; @@ -441,7 +441,7 @@ Dprintk("irq = %d moved to cpu = %d\n", selected_irq, min_loaded); /* mark for change destination */ spin_lock(&desc->lock); - irq_balance_mask[selected_irq] = target_cpu_mask; + pending_irq_balance_apicid[selected_irq] = cpu_to_logical_apicid(min_loaded); spin_unlock(&desc->lock); /* Since we made a change, come back sooner to * check for more variation. @@ -500,7 +500,7 @@ if (cpu != new_cpu) { irq_desc_t *desc = irq_desc + irq; spin_lock(&desc->lock); - irq_balance_mask[irq] = cpu_to_logical_apicid(new_cpu); + pending_irq_balance_apicid[irq] = cpu_to_logical_apicid(new_cpu); spin_unlock(&desc->lock); } } @@ -515,7 +515,7 @@ /* push everything to CPU 0 to give us a starting point. */ for (i = 0 ; i < NR_IRQS ; i++) - irq_balance_mask[i] = 1 << 0; + pending_irq_balance_apicid[i] = cpu_to_logical_apicid(0); for (;;) { set_current_state(TASK_INTERRUPTIBLE); time_remaining = schedule_timeout(time_remaining); @@ -580,9 +580,9 @@ static inline void move_irq(int irq) { /* note - we hold the desc->lock */ - if (unlikely(irq_balance_mask[irq])) { - set_ioapic_affinity(irq, irq_balance_mask[irq]); - irq_balance_mask[irq] = 0; + if (unlikely(pending_irq_balance_apicid[irq])) { + set_ioapic_affinity(irq, pending_irq_balance_apicid[irq]); + pending_irq_balance_apicid[irq] = 0; } } @@ -1745,25 +1745,25 @@ */ static struct hw_interrupt_type ioapic_edge_irq_type = { - "IO-APIC-edge", - startup_edge_ioapic_irq, - shutdown_edge_ioapic_irq, - enable_edge_ioapic_irq, - disable_edge_ioapic_irq, - ack_edge_ioapic_irq, - end_edge_ioapic_irq, - set_ioapic_affinity, + .typename = "IO-APIC-edge", + .startup = startup_edge_ioapic_irq, + .shutdown = shutdown_edge_ioapic_irq, + .enable = enable_edge_ioapic_irq, + .disable = disable_edge_ioapic_irq, + .ack = ack_edge_ioapic_irq, + .end = end_edge_ioapic_irq, + .set_affinity = set_ioapic_affinity, }; static struct hw_interrupt_type ioapic_level_irq_type = { - "IO-APIC-level", - startup_level_ioapic_irq, - shutdown_level_ioapic_irq, - enable_level_ioapic_irq, - disable_level_ioapic_irq, - mask_and_ack_level_ioapic_irq, - end_level_ioapic_irq, - set_ioapic_affinity, + .typename = "IO-APIC-level", + .startup = startup_level_ioapic_irq, + .shutdown = shutdown_level_ioapic_irq, + .enable = enable_level_ioapic_irq, + .disable = disable_level_ioapic_irq, + .ack = mask_and_ack_level_ioapic_irq, + .end = end_level_ioapic_irq, + .set_affinity = set_ioapic_affinity, }; static inline void init_IO_APIC_traps(void) @@ -1821,26 +1821,14 @@ static void end_lapic_irq (unsigned int i) { /* nothing */ } static struct hw_interrupt_type lapic_irq_type = { - "local-APIC-edge", - NULL, /* startup_irq() not used for IRQ0 */ - NULL, /* shutdown_irq() not used for IRQ0 */ - enable_lapic_irq, - disable_lapic_irq, - ack_lapic_irq, - end_lapic_irq + .typename = "local-APIC-edge", + .startup = NULL, /* startup_irq() not used for IRQ0 */ + .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */ + .enable = enable_lapic_irq, + .disable = disable_lapic_irq, + .ack = ack_lapic_irq, + .end = end_lapic_irq }; - -void enable_NMI_through_LVT0 (void * dummy) -{ - unsigned int v, ver; - - ver = apic_read(APIC_LVR); - ver = GET_APIC_VERSION(ver); - v = APIC_DM_NMI; /* unmask and set to NMI */ - if (!APIC_INTEGRATED(ver)) /* 82489DX */ - v |= APIC_LVT_LEVEL_TRIGGER; - apic_write_around(APIC_LVT0, v); -} static void setup_nmi (void) { diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c Sun Feb 23 22:25:23 2003 +++ b/arch/i386/kernel/mpparse.c Sun Feb 23 22:25:23 2003 @@ -1027,8 +1027,19 @@ while ((void *) entry < madt_end) { if (entry->header.type == ACPI_MADT_INT_SRC_OVR && - acpi_fadt.sci_int == entry->global_irq) - return; + acpi_fadt.sci_int == entry->bus_irq) { + /* + * See the note at the end of ACPI 2.0b section + * 5.2.10.8 for what this is about. + */ + if (entry->bus_irq != entry->global_irq) { + acpi_fadt.sci_int = entry->global_irq; + irq = entry->global_irq; + break; + } + else + return; + } entry = (struct acpi_table_int_src_ovr *) ((unsigned long) entry + entry->header.length); diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c Sun Feb 23 22:25:21 2003 +++ b/arch/i386/kernel/process.c Sun Feb 23 22:25:21 2003 @@ -423,8 +423,12 @@ * so the performance issues may eventually be a valid point. * More important, however, is the fact that this allows us much * more flexibility. + * + * The return value (in %eax) will be the "prev" task after + * the task-switch, and shows up in ret_from_fork in entry.S, + * for example. */ -void __switch_to(struct task_struct *prev_p, struct task_struct *next_p) +struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) { struct thread_struct *prev = &prev_p->thread, *next = &next_p->thread; @@ -495,6 +499,7 @@ */ tss->bitmap = INVALID_IO_BITMAP_OFFSET; } + return prev_p; } asmlinkage int sys_fork(struct pt_regs regs) diff -Nru a/arch/i386/kernel/profile.c b/arch/i386/kernel/profile.c --- a/arch/i386/kernel/profile.c Sun Feb 23 22:25:26 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,45 +0,0 @@ -/* - * linux/arch/i386/kernel/profile.c - * - * (C) 2002 John Levon - * - */ - -#include -#include -#include -#include -#include - -static struct notifier_block * profile_listeners; -static rwlock_t profile_lock = RW_LOCK_UNLOCKED; - -int register_profile_notifier(struct notifier_block * nb) -{ - int err; - write_lock_irq(&profile_lock); - err = notifier_chain_register(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - return err; -} - - -int unregister_profile_notifier(struct notifier_block * nb) -{ - int err; - write_lock_irq(&profile_lock); - err = notifier_chain_unregister(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - return err; -} - - -void x86_profile_hook(struct pt_regs * regs) -{ - /* we would not even need this lock if - * we had a global cli() on register/unregister - */ - read_lock(&profile_lock); - notifier_call_chain(&profile_listeners, 0, regs); - read_unlock(&profile_lock); -} diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c Sun Feb 23 22:25:24 2003 +++ b/arch/i386/kernel/setup.c Sun Feb 23 22:25:24 2003 @@ -92,7 +92,6 @@ extern int root_mountflags; extern char _text, _etext, _edata, _end; extern int blk_nohighio; -void __init visws_get_board_type_and_rev(void); unsigned long saved_videomode; diff -Nru a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c --- a/arch/i386/kernel/time.c Sun Feb 23 22:25:24 2003 +++ b/arch/i386/kernel/time.c Sun Feb 23 22:25:24 2003 @@ -135,6 +135,7 @@ time_maxerror = NTP_PHASE_LIMIT; time_esterror = NTP_PHASE_LIMIT; write_sequnlock_irq(&xtime_lock); + clock_was_set(); } /* diff -Nru a/arch/i386/kernel/trampoline.S b/arch/i386/kernel/trampoline.S --- a/arch/i386/kernel/trampoline.S Sun Feb 23 22:25:23 2003 +++ b/arch/i386/kernel/trampoline.S Sun Feb 23 22:25:23 2003 @@ -46,8 +46,8 @@ movl $0xA5A5A5A5, trampoline_data - r_base # write marker for master knows we're running - lidt idt_48 - r_base # load idt with 0, 0 - lgdt gdt_48 - r_base # load gdt with whatever is appropriate + lidt boot_idt - r_base # load idt with 0, 0 + lgdt boot_gdt - r_base # load gdt with whatever is appropriate xor %ax, %ax inc %ax # protected mode (PE) bit @@ -57,7 +57,7 @@ ljmpl $__BOOT_CS, $0x00100000 # jump to startup_32 in arch/i386/kernel/head.S -idt_48: +boot_idt: .word 0 # idt limit = 0 .word 0, 0 # idt base = 0L @@ -65,8 +65,7 @@ # NOTE: here we actually use CPU#0's GDT - but that is OK, we reload # the proper GDT shortly after booting up the secondary CPUs. # - -gdt_48: +ENTRY(boot_gdt) .word __BOOT_DS + 7 # gdt limit .long boot_gdt_table-__PAGE_OFFSET # gdt base = gdt (first SMP CPU) diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c Sun Feb 23 22:25:22 2003 +++ b/arch/i386/kernel/traps.c Sun Feb 23 22:25:22 2003 @@ -73,7 +73,6 @@ asmlinkage void bounds(void); asmlinkage void invalid_op(void); asmlinkage void device_not_available(void); -asmlinkage void double_fault(void); asmlinkage void coprocessor_segment_overrun(void); asmlinkage void invalid_TSS(void); asmlinkage void segment_not_present(void); @@ -349,8 +348,6 @@ DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow) DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds) DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, ILL_ILLOPN, regs->eip) -DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available) -DO_ERROR( 8, SIGSEGV, "double fault", double_fault) DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun) DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) @@ -775,7 +772,7 @@ } #endif -#define _set_gate(gate_addr,type,dpl,addr) \ +#define _set_gate(gate_addr,type,dpl,addr,seg) \ do { \ int __d0, __d1; \ __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ @@ -785,7 +782,7 @@ :"=m" (*((long *) (gate_addr))), \ "=m" (*(1+(long *) (gate_addr))), "=&a" (__d0), "=&d" (__d1) \ :"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \ - "3" ((char *) (addr)),"2" (__KERNEL_CS << 16)); \ + "3" ((char *) (addr)),"2" ((seg) << 16)); \ } while (0) @@ -797,22 +794,27 @@ */ void set_intr_gate(unsigned int n, void *addr) { - _set_gate(idt_table+n,14,0,addr); + _set_gate(idt_table+n,14,0,addr,__KERNEL_CS); } static void __init set_trap_gate(unsigned int n, void *addr) { - _set_gate(idt_table+n,15,0,addr); + _set_gate(idt_table+n,15,0,addr,__KERNEL_CS); } static void __init set_system_gate(unsigned int n, void *addr) { - _set_gate(idt_table+n,15,3,addr); + _set_gate(idt_table+n,15,3,addr,__KERNEL_CS); } static void __init set_call_gate(void *a, void *addr) { - _set_gate(a,12,3,addr); + _set_gate(a,12,3,addr,__KERNEL_CS); +} + +static void __init set_task_gate(unsigned int n, unsigned int gdt_entry) +{ + _set_gate(idt_table+n,5,0,0,(gdt_entry<<3)); } @@ -843,7 +845,7 @@ set_system_gate(5,&bounds); set_trap_gate(6,&invalid_op); set_trap_gate(7,&device_not_available); - set_trap_gate(8,&double_fault); + set_task_gate(8,GDT_ENTRY_DOUBLEFAULT_TSS); set_trap_gate(9,&coprocessor_segment_overrun); set_trap_gate(10,&invalid_TSS); set_trap_gate(11,&segment_not_present); diff -Nru a/arch/i386/lib/delay.c b/arch/i386/lib/delay.c --- a/arch/i386/lib/delay.c Sun Feb 23 22:25:26 2003 +++ b/arch/i386/lib/delay.c Sun Feb 23 22:25:26 2003 @@ -41,3 +41,8 @@ { __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ } + +void __ndelay(unsigned long nsecs) +{ + __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ +} diff -Nru a/arch/i386/mach-visws/Makefile b/arch/i386/mach-visws/Makefile --- a/arch/i386/mach-visws/Makefile Sun Feb 23 22:25:26 2003 +++ b/arch/i386/mach-visws/Makefile Sun Feb 23 22:25:26 2003 @@ -4,8 +4,7 @@ EXTRA_CFLAGS += -I../kernel -obj-y := setup.o traps.o +obj-y := setup.o traps.o reboot.o -obj-$(CONFIG_PCI) += pci-visws.o obj-$(CONFIG_X86_VISWS_APIC) += visws_apic.o obj-$(CONFIG_X86_LOCAL_APIC) += mpparse.o diff -Nru a/arch/i386/mach-visws/mpparse.c b/arch/i386/mach-visws/mpparse.c --- a/arch/i386/mach-visws/mpparse.c Sun Feb 23 22:25:22 2003 +++ b/arch/i386/mach-visws/mpparse.c Sun Feb 23 22:25:22 2003 @@ -1,17 +1,15 @@ -#include -#include -#include -#include + #include -#include -#include -#include -#include +#include +#include #include -#include +#include #include -#include +#include + +#include "cobalt.h" +#include "mach_apic.h" /* Have we found an MP table */ int smp_found_config; @@ -43,25 +41,84 @@ /* Processor that is doing the boot up */ unsigned int boot_cpu_physical_apicid = -1U; unsigned int boot_cpu_logical_apicid = -1U; + /* Internal processor count */ static unsigned int num_processors; /* Bitmask of physically existing CPUs */ unsigned long phys_cpu_present_map; +u8 raw_phys_apicid[NR_CPUS] = { [0 ... NR_CPUS - 1] = BAD_APICID }; + /* * The Visual Workstation is Intel MP compliant in the hardware * sense, but it doesn't have a BIOS(-configuration table). * No problem for Linux. */ + +void __init MP_processor_info (struct mpc_config_processor *m) +{ + int ver, logical_apicid; + + if (!(m->mpc_cpuflag & CPU_ENABLED)) + return; + + logical_apicid = m->mpc_apicid; + printk(KERN_INFO "%sCPU #%d %ld:%ld APIC version %d\n", + m->mpc_cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "", + m->mpc_apicid, + (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, + (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, + m->mpc_apicver); + + if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { + boot_cpu_physical_apicid = m->mpc_apicid; + boot_cpu_logical_apicid = logical_apicid; + } + + num_processors++; + + if (m->mpc_apicid > MAX_APICS) { + printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", + m->mpc_apicid, MAX_APICS); + --num_processors; + return; + } + ver = m->mpc_apicver; + + phys_cpu_present_map |= apicid_to_cpu_present(m->mpc_apicid); + /* + * Validate version + */ + if (ver == 0x0) { + printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! " + "fixing up to 0x10. (tell your hw vendor)\n", + m->mpc_apicid); + ver = 0x10; + } + apic_version[m->mpc_apicid] = ver; + raw_phys_apicid[num_processors - 1] = m->mpc_apicid; +} + void __init find_smp_config(void) { - smp_found_config = 1; + struct mpc_config_processor *mp = phys_to_virt(CO_CPU_TAB_PHYS); + unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS)); + + if (ncpus > CO_CPU_MAX) { + printk(KERN_WARNING "find_visws_smp: got cpu count of %d at %p\n", + ncpus, mp); - phys_cpu_present_map |= 2; /* or in id 1 */ - apic_version[1] |= 0x10; /* integrated APIC */ - apic_version[0] |= 0x10; + ncpus = CO_CPU_MAX; + } + + smp_found_config = 1; + while (ncpus--) + MP_processor_info(mp++); mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; } +void __init get_smp_config (void) +{ +} diff -Nru a/arch/i386/mach-visws/pci-visws.c b/arch/i386/mach-visws/pci-visws.c --- a/arch/i386/mach-visws/pci-visws.c Sun Feb 23 22:25:25 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,141 +0,0 @@ -/* - * Low-Level PCI Support for SGI Visual Workstation - * - * (c) 1999--2000 Martin Mares - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "pci-i386.h" - -unsigned int pci_probe = 0; - -/* - * The VISWS uses configuration access type 1 only. - */ - -#define CONFIG_CMD(dev, where) (0x80000000 | (dev->bus->number << 16) | (dev->devfn << 8) | (where & ~3)) - -static int pci_conf1_read_config_byte(struct pci_dev *dev, int where, u8 *value) -{ - outl(CONFIG_CMD(dev,where), 0xCF8); - *value = inb(0xCFC + (where&3)); - return PCIBIOS_SUCCESSFUL; -} - -static int pci_conf1_read_config_word(struct pci_dev *dev, int where, u16 *value) -{ - outl(CONFIG_CMD(dev,where), 0xCF8); - *value = inw(0xCFC + (where&2)); - return PCIBIOS_SUCCESSFUL; -} - -static int pci_conf1_read_config_dword(struct pci_dev *dev, int where, u32 *value) -{ - outl(CONFIG_CMD(dev,where), 0xCF8); - *value = inl(0xCFC); - return PCIBIOS_SUCCESSFUL; -} - -static int pci_conf1_write_config_byte(struct pci_dev *dev, int where, u8 value) -{ - outl(CONFIG_CMD(dev,where), 0xCF8); - outb(value, 0xCFC + (where&3)); - return PCIBIOS_SUCCESSFUL; -} - -static int pci_conf1_write_config_word(struct pci_dev *dev, int where, u16 value) -{ - outl(CONFIG_CMD(dev,where), 0xCF8); - outw(value, 0xCFC + (where&2)); - return PCIBIOS_SUCCESSFUL; -} - -static int pci_conf1_write_config_dword(struct pci_dev *dev, int where, u32 value) -{ - outl(CONFIG_CMD(dev,where), 0xCF8); - outl(value, 0xCFC); - return PCIBIOS_SUCCESSFUL; -} - -#undef CONFIG_CMD - -static struct pci_ops visws_pci_ops = { - pci_conf1_read_config_byte, - pci_conf1_read_config_word, - pci_conf1_read_config_dword, - pci_conf1_write_config_byte, - pci_conf1_write_config_word, - pci_conf1_write_config_dword -}; - -static void __init pcibios_fixup_irqs(void) -{ - struct pci_dev *dev, *p; - u8 pin; - int irq; - - pci_for_each_dev(dev) { - pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); - dev->irq = 0; - if (!pin) - continue; - pin--; - if (dev->bus->parent) { - p = dev->bus->parent->self; - pin = (pin + PCI_SLOT(dev->devfn)) % 4; - } else - p = dev; - irq = visws_get_PCI_irq_vector(p->bus->number, PCI_SLOT(p->devfn), pin+1); - if (irq >= 0) - dev->irq = irq; - DBG("PCI IRQ: %s pin %d -> %d\n", dev->slot_name, pin, irq); - } -} - -void __init pcibios_fixup_bus(struct pci_bus *b) -{ - pci_read_bridge_bases(b); -} - -#if 0 -static struct resource visws_pci_bus_resources[2] = { - { "Host bus 1", 0xf4000000, 0xf7ffffff, 0 }, - { "Host bus 2", 0xf0000000, 0xf3ffffff, 0 } -}; -#endif - -void __init pcibios_init(void) -{ - unsigned int sec_bus = li_pcib_read16(LI_PCI_BUSNUM) & 0xff; - - printk("PCI: Probing PCI hardware on host buses 00 and %02x\n", sec_bus); - pci_scan_bus(0, &visws_pci_ops, NULL); - pci_scan_bus(sec_bus, &visws_pci_ops, NULL); - pcibios_fixup_irqs(); - pcibios_resource_survey(); -} - -char * __init pcibios_setup(char *str) -{ - return str; -} - -int pcibios_enable_device(struct pci_dev *dev, int mask) -{ - return pcibios_enable_resources(dev, mask); -} - -void __init pcibios_penalize_isa_irq(irq) -{ -} diff -Nru a/arch/i386/mach-visws/reboot.c b/arch/i386/mach-visws/reboot.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/mach-visws/reboot.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,48 @@ + +#include +#include +#include + +#include +#include "piix4.h" + +void (*pm_power_off)(void); + +int reboot_thru_bios; +int reboot_smp; + +void machine_restart(char * __unused) +{ +#ifdef CONFIG_SMP + smp_send_stop(); +#endif + + /* + * Visual Workstations restart after this + * register is poked on the PIIX4 + */ + outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT); +} + +void machine_power_off(void) +{ + unsigned short pm_status; + extern unsigned int pci_bus0; + + while ((pm_status = inw(PMSTS_PORT)) & 0x100) + outw(pm_status, PMSTS_PORT); + + outw(PM_SUSPEND_ENABLE, PMCNTRL_PORT); + + mdelay(10); + +#define PCI_CONF1_ADDRESS(bus, devfn, reg) \ + (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3)) + + outl(PCI_CONF1_ADDRESS(pci_bus0, SPECIAL_DEV, SPECIAL_REG), 0xCF8); + outl(PIIX_SPECIAL_STOP, 0xCFC); +} + +void machine_halt(void) +{ +} diff -Nru a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c --- a/arch/i386/mach-visws/setup.c Sun Feb 23 22:25:22 2003 +++ b/arch/i386/mach-visws/setup.c Sun Feb 23 22:25:22 2003 @@ -9,67 +9,26 @@ #include #include -#include #include #include +#include "cobalt.h" +#include "piix4.h" char visws_board_type = -1; char visws_board_rev = -1; -#define PIIX_PM_START 0x0F80 - -#define SIO_GPIO_START 0x0FC0 - -#define SIO_PM_START 0x0FC8 - -#define PMBASE PIIX_PM_START -#define GPIREG0 (PMBASE+0x30) -#define GPIREG(x) (GPIREG0+((x)/8)) -#define PIIX_GPI_BD_ID1 18 -#define PIIX_GPI_BD_REG GPIREG(PIIX_GPI_BD_ID1) - -#define PIIX_GPI_BD_SHIFT (PIIX_GPI_BD_ID1 % 8) - -#define SIO_INDEX 0x2e -#define SIO_DATA 0x2f - -#define SIO_DEV_SEL 0x7 -#define SIO_DEV_ENB 0x30 -#define SIO_DEV_MSB 0x60 -#define SIO_DEV_LSB 0x61 - -#define SIO_GP_DEV 0x7 - -#define SIO_GP_BASE SIO_GPIO_START -#define SIO_GP_MSB (SIO_GP_BASE>>8) -#define SIO_GP_LSB (SIO_GP_BASE&0xff) - -#define SIO_GP_DATA1 (SIO_GP_BASE+0) - -#define SIO_PM_DEV 0x8 - -#define SIO_PM_BASE SIO_PM_START -#define SIO_PM_MSB (SIO_PM_BASE>>8) -#define SIO_PM_LSB (SIO_PM_BASE&0xff) -#define SIO_PM_INDEX (SIO_PM_BASE+0) -#define SIO_PM_DATA (SIO_PM_BASE+1) - -#define SIO_PM_FER2 0x1 - -#define SIO_PM_GP_EN 0x80 - void __init visws_get_board_type_and_rev(void) { int raw; visws_board_type = (char)(inb_p(PIIX_GPI_BD_REG) & PIIX_GPI_BD_REG) >> PIIX_GPI_BD_SHIFT; -/* - * Get Board rev. - * First, we have to initialize the 307 part to allow us access - * to the GPIO registers. Let's map them at 0x0fc0 which is right - * after the PIIX4 PM section. - */ + /* + * Get Board rev. + * First, we have to initialize the 307 part to allow us access + * to the GPIO registers. Let's map them at 0x0fc0 which is right + * after the PIIX4 PM section. + */ outb_p(SIO_DEV_SEL, SIO_INDEX); outb_p(SIO_GP_DEV, SIO_DATA); /* Talk to GPIO regs. */ @@ -82,11 +41,11 @@ outb_p(SIO_DEV_ENB, SIO_INDEX); outb_p(1, SIO_DATA); /* Enable GPIO registers. */ -/* - * Now, we have to map the power management section to write - * a bit which enables access to the GPIO registers. - * What lunatic came up with this shit? - */ + /* + * Now, we have to map the power management section to write + * a bit which enables access to the GPIO registers. + * What lunatic came up with this shit? + */ outb_p(SIO_DEV_SEL, SIO_INDEX); outb_p(SIO_PM_DEV, SIO_DATA); /* Talk to GPIO regs. */ @@ -99,18 +58,18 @@ outb_p(SIO_DEV_ENB, SIO_INDEX); outb_p(1, SIO_DATA); /* Enable PM registers. */ -/* - * Now, write the PM register which enables the GPIO registers. - */ + /* + * Now, write the PM register which enables the GPIO registers. + */ outb_p(SIO_PM_FER2, SIO_PM_INDEX); outb_p(SIO_PM_GP_EN, SIO_PM_DATA); -/* - * Now, initialize the GPIO registers. - * We want them all to be inputs which is the - * power on default, so let's leave them alone. - * So, let's just read the board rev! - */ + /* + * Now, initialize the GPIO registers. + * We want them all to be inputs which is the + * power on default, so let's leave them alone. + * So, let's just read the board rev! + */ raw = inb_p(SIO_GP_DATA1); raw &= 0x7f; /* 7 bits of valid board revision ID. */ @@ -128,10 +87,10 @@ visws_board_rev = raw; } - printk(KERN_INFO "Silicon Graphics %s (rev %d)\n", - visws_board_type == VISWS_320 ? "320" : + printk(KERN_INFO "Silicon Graphics Visual Workstation %s (rev %d) detected\n", + (visws_board_type == VISWS_320 ? "320" : (visws_board_type == VISWS_540 ? "540" : - "unknown"), visws_board_rev); + "unknown")), visws_board_rev); } void __init pre_intr_init_hook(void) @@ -150,11 +109,16 @@ { visws_get_board_type_and_rev(); } -static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL}; + +static struct irqaction irq0 = { + .handler = timer_interrupt, + .flags = SA_INTERRUPT, + .name = "timer", +}; void __init time_init_hook(void) { - printk("Starting Cobalt Timer system clock\n"); + printk(KERN_INFO "Starting Cobalt Timer system clock\n"); /* Set the countdown value */ co_cpu_write(CO_CPU_TIMEVAL, CO_TIME_HZ/HZ); @@ -166,5 +130,5 @@ co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) & ~CO_CTRL_TIMEMASK); /* Wire cpu IDT entry to s/w handler (and Cobalt APIC to IDT) */ - setup_irq(CO_IRQ_TIMER, &irq0); + setup_irq(0, &irq0); } diff -Nru a/arch/i386/mach-visws/traps.c b/arch/i386/mach-visws/traps.c --- a/arch/i386/mach-visws/traps.c Sun Feb 23 22:25:25 2003 +++ b/arch/i386/mach-visws/traps.c Sun Feb 23 22:25:25 2003 @@ -3,132 +3,68 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include -#include -#include #include -#include -#include -#include -#include - -#include #include #include +#include +#include "cobalt.h" +#include "lithium.h" -#ifdef CONFIG_X86_VISWS_APIC -#include -#include -#include -#endif - -#ifdef CONFIG_X86_VISWS_APIC - -/* - * On Rev 005 motherboards legacy device interrupt lines are wired directly - * to Lithium from the 307. But the PROM leaves the interrupt type of each - * 307 logical device set appropriate for the 8259. Later we'll actually use - * the 8259, but for now we have to flip the interrupt types to - * level triggered, active lo as required by Lithium. - */ - -#define REG 0x2e /* The register to read/write */ -#define DEV 0x07 /* Register: Logical device select */ -#define VAL 0x2f /* The value to read/write */ -static void -superio_outb(int dev, int reg, int val) -{ - outb(DEV, REG); - outb(dev, VAL); - outb(reg, REG); - outb(val, VAL); -} +#define A01234 (LI_INTA_0 | LI_INTA_1 | LI_INTA_2 | LI_INTA_3 | LI_INTA_4) +#define BCD (LI_INTB | LI_INTC | LI_INTD) +#define ALLDEVS (A01234 | BCD) -static int __attribute__ ((unused)) -superio_inb(int dev, int reg) +static __init void lithium_init(void) { - outb(DEV, REG); - outb(dev, VAL); - outb(reg, REG); - return inb(VAL); -} - -#define FLOP 3 /* floppy logical device */ -#define PPORT 4 /* parallel logical device */ -#define UART5 5 /* uart2 logical device (not wired up) */ -#define UART6 6 /* uart1 logical device (THIS is the serial port!) */ -#define IDEST 0x70 /* int. destination (which 307 IRQ line) reg. */ -#define ITYPE 0x71 /* interrupt type register */ - -/* interrupt type bits */ -#define LEVEL 0x01 /* bit 0, 0 == edge triggered */ -#define ACTHI 0x02 /* bit 1, 0 == active lo */ + set_fixmap(FIX_LI_PCIA, LI_PCI_A_PHYS); + set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS); -static __init void -superio_init(void) -{ - if (visws_board_type == VISWS_320 && visws_board_rev == 5) { - superio_outb(UART6, IDEST, 0); /* 0 means no intr propagated */ - printk("SGI 320 rev 5: disabling 307 uart1 interrupt\n"); + if ((li_pcia_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || + (li_pcia_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { + printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'A'); + panic("This machine is not SGI Visual Workstation 320/540"); } -} -static __init void -lithium_init(void) -{ - set_fixmap(FIX_LI_PCIA, LI_PCI_A_PHYS); - printk("Lithium PCI Bridge A, Bus Number: %d\n", - li_pcia_read16(LI_PCI_BUSNUM) & 0xff); - set_fixmap(FIX_LI_PCIB, LI_PCI_B_PHYS); - printk("Lithium PCI Bridge B (PIIX4), Bus Number: %d\n", - li_pcib_read16(LI_PCI_BUSNUM) & 0xff); + if ((li_pcib_read16(PCI_VENDOR_ID) != PCI_VENDOR_ID_SGI) || + (li_pcib_read16(PCI_DEVICE_ID) != PCI_VENDOR_ID_SGI_LITHIUM)) { + printk(KERN_EMERG "Lithium hostbridge %c not found\n", 'B'); + panic("This machine is not SGI Visual Workstation 320/540"); + } - /* XXX blindly enables all interrupts */ - li_pcia_write16(LI_PCI_INTEN, 0xffff); - li_pcib_write16(LI_PCI_INTEN, 0xffff); + li_pcia_write16(LI_PCI_INTEN, ALLDEVS); + li_pcib_write16(LI_PCI_INTEN, ALLDEVS); } -static __init void -cobalt_init(void) +static __init void cobalt_init(void) { /* * On normal SMP PC this is used only with SMP, but we have to * use it and set it up here to start the Cobalt clock */ set_fixmap(FIX_APIC_BASE, APIC_DEFAULT_PHYS_BASE); - printk("Local APIC ID %lx\n", apic_read(APIC_ID)); - printk("Local APIC Version %lx\n", apic_read(APIC_LVR)); + setup_local_APIC(); + printk(KERN_INFO "Local APIC Version %#lx, ID %#lx\n", + apic_read(APIC_LVR), apic_read(APIC_ID)); set_fixmap(FIX_CO_CPU, CO_CPU_PHYS); - printk("Cobalt Revision %lx\n", co_cpu_read(CO_CPU_REV)); - set_fixmap(FIX_CO_APIC, CO_APIC_PHYS); - printk("Cobalt APIC ID %lx\n", co_apic_read(CO_APIC_ID)); + printk(KERN_INFO "Cobalt Revision %#lx, APIC ID %#lx\n", + co_cpu_read(CO_CPU_REV), co_apic_read(CO_APIC_ID)); /* Enable Cobalt APIC being careful to NOT change the ID! */ - co_apic_write(CO_APIC_ID, co_apic_read(CO_APIC_ID)|CO_APIC_ENABLE); + co_apic_write(CO_APIC_ID, co_apic_read(CO_APIC_ID) | CO_APIC_ENABLE); - printk("Cobalt APIC enabled: ID reg %lx\n", co_apic_read(CO_APIC_ID)); + printk(KERN_INFO "Cobalt APIC enabled: ID reg %#lx\n", + co_apic_read(CO_APIC_ID)); } -#endif -void __init trap_init_hook() +void __init trap_init_hook(void) { -#ifdef CONFIG_X86_VISWS_APIC - superio_init(); lithium_init(); cobalt_init(); -#endif } diff -Nru a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c --- a/arch/i386/mach-visws/visws_apic.c Sun Feb 23 22:25:21 2003 +++ b/arch/i386/mach-visws/visws_apic.c Sun Feb 23 22:25:21 2003 @@ -1,5 +1,5 @@ /* - * linux/arch/i386/kernel/visws_apic.c + * linux/arch/i386/mach_visws/visws_apic.c * * Copyright (C) 1999 Bent Hagemark, Ingo Molnar * @@ -10,234 +10,180 @@ * hardware in the system uses this controller directly. Legacy devices * are connected to the PIIX4 which in turn has its 8259(s) connected to * a of the Cobalt APIC entry. + * + * 09/02/2000 - Updated for 2.4 by jbarnes@sgi.com + * + * 25/11/2002 - Updated for 2.5 by Andrey Panin */ -#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 - -/* - * This is the PIIX4-based 8259 that is wired up indirectly to Cobalt - * -- not the manner expected by the normal 8259 code in irq.c. - * - * there is a 'master' physical interrupt source that gets sent to - * the CPU. But in the chipset there are various 'virtual' interrupts - * waiting to be handled. We represent this to Linux through a 'master' - * interrupt controller type, and through a special virtual interrupt- - * controller. Device drivers only see the virtual interrupt sources. - */ - -#define CO_IRQ_BASE 0x20 /* This is the 0x20 in init_IRQ()! */ - -static void startup_piix4_master_irq(unsigned int irq); -static void shutdown_piix4_master_irq(unsigned int irq); -static void do_piix4_master_IRQ(unsigned int irq, struct pt_regs * regs); -#define enable_piix4_master_irq startup_piix4_master_irq -#define disable_piix4_master_irq shutdown_piix4_master_irq +#include +#include -static struct hw_interrupt_type piix4_master_irq_type = { - "PIIX4-master", - startup_piix4_master_irq, - shutdown_piix4_master_irq, - do_piix4_master_IRQ, - enable_piix4_master_irq, - disable_piix4_master_irq -}; - -static void enable_piix4_virtual_irq(unsigned int irq); -static void disable_piix4_virtual_irq(unsigned int irq); -#define startup_piix4_virtual_irq enable_piix4_virtual_irq -#define shutdown_piix4_virtual_irq disable_piix4_virtual_irq - -static struct hw_interrupt_type piix4_virtual_irq_type = { - "PIIX4-virtual", - startup_piix4_virtual_irq, - shutdown_piix4_virtual_irq, - 0, /* no handler, it's never called physically */ - enable_piix4_virtual_irq, - disable_piix4_virtual_irq -}; - -/* - * This is the SGI Cobalt (IO-)APIC: - */ +#include "cobalt.h" +#include "irq_vectors.h" -static void do_cobalt_IRQ(unsigned int irq, struct pt_regs * regs); -static void enable_cobalt_irq(unsigned int irq); -static void disable_cobalt_irq(unsigned int irq); -static void startup_cobalt_irq(unsigned int irq); -#define shutdown_cobalt_irq disable_cobalt_irq -static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED; +int irq_vector[NR_IRQS] = { FIRST_EXTERNAL_VECTOR, 0 }; -static struct hw_interrupt_type cobalt_irq_type = { - "Cobalt-APIC", - startup_cobalt_irq, - shutdown_cobalt_irq, - do_cobalt_IRQ, - enable_cobalt_irq, - disable_cobalt_irq -}; +static spinlock_t cobalt_lock = SPIN_LOCK_UNLOCKED; /* - * Not an __init, needed by the reboot code + * Set the given Cobalt APIC Redirection Table entry to point + * to the given IDT vector/index. */ -void disable_IO_APIC(void) +static inline void co_apic_set(int entry, int irq) { - /* Nop on Cobalt */ -} + co_apic_write(CO_APIC_LO(entry), CO_APIC_LEVEL | irq_vector[irq]); + co_apic_write(CO_APIC_HI(entry), 0); +} /* * Cobalt (IO)-APIC functions to handle PCI devices. */ - -static void disable_cobalt_irq(unsigned int irq) +static inline int co_apic_ide0_hack(void) { - /* XXX undo the APIC entry here? */ + extern char visws_board_type; + extern char visws_board_rev; - /* - * definitely, we do not want to have IRQ storms from - * unused devices --mingo - */ + if (visws_board_type == VISWS_320 && visws_board_rev == 5) + return 5; + return CO_APIC_IDE0; } -static void enable_cobalt_irq(unsigned int irq) +static int is_co_apic(unsigned int irq) { + if (IS_CO_APIC(irq)) + return CO_APIC(irq); + + switch (irq) { + case 0: return CO_APIC_CPU; + case CO_IRQ_IDE0: return co_apic_ide0_hack(); + case CO_IRQ_IDE1: return CO_APIC_IDE1; + default: return -1; + } } + /* - * Set the given Cobalt APIC Redirection Table entry to point - * to the given IDT vector/index. + * This is the SGI Cobalt (IO-)APIC: */ -static void co_apic_set(int entry, int idtvec) + +static void enable_cobalt_irq(unsigned int irq) { - co_apic_write(CO_APIC_LO(entry), CO_APIC_LEVEL | (CO_IRQ_BASE+idtvec)); - co_apic_write(CO_APIC_HI(entry), 0); + co_apic_set(is_co_apic(irq), irq); +} - printk("Cobalt APIC Entry %d IDT Vector %d\n", entry, idtvec); +static void disable_cobalt_irq(unsigned int irq) +{ + int entry = is_co_apic(irq); + + co_apic_write(CO_APIC_LO(entry), CO_APIC_MASK); + co_apic_read(CO_APIC_LO(entry)); } /* * "irq" really just serves to identify the device. Here is where we * map this to the Cobalt APIC entry where it's physically wired. - * This is called via request_irq -> setup_x86_irq -> irq_desc->startup() + * This is called via request_irq -> setup_irq -> irq_desc->startup() */ -static void startup_cobalt_irq(unsigned int irq) +static unsigned int startup_cobalt_irq(unsigned int irq) { - /* - * These "irq"'s are wired to the same Cobalt APIC entries - * for all (known) motherboard types/revs - */ - switch (irq) { - case CO_IRQ_TIMER: co_apic_set(CO_APIC_CPU, CO_IRQ_TIMER); - return; + unsigned long flags; - case CO_IRQ_ENET: co_apic_set(CO_APIC_ENET, CO_IRQ_ENET); - return; + spin_lock_irqsave(&cobalt_lock, flags); + if ((irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS | IRQ_WAITING))) + irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS | IRQ_WAITING); + enable_cobalt_irq(irq); + spin_unlock_irqrestore(&cobalt_lock, flags); + return 0; +} - case CO_IRQ_SERIAL: return; /* XXX move to piix4-8259 "virtual" */ +static void ack_cobalt_irq(unsigned int irq) +{ + unsigned long flags; - case CO_IRQ_8259: co_apic_set(CO_APIC_8259, CO_IRQ_8259); - return; - - case CO_IRQ_IDE: - switch (visws_board_type) { - case VISWS_320: - switch (visws_board_rev) { - case 5: - co_apic_set(CO_APIC_0_5_IDE0, CO_IRQ_IDE); - co_apic_set(CO_APIC_0_5_IDE1, CO_IRQ_IDE); - return; - case 6: - co_apic_set(CO_APIC_0_6_IDE0, CO_IRQ_IDE); - co_apic_set(CO_APIC_0_6_IDE1, CO_IRQ_IDE); - return; - } - case VISWS_540: - switch (visws_board_rev) { - case 2: - co_apic_set(CO_APIC_1_2_IDE0, CO_IRQ_IDE); - return; - } - } - break; - default: - panic("huh?"); - } + spin_lock_irqsave(&cobalt_lock, flags); + disable_cobalt_irq(irq); + apic_write(APIC_EOI, APIC_EIO_ACK); + spin_unlock_irqrestore(&cobalt_lock, flags); } +static void end_cobalt_irq(unsigned int irq) +{ + unsigned long flags; + + spin_lock_irqsave(&cobalt_lock, flags); + if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + enable_cobalt_irq(irq); + spin_unlock_irqrestore(&cobalt_lock, flags); +} + +static struct hw_interrupt_type cobalt_irq_type = { + .typename = "Cobalt-APIC", + .startup = startup_cobalt_irq, + .shutdown = disable_cobalt_irq, + .enable = enable_cobalt_irq, + .disable = disable_cobalt_irq, + .ack = ack_cobalt_irq, + .end = end_cobalt_irq, +}; + + /* - * This is the handle() op in do_IRQ() + * This is the PIIX4-based 8259 that is wired up indirectly to Cobalt + * -- not the manner expected by the code in i8259.c. + * + * there is a 'master' physical interrupt source that gets sent to + * the CPU. But in the chipset there are various 'virtual' interrupts + * waiting to be handled. We represent this to Linux through a 'master' + * interrupt controller type, and through a special virtual interrupt- + * controller. Device drivers only see the virtual interrupt sources. */ -static void do_cobalt_IRQ(unsigned int irq, struct pt_regs * regs) +static unsigned int startup_piix4_master_irq(unsigned int irq) { - struct irqaction * action; - irq_desc_t *desc = irq_desc + irq; + init_8259A(0); - spin_lock(&irq_controller_lock); - { - unsigned int status; - /* XXX APIC EOI? */ - status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING); - action = NULL; - if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) { - action = desc->action; - status |= IRQ_INPROGRESS; - } - desc->status = status; - } - spin_unlock(&irq_controller_lock); + return startup_cobalt_irq(irq); +} - /* Exit early if we had no action or it was disabled */ - if (!action) - return; - - handle_IRQ_event(irq, regs, action); - - (void)co_cpu_read(CO_CPU_REV); /* Sync driver ack to its h/w */ - apic_write(APIC_EOI, APIC_EIO_ACK); /* Send EOI to Cobalt APIC */ - - spin_lock(&irq_controller_lock); - { - unsigned int status = desc->status & ~IRQ_INPROGRESS; - desc->status = status; - if (!(status & IRQ_DISABLED)) - enable_cobalt_irq(irq); - } - spin_unlock(&irq_controller_lock); +static void end_piix4_master_irq(unsigned int irq) +{ + unsigned long flags; + + spin_lock_irqsave(&cobalt_lock, flags); + enable_cobalt_irq(irq); + spin_unlock_irqrestore(&cobalt_lock, flags); } +static struct hw_interrupt_type piix4_master_irq_type = { + .typename = "PIIX4-master", + .startup = startup_piix4_master_irq, + .ack = ack_cobalt_irq, + .end = end_piix4_master_irq, +}; + + +static struct hw_interrupt_type piix4_virtual_irq_type = { + .typename = "PIIX4-virtual", + .startup = startup_8259A_irq, + .shutdown = disable_8259A_irq, + .enable = enable_8259A_irq, + .disable = disable_8259A_irq, +}; + + /* - * PIIX4-8259 master/virtual functions to handle: - * - * floppy - * parallel - * serial - * audio (?) + * PIIX4-8259 master/virtual functions to handle interrupt requests + * from legacy devices: floppy, parallel, serial, rtc. * * None of these get Cobalt APIC entries, neither do they have IDT * entries. These interrupts are purely virtual and distributed from @@ -250,161 +196,112 @@ * enable_irq gets the right irq. This 'master' irq is never directly * manipulated by any driver. */ - -static void startup_piix4_master_irq(unsigned int irq) +static void piix4_master_intr(int irq, void *dev_id, struct pt_regs * regs) { - /* ICW1 */ - outb(0x11, 0x20); - outb(0x11, 0xa0); + int realirq; + irq_desc_t *desc; + unsigned long flags; - /* ICW2 */ - outb(0x08, 0x21); - outb(0x70, 0xa1); + spin_lock_irqsave(&i8259A_lock, flags); - /* ICW3 */ - outb(0x04, 0x21); - outb(0x02, 0xa1); - - /* ICW4 */ - outb(0x01, 0x21); - outb(0x01, 0xa1); - - /* OCW1 - disable all interrupts in both 8259's */ - outb(0xff, 0x21); - outb(0xff, 0xa1); - - startup_cobalt_irq(irq); -} + /* Find out what's interrupting in the PIIX4 master 8259 */ + outb(0x0c, 0x20); /* OCW3 Poll command */ + realirq = inb(0x20); -static void shutdown_piix4_master_irq(unsigned int irq) -{ /* - * [we skip the 8259 magic here, not strictly necessary] + * Bit 7 == 0 means invalid/spurious */ + if (unlikely(!(realirq & 0x80))) + goto out_unlock; - shutdown_cobalt_irq(irq); -} - -static void do_piix4_master_IRQ(unsigned int irq, struct pt_regs * regs) -{ - int realirq, mask; + realirq &= 7; - /* Find out what's interrupting in the PIIX4 8259 */ + if (unlikely(realirq == 2)) { + outb(0x0c, 0xa0); + realirq = inb(0xa0); - spin_lock(&irq_controller_lock); - outb(0x0c, 0x20); /* OCW3 Poll command */ - realirq = inb(0x20); + if (unlikely(!(realirq & 0x80))) + goto out_unlock; - if (!(realirq & 0x80)) { - /* - * Bit 7 == 0 means invalid/spurious - */ - goto out_unlock; + realirq = (realirq & 7) + 8; } - realirq &= 0x7f; - /* - * mask and ack the 8259 - */ - mask = inb(0x21); - if ((mask >> realirq) & 0x01) - /* - * This IRQ is masked... ignore - */ - goto out_unlock; + /* mask and ack interrupt */ + cached_irq_mask |= 1 << realirq; + if (unlikely(realirq > 7)) { + inb(0xa1); + outb(cached_A1, 0xa1); + outb(0x60 + (realirq & 7), 0xa0); + outb(0x60 + 2, 0x20); + } else { + inb(0x21); + outb(cached_21, 0x21); + outb(0x60 + realirq, 0x20); + } - outb(mask | (1<action != NULL)) + handle_IRQ_event(realirq, regs, desc->action); + + if (!(desc->status & IRQ_DISABLED)) + enable_8259A_irq(realirq); - if (!(desc->status & IRQ_DISABLED)) - enable_piix4_virtual_irq(realirq); - } - spin_unlock(&irq_controller_lock); return; out_unlock: - spin_unlock(&irq_controller_lock); + spin_unlock_irqrestore(&i8259A_lock, flags); return; } -static void enable_piix4_virtual_irq(unsigned int irq) -{ - /* - * assumes this irq is one of the legacy devices - */ - - unsigned int mask = inb(0x21); - mask &= ~(1 << irq); - outb(mask, 0x21); - enable_cobalt_irq(irq); -} - -/* - * assumes this irq is one of the legacy devices - */ -static void disable_piix4_virtual_irq(unsigned int irq) -{ - unsigned int mask; - - disable_cobalt_irq(irq); +static struct irqaction master_action = { + .handler = piix4_master_intr, + .name = "PIIX4-8259", +}; - mask = inb(0x21); - mask &= ~(1 << irq); - outb(mask, 0x21); -} +static struct irqaction cascade_action = { + .handler = no_action, + .name = "cascade", +}; -static struct irqaction master_action = - { no_action, 0, 0, "PIIX4-8259", NULL, NULL }; void init_VISWS_APIC_irqs(void) { int i; - for (i = 0; i < 16; i++) { + for (i = 0; i < CO_IRQ_APIC0 + CO_APIC_LAST + 1; i++) { irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - /* - * Cobalt IRQs are mapped to standard ISA - * interrupt vectors: - */ - switch (i) { - /* - * Only CO_IRQ_8259 will be raised - * externally. - */ - case CO_IRQ_8259: + if (i == 0) { + irq_desc[i].handler = &cobalt_irq_type; + } + else if (i == CO_IRQ_IDE0) { + irq_desc[i].handler = &cobalt_irq_type; + } + else if (i == CO_IRQ_IDE1) { + irq_desc[i].handler = &cobalt_irq_type; + } + else if (i == CO_IRQ_8259) { irq_desc[i].handler = &piix4_master_irq_type; - break; - case CO_IRQ_FLOPPY: - case CO_IRQ_PARLL: + } + else if (i < CO_IRQ_APIC0) { irq_desc[i].handler = &piix4_virtual_irq_type; - break; - default: + } + else if (IS_CO_APIC(i)) { irq_desc[i].handler = &cobalt_irq_type; - break; } + irq_vector[i] = i + FIRST_EXTERNAL_VECTOR; } - /* - * The master interrupt is always present: - */ - setup_x86_irq(CO_IRQ_8259, &master_action); + setup_irq(CO_IRQ_8259, &master_action); + setup_irq(2, &cascade_action); } - diff -Nru a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c --- a/arch/i386/mach-voyager/voyager_smp.c Sun Feb 23 22:25:23 2003 +++ b/arch/i386/mach-voyager/voyager_smp.c Sun Feb 23 22:25:23 2003 @@ -234,9 +234,9 @@ static __u32 trampoline_base; /* The per cpu profile stuff - used in smp_local_timer_interrupt */ -static unsigned int prof_multiplier[NR_CPUS] __cacheline_aligned = { 1, }; -static unsigned int prof_old_multiplier[NR_CPUS] __cacheline_aligned = { 1, }; -static DEFINE_PER_CPU(unsigned int, prof_counter) = 1; +static DEFINE_PER_CPU(int, prof_multiplier) = 1; +static DEFINE_PER_CPU(int, prof_old_multiplier) = 1; +static DEFINE_PER_CPU(int, prof_counter) = 1; /* the map used to check if a CPU has booted */ static __u32 cpu_booted_map; @@ -1318,10 +1318,12 @@ * * Interrupts are already masked off at this point. */ - per_cpu(prof_counter,cpu) = prof_multiplier[cpu]; - if (per_cpu(prof_counter, cpu) != prof_old_multiplier[cpu]) { + per_cpu(prof_counter,cpu) = per_cpu(prof_multiplier, cpu); + if (per_cpu(prof_counter, cpu) != + per_cpu(prof_old_multiplier, cpu)) { /* FIXME: need to update the vic timer tick here */ - prof_old_multiplier[cpu] = per_cpu(prof_counter, cpu); + per_cpu(prof_old_multiplier, cpu) = + per_cpu(prof_counter, cpu); } update_process_times(user_mode(regs)); @@ -1406,7 +1408,7 @@ * accounting. */ for (i = 0; i < NR_CPUS; ++i) - prof_multiplier[i] = multiplier; + per_cpu(prof_multiplier, i) = multiplier; return 0; } diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c --- a/arch/i386/mm/hugetlbpage.c Sun Feb 23 22:25:26 2003 +++ b/arch/i386/mm/hugetlbpage.c Sun Feb 23 22:25:26 2003 @@ -71,8 +71,6 @@ return (pte_t *) pmd; } -#define mk_pte_huge(entry) {entry.pte_low |= (_PAGE_PRESENT | _PAGE_PSE);} - static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, struct page *page, pte_t * page_table, int write_access) { pte_t entry; diff -Nru a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile --- a/arch/i386/pci/Makefile Sun Feb 23 22:25:24 2003 +++ b/arch/i386/pci/Makefile Sun Feb 23 22:25:24 2003 @@ -3,6 +3,8 @@ obj-$(CONFIG_PCI_BIOS) += pcbios.o obj-$(CONFIG_PCI_DIRECT) += direct.o +obj-$(CONFIG_X86_VISWS) += visws.o + ifdef CONFIG_X86_NUMAQ obj-y += numa.o else @@ -11,8 +13,15 @@ ifdef CONFIG_ACPI_PCI obj-y += acpi.o endif -obj-y += legacy.o +ifndef CONFIG_X86_VISWS +obj-y += legacy.o +endif endif # CONFIG_X86_NUMAQ -obj-y += irq.o common.o + +ifndef CONFIG_X86_VISWS +obj-y += irq.o +endif + +obj-y += common.o diff -Nru a/arch/i386/pci/common.c b/arch/i386/pci/common.c --- a/arch/i386/pci/common.c Sun Feb 23 22:25:23 2003 +++ b/arch/i386/pci/common.c Sun Feb 23 22:25:23 2003 @@ -180,13 +180,8 @@ return NULL; } #endif - else if (!strcmp(str, "rom")) { - pci_probe |= PCI_ASSIGN_ROMS; - return NULL; - } else if (!strcmp(str, "assign-busses")) { - pci_probe |= PCI_ASSIGN_ALL_BUSSES; - return NULL; - } else if (!strcmp(str, "usepirqmask")) { +#ifndef CONFIG_X86_VISWS + else if (!strcmp(str, "usepirqmask")) { pci_probe |= PCI_USE_PIRQ_MASK; return NULL; } else if (!strncmp(str, "irqmask=", 8)) { @@ -194,6 +189,14 @@ return NULL; } else if (!strncmp(str, "lastbus=", 8)) { pcibios_last_bus = simple_strtol(str+8, NULL, 0); + return NULL; + } +#endif + else if (!strcmp(str, "rom")) { + pci_probe |= PCI_ASSIGN_ROMS; + return NULL; + } else if (!strcmp(str, "assign-busses")) { + pci_probe |= PCI_ASSIGN_ALL_BUSSES; return NULL; } return str; diff -Nru a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c --- a/arch/i386/pci/direct.c Sun Feb 23 22:25:22 2003 +++ b/arch/i386/pci/direct.c Sun Feb 23 22:25:22 2003 @@ -83,7 +83,7 @@ PCI_FUNC(devfn), where, size, value); } -static struct pci_ops pci_direct_conf1 = { +struct pci_ops pci_direct_conf1 = { .read = pci_conf1_read, .write = pci_conf1_write, }; @@ -196,21 +196,35 @@ static int __devinit pci_sanity_check(struct pci_ops *o) { u32 x = 0; - struct pci_bus bus; /* Fake bus and device */ - struct pci_dev dev; + int retval = 0; + struct pci_bus *bus; /* Fake bus and device */ + struct pci_dev *dev; if (pci_probe & PCI_NO_CHECKS) return 1; - bus.number = 0; - dev.bus = &bus; - for(dev.devfn=0; dev.devfn < 0x100; dev.devfn++) - if ((!o->read(&bus, dev.devfn, PCI_CLASS_DEVICE, 2, &x) && + + bus = kmalloc(sizeof(*bus), GFP_ATOMIC); + dev = kmalloc(sizeof(*dev), GFP_ATOMIC); + if (!bus || !dev) { + printk(KERN_ERR "Out of memory in %s\n", __FUNCTION__); + goto exit; + } + + bus->number = 0; + dev->bus = bus; + for(dev->devfn=0; dev->devfn < 0x100; dev->devfn++) + if ((!o->read(bus, dev->devfn, PCI_CLASS_DEVICE, 2, &x) && (x == PCI_CLASS_BRIDGE_HOST || x == PCI_CLASS_DISPLAY_VGA)) || - (!o->read(&bus, dev.devfn, PCI_VENDOR_ID, 2, &x) && - (x == PCI_VENDOR_ID_INTEL || x == PCI_VENDOR_ID_COMPAQ))) - return 1; + (!o->read(bus, dev->devfn, PCI_VENDOR_ID, 2, &x) && + (x == PCI_VENDOR_ID_INTEL || x == PCI_VENDOR_ID_COMPAQ))) { + retval = 1; + goto exit; + } DBG("PCI: Sanity check failed\n"); - return 0; +exit: + kfree(dev); + kfree(bus); + return retval; } static int __init pci_direct_init(void) diff -Nru a/arch/i386/pci/legacy.c b/arch/i386/pci/legacy.c --- a/arch/i386/pci/legacy.c Sun Feb 23 22:25:26 2003 +++ b/arch/i386/pci/legacy.c Sun Feb 23 22:25:26 2003 @@ -12,28 +12,39 @@ static void __devinit pcibios_fixup_peer_bridges(void) { int n; - struct pci_bus bus; - struct pci_dev dev; + struct pci_bus *bus; + struct pci_dev *dev; u16 l; if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff) return; DBG("PCI: Peer bridge fixup\n"); + + bus = kmalloc(sizeof(*bus), GFP_ATOMIC); + dev = kmalloc(sizeof(*dev), GFP_ATOMIC); + if (!bus || !dev) { + printk(KERN_ERR "Out of memory in %s\n", __FUNCTION__); + goto exit; + } + for (n=0; n <= pcibios_last_bus; n++) { if (pci_bus_exists(&pci_root_buses, n)) continue; - bus.number = n; - bus.ops = pci_root_ops; - dev.bus = &bus; - for(dev.devfn=0; dev.devfn<256; dev.devfn += 8) - if (!pci_read_config_word(&dev, PCI_VENDOR_ID, &l) && + bus->number = n; + bus->ops = pci_root_ops; + dev->bus = bus; + for (dev->devfn=0; dev->devfn<256; dev->devfn += 8) + if (!pci_read_config_word(dev, PCI_VENDOR_ID, &l) && l != 0x0000 && l != 0xffff) { - DBG("Found device at %02x:%02x [%04x]\n", n, dev.devfn, l); + DBG("Found device at %02x:%02x [%04x]\n", n, dev->devfn, l); printk(KERN_INFO "PCI: Discovered peer bus %02x\n", n); pci_scan_bus(n, pci_root_ops, NULL); break; } } +exit: + kfree(dev); + kfree(bus); } static int __init pci_legacy_init(void) diff -Nru a/arch/i386/pci/visws.c b/arch/i386/pci/visws.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/pci/visws.c Sun Feb 23 22:25:25 2003 @@ -0,0 +1,111 @@ +/* + * Low-Level PCI Support for SGI Visual Workstation + * + * (c) 1999--2000 Martin Mares + */ + +#include +#include +#include +#include + +#include "cobalt.h" +#include "lithium.h" + +#include "pci.h" + + +int broken_hp_bios_irq9; + +extern struct pci_ops pci_direct_conf1; + +static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; } + +int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq; + +void __init pcibios_penalize_isa_irq(int irq) {} + + +unsigned int pci_bus0, pci_bus1; + +static inline u8 bridge_swizzle(u8 pin, u8 slot) +{ + return (((pin - 1) + slot) % 4) + 1; +} + +static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp) +{ + u8 pin = *pinp; + + while (dev->bus->self) { /* Move up the chain of bridges. */ + pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); + dev = dev->bus->self; + } + *pinp = pin; + + return PCI_SLOT(dev->devfn); +} + +static int __init visws_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq, bus = dev->bus->number; + + pin--; + + /* Nothing usefull at PIIX4 pin 1 */ + if (bus == pci_bus0 && slot == 4 && pin == 0) + return -1; + + /* PIIX4 USB is on Bus 0, Slot 4, Line 3 */ + if (bus == pci_bus0 && slot == 4 && pin == 3) { + irq = CO_IRQ(CO_APIC_PIIX4_USB); + goto out; + } + + /* First pin spread down 1 APIC entry per slot */ + if (pin == 0) { + irq = CO_IRQ((bus == pci_bus0 ? CO_APIC_PCIB_BASE0 : + CO_APIC_PCIA_BASE0) + slot); + goto out; + } + + /* lines 1,2,3 from any slot is shared in this twirly pattern */ + if (bus == pci_bus1) { + /* lines 1-3 from devices 0 1 rotate over 2 apic entries */ + irq = CO_IRQ(CO_APIC_PCIA_BASE123 + ((slot + (pin - 1)) % 2)); + } else { /* bus == pci_bus0 */ + /* lines 1-3 from devices 0-3 rotate over 3 apic entries */ + if (slot == 0) + slot = 3; /* same pattern */ + irq = CO_IRQ(CO_APIC_PCIA_BASE123 + ((3 - slot) + (pin - 1) % 3)); + } +out: + printk(KERN_DEBUG "PCI: Bus %d Slot %d Line %d -> IRQ %d\n", bus, slot, pin, irq); + return irq; +} + +void __init pcibios_update_irq(struct pci_dev *dev, int irq) +{ + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); +} + +static int __init pcibios_init(void) +{ + /* The VISWS supports configuration access type 1 only */ + pci_probe = (pci_probe | PCI_PROBE_CONF1) & + ~(PCI_PROBE_BIOS | PCI_PROBE_CONF2); + + pci_bus0 = li_pcib_read16(LI_PCI_BUSNUM) & 0xff; + pci_bus1 = li_pcia_read16(LI_PCI_BUSNUM) & 0xff; + + printk(KERN_INFO "PCI: Lithium bridge A bus: %u, " + "bridge B (PIIX4) bus: %u\n", pci_bus1, pci_bus0); + + pci_scan_bus(pci_bus0, &pci_direct_conf1, NULL); + pci_scan_bus(pci_bus1, &pci_direct_conf1, NULL); + pci_fixup_irqs(visws_swizzle, visws_map_irq); + pcibios_resource_survey(); + return 0; +} + +subsys_initcall(pcibios_init); diff -Nru a/arch/i386/vmlinux.lds.S b/arch/i386/vmlinux.lds.S --- a/arch/i386/vmlinux.lds.S Sun Feb 23 22:25:22 2003 +++ b/arch/i386/vmlinux.lds.S Sun Feb 23 22:25:22 2003 @@ -6,7 +6,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) -ENTRY(_start) +ENTRY(startup_32) jiffies = jiffies_64; SECTIONS { diff -Nru a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c --- a/arch/ia64/hp/sim/simeth.c Sun Feb 23 22:25:25 2003 +++ b/arch/ia64/hp/sim/simeth.c Sun Feb 23 22:25:25 2003 @@ -149,7 +149,7 @@ static inline int netdev_attach(int fd, int irq, unsigned int ipaddr) { - /* this puts the host interface in the right mode (start interupting) */ + /* this puts the host interface in the right mode (start interrupting) */ return ia64_ssc(fd, ipaddr, 0,0, SSC_NETDEV_ATTACH); } diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c --- a/arch/ia64/ia32/sys_ia32.c Sun Feb 23 22:25:25 2003 +++ b/arch/ia64/ia32/sys_ia32.c Sun Feb 23 22:25:25 2003 @@ -4063,7 +4063,7 @@ return err; } -/* Handle adjtimex compatability. */ +/* Handle adjtimex compatibility. */ struct timex32 { u32 modes; diff -Nru a/arch/ia64/sn/io/l1.c b/arch/ia64/sn/io/l1.c --- a/arch/ia64/sn/io/l1.c Sun Feb 23 22:25:26 2003 +++ b/arch/ia64/sn/io/l1.c Sun Feb 23 22:25:26 2003 @@ -2734,7 +2734,7 @@ * bigger. * * Be careful using the same buffer for both cmd and resp; it could get - * hairy if there were ever an L1 command reqeuest that spanned multiple + * hairy if there were ever an L1 command request that spanned multiple * packets. (On the other hand, that would require some additional * rewriting of the L1 command interface anyway.) */ diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c Sun Feb 23 22:25:27 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c Sun Feb 23 22:25:27 2003 @@ -3505,7 +3505,7 @@ } else xio_port = pcibr_dmamap->bd_xio_port; - /* If this DMA is to an addres that + /* If this DMA is to an address that * refers back to this Bridge chip, * reduce it back to the correct * PCI MEM address. diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c Sun Feb 23 22:25:21 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c Sun Feb 23 22:25:21 2003 @@ -1874,7 +1874,7 @@ BRIDGE_ERRUPPR_ADDRMASK) << 32))); /* - * need to ensure that the xtalk adress in ioe + * need to ensure that the xtalk address in ioe * maps to PCI error address read from bridge. * How to convert PCI address back to Xtalk address ? * (better idea: convert XTalk address to PCI address diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c Sun Feb 23 22:25:27 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c Sun Feb 23 22:25:27 2003 @@ -272,7 +272,7 @@ * the old do_pcibr_rrb_free() code only clears the enable bit * but I say we should clear the whole rrb (ie): * reg = reg & ~(RRB_MASK << (RRB_SIZE * rrb_index)); - * But to be compatable with old code we'll only clear enable. + * But to be compatible with old code we'll only clear enable. */ reg = reg & ~(RRB_ENABLE_BIT(bridge) << (RRB_SIZE * rrb_index)); clr = clr | (enable_bit << (RRB_SIZE * rrb_index)); diff -Nru a/arch/ia64/sn/io/xbow.c b/arch/ia64/sn/io/xbow.c --- a/arch/ia64/sn/io/xbow.c Sun Feb 23 22:25:21 2003 +++ b/arch/ia64/sn/io/xbow.c Sun Feb 23 22:25:21 2003 @@ -305,7 +305,7 @@ /* * get the name of this xbow vertex and keep the info. - * This is needed during errors and interupts, but as + * This is needed during errors and interrupts, but as * long as we have it, we can use it elsewhere. */ s = dev_to_name(vhdl, devnm, MAXDEVNAME); diff -Nru a/arch/ia64/sn/io/xtalk.c b/arch/ia64/sn/io/xtalk.c --- a/arch/ia64/sn/io/xtalk.c Sun Feb 23 22:25:22 2003 +++ b/arch/ia64/sn/io/xtalk.c Sun Feb 23 22:25:22 2003 @@ -890,7 +890,7 @@ widget_info->w_einfo = 0; /* * get the name of this xwidget vertex and keep the info. - * This is needed during errors and interupts, but as + * This is needed during errors and interrupts, but as * long as we have it, we can use it elsewhere. */ s = dev_to_name(widget,devnm,MAXDEVNAME); diff -Nru a/arch/m68k/ifpsp060/src/fpsp.S b/arch/m68k/ifpsp060/src/fpsp.S --- a/arch/m68k/ifpsp060/src/fpsp.S Sun Feb 23 22:25:26 2003 +++ b/arch/m68k/ifpsp060/src/fpsp.S Sun Feb 23 22:25:26 2003 @@ -22147,7 +22147,7 @@ add_ext: addq.l &1,FTEMP_LO(%a0) # add 1 to l-bit bcc.b xcc_clr # test for carry out - addq.l &1,FTEMP_HI(%a0) # propogate carry + addq.l &1,FTEMP_HI(%a0) # propagate carry bcc.b xcc_clr roxr.w FTEMP_HI(%a0) # mant is 0 so restore v-bit roxr.w FTEMP_HI+2(%a0) # mant is 0 so restore v-bit @@ -22167,7 +22167,7 @@ add_dbl: add.l &ad_1_dbl, FTEMP_LO(%a0) # add 1 to lsb bcc.b dcc_clr # no carry - addq.l &0x1, FTEMP_HI(%a0) # propogate carry + addq.l &0x1, FTEMP_HI(%a0) # propagate carry bcc.b dcc_clr # no carry roxr.w FTEMP_HI(%a0) # mant is 0 so restore v-bit diff -Nru a/arch/m68k/ifpsp060/src/isp.S b/arch/m68k/ifpsp060/src/isp.S --- a/arch/m68k/ifpsp060/src/isp.S Sun Feb 23 22:25:22 2003 +++ b/arch/m68k/ifpsp060/src/isp.S Sun Feb 23 22:25:22 2003 @@ -2625,7 +2625,7 @@ addx.l %d7, %d4 # add carry to hi(result) # the result is saved to the register file. -# for '040 compatability, if Dl == Dh then only the hi(result) is +# for '040 compatibility, if Dl == Dh then only the hi(result) is # saved. so, saving hi after lo accomplishes this without need to # check Dl,Dh equality. mul64_done: diff -Nru a/arch/m68k/ifpsp060/src/pfpsp.S b/arch/m68k/ifpsp060/src/pfpsp.S --- a/arch/m68k/ifpsp060/src/pfpsp.S Sun Feb 23 22:25:22 2003 +++ b/arch/m68k/ifpsp060/src/pfpsp.S Sun Feb 23 22:25:22 2003 @@ -6269,7 +6269,7 @@ add_ext: addq.l &1,FTEMP_LO(%a0) # add 1 to l-bit bcc.b xcc_clr # test for carry out - addq.l &1,FTEMP_HI(%a0) # propogate carry + addq.l &1,FTEMP_HI(%a0) # propagate carry bcc.b xcc_clr roxr.w FTEMP_HI(%a0) # mant is 0 so restore v-bit roxr.w FTEMP_HI+2(%a0) # mant is 0 so restore v-bit @@ -6289,7 +6289,7 @@ add_dbl: add.l &ad_1_dbl, FTEMP_LO(%a0) # add 1 to lsb bcc.b dcc_clr # no carry - addq.l &0x1, FTEMP_HI(%a0) # propogate carry + addq.l &0x1, FTEMP_HI(%a0) # propagate carry bcc.b dcc_clr # no carry roxr.w FTEMP_HI(%a0) # mant is 0 so restore v-bit diff -Nru a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S --- a/arch/m68k/kernel/head.S Sun Feb 23 22:25:27 2003 +++ b/arch/m68k/kernel/head.S Sun Feb 23 22:25:27 2003 @@ -92,7 +92,7 @@ * mmu_map was written for two key reasons. First, it was clear * that it was very difficult to read the previous code for mapping * regions of memory. Second, the Macintosh required such extensive - * memory allocations that it didn't make sense to propogate the + * memory allocations that it didn't make sense to propagate the * existing code any further. * mmu_map requires some parameters: * diff -Nru a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig --- a/arch/m68knommu/Kconfig Sun Feb 23 22:25:25 2003 +++ b/arch/m68knommu/Kconfig Sun Feb 23 22:25:25 2003 @@ -379,11 +379,6 @@ help Set RAM size to be 4MiB. -config RAM4MB - bool "4MiB" - help - Set RAM size to be 4MiB. - config RAM8MB bool "8MiB" help diff -Nru a/arch/m68knommu/kernel/init_task.c b/arch/m68knommu/kernel/init_task.c --- a/arch/m68knommu/kernel/init_task.c Sun Feb 23 22:25:23 2003 +++ b/arch/m68knommu/kernel/init_task.c Sun Feb 23 22:25:23 2003 @@ -13,6 +13,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/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c --- a/arch/m68knommu/kernel/signal.c Sun Feb 23 22:25:25 2003 +++ b/arch/m68knommu/kernel/signal.c Sun Feb 23 22:25:25 2003 @@ -783,7 +783,7 @@ /* Restart the system call the same way as if the process were not traced. */ struct k_sigaction *ka = - ¤t->sig->action[signr-1]; + ¤t->sighand->action[signr-1]; int has_handler = (ka->sa.sa_handler != SIG_IGN && ka->sa.sa_handler != SIG_DFL); @@ -819,7 +819,7 @@ } } - ka = ¤t->sig->action[signr-1]; + ka = ¤t->sighand->action[signr-1]; if (ka->sa.sa_handler == SIG_IGN) { if (signr != SIGCHLD) continue; @@ -848,8 +848,7 @@ case SIGSTOP: current->state = TASK_STOPPED; current->exit_code = signr; - if (!(current->parent->sig->action[SIGCHLD-1] - .sa.sa_flags & SA_NOCLDSTOP)) + if (!(current->parent->sighand->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP)) notify_parent(current, SIGCHLD); schedule(); continue; diff -Nru a/arch/m68knommu/mm/Makefile b/arch/m68knommu/mm/Makefile --- a/arch/m68knommu/mm/Makefile Sun Feb 23 22:25:27 2003 +++ b/arch/m68knommu/mm/Makefile Sun Feb 23 22:25:27 2003 @@ -2,4 +2,4 @@ # Makefile for the linux m68knommu specific parts of the memory manager. # -obj-y += init.o fault.o memory.o kmap.o +obj-y += init.o fault.o memory.o kmap.o extable.o diff -Nru a/arch/m68knommu/mm/extable.c b/arch/m68knommu/mm/extable.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/m68knommu/mm/extable.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,30 @@ +/* + * linux/arch/m68knommu/mm/extable.c + */ + +#include +#include +#include +#include + +/* Simple binary search */ +const struct exception_table_entry * +search_extable(const struct exception_table_entry *first, + const struct exception_table_entry *last, + unsigned long value) +{ + while (first <= last) { + const struct exception_table_entry *mid; + long diff; + + mid = (last - first) / 2 + first; + diff = mid->insn - value; + if (diff == 0) + return mid; + else if (diff < 0) + first = mid+1; + else + last = mid-1; + } + return NULL; +} diff -Nru a/arch/m68knommu/platform/5307/vectors.c b/arch/m68knommu/platform/5307/vectors.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/m68knommu/platform/5307/vectors.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,94 @@ +/***************************************************************************/ + +/* + * linux/arch/m68knommu/platform/5307/vectors.c + * + * Copyright (C) 1999-2003, Greg Ungerer + */ + +/***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/***************************************************************************/ + +#ifdef TRAP_DBG_INTERRUPT + +asmlinkage void dbginterrupt_c(struct frame *fp) +{ + extern void dump(struct pt_regs *fp); + printk("%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__); + dump((struct pt_regs *) fp); + asm("halt"); +} + +#endif + +/***************************************************************************/ + +extern e_vector *_ramvec; + +void set_evector(int vecnum, void (*handler)(void)) +{ + if (vecnum >= 0 && vecnum <= 255) + _ramvec[vecnum] = handler; +} + +/***************************************************************************/ + +/* Assembler routines */ +asmlinkage void buserr(void); +asmlinkage void trap(void); +asmlinkage void system_call(void); +asmlinkage void inthandler(void); + +void __init coldfire_trap_init(void) +{ + int i; + + /* + * There is a common trap handler and common interrupt + * handler that handle almost every vector. We treat + * the system call and bus error special, they get their + * own first level handlers. + */ + for (i = 3; (i <= 23); i++) + _ramvec[i] = trap; + for (i = 33; (i <= 63); i++) + _ramvec[i] = trap; + for (i = 24; (i <= 31); i++) + _ramvec[i] = inthandler; + for (i = 64; (i < 255); i++) + _ramvec[i] = inthandler; + _ramvec[255] = 0; + + _ramvec[2] = buserr; + _ramvec[32] = system_call; + +#ifdef TRAP_DBG_INTERRUPT + _ramvec[12] = dbginterrupt; +#endif +} + +/***************************************************************************/ + +void coldfire_reset(void) +{ + HARD_RESET_NOW(); +} + +/***************************************************************************/ diff -Nru a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S --- a/arch/m68knommu/platform/68328/entry.S Sun Feb 23 22:25:21 2003 +++ b/arch/m68knommu/platform/68328/entry.S Sun Feb 23 22:25:21 2003 @@ -95,7 +95,7 @@ Luser_return: /* only allow interrupts when we are really the last one on the*/ /* kernel stack, otherwise stack overflow can occur during*/ - /* heavy interupt load*/ + /* heavy interrupt load*/ andw #ALLOWINT,%sr movel %sp,%d1 /* get thread_info pointer */ diff -Nru a/arch/m68knommu/platform/68328/pilot/crt0_rom.S b/arch/m68knommu/platform/68328/pilot/crt0_rom.S --- a/arch/m68knommu/platform/68328/pilot/crt0_rom.S Sun Feb 23 22:25:26 2003 +++ b/arch/m68knommu/platform/68328/pilot/crt0_rom.S Sun Feb 23 22:25:26 2003 @@ -1,4 +1,6 @@ -/* linux/arch/m68knommu/kernel/head.S: A startup file for the MC68332 +/* + * linux/arch/m68knommu/platform/68328/pilot/crt0_rom.S + * - A startup file for the MC68332 * * Copyright (C) 1998 D. Jeff Dionne , * Kenneth Albanowski , @@ -16,8 +18,6 @@ #include .global _stext -.global __bss_start - .global _start .global _rambase @@ -81,30 +81,28 @@ movew #0x0800, 0xfffff906 /* Ignore CTS */ movew #0x010b, 0xfffff902 /* BAUD to 9600 */ - movew #0x2410, 0xfffff200 /* PLLCR */ - movew #0x123, 0xfffff202 /* PLLFSR */ + movew #0x2410, 0xfffff200 /* PLLCR */ + movew #0x123, 0xfffff202 /* PLLFSR */ #ifdef CONFIG_PILOT - moveb #0, 0xfffffA27 /* LCKCON */ + moveb #0, 0xfffffA27 /* LCKCON */ movel #_start, 0xfffffA00 /* LSSA */ - moveb #0xa, 0xfffffA05 /* LVPW */ - movew #0x9f, 0xFFFFFa08 /* LXMAX */ - movew #0x9f, 0xFFFFFa0a /* LYMAX */ - moveb #9, 0xfffffa29 /* LBAR */ - moveb #0, 0xfffffa25 /* LPXCD */ - moveb #0x04, 0xFFFFFa20 /* LPICF */ - moveb #0x58, 0xfffffA27 /* LCKCON */ - moveb #0x85, 0xfffff429 /* PFDATA */ - moveb #0xd8, 0xfffffA27 /* LCKCON */ - moveb #0xc5, 0xfffff429 /* PFDATA */ - moveb #0xd5, 0xfffff429 /* PFDATA */ + moveb #0xa, 0xfffffA05 /* LVPW */ + movew #0x9f, 0xFFFFFa08 /* LXMAX */ + movew #0x9f, 0xFFFFFa0a /* LYMAX */ + moveb #9, 0xfffffa29 /* LBAR */ + moveb #0, 0xfffffa25 /* LPXCD */ + moveb #0x04, 0xFFFFFa20 /* LPICF */ + moveb #0x58, 0xfffffA27 /* LCKCON */ + moveb #0x85, 0xfffff429 /* PFDATA */ + moveb #0xd8, 0xfffffA27 /* LCKCON */ + moveb #0xc5, 0xfffff429 /* PFDATA */ + moveb #0xd5, 0xfffff429 /* PFDATA */ moveal #0x00100000, %a3 moveal #0x100ffc00, %a4 - #endif /* CONFIG_PILOT */ - #endif /* CONFIG_M68328 */ movew #0x2700, %sr @@ -126,7 +124,7 @@ movel #__ramvec, %d7 addl #16, %d7 moveal %d7, %a0 - moveal #end, %a1 + moveal #_ebss, %a1 lea %a1@(512), %a2 DBG_PUTC('C') @@ -139,9 +137,9 @@ bhi L2 /* Copy data segment from ROM to RAM */ - moveal #__data_rom_start, %a0 - moveal #__data_start, %a1 - moveal #__data_end, %a2 + moveal #_etext, %a0 + moveal #_sdata, %a1 + moveal #_edata, %a2 DBG_PUTC('D') @@ -154,8 +152,8 @@ DBG_PUTC('E') - moveal #__bss_start, %a0 - moveal #end, %a1 + moveal #_sbss, %a0 + moveal #_ebss, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ L1: @@ -166,7 +164,7 @@ DBG_PUTC('F') /* Copy command line from end of bss to command line */ - moveal #end, %a0 + moveal #_ebss, %a0 moveal #command_line, %a1 lea %a1@(512), %a2 @@ -180,17 +178,17 @@ bhi L3 movel #_sdata, %d0 - movel %d0, _rambase - movel #end, %d0 - movel %d0, _ramstart + movel %d0, _rambase + movel #_ebss, %d0 + movel %d0, _ramstart - movel %a4, %d0 - subl #4096, %d0 /* Reserve 4K of stack */ + movel %a4, %d0 + subl #4096, %d0 /* Reserve 4K of stack */ moveq #79, %d7 - movel %d0, _ramend + movel %d0, _ramend - movel %a3, %d0 - movel %d0, rom_length + movel %a3, %d0 + movel %d0, rom_length pea 0 pea env @@ -200,12 +198,10 @@ DBG_PUTC('H') #ifdef CONFIG_PILOT - - movel #penguin_bits, 0xFFFFFA00 - moveb #10, 0xFFFFFA05 - movew #160, 0xFFFFFA08 - movew #160, 0xFFFFFA0A - + movel #penguin_bits, 0xFFFFFA00 + moveb #10, 0xFFFFFA05 + movew #160, 0xFFFFFA08 + movew #160, 0xFFFFFA0A #endif /* CONFIG_PILOT */ DBG_PUTC('I') diff -Nru a/arch/m68knommu/platform/68360/commproc.c b/arch/m68knommu/platform/68360/commproc.c --- a/arch/m68knommu/platform/68360/commproc.c Sun Feb 23 22:25:26 2003 +++ b/arch/m68knommu/platform/68360/commproc.c Sun Feb 23 22:25:26 2003 @@ -90,7 +90,7 @@ while (pquicc->cp_cr & CMD_FLAG); /* On the recommendation of the 68360 manual, p. 7-60 - * - Set sdma interupt service mask to 7 + * - Set sdma interrupt service mask to 7 * - Set sdma arbitration ID to 4 */ pquicc->sdma_sdcr = 0x0740; diff -Nru a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S --- a/arch/m68knommu/platform/68360/entry.S Sun Feb 23 22:25:25 2003 +++ b/arch/m68knommu/platform/68360/entry.S Sun Feb 23 22:25:25 2003 @@ -91,7 +91,7 @@ Luser_return: /* only allow interrupts when we are really the last one on the*/ /* kernel stack, otherwise stack overflow can occur during*/ - /* heavy interupt load*/ + /* heavy interrupt load*/ andw #ALLOWINT,%sr movel %sp,%d1 /* get thread_info pointer */ diff -Nru a/arch/m68knommu/platform/68360/uCquicc/crt0_ram.S b/arch/m68knommu/platform/68360/uCquicc/crt0_ram.S --- a/arch/m68knommu/platform/68360/uCquicc/crt0_ram.S Sun Feb 23 22:25:27 2003 +++ b/arch/m68knommu/platform/68360/uCquicc/crt0_ram.S Sun Feb 23 22:25:27 2003 @@ -15,7 +15,6 @@ #include .global _stext -.global __bss_start .global _start .global _rambase @@ -26,7 +25,6 @@ .global _quicc_base .global _periph_base -.global _dprbase #define REGB 0x1000 #define PEPAR (_dprbase + REGB + 0x0016) @@ -94,63 +92,62 @@ #include -/* By the time this RAM specific code begins to execute, DPRAM - * and DRAM should already be mapped and accessible. */ +/* + * By the time this RAM specific code begins to execute, DPRAM + * and DRAM should already be mapped and accessible. + */ .text _start: _stext: - nop - ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ - /* We should not need to setup the boot stack the reset should do it. */ - movea.l #_boot_stack, %sp /*set up stack at the end of DRAM:*/ - + nop + ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ + /* We should not need to setup the boot stack the reset should do it. */ + movea.l #__ramend, %sp /*set up stack at the end of DRAM:*/ set_mbar_register: - moveq.l #0x07, %d1 /* Setup MBAR */ - movec %d1, %dfc + moveq.l #0x07, %d1 /* Setup MBAR */ + movec %d1, %dfc - lea.l MCU_SIM_MBAR_ADRS, %a0 - move.l #_dprbase, %d0 - andi.l #MCU_SIM_MBAR_BA_MASK, %d0 - ori.l #MCU_SIM_MBAR_AS_MASK, %d0 - moves.l %d0, %a0@ + lea.l MCU_SIM_MBAR_ADRS, %a0 + move.l #_dprbase, %d0 + andi.l #MCU_SIM_MBAR_BA_MASK, %d0 + ori.l #MCU_SIM_MBAR_AS_MASK, %d0 + moves.l %d0, %a0@ - moveq.l #0x05, %d1 - movec.l %d1, %dfc + moveq.l #0x05, %d1 + movec.l %d1, %dfc -/* Now we can begin to access registers in DPRAM */ + /* Now we can begin to access registers in DPRAM */ set_sim_mcr: - /* Set Module Configuration Register */ - move.l #MCU_SIM_MCR, MCR - -/* to do: Determine cause of reset */ + /* Set Module Configuration Register */ + move.l #MCU_SIM_MCR, MCR + /* to do: Determine cause of reset */ - /* - * configure system clock MC68360 p. 6-40 - * (value +1)*osc/128 = system clock - */ + /* + * configure system clock MC68360 p. 6-40 + * (value +1)*osc/128 = system clock + */ set_sim_clock: - move.w #MCU_SIM_PLLCR, PLLCR - move.b #MCU_SIM_CLKOCR, CLKOCR - move.w #MCU_SIM_CDVCR, CDVCR + move.w #MCU_SIM_PLLCR, PLLCR + move.b #MCU_SIM_CLKOCR, CLKOCR + move.w #MCU_SIM_CDVCR, CDVCR - // Wait for the PLL to settle - move.w #16384, %d0 + /* Wait for the PLL to settle */ + move.w #16384, %d0 pll_settle_wait: - subi.w #1, %d0 - bne pll_settle_wait + subi.w #1, %d0 + bne pll_settle_wait - /* Setup the system protection register, and watchdog timer register */ + /* Setup the system protection register, and watchdog timer register */ + move.b #MCU_SIM_SWIV, SWIV + move.w #MCU_SIM_PICR, PICR + move.w #MCU_SIM_PITR, PITR + move.w #MCU_SIM_SYPCR, SYPCR - move.b #MCU_SIM_SWIV, SWIV - move.w #MCU_SIM_PICR, PICR - move.w #MCU_SIM_PITR, PITR - move.w #MCU_SIM_SYPCR, SYPCR - -/* Clear DPRAM - system + parameter */ + /* Clear DPRAM - system + parameter */ movea.l #_dprbase, %a0 movea.l #_dprbase+0x2000, %a1 @@ -161,72 +158,68 @@ bhi clear_dpram configure_memory_controller: - /* - * Set up Global Memory Register (GMR) - */ - move.l #MCU_SIM_GMR, %d0 - move.l %d0, GMR + /* Set up Global Memory Register (GMR) */ + move.l #MCU_SIM_GMR, %d0 + move.l %d0, GMR configure_chip_select_0: - move.l #__ramend, %d0 - subi.l #__ramstart, %d0 - subq.l #0x01, %d0 - eori.l #SIM_OR_MASK, %d0 - ori.l #SIM_OR0_MASK, %d0 - move.l %d0, OR0 - - move.l #__ramstart, %d0 - ori.l #SIM_BR0_MASK, %d0 - move.l %d0, BR0 - + move.l #__ramend, %d0 + subi.l #__ramstart, %d0 + subq.l #0x01, %d0 + eori.l #SIM_OR_MASK, %d0 + ori.l #SIM_OR0_MASK, %d0 + move.l %d0, OR0 + + move.l #__ramstart, %d0 + ori.l #SIM_BR0_MASK, %d0 + move.l %d0, BR0 configure_chip_select_1: - move.l #__flashend, %d0 - subi.l #__flashstart, %d0 - subq.l #0x01, %d0 - eori.l #SIM_OR_MASK, %d0 - ori.l #SIM_OR1_MASK, %d0 - move.l %d0, OR1 - - move.l #__flashstart, %d0 - ori.l #SIM_BR1_MASK, %d0 - move.l %d0, BR1 - - - move.w #MCU_SIM_PEPAR, PEPAR - -/* point to vector table: */ - move.l #_romvec, %a0 - move.l #_ramvec, %a1 + move.l #__rom_end, %d0 + subi.l #__rom_start, %d0 + subq.l #0x01, %d0 + eori.l #SIM_OR_MASK, %d0 + ori.l #SIM_OR1_MASK, %d0 + move.l %d0, OR1 + + move.l #__rom_start, %d0 + ori.l #SIM_BR1_MASK, %d0 + move.l %d0, BR1 + + move.w #MCU_SIM_PEPAR, PEPAR + + /* point to vector table: */ + move.l #_romvec, %a0 + move.l #_ramvec, %a1 copy_vectors: - move.l %a0@, %d0 - move.l %d0, %a1@ - move.l %a0@, %a1@ - addq.l #0x04, %a0 - addq.l #0x04, %a1 - cmp.l #_start, %a0 - blt copy_vectors + move.l %a0@, %d0 + move.l %d0, %a1@ + move.l %a0@, %a1@ + addq.l #0x04, %a0 + addq.l #0x04, %a1 + cmp.l #_start, %a0 + blt copy_vectors - move.l #_ramvec, %a1 - movec %a1, %vbr + move.l #_ramvec, %a1 + movec %a1, %vbr /* Copy data segment from ROM to RAM */ - moveal #__data_rom_start, %a0 - moveal #__data_start, %a1 - moveal #__data_end, %a2 + moveal #_stext, %a0 + moveal #_sdata, %a1 + moveal #_edata, %a2 /* Copy %a0 to %a1 until %a1 == %a2 */ LD1: - move.l %a0@, %d0 - addq.l #0x04, %a0 - move.l %d0, %a1@ - addq.l #0x04, %a1 - cmp.l #__data_end, %a1 - blt LD1 + move.l %a0@, %d0 + addq.l #0x04, %a0 + move.l %d0, %a1@ + addq.l #0x04, %a1 + cmp.l #_edata, %a1 + blt LD1 - moveal #__bss_start, %a0 - moveal #end, %a1 + moveal #_sbss, %a0 + moveal #_ebss, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ L1: @@ -235,21 +228,21 @@ bhi L1 load_quicc: - move.l #_dprbase, _quicc_base + move.l #_dprbase, _quicc_base store_ram_size: - /* Set ram size information */ - move.l #_sdata, _rambase - move.l #end, _ramstart - move.l #__ramend, %d0 - sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ - move.l %d0, _ramend /* Different from __ramend.*/ + /* Set ram size information */ + move.l #_sdata, _rambase + move.l #_ebss, _ramstart + move.l #__ramend, %d0 + sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ + move.l %d0, _ramend /* Different from __ramend.*/ store_flash_size: - /* Set rom size information */ - move.l #__flashend, %d0 - sub.l #__flashstart, %d0 - move.l %d0, rom_length + /* Set rom size information */ + move.l #__rom_end, %d0 + sub.l #__rom_start, %d0 + move.l %d0, rom_length pea 0 pea env @@ -260,17 +253,14 @@ lea 0x2000(%a2), %sp lp: - jsr start_kernel - /* jmp lp */ + jsr start_kernel _exit: - jmp _exit - .data - .align 4 + .align 4 env: .long 0 _quicc_base: @@ -278,13 +268,16 @@ _periph_base: .long 0 _ramvec: - .long 0 + .long 0 _rambase: - .long 0 + .long 0 _ramstart: - .long 0 + .long 0 _ramend: - .long 0 + .long 0 +_dprbase: + .long 0xffffe000 + .text /* @@ -293,7 +286,7 @@ */ .section ".data.initvect","awx" - .long _boot_stack /* Reset: Initial Stack Pointer - 0. */ + .long __ramend /* Reset: Initial Stack Pointer - 0. */ .long _start /* Reset: Initial Program Counter - 1. */ .long buserr /* Bus Error - 2. */ .long trap /* Address Error - 3. */ diff -Nru a/arch/m68knommu/platform/68360/uCquicc/crt0_rom.S b/arch/m68knommu/platform/68360/uCquicc/crt0_rom.S --- a/arch/m68knommu/platform/68360/uCquicc/crt0_rom.S Sun Feb 23 22:25:26 2003 +++ b/arch/m68knommu/platform/68360/uCquicc/crt0_rom.S Sun Feb 23 22:25:26 2003 @@ -11,11 +11,10 @@ * Copyright (C) 1998 D. Jeff Dionne , * */ -#define ASSEMBLY #include .global _stext -.global __bss_start +.global _sbss .global _start .global _rambase @@ -26,7 +25,6 @@ .global _quicc_base .global _periph_base -.global _dprbase #define REGB 0x1000 #define PEPAR (_dprbase + REGB + 0x0016) @@ -78,7 +76,6 @@ #define SIM_OR0_MASK 0x20000000 #define SIM_BR0_MASK 0x00000001 - /* Defines for chip select one - the RAM */ #define SIM_OR1_MASK 0x10000000 #define SIM_BR1_MASK 0x00000001 @@ -107,66 +104,66 @@ #include -/* By the time this RAM specific code begins to execute, DPRAM - * and DRAM should already be mapped and accessible. */ +/* + * By the time this RAM specific code begins to execute, DPRAM + * and DRAM should already be mapped and accessible. + */ .text _start: _stext: - nop - ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ - /* We should not need to setup the boot stack the reset should do it. */ - movea.l #_boot_stack, %sp /*set up stack at the end of DRAM:*/ + nop + ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ + /* We should not need to setup the boot stack the reset should do it. */ + movea.l #__ramend, %sp /* set up stack at the end of DRAM:*/ set_mbar_register: - moveq.l #0x07, %d1 /* Setup MBAR */ - movec %d1, %dfc + moveq.l #0x07, %d1 /* Setup MBAR */ + movec %d1, %dfc - lea.l MCU_SIM_MBAR_ADRS, %a0 - move.l #_dprbase, %d0 - andi.l #MCU_SIM_MBAR_BA_MASK, %d0 - ori.l #MCU_SIM_MBAR_AS_MASK, %d0 - moves.l %d0, %a0@ + lea.l MCU_SIM_MBAR_ADRS, %a0 + move.l #_dprbase, %d0 + andi.l #MCU_SIM_MBAR_BA_MASK, %d0 + ori.l #MCU_SIM_MBAR_AS_MASK, %d0 + moves.l %d0, %a0@ - moveq.l #0x05, %d1 - movec.l %d1, %dfc + moveq.l #0x05, %d1 + movec.l %d1, %dfc -/* Now we can begin to access registers in DPRAM */ + /* Now we can begin to access registers in DPRAM */ set_sim_mcr: - /* Set Module Configuration Register */ - move.l #MCU_SIM_MCR, MCR - -/* to do: Determine cause of reset */ + /* Set Module Configuration Register */ + move.l #MCU_SIM_MCR, MCR + /* to do: Determine cause of reset */ - /* - * configure system clock MC68360 p. 6-40 - * (value +1)*osc/128 = system clock - * or - * (value + 1)*osc = system clock - * You do not need to divide the oscillator by 128 unless you want to. - */ + /* + * configure system clock MC68360 p. 6-40 + * (value +1)*osc/128 = system clock + * or + * (value + 1)*osc = system clock + * You do not need to divide the oscillator by 128 unless you want to. + */ set_sim_clock: - move.w #MCU_SIM_PLLCR, PLLCR - move.b #MCU_SIM_CLKOCR, CLKOCR - move.w #MCU_SIM_CDVCR, CDVCR + move.w #MCU_SIM_PLLCR, PLLCR + move.b #MCU_SIM_CLKOCR, CLKOCR + move.w #MCU_SIM_CDVCR, CDVCR - // Wait for the PLL to settle - move.w #16384, %d0 + /* Wait for the PLL to settle */ + move.w #16384, %d0 pll_settle_wait: - subi.w #1, %d0 - bne pll_settle_wait + subi.w #1, %d0 + bne pll_settle_wait - /* Setup the system protection register, and watchdog timer register */ + /* Setup the system protection register, and watchdog timer register */ + move.b #MCU_SIM_SWIV, SWIV + move.w #MCU_SIM_PICR, PICR + move.w #MCU_SIM_PITR, PITR + move.w #MCU_SIM_SYPCR, SYPCR - move.b #MCU_SIM_SWIV, SWIV - move.w #MCU_SIM_PICR, PICR - move.w #MCU_SIM_PITR, PITR - move.w #MCU_SIM_SYPCR, SYPCR - -/* Clear DPRAM - system + parameter */ + /* Clear DPRAM - system + parameter */ movea.l #_dprbase, %a0 movea.l #_dprbase+0x2000, %a1 @@ -177,65 +174,63 @@ bhi clear_dpram configure_memory_controller: - /* - * Set up Global Memory Register (GMR) - */ - move.l #MCU_SIM_GMR, %d0 - move.l %d0, GMR + /* Set up Global Memory Register (GMR) */ + move.l #MCU_SIM_GMR, %d0 + move.l %d0, GMR configure_chip_select_0: - move.l #0x00400000, %d0 - subq.l #0x01, %d0 - eori.l #SIM_OR_MASK, %d0 - ori.l #SIM_OR0_MASK, %d0 - move.l %d0, OR0 - - move.l #__flashstart, %d0 - ori.l #SIM_BR0_MASK, %d0 - move.l %d0, BR0 - - move.l #0x0, BR1 - move.l #0x0, BR2 - move.l #0x0, BR3 - move.l #0x0, BR4 - move.l #0x0, BR5 - move.l #0x0, BR6 - move.l #0x0, BR7 - - move.w #MCU_SIM_PEPAR, PEPAR - -/* point to vector table: */ - move.l #_romvec, %a0 - move.l #_ramvec, %a1 + move.l #0x00400000, %d0 + subq.l #0x01, %d0 + eori.l #SIM_OR_MASK, %d0 + ori.l #SIM_OR0_MASK, %d0 + move.l %d0, OR0 + + move.l #__rom_start, %d0 + ori.l #SIM_BR0_MASK, %d0 + move.l %d0, BR0 + + move.l #0x0, BR1 + move.l #0x0, BR2 + move.l #0x0, BR3 + move.l #0x0, BR4 + move.l #0x0, BR5 + move.l #0x0, BR6 + move.l #0x0, BR7 + + move.w #MCU_SIM_PEPAR, PEPAR + + /* point to vector table: */ + move.l #_romvec, %a0 + move.l #_ramvec, %a1 copy_vectors: - move.l %a0@, %d0 - move.l %d0, %a1@ - move.l %a0@, %a1@ - addq.l #0x04, %a0 - addq.l #0x04, %a1 - cmp.l #_start, %a0 - blt copy_vectors + move.l %a0@, %d0 + move.l %d0, %a1@ + move.l %a0@, %a1@ + addq.l #0x04, %a0 + addq.l #0x04, %a1 + cmp.l #_start, %a0 + blt copy_vectors - move.l #_ramvec, %a1 - movec %a1, %vbr + move.l #_ramvec, %a1 + movec %a1, %vbr /* Copy data segment from ROM to RAM */ - moveal #__data_rom_start, %a0 - moveal #__data_start, %a1 - moveal #__data_end, %a2 + moveal #_etext, %a0 + moveal #_sdata, %a1 + moveal #_edata, %a2 /* Copy %a0 to %a1 until %a1 == %a2 */ LD1: - move.l %a0@, %d0 - addq.l #0x04, %a0 - move.l %d0, %a1@ - addq.l #0x04, %a1 - cmp.l #__data_end, %a1 - blt LD1 + move.l %a0@, %d0 + addq.l #0x04, %a0 + move.l %d0, %a1@ + addq.l #0x04, %a1 + cmp.l #_edata, %a1 + blt LD1 - moveal #__bss_start, %a0 - moveal #end, %a1 + moveal #_sbss, %a0 + moveal #_ebss, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ L1: @@ -244,21 +239,21 @@ bhi L1 load_quicc: - move.l #_dprbase, _quicc_base + move.l #_dprbase, _quicc_base store_ram_size: - /* Set ram size information */ - move.l #_sdata, _rambase - move.l #end, _ramstart - move.l #__ramend, %d0 - sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ - move.l %d0, _ramend /* Different from __ramend.*/ + /* Set ram size information */ + move.l #_sdata, _rambase + move.l #_ebss, _ramstart + move.l #__ramend, %d0 + sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ + move.l %d0, _ramend /* Different from __ramend.*/ store_flash_size: - /* Set rom size information */ - move.l #__flashend, %d0 - sub.l #__flashstart, %d0 - move.l %d0, rom_length + /* Set rom size information */ + move.l #__rom_end, %d0 + sub.l #__rom_start, %d0 + move.l %d0, rom_length pea 0 pea env @@ -269,17 +264,14 @@ lea 0x2000(%a2), %sp lp: - jsr start_kernel - /* jmp lp */ + jsr start_kernel _exit: - jmp _exit - .data - .align 4 + .align 4 env: .long 0 _quicc_base: @@ -287,13 +279,17 @@ _periph_base: .long 0 _ramvec: - .long 0 + .long 0 _rambase: - .long 0 + .long 0 _ramstart: - .long 0 + .long 0 _ramend: - .long 0 + .long 0 +_dprbase: + .long 0xffffe000 + + .text /* @@ -302,7 +298,7 @@ */ .section ".data.initvect","awx" - .long _boot_stack /* Reset: Initial Stack Pointer - 0. */ + .long __ramend /* Reset: Initial Stack Pointer - 0. */ .long _start /* Reset: Initial Program Counter - 1. */ .long buserr /* Bus Error - 2. */ .long trap /* Address Error - 3. */ diff -Nru a/arch/m68knommu/platform/68VZ328/ucdimm/config.c b/arch/m68knommu/platform/68VZ328/ucdimm/config.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/m68knommu/platform/68VZ328/ucdimm/config.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,119 @@ +/* + * linux/arch/m68knommu/platform/68VZ328/ucdimm/config.c + * + * Copyright (C) 1993 Hamish Macdonald + * Copyright (C) 1999 D. Jeff Dionne + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +void BSP_sched_init(void (*timer_routine)(int, void *, struct pt_regs *)) +{ + /* Restart mode, Enable int, 32KHz, Enable timer */ + TCTL = TCTL_OM | TCTL_IRQEN | TCTL_CLKSOURCE_32KHZ | TCTL_TEN; + /* Set prescaler (Divide 32KHz by 32)*/ + TPRER = 31; + /* Set compare register 32Khz / 32 / 10 = 100 */ + TCMP = 10; + + request_irq(TMR_IRQ_NUM, timer_routine, IRQ_FLG_LOCK, "timer", NULL); +} + +void BSP_tick(void) +{ + /* Reset Timer1 */ + TSTAT &= 0; +} + +unsigned long BSP_gettimeoffset (void) +{ + return 0; +} + +void BSP_gettod (int *yearp, int *monp, int *dayp, + int *hourp, int *minp, int *secp) +{ +} + +int BSP_hwclk(int op, struct hwclk_time *t) +{ + if (!op) { + /* read */ + } else { + /* write */ + } + return 0; +} + +int BSP_set_clock_mmss (unsigned long nowtime) +{ +#if 0 + short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60; + + tod->second1 = real_seconds / 10; + tod->second2 = real_seconds % 10; + tod->minute1 = real_minutes / 10; + tod->minute2 = real_minutes % 10; +#endif + return 0; +} + +void BSP_reset (void) +{ + local_irq_disable(); + asm volatile (" + moveal #0x10c00000, %a0; + moveb #0, 0xFFFFF300; + moveal 0(%a0), %sp; + moveal 4(%a0), %a0; + jmp (%a0); + "); +} + +unsigned char *cs8900a_hwaddr; +static int errno; + +_bsc0(char *, getserialnum) +_bsc1(unsigned char *, gethwaddr, int, a) +_bsc1(char *, getbenv, char *, a) + +void config_BSP(char *command, int len) +{ + unsigned char *p; + + printk("\n68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n"); + + printk("uCdimm serial string [%s]\n",getserialnum()); + p = cs8900a_hwaddr = gethwaddr(0); + printk("uCdimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", + p[0], p[1], p[2], p[3], p[4], p[5]); + p = getbenv("APPEND"); + if (p) strcpy(p,command); + else command[0] = 0; + + mach_sched_init = BSP_sched_init; + mach_tick = BSP_tick; + mach_gettimeoffset = BSP_gettimeoffset; + mach_gettod = BSP_gettod; + mach_reset = BSP_reset; + + config_M68VZ328_irq(); +} diff -Nru a/arch/m68knommu/vmlinux.lds.S b/arch/m68knommu/vmlinux.lds.S --- a/arch/m68knommu/vmlinux.lds.S Sun Feb 23 22:25:24 2003 +++ b/arch/m68knommu/vmlinux.lds.S Sun Feb 23 22:25:24 2003 @@ -1,7 +1,7 @@ /* * vmlinux.lds.S -- master linker script for m68knommu arch * - * (C) Copyright 2002, Greg Ungerer + * (C) Copyright 2002-2003, Greg Ungerer * * This ends up looking compilcated, because of the number of * address variations for ram and rom/flash layouts. The real @@ -226,7 +226,32 @@ *(__ex_table) __stop___ex_table = .; - RODATA + *(.rodata) *(.rodata.*) + *(__vermagic) /* Kernel version magic */ + *(.rodata1) + + /* Kernel symbol table: Normal symbols */ + __start___ksymtab = .; + *(__ksymtab) + __stop___ksymtab = .; + + /* Kernel symbol table: GPL-only symbols */ + __start___ksymtab_gpl = .; + *(__ksymtab_gpl) + __stop___ksymtab_gpl = .; + + /* Kernel symbol table: Normal symbols */ + __start___kcrctab = .; + *(__kcrctab) + __stop___kcrctab = .; + + /* Kernel symbol table: GPL-only symbols */ + __start___kcrctab_gpl = .; + *(__kcrctab_gpl) + __stop___kcrctab_gpl = .; + + /* Kernel symbol table: strings */ + *(__ksymtab_strings) . = ALIGN(4) ; _etext = . ; diff -Nru a/arch/mips/au1000/common/serial.c b/arch/mips/au1000/common/serial.c --- a/arch/mips/au1000/common/serial.c Sun Feb 23 22:25:23 2003 +++ b/arch/mips/au1000/common/serial.c Sun Feb 23 22:25:23 2003 @@ -195,7 +195,7 @@ #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT) #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \ - kdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s) + cdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s) #else #define DBG_CNT(s) #endif @@ -227,11 +227,11 @@ "Warning: null async_struct for (%s) in %s\n"; if (!info) { - printk(badinfo, kdevname(device), routine); + printk(badinfo, cdevname(device), routine); return 1; } if (info->magic != SERIAL_MAGIC) { - printk(badmagic, kdevname(device), routine); + printk(badmagic, cdevname(device), routine); return 1; } #endif diff -Nru a/arch/mips/baget/vacserial.c b/arch/mips/baget/vacserial.c --- a/arch/mips/baget/vacserial.c Sun Feb 23 22:25:25 2003 +++ b/arch/mips/baget/vacserial.c Sun Feb 23 22:25:25 2003 @@ -29,7 +29,7 @@ #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT) #define DBG_CNT(s) baget_printk("(%s):[%x] refc=%d, serc=%d, ttyc=%d-> %s\n", \ - kdevname(tty->device),(info->flags),serial_refcount,info->count,tty->count,s) + cdevname(tty->device),(info->flags),serial_refcount,info->count,tty->count,s) #else #define DBG_CNT(s) #endif @@ -173,11 +173,11 @@ "Warning: null async_struct for (%s) in %s\n"; if (!info) { - printk(badinfo, kdevname(device), routine); + printk(badinfo, cdevname(device), routine); return 1; } if (info->magic != SERIAL_MAGIC) { - printk(badmagic, kdevname(device), routine); + printk(badmagic, cdevname(device), routine); return 1; } #endif diff -Nru a/arch/mips/ddb5xxx/common/pci.c b/arch/mips/ddb5xxx/common/pci.c --- a/arch/mips/ddb5xxx/common/pci.c Sun Feb 23 22:25:27 2003 +++ b/arch/mips/ddb5xxx/common/pci.c Sun Feb 23 22:25:27 2003 @@ -148,7 +148,7 @@ } bus->resource[0]->flags |= pci_bridge_check_io(dev); bus->resource[1]->flags |= IORESOURCE_MEM; - /* For now, propogate hose limits to the bus; + /* For now, propagate hose limits to the bus; we'll adjust them later. */ bus->resource[0]->end = hose->io_resource->end; bus->resource[1]->end = hose->mem_resource->end; diff -Nru a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c --- a/arch/mips/kernel/irixsig.c Sun Feb 23 22:25:26 2003 +++ b/arch/mips/kernel/irixsig.c Sun Feb 23 22:25:26 2003 @@ -1,5 +1,5 @@ /* - * irixsig.c: WHEEE, IRIX signals! YOW, am I compatable or what?!?! + * irixsig.c: WHEEE, IRIX signals! YOW, am I compatible or what?!?! * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * Copyright (C) 1997 - 2000 Ralf Baechle (ralf@gnu.org) diff -Nru a/arch/mips/kernel/pci.c b/arch/mips/kernel/pci.c --- a/arch/mips/kernel/pci.c Sun Feb 23 22:25:25 2003 +++ b/arch/mips/kernel/pci.c Sun Feb 23 22:25:25 2003 @@ -145,7 +145,7 @@ } bus->resource[0]->flags |= pci_bridge_check_io(dev); bus->resource[1]->flags |= IORESOURCE_MEM; - /* For now, propogate hose limits to the bus; + /* For now, propagate hose limits to the bus; we'll adjust them later. */ bus->resource[0]->end = hose->io_resource->end; bus->resource[1]->end = hose->mem_resource->end; diff -Nru a/arch/mips/philips/nino/int-handler.S b/arch/mips/philips/nino/int-handler.S --- a/arch/mips/philips/nino/int-handler.S Sun Feb 23 22:25:21 2003 +++ b/arch/mips/philips/nino/int-handler.S Sun Feb 23 22:25:21 2003 @@ -72,7 +72,7 @@ nop /* - * Ok, we've got one of over a hundred other interupts. + * Ok, we've got one of over a hundred other interrupts. */ low_priority: lui t0, %hi(IntStatus1) diff -Nru a/arch/mips64/kernel/linux32.c b/arch/mips64/kernel/linux32.c --- a/arch/mips64/kernel/linux32.c Sun Feb 23 22:25:25 2003 +++ b/arch/mips64/kernel/linux32.c Sun Feb 23 22:25:25 2003 @@ -1800,7 +1800,7 @@ return ret; } -/* Handle adjtimex compatability. */ +/* Handle adjtimex compatibility. */ struct timex32 { u32 modes; diff -Nru a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile --- a/arch/parisc/kernel/Makefile Sun Feb 23 22:25:23 2003 +++ b/arch/parisc/kernel/Makefile Sun Feb 23 22:25:23 2003 @@ -16,7 +16,6 @@ processor.o pdc_chassis.o obj-$(CONFIG_SMP) += smp.o -obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_PA11) += pci-dma.o obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_MODULES) += module.o diff -Nru a/arch/parisc/kernel/ioctl32.c b/arch/parisc/kernel/ioctl32.c --- a/arch/parisc/kernel/ioctl32.c Sun Feb 23 22:25:21 2003 +++ b/arch/parisc/kernel/ioctl32.c Sun Feb 23 22:25:21 2003 @@ -2892,7 +2892,7 @@ IOCTL_TABLE_START /* List here exlicitly which ioctl's are known to have - * compatable types passed or none at all... + * compatible types passed or none at all... */ /* Big T */ COMPATIBLE_IOCTL(TCGETA) diff -Nru a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c --- a/arch/parisc/kernel/irq.c Sun Feb 23 22:25:23 2003 +++ b/arch/parisc/kernel/irq.c Sun Feb 23 22:25:23 2003 @@ -447,7 +447,7 @@ /* 1) only process IRQs that are enabled/unmasked (cpu_eiem) * 2) We loop here on EIRR contents in order to avoid - * nested interrupts or having to take another interupt + * nested interrupts or having to take another interrupt * when we could have just handled it right away. * 3) Limit the number of times we loop to make sure other * processing can occur. diff -Nru a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c --- a/arch/parisc/kernel/parisc_ksyms.c Sun Feb 23 22:25:27 2003 +++ b/arch/parisc/kernel/parisc_ksyms.c Sun Feb 23 22:25:27 2003 @@ -207,10 +207,5 @@ EXPORT_SYMBOL_NOVERS($$dyncall); #endif -#ifdef CONFIG_PROFILING -EXPORT_SYMBOL_GPL(register_profile_notifier); -EXPORT_SYMBOL_GPL(unregister_profile_notifier); -#endif - #include EXPORT_SYMBOL_NOVERS(vmalloc_start); diff -Nru a/arch/parisc/kernel/profile.c b/arch/parisc/kernel/profile.c --- a/arch/parisc/kernel/profile.c Sun Feb 23 22:25:23 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,43 +0,0 @@ -/* arch/parisc/kernel/profile.c - * - * Almost entirely copied from ppc64 which is: - * (C) 2002 John Levon - */ - -#include -#include -#include -#include - -static struct notifier_block *profile_listeners; -static rwlock_t profile_lock = RW_LOCK_UNLOCKED; - -int register_profile_notifier(struct notifier_block *nb) -{ - int err; - - write_lock_irq(&profile_lock); - err = notifier_chain_register(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - - return err; -} - -int unregister_profile_notifier(struct notifier_block *nb) -{ - int err; - - write_lock_irq(&profile_lock); - err = notifier_chain_unregister(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - - return err; -} - -void parisc_profile_hook(struct pt_regs *regs) -{ - read_lock(&profile_lock); - notifier_call_chain(&profile_listeners, 0, regs); - read_unlock(&profile_lock); -} - diff -Nru a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c --- a/arch/parisc/kernel/time.c Sun Feb 23 22:25:23 2003 +++ b/arch/parisc/kernel/time.c Sun Feb 23 22:25:23 2003 @@ -51,11 +51,7 @@ extern unsigned long prof_cpu_mask; extern char _stext; -#ifdef CONFIG_PROFILING - extern void parisc_profile_hook(struct pt_regs *); - - parisc_profile_hook(regs); -#endif + profile_hook(regs); if (user_mode(regs)) return; diff -Nru a/arch/ppc/8260_io/uart.c b/arch/ppc/8260_io/uart.c --- a/arch/ppc/8260_io/uart.c Sun Feb 23 22:25:21 2003 +++ b/arch/ppc/8260_io/uart.c Sun Feb 23 22:25:21 2003 @@ -227,11 +227,11 @@ "Warning: null async_struct for (%s) in %s\n"; if (!info) { - printk(badinfo, kdevname(device), routine); + printk(badinfo, cdevname(device), routine); return 1; } if (info->magic != SERIAL_MAGIC) { - printk(badmagic, kdevname(device), routine); + printk(badmagic, cdevname(device), routine); return 1; } #endif diff -Nru a/arch/ppc/8xx_io/uart.c b/arch/ppc/8xx_io/uart.c --- a/arch/ppc/8xx_io/uart.c Sun Feb 23 22:25:25 2003 +++ b/arch/ppc/8xx_io/uart.c Sun Feb 23 22:25:25 2003 @@ -242,11 +242,11 @@ "Warning: null async_struct for (%s) in %s\n"; if (!info) { - printk(badinfo, kdevname(device), routine); + printk(badinfo, cdevname(device), routine); return 1; } if (info->magic != SERIAL_MAGIC) { - printk(badmagic, kdevname(device), routine); + printk(badmagic, cdevname(device), routine); return 1; } #endif diff -Nru a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S --- a/arch/ppc/kernel/entry.S Sun Feb 23 22:25:26 2003 +++ b/arch/ppc/kernel/entry.S Sun Feb 23 22:25:26 2003 @@ -30,6 +30,7 @@ #include #include #include +#include #undef SHOW_SYSCALLS #undef SHOW_SYSCALLS_TASK diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S --- a/arch/ppc/kernel/misc.S Sun Feb 23 22:25:26 2003 +++ b/arch/ppc/kernel/misc.S Sun Feb 23 22:25:26 2003 @@ -837,7 +837,7 @@ bdnz 00b blr -_GLOBAL(ide_insw) +_GLOBAL(__ide_mm_insw) _GLOBAL(_insw_ns) cmpwi 0,r5,0 mtctr r5 @@ -849,7 +849,7 @@ bdnz 00b blr -_GLOBAL(ide_outsw) +_GLOBAL(__ide_mm_outsw) _GLOBAL(_outsw_ns) cmpwi 0,r5,0 mtctr r5 @@ -861,6 +861,7 @@ bdnz 00b blr +_GLOBAL(__ide_mm_insl) _GLOBAL(_insl_ns) cmpwi 0,r5,0 mtctr r5 @@ -872,6 +873,7 @@ bdnz 00b blr +_GLOBAL(__ide_mm_outsl) _GLOBAL(_outsl_ns) cmpwi 0,r5,0 mtctr r5 @@ -1281,7 +1283,12 @@ .long sys_epoll_ctl .long sys_epoll_wait .long sys_remap_file_pages - - .rept NR_syscalls-(.-sys_call_table)/4 - .long sys_ni_syscall - .endr + .long sys_timer_create /* 240 */ + .long sys_timer_settime + .long sys_timer_gettime + .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime /* 245 */ + .long sys_clock_gettime + .long sys_clock_getres + .long sys_clock_nanosleep diff -Nru a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c --- a/arch/ppc/kernel/process.c Sun Feb 23 22:25:24 2003 +++ b/arch/ppc/kernel/process.c Sun Feb 23 22:25:24 2003 @@ -197,10 +197,12 @@ return 1; } -void __switch_to(struct task_struct *prev, struct task_struct *new) +struct task_struct *__switch_to(struct task_struct *prev, + struct task_struct *new) { struct thread_struct *new_thread, *old_thread; unsigned long s; + struct task_struct *last; local_irq_save(s); #if CHECK_STACK @@ -244,8 +246,9 @@ new->thread.regs->msr |= MSR_VEC; new_thread = &new->thread; old_thread = ¤t->thread; - _switch(old_thread, new_thread); + last = _switch(old_thread, new_thread); local_irq_restore(s); + return last; } void show_regs(struct pt_regs * regs) diff -Nru a/arch/ppc/xmon/ansidecl.h b/arch/ppc/xmon/ansidecl.h --- a/arch/ppc/xmon/ansidecl.h Sun Feb 23 22:25:27 2003 +++ b/arch/ppc/xmon/ansidecl.h Sun Feb 23 22:25:27 2003 @@ -1,4 +1,4 @@ -/* ANSI and traditional C compatability macros +/* ANSI and traditional C compatibility macros Copyright 1991, 1992 Free Software Foundation, Inc. This file is part of the GNU C Library. diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile --- a/arch/ppc64/Makefile Sun Feb 23 22:25:22 2003 +++ b/arch/ppc64/Makefile Sun Feb 23 22:25:22 2003 @@ -44,6 +44,8 @@ archclean: $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/ppc64/boot +archmrproper: + prepare: include/asm-ppc64/offsets.h arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \ diff -Nru a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile --- a/arch/ppc64/boot/Makefile Sun Feb 23 22:25:26 2003 +++ b/arch/ppc64/boot/Makefile Sun Feb 23 22:25:26 2003 @@ -24,35 +24,45 @@ #CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux- BOOTCC := $(CROSS32_COMPILE)gcc -BOOTCFLAGS := $(HOSTCFLAGS) -Iinclude -BOOTLD := $(CROSS32_COMPILE)ld +HOSTCC := gcc +BOOTCFLAGS := $(HOSTCFLAGS) -Iinclude -fno-builtin BOOTAS := $(CROSS32_COMPILE)as -BOOTAFLAGS := -D__ASSEMBLY__ $(HOSTCFLAGS) - -CFLAGS := $(CPPFLAGS) -O -fno-builtin -DSTDC_HEADERS -LD_ARGS := -Ttext 0x00400000 -e _start -OBJCOPYFLAGS := -S -O binary - -obj-boot := start.o main.o zlib.o imagesize.o no_initrd.o -OBJS := crt0.o start.o main.o zlib.o imagesize.o image.o -obj-boot := $(addprefix $(obj)/,$(obj-boot)) -OBJS := $(addprefix $(obj)/,$(OBJS)) -targets += $(obj-boot) $(addprefix $(obj)/,image.c image.o) +BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional +BOOTLD := $(CROSS32_COMPILE)ld +BOOTLFLAGS := -Ttext 0x00400000 -e _start -T $(obj)/zImage.lds +BOOTOBJCOPY := $(CROSS32_COMPILE)objcopy +OBJCOPYFLAGS := contents,alloc,load,readonly,data + +src-boot := crt0.S string.S prom.c main.c zlib.c imagesize.c +src-boot := $(addprefix $(obj)/, $(src-boot)) +obj-boot := $(addsuffix .o, $(basename $(src-boot))) quiet_cmd_bootcc = BOOTCC $@ cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< -$(obj-boot): %.o: %.c FORCE - $(call if_changed_dep,bootcc) quiet_cmd_bootas = BOOTAS $@ - cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -traditional \ - -c -o $@ $< -$(obj)/crt0.o: %.o: %.S FORCE + cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< + +$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c + $(call if_changed_dep,bootcc) +$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S $(call if_changed_dep,bootas) -host-progs := piggyback addnote addSystemMap addRamDisk -HOSTCFLAGS_piggyback.o := -DKERNELBASE=$(KERNELBASE) -EXTRA_TARGETS += zImage zImage.initrd vmlinux.bin vmlinux.gz \ +#----------------------------------------------------------- +# ELF sections within the zImage bootloader/wrapper +#----------------------------------------------------------- +required := vmlinux .config System.map +initrd := initrd + +obj-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.o, $(section))) +src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section))) +gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) + +host-progs := piggy addnote addSystemMap addRamDisk +EXTRA_TARGETS += zImage zImage.initrd imagesize.c \ + $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ + $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ + $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ vmlinux.sm vmlinux.initrd vmlinux.sminitrd \ sysmap.o initrd.o @@ -69,42 +79,48 @@ $(obj)/vmlinux.sminitrd: $(obj)/vmlinux.sm $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE $(call if_changed,ramdisk) +$(obj)/sysmap.o: System.map $(obj)/piggyback + $(call if_changed,piggy) + +addsection = $(BOOTOBJCOPY) $(1) \ + --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \ + --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS) + +quiet_cmd_addnote = ADDNOTE $@ + cmd_addnote = $(BOOTLD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ quiet_cmd_piggy = PIGGY $@ cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(BOOTAS) -o $@ -$(obj)/image.o: $(obj)/vmlinux.gz $(obj)/piggyback FORCE - $(call if_changed,piggy) +$(call gz-sec, $(required)): $(obj)/kernel-%.gz: % + $(call if_changed,gzip) -$(obj)/sysmap.o: System.map $(obj)/piggyback FORCE - $(call if_changed,piggy) +$(obj)/kernel-initrd.gz: $(obj)/ramdisk.image.gz + cp -f $(obj)/ramdisk.image.gz $@ -$(obj)/initrd.o: $(obj)/ramdisk.image.gz $(obj)/piggyback FORCE - $(call if_changed,piggy) +$(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz + touch $@ -quiet_cmd_addnote = ADDNOTE $@ - cmd_addnote = $(BOOTLD) $(LD_ARGS) -T $(obj)/zImage.lds -o $@ $(OBJS) $<\ - && $(obj)/addnote $@ +$(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c + $(call if_changed_dep,bootcc) + $(call addsection, $@) -$(obj)/zImage: $(obj)/no_initrd.o $(OBJS) $(obj)/addnote FORCE +$(obj)/zImage: obj-boot += $(call obj-sec, $(required)) +$(obj)/zImage: $(call obj-sec, $(required)) $(obj-boot) $(obj)/addnote FORCE $(call if_changed,addnote) -$(obj)/zImage.initrd: $(obj)/initrd.o $(OBJS) $(obj)/addnote FORCE +$(obj)/zImage.initrd: obj-boot += $(call obj-sec, $(required) $(initrd)) +$(obj)/zImage.initrd: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(obj)/addnote FORCE $(call if_changed,addnote) -$(obj)/vmlinux.bin: vmlinux FORCE - $(call if_changed,objcopy) - -$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE - $(call if_changed,gzip) - $(obj)/imagesize.c: vmlinux @echo Generating $@ ls -l vmlinux | \ awk '{printf "/* generated -- do not edit! */\n" \ - "int uncompressed_size = %d;\n", $$5}' > $(obj)/imagesize.c + "unsigned long vmlinux_filesize = %d;\n", $$5}' > $(obj)/imagesize.c $(CROSS_COMPILE)nm -n vmlinux | tail -1 | \ - awk '{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}' \ + awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' \ >> $(obj)/imagesize.c -clean-files := $(targets) + +clean-files := $(patsubst $(obj)/%,%, $(obj-boot)) diff -Nru a/arch/ppc64/boot/README b/arch/ppc64/boot/README --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ppc64/boot/README Sun Feb 23 22:25:27 2003 @@ -0,0 +1,11 @@ + +To extract the kernel vmlinux, System.map, .config or initrd from the zImage binary: + +objcopy -j .kernel:vmlinux -O binary zImage vmlinux.gz +objcopy -j .kernel:System.map -O binary zImage System.map.gz +objcopy -j .kernel:.config -O binary zImage config.gz +objcopy -j .kernel:initrd -O binary zImage.initrd initrd.gz + + + Peter + diff -Nru a/arch/ppc64/boot/addRamDisk.c b/arch/ppc64/boot/addRamDisk.c --- a/arch/ppc64/boot/addRamDisk.c Sun Feb 23 22:25:24 2003 +++ b/arch/ppc64/boot/addRamDisk.c Sun Feb 23 22:25:24 2003 @@ -25,7 +25,7 @@ void death(const char *msg, FILE *fdesc, const char *fname) { - printf(msg); + fprintf(stderr, msg); fclose(fdesc); unlink(fname); exit(1); @@ -66,47 +66,47 @@ if (argc < 2) { - printf("Name of RAM disk file missing.\n"); + fprintf(stderr, "Name of RAM disk file missing.\n"); exit(1); } if (argc < 3) { - printf("Name of System Map input file is missing.\n"); + fprintf(stderr, "Name of System Map input file is missing.\n"); exit(1); } if (argc < 4) { - printf("Name of vmlinux file missing.\n"); + fprintf(stderr, "Name of vmlinux file missing.\n"); exit(1); } if (argc < 5) { - printf("Name of vmlinux output file missing.\n"); + fprintf(stderr, "Name of vmlinux output file missing.\n"); exit(1); } ramDisk = fopen(argv[1], "r"); if ( ! ramDisk ) { - printf("RAM disk file \"%s\" failed to open.\n", argv[1]); + fprintf(stderr, "RAM disk file \"%s\" failed to open.\n", argv[1]); exit(1); } sysmap = fopen(argv[2], "r"); if ( ! sysmap ) { - printf("System Map file \"%s\" failed to open.\n", argv[2]); + fprintf(stderr, "System Map file \"%s\" failed to open.\n", argv[2]); exit(1); } inputVmlinux = fopen(argv[3], "r"); if ( ! inputVmlinux ) { - printf("vmlinux file \"%s\" failed to open.\n", argv[3]); + fprintf(stderr, "vmlinux file \"%s\" failed to open.\n", argv[3]); exit(1); } outputVmlinux = fopen(argv[4], "w+"); if ( ! outputVmlinux ) { - printf("output vmlinux file \"%s\" failed to open.\n", argv[4]); + fprintf(stderr, "output vmlinux file \"%s\" failed to open.\n", argv[4]); exit(1); } @@ -118,7 +118,7 @@ fseek(inputVmlinux, 0, SEEK_SET); printf("kernel file size = %d\n", kernelLen); if ( kernelLen == 0 ) { - printf("You must have a linux kernel specified as argv[3]\n"); + fprintf(stderr, "You must have a linux kernel specified as argv[3]\n"); exit(1); } @@ -154,15 +154,14 @@ /* Process the Sysmap file to determine where _end is */ sysmapPages = sysmapLen / 4096; - for (i=0; i + .text .globl _start _start: - lis 9,_start@h - lis 8,_etext@ha - addi 8,8,_etext@l -1: dcbf 0,9 - icbi 0,9 - addi 9,9,0x20 - cmplwi 0,9,8 + lis r9,_start@h + lis r8,_etext@ha + addi r8,r8,_etext@l +1: dcbf r0,r9 + icbi r0,r9 + addi r9,r9,0x20 + cmplwi 0,r9,8 blt 1b sync isync ## Clear out the BSS as per ANSI C requirements - lis 7,_end@ha - addi 7,7,_end@l # r7 = &_end - lis 8,__bss_start@ha # - addi 8,8,__bss_start@l # r8 = &_bss_start + lis r7,_end@ha + addi r7,r7,_end@l # r7 = &_end + lis r8,__bss_start@ha # + addi r8,r8,__bss_start@l # r8 = &_bss_start ## Determine how large an area, in number of words, to clear - subf 7,8,7 # r7 = &_end - &_bss_start + 1 - addi 7,7,3 # r7 += 3 - srwi. 7,7,2 # r7 = size in words. - beq 3f # If the size is zero, do not bother - addi 8,8,-4 # r8 -= 4 - mtctr 7 # SPRN_CTR = number of words to clear - li 0,0 # r0 = 0 -2: stwu 0,4(8) # Clear out a word - bdnz 2b # If we are not done yet, keep clearing + subf r7,r8,r7 # r7 = &_end - &_bss_start + 1 + addi r7,r7,3 # r7 += 3 + srwi. r7,r7,2 # r7 = size in words. + beq 3f # If the size is zero, don't bother + addi r8,r8,-4 # r8 -= 4 + mtctr r7 # SPRN_CTR = number of words to clear + li r0,0 # r0 = 0 +2: stwu r0,4(r8) # Clear out a word + bdnz 2b # Keep clearing until done 3: - - b start - - -/* - * Flush the dcache and invalidate the icache for a range of addresses. - * - * flush_cache(addr, len) - */ - .global flush_cache -flush_cache: - addi 4,4,0x1f /* len = (len + 0x1f) / 0x20 */ - rlwinm. 4,4,27,5,31 - mtctr 4 - beqlr -1: dcbf 0,3 - icbi 0,3 - addi 3,3,0x20 - bdnz 1b - sync - isync - blr - - -#define r0 0 -#define r3 3 -#define r4 4 -#define r5 5 -#define r6 6 -#define r7 7 -#define r8 8 - - .globl strcpy -strcpy: - addi r5,r3,-1 - addi r4,r4,-1 -1: lbzu r0,1(r4) - cmpwi 0,r0,0 - stbu r0,1(r5) - bne 1b - blr - - .globl strncpy -strncpy: - cmpwi 0,r5,0 - beqlr - mtctr r5 - addi r6,r3,-1 - addi r4,r4,-1 -1: lbzu r0,1(r4) - cmpwi 0,r0,0 - stbu r0,1(r6) - bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */ - blr - - .globl strcat -strcat: - addi r5,r3,-1 - addi r4,r4,-1 -1: lbzu r0,1(r5) - cmpwi 0,r0,0 - bne 1b - addi r5,r5,-1 -1: lbzu r0,1(r4) - cmpwi 0,r0,0 - stbu r0,1(r5) - bne 1b - blr - - .globl strcmp -strcmp: - addi r5,r3,-1 - addi r4,r4,-1 -1: lbzu r3,1(r5) - cmpwi 1,r3,0 - lbzu r0,1(r4) - subf. r3,r0,r3 - beqlr 1 - beq 1b - blr - - .globl strlen -strlen: - addi r4,r3,-1 -1: lbzu r0,1(r4) - cmpwi 0,r0,0 - bne 1b - subf r3,r3,r4 - blr - - .globl memset -memset: - rlwimi r4,r4,8,16,23 - rlwimi r4,r4,16,0,15 - addi r6,r3,-4 - cmplwi 0,r5,4 - blt 7f - stwu r4,4(r6) - beqlr - andi. r0,r6,3 - add r5,r0,r5 - subf r6,r0,r6 - rlwinm r0,r5,32-2,2,31 - mtctr r0 - bdz 6f -1: stwu r4,4(r6) - bdnz 1b -6: andi. r5,r5,3 -7: cmpwi 0,r5,0 - beqlr - mtctr r5 - addi r6,r6,3 -8: stbu r4,1(r6) - bdnz 8b - blr - - .globl bcopy -bcopy: - mr r6,r3 - mr r3,r4 - mr r4,r6 - b memcpy - - .globl memmove -memmove: - cmplw 0,r3,r4 - bgt backwards_memcpy - /* fall through */ - - .globl memcpy -memcpy: - rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */ - addi r6,r3,-4 - addi r4,r4,-4 - beq 2f /* if less than 8 bytes to do */ - andi. r0,r6,3 /* get dest word aligned */ - mtctr r7 - bne 5f -1: lwz r7,4(r4) - lwzu r8,8(r4) - stw r7,4(r6) - stwu r8,8(r6) - bdnz 1b - andi. r5,r5,7 -2: cmplwi 0,r5,4 - blt 3f - lwzu r0,4(r4) - addi r5,r5,-4 - stwu r0,4(r6) -3: cmpwi 0,r5,0 - beqlr - mtctr r5 - addi r4,r4,3 - addi r6,r6,3 -4: lbzu r0,1(r4) - stbu r0,1(r6) - bdnz 4b - blr -5: subfic r0,r0,4 - mtctr r0 -6: lbz r7,4(r4) - addi r4,r4,1 - stb r7,4(r6) - addi r6,r6,1 - bdnz 6b - subf r5,r0,r5 - rlwinm. r7,r5,32-3,3,31 - beq 2b - mtctr r7 - b 1b - - .globl backwards_memcpy -backwards_memcpy: - rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */ - add r6,r3,r5 - add r4,r4,r5 - beq 2f - andi. r0,r6,3 - mtctr r7 - bne 5f -1: lwz r7,-4(r4) - lwzu r8,-8(r4) - stw r7,-4(r6) - stwu r8,-8(r6) - bdnz 1b - andi. r5,r5,7 -2: cmplwi 0,r5,4 - blt 3f - lwzu r0,-4(r4) - subi r5,r5,4 - stwu r0,-4(r6) -3: cmpwi 0,r5,0 - beqlr - mtctr r5 -4: lbzu r0,-1(r4) - stbu r0,-1(r6) - bdnz 4b - blr -5: mtctr r0 -6: lbzu r7,-1(r4) - stbu r7,-1(r6) - bdnz 6b - subf r5,r0,r5 - rlwinm. r7,r5,32-3,3,31 - beq 2b - mtctr r7 - b 1b - - .globl memcmp -memcmp: - cmpwi 0,r5,0 - blelr - mtctr r5 - addi r6,r3,-1 - addi r4,r4,-1 -1: lbzu r3,1(r6) - lbzu r0,1(r4) - subf. r3,r0,r3 - bdnzt 2,1b - blr diff -Nru a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c --- a/arch/ppc64/boot/main.c Sun Feb 23 22:25:27 2003 +++ b/arch/ppc64/boot/main.c Sun Feb 23 22:25:27 2003 @@ -1,7 +1,7 @@ /* * Copyright (C) Paul Mackerras 1997. * - * Updates for PPC64 by Todd Inglett & Dave Engebretsen. + * Updates for PPC64 by Todd Inglett, Dave Engebretsen & Peter Bergner. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -9,31 +9,31 @@ * 2 of the License, or (at your option) any later version. */ #define __KERNEL__ +#include "ppc32-types.h" #include "zlib.h" +#include #include #include #include -#undef DEBUG - void memmove(void *dst, void *im, int len); extern void *finddevice(const char *); extern int getprop(void *, const char *, void *, int); +extern void printk(char *fmt, ...); extern void printf(const char *fmt, ...); extern int sprintf(char *buf, const char *fmt, ...); void gunzip(void *, int, unsigned char *, int *); void *claim(unsigned int, unsigned int, unsigned int); -void flush_cache(void *, int); +void flush_cache(void *, unsigned long); void pause(void); +extern void exit(void); + static struct bi_record *make_bi_recs(unsigned long); #define RAM_START 0x00000000 #define RAM_END (64<<20) -#define BOOT_START ((unsigned long)_start) -#define BOOT_END ((unsigned long)_end) - /* Value picked to match that used by yaboot */ #define PROG_START 0x01400000 @@ -42,18 +42,26 @@ char *avail_high; unsigned int heap_use; unsigned int heap_max; -unsigned long initrd_start = 0; -unsigned long initrd_size = 0; extern char _end[]; -extern char image_data[]; -extern int image_len; -extern char initrd_data[]; -extern int initrd_len; -extern char sysmap_data[]; -extern int sysmap_len; -extern int uncompressed_size; -extern long vmlinux_end; +extern char _vmlinux_start[]; +extern char _vmlinux_end[]; +extern char _sysmap_start[]; +extern char _sysmap_end[]; +extern char _initrd_start[]; +extern char _initrd_end[]; +extern unsigned long vmlinux_filesize; +extern unsigned long vmlinux_memsize; + +struct addr_range { + unsigned long addr; + unsigned long size; + unsigned long memsize; +}; +struct addr_range vmlinux = {0, 0, 0}; +struct addr_range vmlinuz = {0, 0, 0}; +struct addr_range sysmap = {0, 0, 0}; +struct addr_range initrd = {0, 0, 0}; static char scratch[128<<10]; /* 128kB of scratch space for gunzip */ @@ -62,66 +70,130 @@ void *, struct bi_record *); + +int (*prom)(void *); + +void *chosen_handle; +void *stdin; +void *stdout; +void *stderr; + + void -chrpboot(unsigned long a1, unsigned long a2, void *prom) +start(unsigned long a1, unsigned long a2, void *promptr) { - unsigned len; - void *dst = (void *)-1; - unsigned long claim_addr; - unsigned char *im; + unsigned long i, claim_addr, claim_size; extern char _start; struct bi_record *bi_recs; kernel_entry_t kernel_entry; - - printf("chrpboot starting: loaded at 0x%x\n\r", (unsigned)&_start); + Elf64_Ehdr *elf64; + Elf64_Phdr *elf64ph; + + prom = (int (*)(void *)) promptr; + chosen_handle = finddevice("/chosen"); + if (chosen_handle == (void *) -1) + exit(); + if (getprop(chosen_handle, "stdout", &stdout, sizeof(stdout)) != 4) + exit(); + stderr = stdout; + if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4) + exit(); + + printf("zImage starting: loaded at 0x%x\n\r", (unsigned)&_start); + +#if 0 + sysmap.size = (unsigned long)(_sysmap_end - _sysmap_start); + sysmap.memsize = sysmap.size; + if ( sysmap.size > 0 ) { + sysmap.addr = (RAM_END - sysmap.size) & ~0xFFF; + claim(sysmap.addr, RAM_END - sysmap.addr, 0); + printf("initial ramdisk moving 0x%lx <- 0x%lx (%lx bytes)\n\r", + sysmap.addr, (unsigned long)_sysmap_start, sysmap.size); + memcpy((void *)sysmap.addr, (void *)_sysmap_start, sysmap.size); + } +#endif - if (initrd_len) { - initrd_size = initrd_len; - initrd_start = (RAM_END - initrd_size) & ~0xFFF; + initrd.size = (unsigned long)(_initrd_end - _initrd_start); + initrd.memsize = initrd.size; + if ( initrd.size > 0 ) { + initrd.addr = (RAM_END - initrd.size) & ~0xFFF; a1 = a2 = 0; - claim(initrd_start, RAM_END - initrd_start, 0); + claim(initrd.addr, RAM_END - initrd.addr, 0); printf("initial ramdisk moving 0x%lx <- 0x%lx (%lx bytes)\n\r", - initrd_start, (unsigned long)initrd_data, initrd_size); - memcpy((void *)initrd_start, (void *)initrd_data, initrd_size); + initrd.addr, (unsigned long)_initrd_start, initrd.size); + memcpy((void *)initrd.addr, (void *)_initrd_start, initrd.size); } - im = image_data; - len = image_len; - uncompressed_size = PAGE_ALIGN(uncompressed_size); + vmlinuz.addr = (unsigned long)_vmlinux_start; + vmlinuz.size = (unsigned long)(_vmlinux_end - _vmlinux_start); + vmlinux.addr = (unsigned long)(void *)-1; + vmlinux.size = PAGE_ALIGN(vmlinux_filesize); + vmlinux.memsize = vmlinux_memsize; + claim_size = vmlinux.memsize /* PPPBBB: + fudge for bi_recs */; for(claim_addr = PROG_START; claim_addr <= PROG_START * 8; claim_addr += 0x100000) { #ifdef DEBUG printf(" trying: 0x%08lx\n\r", claim_addr); #endif - dst = claim(claim_addr, uncompressed_size, 0); - if (dst != (void *)-1) break; + vmlinux.addr = (unsigned long)claim(claim_addr, claim_size, 0); + if ((void *)vmlinux.addr != (void *)-1) break; } - if (dst == (void *)-1) { + if ((void *)vmlinux.addr == (void *)-1) { printf("claim error, can't allocate kernel memory\n\r"); - return; + exit(); } - if (im[0] == 0x1f && im[1] == 0x8b) { + /* PPPBBB: should kernel always be gziped? */ + if (*(unsigned short *)vmlinuz.addr == 0x1f8b) { avail_ram = scratch; begin_avail = avail_high = avail_ram; end_avail = scratch + sizeof(scratch); - printf("gunzipping (0x%x <- 0x%x:0x%0x)...", - (unsigned)dst, (unsigned)im, (unsigned)im+len); - gunzip(dst, uncompressed_size, im, &len); - printf("done %u bytes\n\r", len); + printf("gunzipping (0x%lx <- 0x%lx:0x%0lx)...", + vmlinux.addr, vmlinuz.addr, vmlinuz.addr+vmlinuz.size); + gunzip((void *)vmlinux.addr, vmlinux.size, + (unsigned char *)vmlinuz.addr, (int *)&vmlinuz.size); + printf("done %lu bytes\n\r", vmlinuz.size); printf("%u bytes of heap consumed, max in use %u\n\r", (unsigned)(avail_high - begin_avail), heap_max); } else { - memmove(dst, im, len); + memmove((void *)vmlinux.addr,(void *)vmlinuz.addr,vmlinuz.size); + } + + /* Skip over the ELF header */ + elf64 = (Elf64_Ehdr *)vmlinux.addr; + if ( elf64->e_ident[EI_MAG0] != ELFMAG0 || + elf64->e_ident[EI_MAG1] != ELFMAG1 || + elf64->e_ident[EI_MAG2] != ELFMAG2 || + elf64->e_ident[EI_MAG3] != ELFMAG3 || + elf64->e_ident[EI_CLASS] != ELFCLASS64 || + elf64->e_ident[EI_DATA] != ELFDATA2MSB || + elf64->e_type != ET_EXEC || + elf64->e_machine != EM_PPC64 ) + { + printf("Error: not a valid PPC64 ELF file!\n\r"); + exit(); + } + + elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + + (unsigned long)elf64->e_phoff); + for(i=0; i < (unsigned int)elf64->e_phnum ;i++,elf64ph++) { + if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0) + break; } +#ifdef DEBUG + printf("... skipping 0x%lx bytes of ELF header\n\r", + (unsigned long)elf64ph->p_offset); +#endif + vmlinux.addr += (unsigned long)elf64ph->p_offset; + vmlinux.size -= (unsigned long)elf64ph->p_offset; - flush_cache(dst, len); + flush_cache((void *)vmlinux.addr, vmlinux.memsize); - bi_recs = make_bi_recs((unsigned long)dst + vmlinux_end); + bi_recs = make_bi_recs(vmlinux.addr + vmlinux.memsize); - kernel_entry = (kernel_entry_t)dst; + kernel_entry = (kernel_entry_t)vmlinux.addr; #ifdef DEBUG printf( "kernel:\n\r" " entry addr = 0x%lx\n\r" @@ -135,9 +207,9 @@ kernel_entry( a1, a2, prom, bi_recs ); - printf("returned?\n\r"); + printf("Error: Linux kernel returned to zImage bootloader!\n\r"); - pause(); + exit(); } static struct bi_record * @@ -162,21 +234,19 @@ rec->data[0] = PLATFORM_PSERIES; rec->data[1] = 1; - if ( initrd_size > 0 ) { + if ( initrd.size > 0 ) { rec = bi_rec_alloc(rec, 2); rec->tag = BI_INITRD; - rec->data[0] = initrd_start; - rec->data[1] = initrd_size; + rec->data[0] = initrd.addr; + rec->data[1] = initrd.size; } -#if 0 - if ( sysmap_len > 0 ) { + if ( sysmap.size > 0 ) { rec = bi_rec_alloc(rec, 2); rec->tag = BI_SYSMAP; - rec->data[0] = (unsigned long)sysmap_data; - rec->data[1] = sysmap_len; + rec->data[0] = (unsigned long)sysmap.addr; + rec->data[1] = (unsigned long)sysmap.size; } -#endif rec = bi_rec_alloc(rec, 1); rec->tag = BI_LAST; diff -Nru a/arch/ppc64/boot/ppc32-types.h b/arch/ppc64/boot/ppc32-types.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ppc64/boot/ppc32-types.h Sun Feb 23 22:25:27 2003 @@ -0,0 +1,30 @@ +#ifndef _PPC64_TYPES_H +#define _PPC64_TYPES_H + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + +typedef __signed__ long long __s64; +typedef unsigned long long __u64; + +typedef signed char s8; +typedef unsigned char u8; + +typedef signed short s16; +typedef unsigned short u16; + +typedef signed int s32; +typedef unsigned int u32; + +typedef signed long long s64; +typedef unsigned long long u64; + +#define BITS_PER_LONG 32 + +#endif /* _PPC64_TYPES_H */ diff -Nru a/arch/ppc64/boot/prom.c b/arch/ppc64/boot/prom.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ppc64/boot/prom.c Sun Feb 23 22:25:27 2003 @@ -0,0 +1,636 @@ +/* + * Copyright (C) Paul Mackerras 1997. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include +#include + +#include + +int (*prom)(void *); + +void *chosen_handle; +void *stdin; +void *stdout; +void *stderr; + +void exit(void); +void *finddevice(const char *name); +int getprop(void *phandle, const char *name, void *buf, int buflen); +void chrpboot(int a1, int a2, void *prom); /* in main.c */ + +void printk(char *fmt, ...); + +int +write(void *handle, void *ptr, int nb) +{ + struct prom_args { + char *service; + int nargs; + int nret; + void *ihandle; + void *addr; + int len; + int actual; + } args; + + args.service = "write"; + args.nargs = 3; + args.nret = 1; + args.ihandle = handle; + args.addr = ptr; + args.len = nb; + args.actual = -1; + (*prom)(&args); + return args.actual; +} + +int +read(void *handle, void *ptr, int nb) +{ + struct prom_args { + char *service; + int nargs; + int nret; + void *ihandle; + void *addr; + int len; + int actual; + } args; + + args.service = "read"; + args.nargs = 3; + args.nret = 1; + args.ihandle = handle; + args.addr = ptr; + args.len = nb; + args.actual = -1; + (*prom)(&args); + return args.actual; +} + +void +exit() +{ + struct prom_args { + char *service; + } args; + + for (;;) { + args.service = "exit"; + (*prom)(&args); + } +} + +void +pause(void) +{ + struct prom_args { + char *service; + } args; + + args.service = "enter"; + (*prom)(&args); +} + +void * +finddevice(const char *name) +{ + struct prom_args { + char *service; + int nargs; + int nret; + const char *devspec; + void *phandle; + } args; + + args.service = "finddevice"; + args.nargs = 1; + args.nret = 1; + args.devspec = name; + args.phandle = (void *) -1; + (*prom)(&args); + return args.phandle; +} + +void * +claim(unsigned long virt, unsigned long size, unsigned long align) +{ + struct prom_args { + char *service; + int nargs; + int nret; + unsigned int virt; + unsigned int size; + unsigned int align; + void *ret; + } args; + + args.service = "claim"; + args.nargs = 3; + args.nret = 1; + args.virt = virt; + args.size = size; + args.align = align; + (*prom)(&args); + return args.ret; +} + +int +getprop(void *phandle, const char *name, void *buf, int buflen) +{ + struct prom_args { + char *service; + int nargs; + int nret; + void *phandle; + const char *name; + void *buf; + int buflen; + int size; + } args; + + args.service = "getprop"; + args.nargs = 4; + args.nret = 1; + args.phandle = phandle; + args.name = name; + args.buf = buf; + args.buflen = buflen; + args.size = -1; + (*prom)(&args); + return args.size; +} + +int +putc(int c, void *f) +{ + char ch = c; + + if (c == '\n') + putc('\r', f); + return write(f, &ch, 1) == 1? c: -1; +} + +int +putchar(int c) +{ + return putc(c, stdout); +} + +int +fputs(char *str, void *f) +{ + int n = strlen(str); + + return write(f, str, n) == n? 0: -1; +} + +int +readchar(void) +{ + char ch; + + for (;;) { + switch (read(stdin, &ch, 1)) { + case 1: + return ch; + case -1: + printk("read(stdin) returned -1\r\n"); + return -1; + } + } +} + +static char line[256]; +static char *lineptr; +static int lineleft; + +int +getchar(void) +{ + int c; + + if (lineleft == 0) { + lineptr = line; + for (;;) { + c = readchar(); + if (c == -1 || c == 4) + break; + if (c == '\r' || c == '\n') { + *lineptr++ = '\n'; + putchar('\n'); + break; + } + switch (c) { + case 0177: + case '\b': + if (lineptr > line) { + putchar('\b'); + putchar(' '); + putchar('\b'); + --lineptr; + } + break; + case 'U' & 0x1F: + while (lineptr > line) { + putchar('\b'); + putchar(' '); + putchar('\b'); + --lineptr; + } + break; + default: + if (lineptr >= &line[sizeof(line) - 1]) + putchar('\a'); + else { + putchar(c); + *lineptr++ = c; + } + } + } + lineleft = lineptr - line; + lineptr = line; + } + if (lineleft == 0) + return -1; + --lineleft; + return *lineptr++; +} + + + +/* String functions lifted from lib/vsprintf.c and lib/ctype.c */ +unsigned char _ctype[] = { +_C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ +_C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ +_C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */ +_C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */ +_S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */ +_P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */ +_D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */ +_D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */ +_P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */ +_U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */ +_U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */ +_U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */ +_P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */ +_L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */ +_L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */ +_L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */ +_S|_SP,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 160-175 */ +_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 176-191 */ +_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U, /* 192-207 */ +_U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L, /* 208-223 */ +_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L, /* 224-239 */ +_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ + +size_t strnlen(const char * s, size_t count) +{ + const char *sc; + + for (sc = s; count-- && *sc != '\0'; ++sc) + /* nothing */; + return sc - s; +} + +unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base) +{ + unsigned long result = 0,value; + + if (!base) { + base = 10; + if (*cp == '0') { + base = 8; + cp++; + if ((*cp == 'x') && isxdigit(cp[1])) { + cp++; + base = 16; + } + } + } + while (isxdigit(*cp) && + (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) { + result = result*base + value; + cp++; + } + if (endp) + *endp = (char *)cp; + return result; +} + +long simple_strtol(const char *cp,char **endp,unsigned int base) +{ + if(*cp=='-') + return -simple_strtoul(cp+1,endp,base); + return simple_strtoul(cp,endp,base); +} + +static int skip_atoi(const char **s) +{ + int i=0; + + while (isdigit(**s)) + i = i*10 + *((*s)++) - '0'; + return i; +} + +#define ZEROPAD 1 /* pad with zero */ +#define SIGN 2 /* unsigned/signed long */ +#define PLUS 4 /* show plus */ +#define SPACE 8 /* space if plus */ +#define LEFT 16 /* left justified */ +#define SPECIAL 32 /* 0x */ +#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ + +static char * number(char * str, long long num, int base, int size, int precision, int type) +{ + char c,sign,tmp[66]; + const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; + int i; + + if (type & LARGE) + digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return 0; + c = (type & ZEROPAD) ? '0' : ' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = '-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + if (type & SPECIAL) { + if (base == 16) + size -= 2; + else if (base == 8) + size--; + } + i = 0; + if (num == 0) + tmp[i++]='0'; + else while (num != 0) + tmp[i++] = digits[do_div(num,base)]; + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + *str++ = ' '; + if (sign) + *str++ = sign; + if (type & SPECIAL) { + if (base==8) + *str++ = '0'; + else if (base==16) { + *str++ = '0'; + *str++ = digits[33]; + } + } + if (!(type & LEFT)) + while (size-- > 0) + *str++ = c; + while (i < precision--) + *str++ = '0'; + while (i-- > 0) + *str++ = tmp[i]; + while (size-- > 0) + *str++ = ' '; + return str; +} + +/* Forward decl. needed for IP address printing stuff... */ +int sprintf(char * buf, const char *fmt, ...); + +int vsprintf(char *buf, const char *fmt, va_list args) +{ + int len; + unsigned long long num; + int i, base; + char * str; + const char *s; + + int flags; /* flags to number() */ + + int field_width; /* width of output field */ + int precision; /* min. # of digits for integers; max + number of chars for from string */ + int qualifier; /* 'h', 'l', or 'L' for integer fields */ + /* 'z' support added 23/7/1999 S.H. */ + /* 'z' changed to 'Z' --davidm 1/25/99 */ + + + for (str=buf ; *fmt ; ++fmt) { + if (*fmt != '%') { + *str++ = *fmt; + continue; + } + + /* process flags */ + flags = 0; + repeat: + ++fmt; /* this also skips first '%' */ + switch (*fmt) { + case '-': flags |= LEFT; goto repeat; + case '+': flags |= PLUS; goto repeat; + case ' ': flags |= SPACE; goto repeat; + case '#': flags |= SPECIAL; goto repeat; + case '0': flags |= ZEROPAD; goto repeat; + } + + /* get field width */ + field_width = -1; + if (isdigit(*fmt)) + field_width = skip_atoi(&fmt); + else if (*fmt == '*') { + ++fmt; + /* it's the next argument */ + field_width = va_arg(args, int); + if (field_width < 0) { + field_width = -field_width; + flags |= LEFT; + } + } + + /* get the precision */ + precision = -1; + if (*fmt == '.') { + ++fmt; + if (isdigit(*fmt)) + precision = skip_atoi(&fmt); + else if (*fmt == '*') { + ++fmt; + /* it's the next argument */ + precision = va_arg(args, int); + } + if (precision < 0) + precision = 0; + } + + /* get the conversion qualifier */ + qualifier = -1; + if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') { + qualifier = *fmt; + ++fmt; + } + + /* default base */ + base = 10; + + switch (*fmt) { + case 'c': + if (!(flags & LEFT)) + while (--field_width > 0) + *str++ = ' '; + *str++ = (unsigned char) va_arg(args, int); + while (--field_width > 0) + *str++ = ' '; + continue; + + case 's': + s = va_arg(args, char *); + if (!s) + s = ""; + + len = strnlen(s, precision); + + if (!(flags & LEFT)) + while (len < field_width--) + *str++ = ' '; + for (i = 0; i < len; ++i) + *str++ = *s++; + while (len < field_width--) + *str++ = ' '; + continue; + + case 'p': + if (field_width == -1) { + field_width = 2*sizeof(void *); + flags |= ZEROPAD; + } + str = number(str, + (unsigned long) va_arg(args, void *), 16, + field_width, precision, flags); + continue; + + + case 'n': + if (qualifier == 'l') { + long * ip = va_arg(args, long *); + *ip = (str - buf); + } else if (qualifier == 'Z') { + size_t * ip = va_arg(args, size_t *); + *ip = (str - buf); + } else { + int * ip = va_arg(args, int *); + *ip = (str - buf); + } + continue; + + case '%': + *str++ = '%'; + continue; + + /* integer number formats - set up the flags and "break" */ + case 'o': + base = 8; + break; + + case 'X': + flags |= LARGE; + case 'x': + base = 16; + break; + + case 'd': + case 'i': + flags |= SIGN; + case 'u': + break; + + default: + *str++ = '%'; + if (*fmt) + *str++ = *fmt; + else + --fmt; + continue; + } + if (qualifier == 'L') + num = va_arg(args, long long); + else if (qualifier == 'l') { + num = va_arg(args, unsigned long); + if (flags & SIGN) + num = (signed long) num; + } else if (qualifier == 'Z') { + num = va_arg(args, size_t); + } else if (qualifier == 'h') { + num = (unsigned short) va_arg(args, int); + if (flags & SIGN) + num = (signed short) num; + } else { + num = va_arg(args, unsigned int); + if (flags & SIGN) + num = (signed int) num; + } + str = number(str, num, base, field_width, precision, flags); + } + *str = '\0'; + return str-buf; +} + +int sprintf(char * buf, const char *fmt, ...) +{ + va_list args; + int i; + + va_start(args, fmt); + i=vsprintf(buf,fmt,args); + va_end(args); + return i; +} + +static char sprint_buf[1024]; + +void +printk(char *fmt, ...) +{ + va_list args; + int n; + + va_start(args, fmt); + n = vsprintf(sprint_buf, fmt, args); + va_end(args); + write(stdout, sprint_buf, n); +} + +int +printf(char *fmt, ...) +{ + va_list args; + int n; + + va_start(args, fmt); + n = vsprintf(sprint_buf, fmt, args); + va_end(args); + write(stdout, sprint_buf, n); + return n; +} diff -Nru a/arch/ppc64/boot/string.S b/arch/ppc64/boot/string.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/ppc64/boot/string.S Sun Feb 23 22:25:27 2003 @@ -0,0 +1,223 @@ +/* + * Copyright (C) Paul Mackerras 1997. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * NOTE: this code runs in 32 bit mode and is packaged as ELF32. + */ + +#include + + .text + .globl strcpy +strcpy: + addi r5,r3,-1 + addi r4,r4,-1 +1: lbzu r0,1(r4) + cmpwi 0,r0,0 + stbu r0,1(r5) + bne 1b + blr + + .globl strncpy +strncpy: + cmpwi 0,r5,0 + beqlr + mtctr r5 + addi r6,r3,-1 + addi r4,r4,-1 +1: lbzu r0,1(r4) + cmpwi 0,r0,0 + stbu r0,1(r6) + bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */ + blr + + .globl strcat +strcat: + addi r5,r3,-1 + addi r4,r4,-1 +1: lbzu r0,1(r5) + cmpwi 0,r0,0 + bne 1b + addi r5,r5,-1 +1: lbzu r0,1(r4) + cmpwi 0,r0,0 + stbu r0,1(r5) + bne 1b + blr + + .globl strcmp +strcmp: + addi r5,r3,-1 + addi r4,r4,-1 +1: lbzu r3,1(r5) + cmpwi 1,r3,0 + lbzu r0,1(r4) + subf. r3,r0,r3 + beqlr 1 + beq 1b + blr + + .globl strlen +strlen: + addi r4,r3,-1 +1: lbzu r0,1(r4) + cmpwi 0,r0,0 + bne 1b + subf r3,r3,r4 + blr + + .globl memset +memset: + rlwimi r4,r4,8,16,23 + rlwimi r4,r4,16,0,15 + addi r6,r3,-4 + cmplwi 0,r5,4 + blt 7f + stwu r4,4(r6) + beqlr + andi. r0,r6,3 + add r5,r0,r5 + subf r6,r0,r6 + rlwinm r0,r5,32-2,2,31 + mtctr r0 + bdz 6f +1: stwu r4,4(r6) + bdnz 1b +6: andi. r5,r5,3 +7: cmpwi 0,r5,0 + beqlr + mtctr r5 + addi r6,r6,3 +8: stbu r4,1(r6) + bdnz 8b + blr + + .globl bcopy +bcopy: + mr r6,r3 + mr r3,r4 + mr r4,r6 + b memcpy + + .globl memmove +memmove: + cmplw 0,r3,r4 + bgt backwards_memcpy + /* fall through */ + + .globl memcpy +memcpy: + rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */ + addi r6,r3,-4 + addi r4,r4,-4 + beq 2f /* if less than 8 bytes to do */ + andi. r0,r6,3 /* get dest word aligned */ + mtctr r7 + bne 5f +1: lwz r7,4(r4) + lwzu r8,8(r4) + stw r7,4(r6) + stwu r8,8(r6) + bdnz 1b + andi. r5,r5,7 +2: cmplwi 0,r5,4 + blt 3f + lwzu r0,4(r4) + addi r5,r5,-4 + stwu r0,4(r6) +3: cmpwi 0,r5,0 + beqlr + mtctr r5 + addi r4,r4,3 + addi r6,r6,3 +4: lbzu r0,1(r4) + stbu r0,1(r6) + bdnz 4b + blr +5: subfic r0,r0,4 + mtctr r0 +6: lbz r7,4(r4) + addi r4,r4,1 + stb r7,4(r6) + addi r6,r6,1 + bdnz 6b + subf r5,r0,r5 + rlwinm. r7,r5,32-3,3,31 + beq 2b + mtctr r7 + b 1b + + .globl backwards_memcpy +backwards_memcpy: + rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */ + add r6,r3,r5 + add r4,r4,r5 + beq 2f + andi. r0,r6,3 + mtctr r7 + bne 5f +1: lwz r7,-4(r4) + lwzu r8,-8(r4) + stw r7,-4(r6) + stwu r8,-8(r6) + bdnz 1b + andi. r5,r5,7 +2: cmplwi 0,r5,4 + blt 3f + lwzu r0,-4(r4) + subi r5,r5,4 + stwu r0,-4(r6) +3: cmpwi 0,r5,0 + beqlr + mtctr r5 +4: lbzu r0,-1(r4) + stbu r0,-1(r6) + bdnz 4b + blr +5: mtctr r0 +6: lbzu r7,-1(r4) + stbu r7,-1(r6) + bdnz 6b + subf r5,r0,r5 + rlwinm. r7,r5,32-3,3,31 + beq 2b + mtctr r7 + b 1b + + .globl memcmp +memcmp: + cmpwi 0,r5,0 + blelr + mtctr r5 + addi r6,r3,-1 + addi r4,r4,-1 +1: lbzu r3,1(r6) + lbzu r0,1(r4) + subf. r3,r0,r3 + bdnzt 2,1b + blr + + +/* + * Flush the dcache and invalidate the icache for a range of addresses. + * + * flush_cache(addr, len) + */ + .global flush_cache +flush_cache: + addi 4,4,0x1f /* len = (len + 0x1f) / 0x20 */ + rlwinm. 4,4,27,5,31 + mtctr 4 + beqlr +1: dcbf 0,3 + icbi 0,3 + addi 3,3,0x20 + bdnz 1b + sync + isync + blr + diff -Nru a/arch/ppc64/boot/zImage.lds b/arch/ppc64/boot/zImage.lds --- a/arch/ppc64/boot/zImage.lds Sun Feb 23 22:25:21 2003 +++ b/arch/ppc64/boot/zImage.lds Sun Feb 23 22:25:21 2003 @@ -58,6 +58,27 @@ *(.dynamic) CONSTRUCTORS } + + . = ALIGN(4096); + _vmlinux_start = .; + .kernel:vmlinux : { *(.kernel:vmlinux) } + _vmlinux_end = .; + + . = ALIGN(4096); + _dotconfig_start = .; + .kernel:.config : { *(.kernel:.config) } + _dotconfig_end = .; + + . = ALIGN(4096); + _sysmap_start = .; + .kernel:System.map : { *(.kernel:System.map) } + _sysmap_end = .; + + . = ALIGN(4096); + _initrd_start = .; + .kernel:initrd : { *(.kernel:initrd) } + _initrd_end = .; + . = ALIGN(4096); _edata = .; PROVIDE (edata = .); diff -Nru a/arch/ppc64/defconfig b/arch/ppc64/defconfig --- a/arch/ppc64/defconfig Sun Feb 23 22:25:22 2003 +++ b/arch/ppc64/defconfig Sun Feb 23 22:25:22 2003 @@ -46,6 +46,7 @@ # CONFIG_HMT is not set # CONFIG_DISCONTIGMEM is not set # CONFIG_RTAS_FLASH is not set +CONFIG_SCANLOG=y CONFIG_PPC_RTAS=y # @@ -54,7 +55,6 @@ CONFIG_PCI=y CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_ELF32=y # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y @@ -137,7 +137,6 @@ # CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_DMA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set @@ -267,6 +266,7 @@ # CONFIG_SUNGEM is not set CONFIG_NET_VENDOR_3COM=y CONFIG_VORTEX=y +# CONFIG_TYPHOON is not set # # Tulip family network device support diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile --- a/arch/ppc64/kernel/Makefile Sun Feb 23 22:25:26 2003 +++ b/arch/ppc64/kernel/Makefile Sun Feb 23 22:25:26 2003 @@ -27,7 +27,6 @@ obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o obj-$(CONFIG_SMP) += smp.o -obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o obj-$(CONFIG_PPC_RTAS) += rtas-proc.o obj-$(CONFIG_SCANLOG) += scanlog.o diff -Nru a/arch/ppc64/kernel/align.c b/arch/ppc64/kernel/align.c --- a/arch/ppc64/kernel/align.c Sun Feb 23 22:25:27 2003 +++ b/arch/ppc64/kernel/align.c Sun Feb 23 22:25:27 2003 @@ -180,7 +180,7 @@ #define SWAP(a, b) (t = (a), (a) = (b), (b) = t) -unsigned static inline make_dsisr( unsigned instr ) +static inline unsigned make_dsisr(unsigned instr) { unsigned dsisr; diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S --- a/arch/ppc64/kernel/entry.S Sun Feb 23 22:25:21 2003 +++ b/arch/ppc64/kernel/entry.S Sun Feb 23 22:25:21 2003 @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include @@ -301,6 +301,8 @@ REST_8GPRS(14, r1) REST_10GPRS(22, r1) + /* convert old thread to its task_struct for return value */ + addi r3,r3,-THREAD ld r7,_NIP(r1) /* Return to _switch caller in new task */ mtlr r7 addi r1,r1,SWITCH_FRAME_SIZE @@ -391,6 +393,11 @@ stb r0,PACAPROCENABLED(r13) #endif + mfmsr r0 + li r2, MSR_RI + andc r0,r0,r2 + mtmsrd r0 + ld r0,_MSR(r1) mtspr SRR1,r0 @@ -487,8 +494,9 @@ li r9,1 rldicr r9,r9,MSR_SF_LG,(63-MSR_SF_LG) - ori r9,r9,MSR_IR|MSR_DR|MSR_FE0|MSR_FE1|MSR_FP|MSR_RI + ori r9,r9,MSR_IR|MSR_DR|MSR_FE0|MSR_FE1|MSR_FP andc r6,r0,r9 + ori r6,r6,MSR_RI sync /* disable interrupts so SRR0/1 */ mtmsrd r0 /* don't get trashed */ diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S Sun Feb 23 22:25:24 2003 +++ b/arch/ppc64/kernel/head.S Sun Feb 23 22:25:24 2003 @@ -189,12 +189,20 @@ std r22,EX_SRR0(r21); /* Save SRR0 in exc. frame */ \ mfspr r23,SRR1; /* machine state at interrupt */ \ std r23,EX_SRR1(r21); /* Save SRR1 in exc. frame */ \ + \ + mfspr r23,DAR; /* Save DAR in exc. frame */ \ + std r23,EX_DAR(r21); \ + mfspr r23,DSISR; /* Save DSISR in exc. frame */ \ + stw r23,EX_DSISR(r21); \ + mfspr r23,SPRG2; /* Save r20 in exc. frame */ \ + std r23,EX_R20(r21); \ + \ clrrdi r22,r20,60; /* Get 0xc part of the vaddr */ \ ori r22,r22,(label)@l; /* add in the vaddr offset */ \ /* assumes *_common < 16b */ \ mfmsr r23; \ rotldi r23,r23,4; \ - ori r23,r23,0x30B; /* Set IR, DR, SF, ISF, HV */ \ + ori r23,r23,0x32B; /* Set IR, DR, RI, SF, ISF, HV*/ \ rotldi r23,r23,60; /* for generic handlers */ \ mtspr SRR0,r22; \ mtspr SRR1,r23; \ @@ -231,16 +239,10 @@ * frame on entry, r23 contains the saved CR, and relocation is on. */ #define EXCEPTION_PROLOG_COMMON \ - mfspr r22,SPRG2; /* Save r20 in exc. frame */ \ - std r22,EX_R20(r21); \ mfspr r22,SPRG1; /* Save r21 in exc. frame */ \ std r22,EX_R21(r21); \ - mfspr r22,DAR; /* Save DAR in exc. frame */ \ - std r22,EX_DAR(r21); \ std r21,PACAEXCSP(r20); /* update exception stack ptr */ \ /* iff no protection flt */ \ - mfspr r22,DSISR; /* Save DSISR in exc. frame */ \ - stw r22,EX_DSISR(r21); \ ld r22,EX_SRR1(r21); /* Get SRR1 from exc. frame */ \ andi. r22,r22,MSR_PR; /* Set CR for later branch */ \ mr r22,r1; /* Save r1 */ \ @@ -337,8 +339,8 @@ * Start of pSeries system interrupt routines */ . = 0x100 - .globl __start_interupts -__start_interupts: + .globl __start_interrupts +__start_interrupts: STD_EXCEPTION_PSERIES( 0x100, SystemReset ) STD_EXCEPTION_PSERIES( 0x200, MachineCheck ) @@ -367,7 +369,7 @@ . = 0x4000 .globl __end_interrupts .globl __start_naca -__end_interupts: +__end_interrupts: __start_naca: #ifdef CONFIG_PPC_ISERIES .llong itVpdAreas @@ -556,6 +558,12 @@ REST_GPR(0, r1) REST_8GPRS(2, r1) REST_4GPRS(10, r1) + + mfmsr r20 + li r21, MSR_RI + andc r20,r20,r21 + mtmsrd r20 + mtspr SRR1,r23 mtspr SRR0,r22 REST_4GPRS(20, r1) @@ -977,6 +985,12 @@ lwz r23,EX_CCR(r21) /* get saved CR */ /* note that this is almost identical to maskable_exception_exit */ mtcr r23 /* restore CR */ + + mfmsr r22 + li r23, MSR_RI + andc r22,r22,r23 + mtmsrd r22 + ld r22,EX_SRR0(r21) /* Get SRR0 from exc. frame */ ld r23,EX_SRR1(r21) /* Get SRR1 from exc. frame */ mtspr SRR0,r22 @@ -1076,6 +1090,12 @@ lwz r23,EX_CCR(r21) /* get saved CR */ /* note that this is almost identical to maskable_exception_exit */ mtcr r23 /* restore CR */ + + mfmsr r22 + li r23, MSR_RI + andc r22,r22,r23 + mtmsrd r22 + ld r22,EX_SRR0(r21) /* Get SRR0 from exc. frame */ ld r23,EX_SRR1(r21) /* Get SRR1 from exc. frame */ mtspr SRR0,r22 @@ -1189,7 +1209,6 @@ * At entry, r3 = this processor's number (in Linux terms, not hardware). */ _GLOBAL(pseries_secondary_smp_init) - /* turn on 64-bit mode */ bl .enable_64b_mode isync @@ -1543,15 +1562,23 @@ sc /* HvCall_setASR */ #else /* set the ASR */ - addi r3,0,0x4000 /* r3 = ptr to naca */ - lhz r3,PLATFORM(r3) /* r3 = platform flags */ - cmpldi r3,PLATFORM_PSERIES_LPAR - bne 98f - li r3,H_SET_ASR /* hcall = H_SET_ASR */ - HSC /* Invoking hcall */ - b 99f -98: /* This is not a hypervisor machine */ - mtasr r4 /* set the stab location */ + addi r3,0,0x4000 /* r3 = ptr to naca */ + lhz r3,PLATFORM(r3) /* r3 = platform flags */ + cmpldi r3,PLATFORM_PSERIES_LPAR + bne 98f + mfspr r3,PVR + srwi r3,r3,16 + cmpwi r3,0x37 /* SStar */ + beq 97f + cmpwi r3,0x36 /* IStar */ + beq 97f + cmpwi r3,0x34 /* Pulsar */ + bne 98f +97: li r3,H_SET_ASR /* hcall = H_SET_ASR */ + HSC /* Invoking hcall */ + b 99f +98: /* !(rpa hypervisor) || !(star) */ + mtasr r4 /* set the stab location */ 99: #endif li r7,0 @@ -1689,15 +1716,23 @@ ori r4,r3,1 /* turn on valid bit */ /* set the ASR */ - addi r3,0,0x4000 /* r3 = ptr to naca */ - lhz r3,PLATFORM(r3) /* r3 = platform flags */ - cmpldi r3,PLATFORM_PSERIES_LPAR - bne 98f - li r3,H_SET_ASR /* hcall = H_SET_ASR */ - HSC /* Invoking hcall */ - b 99f -98: /* This is not a hypervisor machine */ - mtasr r4 /* set the stab location */ + addi r3,0,0x4000 /* r3 = ptr to naca */ + lhz r3,PLATFORM(r3) /* r3 = platform flags */ + cmpldi r3,PLATFORM_PSERIES_LPAR + bne 98f + mfspr r3,PVR + srwi r3,r3,16 + cmpwi r3,0x37 /* SStar */ + beq 97f + cmpwi r3,0x36 /* IStar */ + beq 97f + cmpwi r3,0x34 /* Pulsar */ + bne 98f +97: li r3,H_SET_ASR /* hcall = H_SET_ASR */ + HSC /* Invoking hcall */ + b 99f +98: /* !(rpa hypervisor) || !(star) */ + mtasr r4 /* set the stab location */ 99: mfspr r6,SPRG3 ld r3,PACASTABREAL(r6) /* restore r3 for stab_initialize */ diff -Nru a/arch/ppc64/kernel/htab.c b/arch/ppc64/kernel/htab.c --- a/arch/ppc64/kernel/htab.c Sun Feb 23 22:25:24 2003 +++ b/arch/ppc64/kernel/htab.c Sun Feb 23 22:25:24 2003 @@ -46,6 +46,7 @@ #include #include #include +#include /* * Note: pte --> Linux PTE @@ -347,6 +348,9 @@ goto repeat; } } + + if (unlikely(slot == -2)) + panic("hash_page: pte_insert failed\n"); pte_val(new_pte) |= (slot<<12) & _PAGE_GROUP_IX; diff -Nru a/arch/ppc64/kernel/ioctl32.c b/arch/ppc64/kernel/ioctl32.c --- a/arch/ppc64/kernel/ioctl32.c Sun Feb 23 22:25:27 2003 +++ b/arch/ppc64/kernel/ioctl32.c Sun Feb 23 22:25:27 2003 @@ -99,6 +99,7 @@ #include #include +#include #include #include @@ -3633,6 +3634,15 @@ return sys_ioctl(fd, BLKGETSIZE64, arg); } +/* Bluetooth ioctls */ +#define HCIUARTSETPROTO _IOW('U', 200, int) +#define HCIUARTGETPROTO _IOR('U', 201, int) + +#define BNEPCONNADD _IOW('B', 200, int) +#define BNEPCONNDEL _IOW('B', 201, int) +#define BNEPGETCONNLIST _IOR('B', 210, int) +#define BNEPGETCONNINFO _IOR('B', 211, int) + struct ioctl_trans { unsigned long cmd; unsigned long handler; @@ -4241,6 +4251,17 @@ COMPATIBLE_IOCTL(HCISETACLMTU), COMPATIBLE_IOCTL(HCISETSCOMTU), COMPATIBLE_IOCTL(HCIINQUIRY), +COMPATIBLE_IOCTL(HCIUARTSETPROTO), +COMPATIBLE_IOCTL(HCIUARTGETPROTO), +COMPATIBLE_IOCTL(RFCOMMCREATEDEV), +COMPATIBLE_IOCTL(RFCOMMRELEASEDEV), +COMPATIBLE_IOCTL(RFCOMMGETDEVLIST), +COMPATIBLE_IOCTL(RFCOMMGETDEVINFO), +COMPATIBLE_IOCTL(RFCOMMSTEALDLC), +COMPATIBLE_IOCTL(BNEPCONNADD), +COMPATIBLE_IOCTL(BNEPCONNDEL), +COMPATIBLE_IOCTL(BNEPGETCONNLIST), +COMPATIBLE_IOCTL(BNEPGETCONNINFO), COMPATIBLE_IOCTL(PCIIOC_CONTROLLER), COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO), COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM), diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S Sun Feb 23 22:25:26 2003 +++ b/arch/ppc64/kernel/misc.S Sun Feb 23 22:25:26 2003 @@ -743,10 +743,6 @@ .llong .sys_epoll_wait .llong .sys_remap_file_pages - .rept NR_syscalls-239 - .llong .sys_ni_syscall - .endr - .balign 8 _GLOBAL(sys_call_table) .llong .sys_restart_syscall /* 0 */ @@ -989,7 +985,3 @@ .llong .sys_epoll_ctl .llong .sys_epoll_wait .llong .sys_remap_file_pages - - .rept NR_syscalls-239 - .llong .sys_ni_syscall - .endr diff -Nru a/arch/ppc64/kernel/open_pic.c b/arch/ppc64/kernel/open_pic.c --- a/arch/ppc64/kernel/open_pic.c Sun Feb 23 22:25:25 2003 +++ b/arch/ppc64/kernel/open_pic.c Sun Feb 23 22:25:25 2003 @@ -555,14 +555,15 @@ if (OpenPIC == NULL) return; - request_irq(openpic_vec_ipi, - openpic_ipi_action, 0, "IPI0 (call function)", 0); - request_irq(openpic_vec_ipi+1, - openpic_ipi_action, 0, "IPI1 (reschedule)", 0); - request_irq(openpic_vec_ipi+2, - openpic_ipi_action, 0, "IPI2 (invalidate tlb)", 0); - request_irq(openpic_vec_ipi+3, - openpic_ipi_action, 0, "IPI3 (xmon break)", 0); + /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ + request_irq(openpic_vec_ipi, openpic_ipi_action, SA_INTERRUPT, + "IPI0 (call function)", 0); + request_irq(openpic_vec_ipi+1, openpic_ipi_action, SA_INTERRUPT, + "IPI1 (reschedule)", 0); + request_irq(openpic_vec_ipi+2, openpic_ipi_action, SA_INTERRUPT, + "IPI2 (invalidate tlb)", 0); + request_irq(openpic_vec_ipi+3, openpic_ipi_action, SA_INTERRUPT, + "IPI3 (xmon break)", 0); for ( i = 0; i < OPENPIC_NUM_IPI ; i++ ) openpic_enable_ipi(openpic_vec_ipi+i); @@ -754,17 +755,12 @@ #ifdef CONFIG_SMP static void openpic_end_ipi(unsigned int irq_nr) { - /* IPIs are marked IRQ_PER_CPU. This has the side effect of + /* + * IPIs are marked IRQ_PER_CPU. This has the side effect of * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from * applying to them. We EOI them late to avoid re-entering. - * however, I'm wondering if we could simply let them have the - * SA_INTERRUPT flag and let them execute with all interrupts OFF. - * This would have the side effect of either running cross-CPU - * functions with interrupts off, or we can re-enable them explicitely - * with a local_irq_enable() in smp_call_function_interrupt(), since - * smp_call_function() is protected by a spinlock. - * Or maybe we shouldn't set the IRQ_PER_CPU flag on cross-CPU - * function calls IPI at all but that would make a special case. + * We mark IPI's with SA_INTERRUPT as they must run with + * irqs disabled. */ openpic_eoi(); } diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c --- a/arch/ppc64/kernel/pSeries_lpar.c Sun Feb 23 22:25:27 2003 +++ b/arch/ppc64/kernel/pSeries_lpar.c Sun Feb 23 22:25:27 2003 @@ -460,8 +460,13 @@ if (lpar_rc == H_PTEG_Full) return -1; + /* + * Since we try and ioremap PHBs we dont own, the pte insert + * will fail. However we must catch the failure in hash_page + * or we will loop forever, so return -2 in this case. + */ if (lpar_rc != H_Success) - panic("Bad return code from pte enter rc = %lx\n", lpar_rc); + return -2; return slot; } diff -Nru a/arch/ppc64/kernel/ppc_ksyms.c b/arch/ppc64/kernel/ppc_ksyms.c --- a/arch/ppc64/kernel/ppc_ksyms.c Sun Feb 23 22:25:22 2003 +++ b/arch/ppc64/kernel/ppc_ksyms.c Sun Feb 23 22:25:22 2003 @@ -232,8 +232,3 @@ #endif EXPORT_SYMBOL(tb_ticks_per_usec); - -#ifdef CONFIG_PROFILING -EXPORT_SYMBOL_GPL(register_profile_notifier); -EXPORT_SYMBOL_GPL(unregister_profile_notifier); -#endif diff -Nru a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c --- a/arch/ppc64/kernel/process.c Sun Feb 23 22:25:25 2003 +++ b/arch/ppc64/kernel/process.c Sun Feb 23 22:25:25 2003 @@ -82,11 +82,12 @@ return 1; } -void -__switch_to(struct task_struct *prev, struct task_struct *new) +struct task_struct *__switch_to(struct task_struct *prev, + struct task_struct *new) { struct thread_struct *new_thread, *old_thread; unsigned long flags; + struct task_struct *last; #ifdef CONFIG_SMP /* avoid complexity of lazy save/restore of fpu @@ -106,8 +107,9 @@ old_thread = ¤t->thread; local_irq_save(flags); - _switch(old_thread, new_thread); + last = _switch(old_thread, new_thread); local_irq_restore(flags); + return last; } static void show_tsk_stack(struct task_struct *p, unsigned long sp); @@ -237,22 +239,30 @@ /* * Set up a thread for executing a new program */ -void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp) +void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp) { - /* NIP is *really* a pointer to the function descriptor for + unsigned long entry, toc, load_addr = regs->gpr[2]; + + /* fdptr is a relocated pointer to the function descriptor for * the elf _start routine. The first entry in the function * descriptor is the entry address of _start and the second * entry is the TOC value we need to use. */ - unsigned long *entry = (unsigned long *)nip; - unsigned long *toc = entry + 1; - set_fs(USER_DS); - memset(regs->gpr, 0, sizeof(regs->gpr)); - memset(®s->ctr, 0, 4 * sizeof(regs->ctr)); - __get_user(regs->nip, entry); + __get_user(entry, (unsigned long *)fdptr); + __get_user(toc, (unsigned long *)fdptr+1); + + /* Check whether the e_entry function descriptor entries + * need to be relocated before we can use them. + */ + if ( load_addr != 0 ) { + entry += load_addr; + toc += load_addr; + } + + regs->nip = entry; regs->gpr[1] = sp; - __get_user(regs->gpr[2], toc); + regs->gpr[2] = toc; regs->msr = MSR_USER64; if (last_task_used_math == current) last_task_used_math = 0; diff -Nru a/arch/ppc64/kernel/profile.c b/arch/ppc64/kernel/profile.c --- a/arch/ppc64/kernel/profile.c Sun Feb 23 22:25:24 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,42 +0,0 @@ -/* - * linux/arch/i386/kernel/profile.c - * - * (C) 2002 John Levon - * - */ - -#include -#include -#include -#include -#include - -static struct notifier_block * profile_listeners; -static rwlock_t profile_lock = RW_LOCK_UNLOCKED; - -int register_profile_notifier(struct notifier_block * nb) -{ - int err; - write_lock_irq(&profile_lock); - err = notifier_chain_register(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - return err; -} - - -int unregister_profile_notifier(struct notifier_block * nb) -{ - int err; - write_lock_irq(&profile_lock); - err = notifier_chain_unregister(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - return err; -} - - -void ppc64_profile_hook(struct pt_regs * regs) -{ - read_lock(&profile_lock); - notifier_call_chain(&profile_listeners, 0, regs); - read_unlock(&profile_lock); -} diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c --- a/arch/ppc64/kernel/signal32.c Sun Feb 23 22:25:26 2003 +++ b/arch/ppc64/kernel/signal32.c Sun Feb 23 22:25:26 2003 @@ -29,6 +29,8 @@ #include #include +#define DEBUG_SIG 0 + #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) /* * These are the flags in the MSR that the user is allowed to change diff -Nru a/arch/ppc64/kernel/sys32.S b/arch/ppc64/kernel/sys32.S --- a/arch/ppc64/kernel/sys32.S Sun Feb 23 22:25:26 2003 +++ b/arch/ppc64/kernel/sys32.S Sun Feb 23 22:25:26 2003 @@ -1,5 +1,5 @@ /* - * sys32.S: I-cache tricks for 32-bit compatability layer simple + * sys32.S: I-cache tricks for 32-bit compatibility layer simple * conversions. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c --- a/arch/ppc64/kernel/sys_ppc32.c Sun Feb 23 22:25:25 2003 +++ b/arch/ppc64/kernel/sys_ppc32.c Sun Feb 23 22:25:25 2003 @@ -812,7 +812,7 @@ return sys_sysfs((int)option, arg1, arg2); } -/* Handle adjtimex compatability. */ +/* Handle adjtimex compatibility. */ struct timex32 { u32 modes; s32 offset, freq, maxerror, esterror; diff -Nru a/arch/ppc64/kernel/syscalls.c b/arch/ppc64/kernel/syscalls.c --- a/arch/ppc64/kernel/syscalls.c Sun Feb 23 22:25:25 2003 +++ b/arch/ppc64/kernel/syscalls.c Sun Feb 23 22:25:25 2003 @@ -44,7 +44,6 @@ #include extern unsigned long wall_jiffies; -#define USEC_PER_SEC (1000000) void check_bugs(void) diff -Nru a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c --- a/arch/ppc64/kernel/time.c Sun Feb 23 22:25:26 2003 +++ b/arch/ppc64/kernel/time.c Sun Feb 23 22:25:26 2003 @@ -77,7 +77,6 @@ #endif #define XSEC_PER_SEC (1024*1024) -#define USEC_PER_SEC (1000000) unsigned long tb_ticks_per_jiffy; unsigned long tb_ticks_per_usec; @@ -110,11 +109,8 @@ unsigned long nip; extern unsigned long prof_cpu_mask; extern char _stext; -#ifdef CONFIG_PROFILING - extern void ppc64_profile_hook(struct pt_regs *); - ppc64_profile_hook(regs); -#endif + profile_hook(regs); if (user_mode(regs)) return; diff -Nru a/arch/ppc64/kernel/xics.c b/arch/ppc64/kernel/xics.c --- a/arch/ppc64/kernel/xics.c Sun Feb 23 22:25:24 2003 +++ b/arch/ppc64/kernel/xics.c Sun Feb 23 22:25:24 2003 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -423,8 +424,11 @@ } #ifdef CONFIG_SMP - real_irq_to_virt_map[XICS_IPI] = virt_irq_to_real_map[XICS_IPI] = XICS_IPI; - request_irq(XICS_IPI + XICS_IRQ_OFFSET, xics_ipi_action, 0, "IPI", 0); + real_irq_to_virt_map[XICS_IPI] = virt_irq_to_real_map[XICS_IPI] = + XICS_IPI; + /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ + request_irq(XICS_IPI + XICS_IRQ_OFFSET, xics_ipi_action, SA_INTERRUPT, + "IPI", 0); irq_desc[XICS_IPI+XICS_IRQ_OFFSET].status |= IRQ_PER_CPU; #endif ppc64_boot_msg(0x21, "XICS Done"); diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c --- a/arch/ppc64/mm/init.c Sun Feb 23 22:25:25 2003 +++ b/arch/ppc64/mm/init.c Sun Feb 23 22:25:25 2003 @@ -233,6 +233,7 @@ hpteg = ((hash & htab_data.htab_hash_mask)*HPTES_PER_GROUP); + /* Panic if a pte grpup is full */ if (ppc_md.hpte_insert(hpteg, va, pa >> PAGE_SHIFT, 0, _PAGE_NO_CACHE|_PAGE_GUARDED|PP_RWXX, 1, 0) == -1) { diff -Nru a/arch/ppc64/oprofile/timer_int.c b/arch/ppc64/oprofile/timer_int.c --- a/arch/ppc64/oprofile/timer_int.c Sun Feb 23 22:25:27 2003 +++ b/arch/ppc64/oprofile/timer_int.c Sun Feb 23 22:25:27 2003 @@ -13,6 +13,7 @@ #include #include #include +#include #include static int timer_notify(struct notifier_block * self, unsigned long val, void * data) diff -Nru a/arch/ppc64/xmon/ansidecl.h b/arch/ppc64/xmon/ansidecl.h --- a/arch/ppc64/xmon/ansidecl.h Sun Feb 23 22:25:23 2003 +++ b/arch/ppc64/xmon/ansidecl.h Sun Feb 23 22:25:23 2003 @@ -1,4 +1,4 @@ -/* ANSI and traditional C compatability macros +/* ANSI and traditional C compatibility macros Copyright 1991, 1992 Free Software Foundation, Inc. This file is part of the GNU C Library. diff -Nru a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S --- a/arch/s390/kernel/entry.S Sun Feb 23 22:25:22 2003 +++ b/arch/s390/kernel/entry.S Sun Feb 23 22:25:22 2003 @@ -757,8 +757,8 @@ la %r2,SP_PTREGS(%r15) # address of register-save area sr %r3,%r3 icm %r3,3,__LC_SUBCHANNEL_NR # load subchannel nr & extend to int - l %r4,__LC_IO_INT_PARM # load interuption parm - l %r5,__LC_IO_INT_WORD # load interuption word + l %r4,__LC_IO_INT_PARM # load interruption parm + l %r5,__LC_IO_INT_WORD # load interruption word basr %r14,%r1 # branch to standard irq handler io_return: diff -Nru a/arch/s390x/kernel/entry.S b/arch/s390x/kernel/entry.S --- a/arch/s390x/kernel/entry.S Sun Feb 23 22:25:22 2003 +++ b/arch/s390x/kernel/entry.S Sun Feb 23 22:25:22 2003 @@ -781,8 +781,8 @@ GET_THREAD_INFO # load pointer to task_struct to R9 la %r2,SP_PTREGS(%r15) # address of register-save area llgh %r3,__LC_SUBCHANNEL_NR # load subchannel number - llgf %r4,__LC_IO_INT_PARM # load interuption parm - llgf %r5,__LC_IO_INT_WORD # load interuption word + llgf %r4,__LC_IO_INT_PARM # load interruption parm + llgf %r5,__LC_IO_INT_WORD # load interruption word brasl %r14,do_IRQ # call standard irq handler io_return: diff -Nru a/arch/s390x/kernel/linux32.c b/arch/s390x/kernel/linux32.c --- a/arch/s390x/kernel/linux32.c Sun Feb 23 22:25:25 2003 +++ b/arch/s390x/kernel/linux32.c Sun Feb 23 22:25:25 2003 @@ -3578,7 +3578,7 @@ return ret; } -/* Handle adjtimex compatability. */ +/* Handle adjtimex compatibility. */ struct timex32 { u32 modes; diff -Nru a/arch/sparc/Kconfig b/arch/sparc/Kconfig --- a/arch/sparc/Kconfig Sun Feb 23 22:25:21 2003 +++ b/arch/sparc/Kconfig Sun Feb 23 22:25:21 2003 @@ -136,34 +136,20 @@ config ISA bool help - Find out whether you have ISA slots on your motherboard. ISA is the - name of a bus system, i.e. the way the CPU talks to the other stuff - inside your box. Other bus systems are PCI, EISA, MicroChannel - (MCA) or VESA. ISA is an older system, now being displaced by PCI; - newer boards don't support it. If you have ISA, say Y, otherwise N. + ISA is found on Espresso only and is not supported currently. + Say N config EISA bool - ---help--- - The Extended Industry Standard Architecture (EISA) bus was - developed as an open alternative to the IBM MicroChannel bus. - - The EISA bus provided some of the features of the IBM MicroChannel - bus while maintaining backward compatibility with cards made for - the older ISA bus. The EISA bus saw limited use between 1988 and - 1995 when it was made obsolete by the PCI bus. - - Say Y here if you are building a kernel for an EISA-based machine. - - Otherwise, say N. + help + EISA is not supported. + Say N config MCA bool help - MicroChannel Architecture is found in some IBM PS/2 machines and - laptops. It is a bus system similar to PCI or ISA. See - (and especially the web page given - there) before attempting to build an MCA bus kernel. + EISA is not supported. + Say N config PCMCIA tristate @@ -242,8 +228,8 @@ config SUN4 bool "Support for SUN4 machines (disables SUN4[CDM] support)" help - Say Y here if, and only if, your machine is a Sun4. Note that - a kernel compiled with this option will run only on Sun4. + Say Y here if, and only if, your machine is a sun4. Note that + a kernel compiled with this option will run only on sun4. (And the current version will probably work only on sun4/330.) if !SUN4 @@ -251,15 +237,9 @@ config PCI bool "Support for PCI and PS/2 keyboard/mouse" help - Find out whether you have a PCI motherboard. PCI is the name of a - bus system, i.e. the way the CPU talks to the other stuff inside - your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or - VESA. If you have PCI, say Y, otherwise N. - - The PCI-HOWTO, available from - , contains valuable - information about which PCI hardware does work under Linux and which - doesn't. + CONFIG_PCI is needed for all JavaStation's (including MrCoffee), + CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC. + All of these platforms are extremely obscure, so say N if unsure. source "drivers/pci/Kconfig" diff -Nru a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c --- a/arch/sparc/kernel/sparc_ksyms.c Sun Feb 23 22:25:21 2003 +++ b/arch/sparc/kernel/sparc_ksyms.c Sun Feb 23 22:25:21 2003 @@ -55,6 +55,8 @@ #include #include +extern spinlock_t rtc_lock; + struct poll { int fd; short events; @@ -152,6 +154,7 @@ EXPORT_SYMBOL(udelay); EXPORT_SYMBOL(ndelay); +EXPORT_SYMBOL(rtc_lock); EXPORT_SYMBOL(mostek_lock); EXPORT_SYMBOL(mstk48t02_regs); #if CONFIG_SUN_AUXIO diff -Nru a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c --- a/arch/sparc/kernel/time.c Sun Feb 23 22:25:24 2003 +++ b/arch/sparc/kernel/time.c Sun Feb 23 22:25:24 2003 @@ -47,6 +47,7 @@ u64 jiffies_64; +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; enum sparc_clock_type sp_clock_typ; spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED; unsigned long mstk48t02_regs = 0UL; diff -Nru a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile --- a/arch/sparc64/kernel/Makefile Sun Feb 23 22:25:22 2003 +++ b/arch/sparc64/kernel/Makefile Sun Feb 23 22:25:22 2003 @@ -3,6 +3,7 @@ # EXTRA_AFLAGS := -ansi +CFLAGS += -Werror EXTRA_TARGETS := head.o init_task.o @@ -15,7 +16,6 @@ obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ pci_psycho.o pci_sabre.o pci_schizo.o obj-$(CONFIG_SMP) += smp.o trampoline.o -obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o ioctl32.o obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o diff -Nru a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c --- a/arch/sparc64/kernel/ioctl32.c Sun Feb 23 22:25:26 2003 +++ b/arch/sparc64/kernel/ioctl32.c Sun Feb 23 22:25:26 2003 @@ -97,6 +97,7 @@ #include #include +#include #include #include @@ -4264,6 +4265,15 @@ return sys_ioctl(fd, BLKGETSIZE64, arg); } +/* Bluetooth ioctls */ +#define HCIUARTSETPROTO _IOW('U', 200, int) +#define HCIUARTGETPROTO _IOR('U', 201, int) + +#define BNEPCONNADD _IOW('B', 200, int) +#define BNEPCONNDEL _IOW('B', 201, int) +#define BNEPGETCONNLIST _IOR('B', 210, int) +#define BNEPGETCONNINFO _IOR('B', 211, int) + struct ioctl_trans { unsigned int cmd; unsigned int handler; @@ -4277,7 +4287,7 @@ IOCTL_TABLE_START /* List here exlicitly which ioctl's are known to have - * compatable types passed or none at all... + * compatible types passed or none at all... */ /* Big T */ COMPATIBLE_IOCTL(TCGETA) @@ -4957,6 +4967,17 @@ COMPATIBLE_IOCTL(HCISETACLMTU) COMPATIBLE_IOCTL(HCISETSCOMTU) COMPATIBLE_IOCTL(HCIINQUIRY) +COMPATIBLE_IOCTL(HCIUARTSETPROTO) +COMPATIBLE_IOCTL(HCIUARTGETPROTO) +COMPATIBLE_IOCTL(RFCOMMCREATEDEV) +COMPATIBLE_IOCTL(RFCOMMRELEASEDEV) +COMPATIBLE_IOCTL(RFCOMMGETDEVLIST) +COMPATIBLE_IOCTL(RFCOMMGETDEVINFO) +COMPATIBLE_IOCTL(RFCOMMSTEALDLC) +COMPATIBLE_IOCTL(BNEPCONNADD) +COMPATIBLE_IOCTL(BNEPCONNDEL) +COMPATIBLE_IOCTL(BNEPGETCONNLIST) +COMPATIBLE_IOCTL(BNEPGETCONNINFO) /* Misc. */ COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ diff -Nru a/arch/sparc64/kernel/profile.c b/arch/sparc64/kernel/profile.c --- a/arch/sparc64/kernel/profile.c Sun Feb 23 22:25:22 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,42 +0,0 @@ -/* arch/sparc64/kernel/profile.c - * - * Almost entirely copied from ppc64 which is: - * (C) 2002 John Levon - */ - -#include -#include -#include -#include - -static struct notifier_block *profile_listeners; -static rwlock_t profile_lock = RW_LOCK_UNLOCKED; - -int register_profile_notifier(struct notifier_block *nb) -{ - int err; - - write_lock_irq(&profile_lock); - err = notifier_chain_register(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - - return err; -} - -int unregister_profile_notifier(struct notifier_block *nb) -{ - int err; - - write_lock_irq(&profile_lock); - err = notifier_chain_unregister(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - - return err; -} - -void sparc64_profile_hook(struct pt_regs *regs) -{ - read_lock(&profile_lock); - notifier_call_chain(&profile_listeners, 0, regs); - read_unlock(&profile_lock); -} diff -Nru a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c --- a/arch/sparc64/kernel/signal.c Sun Feb 23 22:25:24 2003 +++ b/arch/sparc64/kernel/signal.c Sun Feb 23 22:25:24 2003 @@ -185,7 +185,7 @@ err |= __put_user(regs->u_regs[UREG_G4], &((*grp)[MC_G4])); err |= __put_user(regs->u_regs[UREG_G5], &((*grp)[MC_G5])); err |= __put_user(regs->u_regs[UREG_G6], &((*grp)[MC_G6])); - err |= __put_user(regs->u_regs[UREG_G6], &((*grp)[MC_G7])); + err |= __put_user(regs->u_regs[UREG_G7], &((*grp)[MC_G7])); err |= __put_user(regs->u_regs[UREG_I0], &((*grp)[MC_O0])); err |= __put_user(regs->u_regs[UREG_I1], &((*grp)[MC_O1])); err |= __put_user(regs->u_regs[UREG_I2], &((*grp)[MC_O2])); @@ -404,8 +404,8 @@ err |= copy_from_user(regs->u_regs, sf->regs.u_regs, sizeof(regs->u_regs)); /* User can only change condition codes in %tstate. */ - regs->tstate &= ~(TSTATE_ICC); - regs->tstate |= (tstate & TSTATE_ICC); + regs->tstate &= ~(TSTATE_ICC | TSTATE_XCC); + regs->tstate |= (tstate & (TSTATE_ICC | TSTATE_XCC)); err |= __get_user(fpu_save, &sf->fpu_save); if (fpu_save) diff -Nru a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c --- a/arch/sparc64/kernel/smp.c Sun Feb 23 22:25:21 2003 +++ b/arch/sparc64/kernel/smp.c Sun Feb 23 22:25:21 2003 @@ -209,6 +209,174 @@ panic("SMP bolixed\n"); } +static unsigned long current_tick_offset; + +/* This stick register synchronization scheme is taken entirely from + * the ia64 port, see arch/ia64/kernel/smpboot.c for details and credit. + * + * The only change I've made is to rework it so that the master + * initiates the synchonization instead of the slave. -DaveM + */ + +#define MASTER 0 +#define SLAVE (SMP_CACHE_BYTES/sizeof(unsigned long)) + +#define NUM_ROUNDS 64 /* magic value */ +#define NUM_ITERS 5 /* likewise */ + +static spinlock_t itc_sync_lock = SPIN_LOCK_UNLOCKED; +static unsigned long go[SLAVE + 1]; + +#define DEBUG_STICK_SYNC 0 + +static inline unsigned long get_stick(void) +{ + unsigned long val; + + __asm__ __volatile__("rd %%asr24, %0" + : "=r" (val)); + return val; +} + +static inline long get_delta (long *rt, long *master) +{ + unsigned long best_t0 = 0, best_t1 = ~0UL, best_tm = 0; + unsigned long tcenter, t0, t1, tm; + unsigned long i; + + for (i = 0; i < NUM_ITERS; i++) { + t0 = get_stick(); + go[MASTER] = 1; + membar("#StoreLoad"); + while (!(tm = go[SLAVE])) + membar("#LoadLoad"); + go[SLAVE] = 0; + membar("#StoreStore"); + t1 = get_stick(); + + if (t1 - t0 < best_t1 - best_t0) + best_t0 = t0, best_t1 = t1, best_tm = tm; + } + + *rt = best_t1 - best_t0; + *master = best_tm - best_t0; + + /* average best_t0 and best_t1 without overflow: */ + tcenter = (best_t0/2 + best_t1/2); + if (best_t0 % 2 + best_t1 % 2 == 2) + tcenter++; + return tcenter - best_tm; +} + +static void adjust_stick(long adj) +{ + unsigned long tmp, pstate; + + __asm__ __volatile__( + "rdpr %%pstate, %0\n\t" + "ba,pt %%xcc, 1f\n\t" + " wrpr %0, %4, %%pstate\n\t" + ".align 16\n\t" + "1:nop\n\t" + "rd %%asr24, %1\n\t" + "add %1, %2, %1\n\t" + "wr %1, 0x0, %%asr24\n\t" + "add %1, %3, %1\n\t" + "wr %1, 0x0, %%asr25\n\t" + "wrpr %0, 0x0, %%pstate" + : "=&r" (pstate), "=&r" (tmp) + : "r" (adj), "r" (current_tick_offset), + "i" (PSTATE_IE)); +} + +void smp_synchronize_stick_client(void) +{ + long i, delta, adj, adjust_latency = 0, done = 0; + unsigned long flags, rt, master_time_stamp, bound; +#if DEBUG_STICK_SYNC + struct { + long rt; /* roundtrip time */ + long master; /* master's timestamp */ + long diff; /* difference between midpoint and master's timestamp */ + long lat; /* estimate of itc adjustment latency */ + } t[NUM_ROUNDS]; +#endif + + go[MASTER] = 1; + + while (go[MASTER]) + membar("#LoadLoad"); + + local_irq_save(flags); + { + for (i = 0; i < NUM_ROUNDS; i++) { + delta = get_delta(&rt, &master_time_stamp); + if (delta == 0) { + done = 1; /* let's lock on to this... */ + bound = rt; + } + + if (!done) { + if (i > 0) { + adjust_latency += -delta; + adj = -delta + adjust_latency/4; + } else + adj = -delta; + + adjust_stick(adj); + } +#if DEBUG_STICK_SYNC + t[i].rt = rt; + t[i].master = master_time_stamp; + t[i].diff = delta; + t[i].lat = adjust_latency/4; +#endif + } + } + local_irq_restore(flags); + +#if DEBUG_STICK_SYNC + for (i = 0; i < NUM_ROUNDS; i++) + printk("rt=%5ld master=%5ld diff=%5ld adjlat=%5ld\n", + t[i].rt, t[i].master, t[i].diff, t[i].lat); +#endif + + printk(KERN_INFO "CPU %d: synchronized STICK with master CPU (last diff %ld cycles," + "maxerr %lu cycles)\n", smp_processor_id(), delta, rt); +} + +static void smp_start_sync_stick_client(int cpu); + +static void smp_synchronize_one_stick(int cpu) +{ + unsigned long flags, i; + + go[MASTER] = 0; + + smp_start_sync_stick_client(cpu); + + /* wait for client to be ready */ + while (!go[MASTER]) + membar("#LoadLoad"); + + /* now let the client proceed into his loop */ + go[MASTER] = 0; + membar("#StoreLoad"); + + spin_lock_irqsave(&itc_sync_lock, flags); + { + for (i = 0; i < NUM_ROUNDS*NUM_ITERS; i++) { + while (!go[MASTER]) + membar("#LoadLoad"); + go[MASTER] = 0; + membar("#StoreStore"); + go[SLAVE] = get_stick(); + membar("#StoreLoad"); + } + } + spin_unlock_irqrestore(&itc_sync_lock, flags); +} + extern struct prom_cpuinfo linux_cpus[NR_CPUS]; extern unsigned long sparc64_cpu_startup; @@ -470,6 +638,15 @@ /* NOTE: Caller runs local copy on master. */ } +extern unsigned long xcall_sync_stick; + +static void smp_start_sync_stick_client(int cpu) +{ + smp_cross_call_masked(&xcall_sync_stick, + 0, 0, 0, + (1UL << cpu)); +} + /* Send cross call to all processors except self. */ #define smp_cross_call(func, ctx, data1, data2) \ smp_cross_call_masked(func, ctx, data1, data2, cpu_online_map) @@ -928,8 +1105,6 @@ extern void sparc64_do_profile(struct pt_regs *regs); -static unsigned long current_tick_offset; - #define prof_multiplier(__cpu) cpu_data[(__cpu)].multiplier #define prof_counter(__cpu) cpu_data[(__cpu)].counter @@ -1260,8 +1435,12 @@ set_bit(cpu, &smp_commenced_mask); while (!test_bit(cpu, &cpu_online_map)) mb(); - if (!test_bit(cpu, &cpu_online_map)) + if (!test_bit(cpu, &cpu_online_map)) { ret = -ENODEV; + } else { + if (SPARC64_USE_STICK) + smp_synchronize_one_stick(cpu); + } } return ret; } diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c --- a/arch/sparc64/kernel/sparc64_ksyms.c Sun Feb 23 22:25:26 2003 +++ b/arch/sparc64/kernel/sparc64_ksyms.c Sun Feb 23 22:25:26 2003 @@ -374,8 +374,3 @@ /* for ns8703 */ EXPORT_SYMBOL(ns87303_lock); - -#ifdef CONFIG_PROFILING -EXPORT_SYMBOL_GPL(register_profile_notifier); -EXPORT_SYMBOL_GPL(unregister_profile_notifier); -#endif diff -Nru a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c --- a/arch/sparc64/kernel/sunos_ioctl32.c Sun Feb 23 22:25:26 2003 +++ b/arch/sparc64/kernel/sunos_ioctl32.c Sun Feb 23 22:25:26 2003 @@ -1,5 +1,5 @@ /* $Id: sunos_ioctl32.c,v 1.11 2000/07/30 23:12:24 davem Exp $ - * sunos_ioctl32.c: SunOS ioctl compatability on sparc64. + * sunos_ioctl32.c: SunOS ioctl compatibility on sparc64. * * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) * Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu) diff -Nru a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S --- a/arch/sparc64/kernel/sys32.S Sun Feb 23 22:25:22 2003 +++ b/arch/sparc64/kernel/sys32.S Sun Feb 23 22:25:22 2003 @@ -1,5 +1,5 @@ /* $Id: sys32.S,v 1.12 2000/03/24 04:17:37 davem Exp $ - * sys32.S: I-cache tricks for 32-bit compatability layer simple + * sys32.S: I-cache tricks for 32-bit compatibility layer simple * conversions. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c --- a/arch/sparc64/kernel/sys_sparc32.c Sun Feb 23 22:25:25 2003 +++ b/arch/sparc64/kernel/sys_sparc32.c Sun Feb 23 22:25:25 2003 @@ -3528,7 +3528,7 @@ return ret; } -/* Handle adjtimex compatability. */ +/* Handle adjtimex compatibility. */ struct timex32 { u32 modes; diff -Nru a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c --- a/arch/sparc64/kernel/sys_sunos32.c Sun Feb 23 22:25:25 2003 +++ b/arch/sparc64/kernel/sys_sunos32.c Sun Feb 23 22:25:25 2003 @@ -1,5 +1,5 @@ /* $Id: sys_sunos32.c,v 1.64 2002/02/09 19:49:31 davem Exp $ - * sys_sunos32.c: SunOS binary compatability layer on sparc64. + * sys_sunos32.c: SunOS binary compatibility layer on sparc64. * * Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) diff -Nru a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S --- a/arch/sparc64/kernel/systbls.S Sun Feb 23 22:25:24 2003 +++ b/arch/sparc64/kernel/systbls.S Sun Feb 23 22:25:24 2003 @@ -47,7 +47,7 @@ .word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate /*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall .word sys_nis_syscall, sys_mkdir, sys_rmdir, sys32_utimes, sys_stat64 -/*140*/ .word sys32_sendfile64, sys_nis_syscall, sys_futex, sys_gettid, sys32_getrlimit +/*140*/ .word sys32_sendfile64, sys_nis_syscall, compat_sys_futex, sys_gettid, sys32_getrlimit .word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write /*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 .word sys32_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount diff -Nru a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c --- a/arch/sparc64/kernel/time.c Sun Feb 23 22:25:24 2003 +++ b/arch/sparc64/kernel/time.c Sun Feb 23 22:25:24 2003 @@ -88,11 +88,8 @@ { unsigned long pc = regs->tpc; unsigned long o7 = regs->u_regs[UREG_RETPC]; -#ifdef CONFIG_PROFILING - extern void sparc64_profile_hook(struct pt_regs *); - sparc64_profile_hook(regs); -#endif + profile_hook(regs); if (user_mode(regs)) return; diff -Nru a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile --- a/arch/sparc64/lib/Makefile Sun Feb 23 22:25:21 2003 +++ b/arch/sparc64/lib/Makefile Sun Feb 23 22:25:21 2003 @@ -3,6 +3,7 @@ # EXTRA_AFLAGS := -ansi +CFLAGS += -Werror L_TARGET = lib.a obj-y := PeeCeeI.o blockops.o debuglocks.o strlen.o strncmp.o \ diff -Nru a/arch/sparc64/mm/Makefile b/arch/sparc64/mm/Makefile --- a/arch/sparc64/mm/Makefile Sun Feb 23 22:25:26 2003 +++ b/arch/sparc64/mm/Makefile Sun Feb 23 22:25:26 2003 @@ -3,6 +3,7 @@ # EXTRA_AFLAGS := -ansi +CFLAGS += -Werror obj-y := ultra.o fault.o init.o generic.o extable.o diff -Nru a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S --- a/arch/sparc64/mm/ultra.S Sun Feb 23 22:25:25 2003 +++ b/arch/sparc64/mm/ultra.S Sun Feb 23 22:25:25 2003 @@ -557,6 +557,24 @@ nop nop + /* This runs in a very controlled environment, so we do + * not need to worry about BH races etc. + */ + .globl xcall_sync_stick +xcall_sync_stick: + rdpr %pstate, %g2 + wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate + rdpr %pil, %g2 + wrpr %g0, 15, %pil + sethi %hi(109f), %g7 + b,pt %xcc, etrap_irq +109: or %g7, %lo(109b), %g7 + call smp_synchronize_stick_client + nop + clr %l6 + b rtrap_xcall + ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 + /* NOTE: This is SPECIAL!! We do etrap/rtrap however * we choose to deal with the "BH's run with * %pil==15" problem (described in asm/pil.h) diff -Nru a/arch/sparc64/oprofile/timer_int.c b/arch/sparc64/oprofile/timer_int.c --- a/arch/sparc64/oprofile/timer_int.c Sun Feb 23 22:25:25 2003 +++ b/arch/sparc64/oprofile/timer_int.c Sun Feb 23 22:25:25 2003 @@ -13,6 +13,7 @@ #include #include #include +#include #include static int timer_notify(struct notifier_block * self, unsigned long val, void * data) diff -Nru a/arch/sparc64/prom/Makefile b/arch/sparc64/prom/Makefile --- a/arch/sparc64/prom/Makefile Sun Feb 23 22:25:26 2003 +++ b/arch/sparc64/prom/Makefile Sun Feb 23 22:25:26 2003 @@ -4,6 +4,7 @@ # EXTRA_AFLAGS := -ansi +CFLAGS += -Werror L_TARGET = lib.a obj-y := bootstr.o devops.o init.o memory.o misc.o \ diff -Nru a/arch/um/include/sysdep-i386/checksum.h b/arch/um/include/sysdep-i386/checksum.h --- a/arch/um/include/sysdep-i386/checksum.h Sun Feb 23 22:25:22 2003 +++ b/arch/um/include/sysdep-i386/checksum.h Sun Feb 23 22:25:22 2003 @@ -60,7 +60,7 @@ /* * These are the old (and unsafe) way of doing checksums, a warning message - * will be printed if they are used and an exeption occurs. + * will be printed if they are used and an exception occurs. * * these functions should go away after some time. */ diff -Nru a/arch/v850/Kconfig b/arch/v850/Kconfig --- a/arch/v850/Kconfig Sun Feb 23 22:25:24 2003 +++ b/arch/v850/Kconfig Sun Feb 23 22:25:24 2003 @@ -133,6 +133,11 @@ depends RTE_CB default y + config RTE_CB_MULTI_DBTRAP + bool "Pass illegal insn trap / dbtrap to kernel" + depends RTE_CB_MULTI + default n + config RTE_CB_MA1_KSRAM bool "Kernel in SRAM (limits size of kernel)" depends RTE_CB_MA1 && RTE_CB_MULTI diff -Nru a/arch/v850/kernel/bug.c b/arch/v850/kernel/bug.c --- a/arch/v850/kernel/bug.c Sun Feb 23 22:25:25 2003 +++ b/arch/v850/kernel/bug.c Sun Feb 23 22:25:25 2003 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/bug.c -- Bug reporting functions * - * Copyright (C) 2001,02 NEC Corporation - * Copyright (C) 2001,02 Miles Bader + * Copyright (C) 2001,02,03 NEC Electronics Corporation + * Copyright (C) 2001,02,03 Miles Bader * * 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 @@ -37,12 +37,6 @@ printk (KERN_CRIT "unimplemented trap %d called at 0x%08lx, pid %d!\n", trap_num, regs->pc, current->pid); - return -ENOSYS; -} - -int debug_trap (struct pt_regs *regs) -{ - printk (KERN_CRIT "debug trap at 0x%08lx!\n", regs->pc); return -ENOSYS; } diff -Nru a/arch/v850/kernel/entry.S b/arch/v850/kernel/entry.S --- a/arch/v850/kernel/entry.S Sun Feb 23 22:25:26 2003 +++ b/arch/v850/kernel/entry.S Sun Feb 23 22:25:26 2003 @@ -2,8 +2,8 @@ * arch/v850/kernel/entry.S -- Low-level system-call handling, trap handlers, * and context-switching * - * Copyright (C) 2001,02 NEC Corporation - * Copyright (C) 2001,02 Miles Bader + * Copyright (C) 2001,02,03 NEC Electronics Corporation + * Copyright (C) 2001,02,03 Miles Bader * * 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 @@ -38,27 +38,27 @@ sst.w r6, PTO+PT_GPR(6)[ep]; \ sst.w r7, PTO+PT_GPR(7)[ep]; \ sst.w r8, PTO+PT_GPR(8)[ep]; \ - sst.w r9, PTO+PT_GPR(9)[ep]; + sst.w r9, PTO+PT_GPR(9)[ep] /* Restore argument registers from the struct pt_regs pointed to by EP. */ #define RESTORE_ARG_REGS \ sld.w PTO+PT_GPR(6)[ep], r6; \ sld.w PTO+PT_GPR(7)[ep], r7; \ sld.w PTO+PT_GPR(8)[ep], r8; \ - sld.w PTO+PT_GPR(9)[ep], r9; + sld.w PTO+PT_GPR(9)[ep], r9 /* Save value return registers to the struct pt_regs pointed to by EP. */ #define SAVE_RVAL_REGS \ sst.w r10, PTO+PT_GPR(10)[ep]; \ - sst.w r11, PTO+PT_GPR(11)[ep]; + sst.w r11, PTO+PT_GPR(11)[ep] /* Restore value return registers from the struct pt_regs pointed to by EP. */ #define RESTORE_RVAL_REGS \ sld.w PTO+PT_GPR(10)[ep], r10; \ - sld.w PTO+PT_GPR(11)[ep], r11; + sld.w PTO+PT_GPR(11)[ep], r11 #define SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS \ sst.w r1, PTO+PT_GPR(1)[ep]; \ - sst.w r5, PTO+PT_GPR(5)[ep]; + sst.w r5, PTO+PT_GPR(5)[ep] #define SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL \ sst.w r12, PTO+PT_GPR(12)[ep]; \ sst.w r13, PTO+PT_GPR(13)[ep]; \ @@ -67,10 +67,10 @@ sst.w r16, PTO+PT_GPR(16)[ep]; \ sst.w r17, PTO+PT_GPR(17)[ep]; \ sst.w r18, PTO+PT_GPR(18)[ep]; \ - sst.w r19, PTO+PT_GPR(19)[ep]; + sst.w r19, PTO+PT_GPR(19)[ep] #define RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS \ sld.w PTO+PT_GPR(1)[ep], r1; \ - sld.w PTO+PT_GPR(5)[ep], r5; + sld.w PTO+PT_GPR(5)[ep], r5 #define RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL \ sld.w PTO+PT_GPR(12)[ep], r12; \ sld.w PTO+PT_GPR(13)[ep], r13; \ @@ -79,40 +79,34 @@ sld.w PTO+PT_GPR(16)[ep], r16; \ sld.w PTO+PT_GPR(17)[ep], r17; \ sld.w PTO+PT_GPR(18)[ep], r18; \ - sld.w PTO+PT_GPR(19)[ep], r19; + sld.w PTO+PT_GPR(19)[ep], r19 /* Save `call clobbered' registers to the struct pt_regs pointed to by EP. */ #define SAVE_CALL_CLOBBERED_REGS \ SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ SAVE_ARG_REGS; \ SAVE_RVAL_REGS; \ - SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL; + SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL /* Restore `call clobbered' registers from the struct pt_regs pointed to by EP. */ #define RESTORE_CALL_CLOBBERED_REGS \ RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ RESTORE_ARG_REGS; \ RESTORE_RVAL_REGS; \ - RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL; + RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL /* Save `call clobbered' registers except for the return-value registers to the struct pt_regs pointed to by EP. */ #define SAVE_CALL_CLOBBERED_REGS_NO_RVAL \ SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ SAVE_ARG_REGS; \ - SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL; + SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL /* Restore `call clobbered' registers except for the return-value registers from the struct pt_regs pointed to by EP. */ #define RESTORE_CALL_CLOBBERED_REGS_NO_RVAL \ RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ RESTORE_ARG_REGS; \ - RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL; - -/* Zero `call clobbered' registers except for the return-value registers. */ -#define ZERO_CALL_CLOBBERED_REGS_NO_RVAL \ - mov r0, r1; mov r0, r5; \ - mov r0, r12; mov r0, r13; mov r0, r14; mov r0, r15; \ - mov r0, r16; mov r0, r17; mov r0, r18; mov r0, r19; + RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL /* Save `call saved' registers to the struct pt_regs pointed to by EP. */ #define SAVE_CALL_SAVED_REGS \ @@ -126,7 +120,7 @@ sst.w r26, PTO+PT_GPR(26)[ep]; \ sst.w r27, PTO+PT_GPR(27)[ep]; \ sst.w r28, PTO+PT_GPR(28)[ep]; \ - sst.w r29, PTO+PT_GPR(29)[ep]; + sst.w r29, PTO+PT_GPR(29)[ep] /* Restore `call saved' registers from the struct pt_regs pointed to by EP. */ #define RESTORE_CALL_SAVED_REGS \ sld.w PTO+PT_GPR(2)[ep], r2; \ @@ -139,68 +133,53 @@ sld.w PTO+PT_GPR(26)[ep], r26; \ sld.w PTO+PT_GPR(27)[ep], r27; \ sld.w PTO+PT_GPR(28)[ep], r28; \ - sld.w PTO+PT_GPR(29)[ep], r29; + sld.w PTO+PT_GPR(29)[ep], r29 + +/* Save the PC stored in the special register SAVEREG to the struct pt_regs + pointed to by EP. r19 is clobbered. */ +#define SAVE_PC(savereg) \ + stsr SR_ ## savereg, r19; \ + sst.w r19, PTO+PT_PC[ep] +/* Restore the PC from the struct pt_regs pointed to by EP, to the special + register SAVEREG. LP is clobbered (it is used as a scratch register + because the POP_STATE macro restores it, and this macro is usually used + inside POP_STATE). */ +#define RESTORE_PC(savereg) \ + sld.w PTO+PT_PC[ep], lp; \ + ldsr lp, SR_ ## savereg +/* Save the PSW register stored in the special register SAVREG to the + struct pt_regs pointed to by EP r19 is clobbered. */ +#define SAVE_PSW(savereg) \ + stsr SR_ ## savereg, r19; \ + sst.w r19, PTO+PT_PSW[ep] +/* Restore the PSW register from the struct pt_regs pointed to by EP, to + the special register SAVEREG. LP is clobbered (it is used as a scratch + register because the POP_STATE macro restores it, and this macro is + usually used inside POP_STATE). */ +#define RESTORE_PSW(savereg) \ + sld.w PTO+PT_PSW[ep], lp; \ + ldsr lp, SR_ ## savereg -/* Save system registers to the struct pt_regs pointed to by REG. +/* Save CTPC/CTPSW/CTBP registers to the struct pt_regs pointed to by REG. r19 is clobbered. */ -#define SAVE_SYS_REGS \ - stsr SR_EIPC, r19; /* user's PC, before interrupt */ \ - sst.w r19, PTO+PT_PC[ep]; \ - stsr SR_EIPSW, r19; /* & PSW (XXX save this?) */ \ - sst.w r19, PTO+PT_PSW[ep]; \ - stsr SR_CTPC, r19; /* (XXX maybe not used in kernel?) */ \ +#define SAVE_CT_REGS \ + stsr SR_CTPC, r19; \ sst.w r19, PTO+PT_CTPC[ep]; \ - stsr SR_CTPSW, r19; /* " */ \ + stsr SR_CTPSW, r19; \ sst.w r19, PTO+PT_CTPSW[ep]; \ - stsr SR_CTBP, r19; /* " */ \ - sst.w r19, PTO+PT_CTBP[ep]; -/* Restore system registers from the struct pt_regs pointed to by EP. + stsr SR_CTBP, r19; \ + sst.w r19, PTO+PT_CTBP[ep] +/* Restore CTPC/CTPSW/CTBP registers from the struct pt_regs pointed to by EP. LP is clobbered (it is used as a scratch register because the POP_STATE macro restores it, and this macro is usually used inside POP_STATE). */ -#define RESTORE_SYS_REGS \ - sld.w PTO+PT_PC[ep], lp; \ - ldsr lp, SR_EIPC; /* user's PC, before interrupt */ \ - sld.w PTO+PT_PSW[ep], lp; \ - ldsr lp, SR_EIPSW; /* & PSW (XXX save this?) */ \ +#define RESTORE_CT_REGS \ sld.w PTO+PT_CTPC[ep], lp; \ - ldsr lp, SR_CTPC; /* (XXX maybe not used in kernel?) */ \ + ldsr lp, SR_CTPC; \ sld.w PTO+PT_CTPSW[ep], lp; \ - ldsr lp, SR_CTPSW; /* " */ \ + ldsr lp, SR_CTPSW; \ sld.w PTO+PT_CTBP[ep], lp; \ - ldsr lp, SR_CTBP; /* " */ - - -/* Save system registers to the struct pt_regs pointed to by REG. This is a - NMI-specific version, because NMIs save the PC/PSW in a different place - than other interrupt requests. r19 is clobbered. */ -#define SAVE_SYS_REGS_FOR_NMI \ - stsr SR_FEPC, r19; /* user's PC, before NMI */ \ - sst.w r19, PTO+PT_PC[ep]; \ - stsr SR_FEPSW, r19; /* & PSW (XXX save this?) */ \ - sst.w r19, PTO+PT_PSW[ep]; \ - stsr SR_CTPC, r19; /* (XXX maybe not used in kernel?) */ \ - sst.w r19, PTO+PT_CTPC[ep]; \ - stsr SR_CTPSW, r19; /* " */ \ - sst.w r19, PTO+PT_CTPSW[ep]; \ - stsr SR_CTBP, r19; /* " */ \ - sst.w r19, PTO+PT_CTBP[ep]; -/* Restore system registers from the struct pt_regs pointed to by EP. This is - a NMI-specific version, because NMIs save the PC/PSW in a different place - than other interrupt requests. LP is clobbered (it is used as a scratch - register because the POP_STATE macro restores it, and this macro is usually - used inside POP_STATE). */ -#define RESTORE_SYS_REGS_FOR_NMI \ - ldsr lp, SR_FEPC; /* user's PC, before NMI */ \ - sld.w PTO+PT_PC[ep], lp; \ - ldsr lp, SR_FEPSW; /* & PSW (XXX save this?) */ \ - sld.w PTO+PT_PSW[ep], lp; \ - ldsr lp, SR_CTPC; /* (XXX maybe not used in kernel?) */ \ - sld.w PTO+PT_CTPC[ep], lp; \ - ldsr lp, SR_CTPSW; /* " */ \ - sld.w PTO+PT_CTPSW[ep], lp; \ - ldsr lp, SR_CTBP; /* " */ \ - sld.w PTO+PT_CTBP[ep], lp; + ldsr lp, SR_CTBP /* Push register state, except for the stack pointer, on the stack in the form @@ -213,7 +192,7 @@ mov sp, ep; \ sst.w gp, PTO+PT_GPR(GPR_GP)[ep]; \ sst.w lp, PTO+PT_GPR(GPR_LP)[ep]; \ - type ## _STATE_SAVER; + type ## _STATE_SAVER /* Pop a register state, except for the stack pointer, from the struct pt_regs on the stack. */ #define POP_STATE(type) \ @@ -222,161 +201,175 @@ sld.w PTO+PT_GPR(GPR_GP)[ep], gp; \ sld.w PTO+PT_GPR(GPR_LP)[ep], lp; \ sld.w PTO+PT_GPR(GPR_EP)[ep], ep; \ - addi STATE_SAVE_SIZE, sp, sp; /* Clean up our stack space. */ + addi STATE_SAVE_SIZE, sp, sp /* Clean up our stack space. */ -/* Switch to the kernel stack if necessary, and push register state on - the stack in the form of a struct pt_regs. Also load the current - task pointer if switching from user mode. The stack-pointer (r3) - should have already been saved to the memory location SP_SAVE_LOC - (the reason for this is that the interrupt vectors may be beyond a - 22-bit signed offset jump from the actual interrupt handler, and this - allows them to save the stack-pointer and use that register to do an - indirect jump). This macro makes sure that `special' registers, - system registers, and the stack pointer are saved; TYPE identifies - the set of extra registers to be saved as well. SYSCALL_NUM is the - register in which the system-call number this state is for is stored - (r0 if this isn't a system call). Interrupts should already be - disabled when calling this. */ +/* Switch to the kernel stack if necessary, and push register state on the + stack in the form of a struct pt_regs. Also load the current task + pointer if switching from user mode. The stack-pointer (r3) should have + already been saved to the memory location SP_SAVE_LOC (the reason for + this is that the interrupt vectors may be beyond a 22-bit signed offset + jump from the actual interrupt handler, and this allows them to save the + stack-pointer and use that register to do an indirect jump). This macro + makes sure that `special' registers, system registers, and the stack + pointer are saved; TYPE identifies the set of extra registers to be + saved as well. SYSCALL_NUM is the register in which the system-call + number this state is for is stored (r0 if this isn't a system call). + Interrupts should already be disabled when calling this. */ #define SAVE_STATE(type, syscall_num, sp_save_loc) \ - tst1 0, KM; /* See if already in kernel mode. */ \ + tst1 0, KM; /* See if already in kernel mode. */ \ bz 1f; \ - /* Kernel-mode state save. */ \ - ld.w sp_save_loc, sp; /* Reload kernel stack-pointer. */ \ - st.w sp, (PT_GPR(GPR_SP)-PT_SIZE)[sp]; /* Save original SP. */ \ - PUSH_STATE(type); \ - mov 1, r19; /* Was in kernel-mode. */ \ - sst.w r19, PTO+PT_KERNEL_MODE[ep]; /* [ep is set by PUSH_STATE] */ \ - br 2f; \ -1: /* User-mode state save. */ \ - ld.w KSP, sp; /* Switch to kernel stack. */ \ - PUSH_STATE(type); \ - sst.w r0, PTO+PT_KERNEL_MODE[ep]; /* Was in user-mode. */ \ - ld.w sp_save_loc, r19; \ - sst.w r19, PTO+PT_GPR(GPR_SP)[ep]; /* Store user SP. */ \ - mov 1, r19; \ - st.b r19, KM; /* Now we're in kernel-mode. */ \ + ld.w sp_save_loc, sp; /* ... yes, use saved SP. */ \ + br 2f; \ +1: ld.w KSP, sp; /* ... no, switch to kernel stack. */ \ +2: PUSH_STATE(type); \ + ld.b KM, r19; /* Remember old kernel-mode. */ \ + sst.w r19, PTO+PT_KERNEL_MODE[ep]; \ + ld.w sp_save_loc, r19; /* Remember old SP. */ \ + sst.w r19, PTO+PT_GPR(GPR_SP)[ep]; \ + mov 1, r19; /* Now definitely in kernel-mode. */ \ + st.b r19, KM; \ GET_CURRENT_TASK(CURRENT_TASK); /* Fetch the current task pointer. */ \ -2: /* Save away the syscall number. */ \ - sst.w syscall_num, PTO+PT_SYSCALL[ep] + /* Save away the syscall number. */ \ + sst.w syscall_num, PTO+PT_SYSCALL[ep] /* Save register state not normally saved by PUSH_STATE for TYPE. */ #define SAVE_EXTRA_STATE(type) \ mov sp, ep; \ - type ## _EXTRA_STATE_SAVER; + type ## _EXTRA_STATE_SAVER /* Restore register state not normally restored by POP_STATE for TYPE. */ #define RESTORE_EXTRA_STATE(type) \ mov sp, ep; \ - type ## _EXTRA_STATE_RESTORER; + type ## _EXTRA_STATE_RESTORER /* Save any call-clobbered registers not normally saved by PUSH_STATE for TYPE. */ #define SAVE_EXTRA_STATE_FOR_FUNCALL(type) \ mov sp, ep; \ - type ## _FUNCALL_EXTRA_STATE_SAVER; + type ## _FUNCALL_EXTRA_STATE_SAVER /* Restore any call-clobbered registers not normally restored by POP_STATE for TYPE. */ #define RESTORE_EXTRA_STATE_FOR_FUNCALL(type) \ mov sp, ep; \ - type ## _FUNCALL_EXTRA_STATE_RESTORER; + type ## _FUNCALL_EXTRA_STATE_RESTORER -/* These are extra_state_saver/restorer values for a user trap. Note that we - save the argument registers so that restarted syscalls will function - properly (otherwise it wouldn't be necessary), and we must _not_ restore - the return-value registers (so that traps can return a value!), but there - are various options for what happens to other call-clobbered registers, - selected by preprocessor conditionals. */ - -#if TRAPS_PRESERVE_CALL_CLOBBERED_REGS - -/* Traps save/restore all call-clobbered registers (except for rval regs). */ -#define TRAP_STATE_SAVER \ - SAVE_CALL_CLOBBERED_REGS_NO_RVAL; \ - SAVE_SYS_REGS -#define TRAP_STATE_RESTORER \ - RESTORE_CALL_CLOBBERED_REGS_NO_RVAL; \ - RESTORE_SYS_REGS - -#else /* !TRAPS_PRESERVE_CALL_CLOBBERED_REGS */ +/* These are extra_state_saver/restorer values for a user trap. Note + that we save the argument registers so that restarted syscalls will + function properly (otherwise it wouldn't be necessary), and we must + _not_ restore the return-value registers (so that traps can return a + value!), but call-clobbered registers are not saved at all, as the + caller of the syscall function should have saved them. */ +#define TRAP_RET reti /* Traps don't save call-clobbered registers (but do still save arg regs). */ #define TRAP_STATE_SAVER \ - SAVE_ARG_REGS; \ - SAVE_SYS_REGS - -#if TRAPS_ZERO_CALL_CLOBBERED_REGS - -/* Traps zero call-clobbered registers (except for arg/rval regs) before - returning from a system call, to avoid any internal values from leaking out - of the kernel. */ -#define TRAP_STATE_RESTORER \ - ZERO_CALL_CLOBBERED_REGS_NO_ARGS_NO_RVAL; \ - RESTORE_ARG_REGS; \ - RESTORE_SYS_REGS - -#else /* !TRAPS_ZERO_CALL_CLOBBERED_REGS */ - + SAVE_ARG_REGS; \ + SAVE_PC(EIPC) /* When traps return, they just leave call-clobbered registers (except for arg regs) with whatever value they have from the kernel. */ #define TRAP_STATE_RESTORER \ - RESTORE_ARG_REGS; \ - RESTORE_SYS_REGS - -#endif /* TRAPS_ZERO_CALL_CLOBBERED_REGS */ -#endif /* TRAPS_PRESERVE_CALL_CLOBBERED_REGS */ - -/* Save registers not normally saved by traps. */ + RESTORE_ARG_REGS; \ + RESTORE_PC(EIPC) +/* Save registers not normally saved by traps. We need to save r12, even + though it's nominally call-clobbered, because it's used when restarting + a system call (the signal-handling path uses SAVE_EXTRA_STATE, and + expects r12 to be restored when the trap returns). Similarly, we must + save the PSW, so that it's at least in a known state in the the pt_regs + structure. */ #define TRAP_EXTRA_STATE_SAVER \ - SAVE_RVAL_REGS; \ - SAVE_CALL_SAVED_REGS + SAVE_RVAL_REGS; \ + sst.w r12, PTO+PT_GPR(12)[ep]; \ + SAVE_CALL_SAVED_REGS; \ + SAVE_PSW(EIPSW); \ + SAVE_CT_REGS #define TRAP_EXTRA_STATE_RESTORER \ - RESTORE_RVAL_REGS; \ - RESTORE_CALL_SAVED_REGS + RESTORE_RVAL_REGS; \ + sld.w PTO+PT_GPR(12)[ep], r12; \ + RESTORE_CALL_SAVED_REGS; \ + RESTORE_PSW(EIPSW); \ + RESTORE_CT_REGS #define TRAP_FUNCALL_EXTRA_STATE_SAVER \ - SAVE_RVAL_REGS + SAVE_RVAL_REGS #define TRAP_FUNCALL_EXTRA_STATE_RESTORER \ - RESTORE_RVAL_REGS - + RESTORE_RVAL_REGS /* Register saving/restoring for maskable interrupts. */ +#define IRQ_RET reti #define IRQ_STATE_SAVER \ - SAVE_CALL_CLOBBERED_REGS; \ - SAVE_SYS_REGS + SAVE_CALL_CLOBBERED_REGS; \ + SAVE_PC(EIPC); \ + SAVE_PSW(EIPSW) #define IRQ_STATE_RESTORER \ - RESTORE_CALL_CLOBBERED_REGS; \ - RESTORE_SYS_REGS + RESTORE_CALL_CLOBBERED_REGS; \ + RESTORE_PC(EIPC); \ + RESTORE_PSW(EIPSW) #define IRQ_EXTRA_STATE_SAVER \ - SAVE_CALL_SAVED_REGS + SAVE_CALL_SAVED_REGS; \ + SAVE_CT_REGS #define IRQ_EXTRA_STATE_RESTORER \ - RESTORE_CALL_SAVED_REGS + RESTORE_CALL_SAVED_REGS; \ + RESTORE_CT_REGS #define IRQ_FUNCALL_EXTRA_STATE_SAVER /* nothing */ #define IRQ_FUNCALL_EXTRA_STATE_RESTORER /* nothing */ /* Register saving/restoring for non-maskable interrupts. */ +#define NMI_RET reti #define NMI_STATE_SAVER \ - SAVE_CALL_CLOBBERED_REGS; \ - SAVE_SYS_REGS_FOR_NMI + SAVE_CALL_CLOBBERED_REGS; \ + SAVE_PC(FEPC); \ + SAVE_PSW(FEPSW); #define NMI_STATE_RESTORER \ - RESTORE_CALL_CLOBBERED_REGS; \ - RESTORE_SYS_REGS_FOR_NMI + RESTORE_CALL_CLOBBERED_REGS; \ + RESTORE_PC(FEPC); \ + RESTORE_PSW(FEPSW); #define NMI_EXTRA_STATE_SAVER \ - SAVE_CALL_SAVED_REGS + SAVE_CALL_SAVED_REGS; \ + SAVE_CT_REGS #define NMI_EXTRA_STATE_RESTORER \ - RESTORE_CALL_SAVED_REGS + RESTORE_CALL_SAVED_REGS; \ + RESTORE_CT_REGS #define NMI_FUNCALL_EXTRA_STATE_SAVER /* nothing */ #define NMI_FUNCALL_EXTRA_STATE_RESTORER /* nothing */ - -/* Register saving/restoring for a context switch. We don't need to save too - many registers, because context-switching looks like a function call (via - the function `switch_thread'), so callers will save any call-clobbered - registers themselves. The stack pointer and return value are handled by - switch_thread itself. */ + +/* Register saving/restoring for debug traps. */ +#define DBTRAP_RET .long 0x014607E0 /* `dbret', but gas doesn't support it. */ +#define DBTRAP_STATE_SAVER \ + SAVE_CALL_CLOBBERED_REGS; \ + SAVE_PC(DBPC); \ + SAVE_PSW(DBPSW) +#define DBTRAP_STATE_RESTORER \ + RESTORE_CALL_CLOBBERED_REGS; \ + RESTORE_PC(DBPC); \ + RESTORE_PSW(DBPSW) +#define DBTRAP_EXTRA_STATE_SAVER \ + SAVE_CALL_SAVED_REGS; \ + SAVE_CT_REGS +#define DBTRAP_EXTRA_STATE_RESTORER \ + RESTORE_CALL_SAVED_REGS; \ + RESTORE_CT_REGS +#define DBTRAP_FUNCALL_EXTRA_STATE_SAVER /* nothing */ +#define DBTRAP_FUNCALL_EXTRA_STATE_RESTORER /* nothing */ + +/* Register saving/restoring for a context switch. We don't need to save + too many registers, because context-switching looks like a function call + (via the function `switch_thread'), so callers will save any + call-clobbered registers themselves. We do need to save the CT regs, as + they're normally not saved during kernel entry (the kernel doesn't use + them). We save PSW so that interrupt-status state will correctly follow + each thread (mostly NMI vs. normal-IRQ/trap), though for the most part + it doesn't matter since threads are always in almost exactly the same + processor state during a context switch. The stack pointer and return + value are handled by switch_thread itself. */ #define SWITCH_STATE_SAVER \ - SAVE_CALL_SAVED_REGS + SAVE_CALL_SAVED_REGS; \ + SAVE_PSW(PSW); \ + SAVE_CT_REGS #define SWITCH_STATE_RESTORER \ - RESTORE_CALL_SAVED_REGS + RESTORE_CALL_SAVED_REGS; \ + RESTORE_PSW(PSW); \ + RESTORE_CT_REGS /* Restore register state from the struct pt_regs on the stack, switch back @@ -400,24 +393,27 @@ andi _TIF_SIGPENDING, r19, r0; \ bnz 4f; /* Signals to handle, handle them */ \ \ -/* Finally, return to user state. */ \ +/* Return to user state. */ \ 1: st.b r0, KM; /* Now officially in user state. */ \ - POP_STATE(type); \ - st.w sp, KSP; /* Save the kernel stack pointer. */ \ - ld.w PT_GPR(GPR_SP)-PT_SIZE[sp], sp; \ - /* Restore user stack pointer. */ \ - reti; \ \ -/* Return to kernel state. */ \ +/* Final return. The stack-pointer fiddling is not needed when returning \ + to kernel-mode, but they don't hurt, and this way we can share the \ + (somtimes rather lengthy) POP_STATE macro. */ \ 2: POP_STATE(type); \ - reti; \ + st.w sp, KSP; /* Save the kernel stack pointer. */ \ + ld.w PT_GPR(GPR_SP)-PT_SIZE[sp], sp; /* Restore stack pointer. */ \ + type ## _RET; /* Return from the trap/interrupt. */ \ \ /* Call the scheduler before returning from a syscall/trap. */ \ 3: SAVE_EXTRA_STATE_FOR_FUNCALL(type); /* Prepare for funcall. */ \ jarl CSYM(schedule), lp; /* Call scheduler */ \ di; /* The scheduler enables interrupts */\ RESTORE_EXTRA_STATE_FOR_FUNCALL(type); \ - br 1b; \ + GET_CURRENT_THREAD(r18); \ + ld.w TI_FLAGS[r18], r19; \ + andi _TIF_SIGPENDING, r19, r0; \ + bz 1b; /* No signals, return. */ \ + /* Signals to handle, fall through to handle them. */ \ \ /* Handle a signal return. */ \ 4: /* Not all registers are saved by the normal trap/interrupt entry \ @@ -428,13 +424,13 @@ complete register state. Here we save anything not saved by \ the normal entry sequence, so that it may be safely restored \ (in a possibly modified form) after do_signal returns. */ \ - SAVE_EXTRA_STATE(type) /* Save state not saved by entry. */ \ + SAVE_EXTRA_STATE(type); /* Save state not saved by entry. */ \ movea PTO, sp, r6; /* Arg 1: struct pt_regs *regs */ \ mov r0, r7; /* Arg 2: sigset_t *oldset */ \ jarl CSYM(do_signal), lp; /* Handle any signals */ \ di; /* sig handling enables interrupts */ \ RESTORE_EXTRA_STATE(type); /* Restore extra regs. */ \ - br 1b; + br 1b /* Jump to the appropriate function for the system call number in r12 @@ -454,7 +450,7 @@ jmp [r12]; \ /* The syscall number is invalid, return an error. */ \ 1: addi -ENOSYS, r0, r10; \ - jmp [lp]; + jmp [lp] .text @@ -469,7 +465,7 @@ * beyond a 22-bit signed offset jump from the actual interrupt handler, and * this allows them to save the stack-pointer and use that register to do an * indirect jump). - * + * * Syscall protocol: * Syscall number in r12, args in r6-r9 * Return value in r10 @@ -537,18 +533,15 @@ st.w r13, 16[sp] // arg 5 st.w r14, 20[sp] // arg 6 -#if !TRAPS_PRESERVE_CALL_CLOBBERED_REGS // Make sure r13 and r14 are preserved, in case we have to restart a // system call because of a signal (ep has already been set by caller). st.w r13, PTO+PT_GPR(13)[sp] st.w r14, PTO+PT_GPR(13)[sp] mov hilo(ret_from_long_syscall), lp -#endif /* !TRAPS_PRESERVE_CALL_CLOBBERED_REGS */ MAKE_SYS_CALL // Jump to the syscall function. END(syscall_long) -#if !TRAPS_PRESERVE_CALL_CLOBBERED_REGS /* Entry point used to return from a long syscall. Only needed to restore r13/r14 if the general trap mechanism doesnt' do so. */ L_ENTRY(ret_from_long_syscall): @@ -556,7 +549,6 @@ ld.w PTO+PT_GPR(13)[sp], r14 br ret_from_trap // The rest is the same as other traps END(ret_from_long_syscall) -#endif /* !TRAPS_PRESERVE_CALL_CLOBBERED_REGS */ /* These syscalls need access to the struct pt_regs on the stack, so we @@ -564,14 +556,11 @@ L_ENTRY(sys_fork_wrapper): #ifdef CONFIG_MMU - // Save state not saved by entry. This is actually slight overkill; - // it's actually only necessary to save any state restored by - // switch_thread that's not saved by the trap entry. - SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. addi SIGCHLD, r0, r6 // Arg 0: flags ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's) movea PTO, sp, r8 // Arg 2: parent context - jr CSYM(fork_common) // Do real work (tail-call). + mov hilo(CSYM(fork_common)), r18// Where the real work gets done + br save_extra_state_tramp // Save state and go there #else // fork almost works, enough to trick you into looking elsewhere :-( addi -EINVAL, r0, r10 @@ -580,60 +569,66 @@ END(sys_fork_wrapper) L_ENTRY(sys_vfork_wrapper): - // Save state not saved by entry. This is actually slight overkill; - // it's actually only necessary to save any state restored by - // switch_thread that's not saved by the trap entry. - SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. addi CLONE_VFORK | CLONE_VM | SIGCHLD, r0, r6 // Arg 0: flags ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's) movea PTO, sp, r8 // Arg 2: parent context - jr CSYM(fork_common) // Do real work (tail-call). + mov hilo(CSYM(fork_common)), r18// Where the real work gets done + br save_extra_state_tramp // Save state and go there END(sys_vfork_wrapper) L_ENTRY(sys_clone_wrapper): - // Save state not saved by entry. This is actually slight overkill; - // it's actually only necessary to save any state restored by - // switch_thread that's not saved by the trap entry. - SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. ld.w PTO+PT_GPR(GPR_SP)[sp], r19 // parent's stack pointer cmp r7, r0 // See if child SP arg (arg 1) is 0. cmov z, r19, r7, r7 // ... and use the parent's if so. movea PTO, sp, r8 // Arg 2: parent context - jr CSYM(fork_common) // Do real work (tail-call). + mov hilo(CSYM(fork_common)), r18// Where the real work gets done + br save_extra_state_tramp // Save state and go there END(sys_clone_wrapper) + L_ENTRY(sys_execve_wrapper): movea PTO, sp, r9 // add user context as 4th arg jr CSYM(sys_execve) // Do real work (tail-call). END(sys_execve_wrapper) + L_ENTRY(sys_sigsuspend_wrapper): - SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. movea PTO, sp, r7 // add user context as 2nd arg - jarl CSYM(sys_sigsuspend), lp// Do real work. + mov hilo(CSYM(sys_sigsuspend)), r18 // syscall function + jarl save_extra_state_tramp, lp // Save state and do it br restore_extra_regs_and_ret_from_trap END(sys_sigsuspend_wrapper) L_ENTRY(sys_rt_sigsuspend_wrapper): - SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. movea PTO, sp, r8 // add user context as 3rd arg - jarl CSYM(sys_rt_sigsuspend), lp // Do real work. + mov hilo(CSYM(sys_rt_sigsuspend)), r18 // syscall function + jarl save_extra_state_tramp, lp // Save state and do it br restore_extra_regs_and_ret_from_trap END(sys_rt_sigsuspend_wrapper) L_ENTRY(sys_sigreturn_wrapper): - SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. movea PTO, sp, r6 // add user context as 1st arg - jarl CSYM(sys_sigreturn), lp // Do real work. + mov hilo(CSYM(sys_sigreturn)), r18 // syscall function + jarl save_extra_state_tramp, lp // Save state and do it br restore_extra_regs_and_ret_from_trap END(sys_sigreturn_wrapper) L_ENTRY(sys_rt_sigreturn_wrapper): SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. movea PTO, sp, r6 // add user context as 1st arg - jarl CSYM(sys_rt_sigreturn), lp // Do real work. + mov hilo(CSYM(sys_rt_sigreturn)), r18 // syscall function + jarl save_extra_state_tramp, lp // Save state and do it br restore_extra_regs_and_ret_from_trap END(sys_rt_sigreturn_wrapper) +/* Save any state not saved by SAVE_STATE(TRAP), and jump to r18. + It's main purpose is to share the rather lengthy code sequence that + SAVE_STATE expands into among the above wrapper functions. */ +L_ENTRY(save_extra_state_tramp): + SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. + jmp [r18] // Do the work the caller wants +END(save_extra_state_tramp) + + /* * Hardware maskable interrupts. * @@ -658,37 +653,40 @@ shr 20, r6 // shift back, and remove lower nibble add -8, r6 // remove bias for irqs - // If the IRQ index is negative, it's actually one of the exception - // traps below 0x80 (currently, the illegal instruction trap, and - // the `debug trap'). Handle these separately. - bn exception - // Call the high-level interrupt handling code. jarl CSYM(handle_irq), lp - // fall through -/* Entry point used to return from an interrupt (also used by exception - handlers, below). */ -ret_from_irq: RETURN(IRQ) +END(irq) -exception: - mov hilo(ret_from_irq), lp // where the handler should return - cmp -2, r6 - bne 1f - // illegal instruction exception - addi SIGILL, r0, r6 // Arg 0: signal number - mov CURRENT_TASK, r7 // Arg 1: task - jr CSYM(force_sig) // tail call +/* + * Debug trap / illegal-instruction exception + * + * The stack-pointer (r3) should have already been saved to the memory + * location ENTRY_SP (the reason for this is that the interrupt vectors may be + * beyond a 22-bit signed offset jump from the actual interrupt handler, and + * this allows them to save the stack-pointer and use that register to do an + * indirect jump). + */ +G_ENTRY(dbtrap): + SAVE_STATE (DBTRAP, r0, ENTRY_SP)// Save registers. -1: cmp -1, r6 - bne bad_trap_wrapper - // `dbtrap' exception - movea PTO, sp, r6 // Arg 0: user regs - jr CSYM(debug_trap) // tail call + /* Look to see if the preceding instruction was is a dbtrap or not, + to decide which signal we should use. */ + stsr SR_DBPC, r19 // PC following trapping insn + ld.hu -2[r19], r19 + mov SIGTRAP, r6 + ori 0xf840, r0, r20 // DBTRAP insn + cmp r19, r20 // Was this trap caused by DBTRAP? + cmov ne, SIGILL, r6, r6 // Choose signal appropriately -END(irq) + /* Raise the desired signal. */ + mov CURRENT_TASK, r7 // Arg 1: task + jarl CSYM(force_sig), lp // tail call + + RETURN(DBTRAP) +END(dbtrap) /* @@ -711,7 +709,7 @@ Call the generic IRQ handler, with two arguments, the IRQ number, and a pointer to the user registers, to handle the specifics. (we subtract one because the first NMI has code 1). */ - addi FIRST_NMI - 1, r6, r6; + addi FIRST_NMI - 1, r6, r6 jarl CSYM(handle_irq), lp RETURN(NMI) diff -Nru a/arch/v850/kernel/init_task.c b/arch/v850/kernel/init_task.c --- a/arch/v850/kernel/init_task.c Sun Feb 23 22:25:22 2003 +++ b/arch/v850/kernel/init_task.c Sun Feb 23 22:25:22 2003 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/init_task.c -- Initial task/thread structures * - * Copyright (C) 2002 NEC Corporation - * Copyright (C) 2002 Miles Bader + * Copyright (C) 2002,03 NEC Electronics Corporation + * Copyright (C) 2002,03 Miles Bader * * 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 @@ -21,6 +21,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/v850/kernel/intv.S b/arch/v850/kernel/intv.S --- a/arch/v850/kernel/intv.S Sun Feb 23 22:25:24 2003 +++ b/arch/v850/kernel/intv.S Sun Feb 23 22:25:24 2003 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/intv.S -- Interrupt vectors * - * Copyright (C) 2001,02 NEC Corporation - * Copyright (C) 2001,02 Miles Bader + * Copyright (C) 2001,02,03 NEC Electronics Corporation + * Copyright (C) 2001,02,03 Miles Bader * * 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 @@ -40,22 +40,19 @@ /* Generic interrupt vectors. */ .section .intv.common, "ax" .balign 0x10 - JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // NMI0 + JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x10 - NMI0 .balign 0x10 - JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // NMI1 + JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x20 - NMI1 .balign 0x10 - JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // NMI2 + JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x30 - NMI2 .balign 0x10 - JUMP_TO_HANDLER (trap, ENTRY_SP) // TRAP0n + JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x40 - TRAP0n .balign 0x10 - JUMP_TO_HANDLER (trap, ENTRY_SP) // TRAP1n + JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x50 - TRAP1n .balign 0x10 - JUMP_TO_HANDLER (irq, ENTRY_SP) // illegal insn trap - - .balign 0x10 - JUMP_TO_HANDLER (irq, ENTRY_SP) // DBTRAP insn + JUMP_TO_HANDLER (dbtrap, ENTRY_SP) // 0x60 - Illegal op / DBTRAP insn /* Hardware interrupt vectors. */ diff -Nru a/arch/v850/kernel/irq.c b/arch/v850/kernel/irq.c --- a/arch/v850/kernel/irq.c Sun Feb 23 22:25:25 2003 +++ b/arch/v850/kernel/irq.c Sun Feb 23 22:25:25 2003 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/irq.c -- High-level interrupt handling * - * Copyright (C) 2001,02 NEC Corporation - * Copyright (C) 2001,02 Miles Bader + * Copyright (C) 2001,02,03 NEC Corporation + * Copyright (C) 2001,02,03 Miles Bader * Copyright (C) 1994-2000 Ralf Baechle * Copyright (C) 1992 Linus Torvalds * @@ -713,3 +713,9 @@ base_irq += interval; } } + +#if defined(CONFIG_PROC_FS) && defined(CONFIG_SYSCTL) +void init_irq_proc(void) +{ +} +#endif /* CONFIG_PROC_FS && CONFIG_SYSCTL */ diff -Nru a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c --- a/arch/v850/kernel/process.c Sun Feb 23 22:25:22 2003 +++ b/arch/v850/kernel/process.c Sun Feb 23 22:25:22 2003 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/process.c -- Arch-dependent process handling * - * Copyright (C) 2001,02 NEC Corporation - * Copyright (C) 2001,02 Miles Bader + * Copyright (C) 2001,02,03 NEC Corporation + * Copyright (C) 2001,02,03 Miles Bader * * 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 @@ -75,7 +75,9 @@ set_fs (KERNEL_DS); - /* Clone this thread. */ + /* Clone this thread. Note that we don't pass the clone syscall's + second argument -- it's ignored for calls from kernel mode (the + child's SP is always set to the top of the kernel stack). */ arg0 = flags | CLONE_VM; syscall = __NR_clone; asm volatile ("trap " SYSCALL_SHORT_TRAP @@ -109,7 +111,8 @@ struct task_struct *p, struct pt_regs *regs) { /* Start pushing stuff from the top of the child's kernel stack. */ - unsigned long ksp = (unsigned long)p->thread_info + THREAD_SIZE; + unsigned long orig_ksp = (unsigned long)p->thread_info + THREAD_SIZE; + unsigned long ksp = orig_ksp; /* We push two `state save' stack fames (see entry.S) on the new kernel stack: 1) The innermost one is what switch_thread would have @@ -137,6 +140,19 @@ register (r31), so we make that the place where we want to jump when the child thread begins running. */ child_switch_regs->gpr[GPR_LP] = (v850_reg_t)ret_from_fork; + + if (regs->kernel_mode) + /* Since we're returning to kernel-mode, make sure the child's + stored kernel stack pointer agrees with what the actual + stack pointer will be at that point (the trap return code + always restores the SP, even when returning to + kernel-mode). */ + child_trap_regs->gpr[GPR_SP] = orig_ksp; + else + /* Set the child's user-mode stack-pointer (the name + `stack_start' is a misnomer, it's just the initial SP + value). */ + child_trap_regs->gpr[GPR_SP] = stack_start; /* Thread state for the child (everything else is on the stack). */ p->thread.ksp = ksp; diff -Nru a/arch/v850/kernel/rte_cb_multi.c b/arch/v850/kernel/rte_cb_multi.c --- a/arch/v850/kernel/rte_cb_multi.c Sun Feb 23 22:25:23 2003 +++ b/arch/v850/kernel/rte_cb_multi.c Sun Feb 23 22:25:23 2003 @@ -2,8 +2,8 @@ * include/asm-v850/rte_multi.c -- Support for Multi debugger monitor ROM * on Midas lab RTE-CB series of evaluation boards * - * Copyright (C) 2001,02 NEC Corporation - * Copyright (C) 2001,02 Miles Bader + * Copyright (C) 2001,02,03 NEC Corporation + * Copyright (C) 2001,02,03 Miles Bader * * 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 @@ -23,6 +23,9 @@ the table. */ static long multi_intv_install_table[] = { 0x40, 0x50, /* trap vectors */ +#ifdef CONFIG_RTE_CB_MULTI_DBTRAP + 0x60, /* illegal insn / dbtrap */ +#endif /* Note -- illegal insn trap is used by the debugger. */ 0xD0, 0xE0, 0xF0, /* GINT1 - GINT3 */ 0x240, 0x250, 0x260, 0x270, /* timer D interrupts */ @@ -52,7 +55,7 @@ register unsigned long jr_fixup = (char *)&_intv_start - (char *)dst; register long *ii; - /* Copy interupt vectors as instructed by multi_intv_install_table. */ + /* Copy interrupt vectors as instructed by multi_intv_install_table. */ for (ii = multi_intv_install_table; *ii >= 0; ii++) { /* Copy 16-byte interrupt vector at offset *ii. */ int boffs; diff -Nru a/arch/v850/kernel/signal.c b/arch/v850/kernel/signal.c --- a/arch/v850/kernel/signal.c Sun Feb 23 22:25:27 2003 +++ b/arch/v850/kernel/signal.c Sun Feb 23 22:25:27 2003 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/signal.c -- Signal handling * - * Copyright (C) 2001,02 NEC Corporation - * Copyright (C) 2001,02 Miles Bader + * Copyright (C) 2001,02,03 NEC Electronics Corporation + * Copyright (C) 2001,02,03 Miles Bader * Copyright (C) 1999,2000,2002 Niibe Yutaka & Kaz Kojima * Copyright (C) 1991,1992 Linus Torvalds * @@ -434,7 +434,7 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) { - struct k_sigaction *ka = ¤t->sig->action[sig-1]; + struct k_sigaction *ka = ¤t->sighand->action[sig-1]; /* Are we from a system call? */ if (PT_REGS_SYSCALL (regs)) { diff -Nru a/arch/v850/vmlinux.lds.S b/arch/v850/vmlinux.lds.S --- a/arch/v850/vmlinux.lds.S Sun Feb 23 22:25:25 2003 +++ b/arch/v850/vmlinux.lds.S Sun Feb 23 22:25:25 2003 @@ -24,9 +24,12 @@ /* Interrupt vectors. */ #define INTV_CONTENTS \ + . = ALIGN (0x10) ; \ __intv_start = . ; \ *(.intv.reset) /* Reset vector */ \ + . = __intv_start + 0x10 ; \ *(.intv.common) /* Vectors common to all v850e proc */\ + . = __intv_start + 0x80 ; \ *(.intv.mach) /* Machine-specific int. vectors. */ \ __intv_end = . ; diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig --- a/arch/x86_64/Kconfig Sun Feb 23 22:25:25 2003 +++ b/arch/x86_64/Kconfig Sun Feb 23 22:25:25 2003 @@ -204,7 +204,7 @@ # someone write a better help text please. config K8_NUMA bool "K8 NUMA support" - depends on SMP + depends on SMP && NOT_WORKING help Enable NUMA (Non Unified Memory Architecture) support for AMD Opteron Multiprocessor systems. The kernel will try to allocate diff -Nru a/arch/x86_64/boot/compressed/misc.c b/arch/x86_64/boot/compressed/misc.c --- a/arch/x86_64/boot/compressed/misc.c Sun Feb 23 22:25:24 2003 +++ b/arch/x86_64/boot/compressed/misc.c Sun Feb 23 22:25:24 2003 @@ -329,84 +329,46 @@ void check_cpu(void) { - int res = 0; - int tmp, flags; + unsigned before, after, flags; + unsigned a,b,c,d; + int isamd; + + /* check if the CPU supports CPUID. This is done by testing if the CPU + supports changing the ID bit (21) in EFLAGS. */ + asm("pushfl ; " + "popl %0 ; " /* get EFLAGS */ + "movl %0,%1 ; " + "xorl $(1<<21),%0 ; " /* toggle bit 21 */ + "pushl %0 ; " + "popfl ; " + "pushfl ; " /* get EFLAGS again */ + "popl %0 " : "=r" (after), "=r" (before)); + if (before == after) + error("Your CPU doesn't support CPUID."); + + /* check if it supports AMD extended cpuid reporting */ + asm("cpuid" : "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "0" (0x80000000)); + + if (a < 0x80000001) + error("Your CPU doesn't support AMD extended CPUIDs."); + + /* AuthenticAMD */ + isamd = (b == 0x68747541) && (d == 0x69746e65) && (c == 0x444d4163); - asm volatile( " \n\ - movl $3,%%edx # at least 386 \n\ - pushfl # push EFLAGS \n\ - popl %%eax # get EFLAGS \n\ - movl %%eax,%%ecx # save original EFLAGS \n\ - xorl $0x40000,%%eax # flip AC bit in EFLAGS \n\ - pushl %%eax # copy to EFLAGS \n\ - popfl # set EFLAGS \n\ - pushfl # get new EFLAGS \n\ - popl %%eax # put it in eax \n\ - xorl %%ecx,%%eax # change in flags \n\ - andl $0x40000,%%eax # check if AC bit changed \n\ - je 1f \n\ -\n\ - movl $4,%%edx # at least 486 \n\ - movl %%ecx,%%eax \n\ - xorl $0x200000,%%eax # check ID flag \n\ - pushl %%eax \n\ - popfl # if we are on a straight 486DX, SX, or \n\ - pushfl # 487SX we can't change it \n\ - popl %%eax \n\ - xorl %%ecx,%%eax \n\ - pushl %%ecx # restore original EFLAGS \n\ - popfl \n\ - andl $0x200000,%%eax \n\ - je 1f \n\ -\n\ - /* get vendor info */ \n\ -# xorl %%eax,%%eax # call CPUID with 0 -> return vendor ID \n\ -# cpuid \n\ -# movl $5, %%edx \n\ -# cmpl $0x41757468,%%ebx # check thats amd \n\ -# jne 1f \n\ -\n\ - mov $0x80000000,%%eax # Is extended cpuid supported?\n\ - cpuid\n\ - test $0x80000000,%%eax\n\ - movl $5, %%edx \n\ - jz 1f\n\ -\n\ - movl $0x80000001,%%eax \n\ - cpuid \n\ - andl $0x20000000,%%edx \n\ - movl $6, %%edx \n\ - jz 1f \n\ -\n\ - movl $7, %%edx \n\ -1:" : "=d" (res) : : "eax", "ebx", "ecx" ); - - switch (res) { - case 3: puts( "386" ); - break; - case 4: puts( "486" ); - break; - case 5: puts( "no extended cpuid" ); - break; - case 6: puts( "non-64bit 586+" ); - break; - case 7: puts( "64bit" ); - break; - default:puts( "internal error" ); - break; - } - if (res !=7) - error( "Sorry, your CPU is not capable of running 64-bit kernel." ); /* check required feature flags */ /* see http://www.x86-64.org/lists/discuss/msg02971.html */ #define REQUIRED_MASK1 ((1<<0)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<8)|(1<<11)| \ (1<<13)|(1<<15)|(1<<24)) - asm("cpuid" : "=d" (flags), "=a" (tmp) : "1" (0x80000001) : "ebx", "ecx"); + asm("cpuid" : "=d" (flags), "=a" (a) : "1" (0x80000001) : "ebx", "ecx"); flags &= REQUIRED_MASK1; flags ^= REQUIRED_MASK1; + if (flags & (1<<9)) { + puts("WARNING: non APIC mode for long mode kernel is untested."); + puts("In case of trouble use 32bit kernel or enable APIC."); + } if (flags & (1<<0)) - error("CPU misses x87"); + error("CPU misses x87 FPU"); if (flags & (1<<3)) error("CPU doesn't support page size extension (PSE)"); if (flags & (1<<4)) @@ -425,11 +387,23 @@ error("CPU doesn't support CMOV"); if (flags & (1<<24)) error("CPU doesn't support FXSAVE/FXRSTOR"); + if (flags & (1<<29)) + error("CPU doesn't support long mode"); + +#define SSE_MASK ((1<<25)|(1<<26)) + asm("cpuid" : "=d" (flags), "=a" (a) : "1" (1) : "ebx", "ecx"); + if ((flags & SSE_MASK) != SSE_MASK && isamd) { + /* Only try this on AMD CPUs. */ + /* Enable SSE in HWCFG MSR */ + asm volatile("rdmsr" : "=d" (d), "=a" (flags) : "c" (0xc0010015)); + flags &= ~(1<<15); + asm volatile("wrmsr" :: "d" (d), "a" (flags), "c" (0xc0010015)); + } -#define REQUIRED_MASK2 ((1<<25)|(1<<26)) - asm("cpuid" : "=d" (flags), "=a" (tmp) : "1" (1) : "ebx", "ecx"); - flags &= REQUIRED_MASK2; - flags ^= REQUIRED_MASK2; + /* Try again */ + asm("cpuid" : "=d" (flags), "=a" (a) : "1" (1) : "ebx", "ecx"); + flags &= SSE_MASK; + flags ^= SSE_MASK; if (flags & (1<<25)) error("CPU doesn't support SSE1"); if (flags & (1<<26)) diff -Nru a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c --- a/arch/x86_64/ia32/ia32_ioctl.c Sun Feb 23 22:25:24 2003 +++ b/arch/x86_64/ia32/ia32_ioctl.c Sun Feb 23 22:25:24 2003 @@ -3593,7 +3593,7 @@ IOCTL_TABLE_START /* List here explicitly which ioctl's are known to have - * compatable types passed or none at all... + * compatible types passed or none at all... */ /* Big T */ COMPATIBLE_IOCTL(TCGETA) diff -Nru a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c --- a/arch/x86_64/ia32/sys_ia32.c Sun Feb 23 22:25:24 2003 +++ b/arch/x86_64/ia32/sys_ia32.c Sun Feb 23 22:25:24 2003 @@ -1573,7 +1573,7 @@ return ret; } -/* Handle adjtimex compatability. */ +/* Handle adjtimex compatibility. */ struct timex32 { u32 modes; diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile --- a/arch/x86_64/kernel/Makefile Sun Feb 23 22:25:25 2003 +++ b/arch/x86_64/kernel/Makefile Sun Feb 23 22:25:25 2003 @@ -22,8 +22,6 @@ obj-$(CONFIG_GART_IOMMU) += pci-gart.o aperture.o obj-$(CONFIG_DUMMY_IOMMU) += pci-nommu.o obj-$(CONFIG_MODULES) += module.o -obj-$(CONFIG_PROFILING) += profile.o - $(obj)/bootflag.c: @ln -sf ../../i386/kernel/bootflag.c $(obj)/bootflag.c diff -Nru a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c --- a/arch/x86_64/kernel/apic.c Sun Feb 23 22:25:22 2003 +++ b/arch/x86_64/kernel/apic.c Sun Feb 23 22:25:22 2003 @@ -37,9 +37,19 @@ int dont_enable_local_apic __initdata = 0; -int prof_multiplier[NR_CPUS] = { 1, }; -int prof_old_multiplier[NR_CPUS] = { 1, }; -DEFINE_PER_CPU(int, prof_counter) = 1; +static DEFINE_PER_CPU(int, prof_multiplier) = 1; +static DEFINE_PER_CPU(int, prof_old_multiplier) = 1; +static DEFINE_PER_CPU(int, prof_counter) = 1; + +void enable_NMI_through_LVT0 (void * dummy) +{ + unsigned int v, ver; + + ver = apic_read(APIC_LVR); + ver = GET_APIC_VERSION(ver); + v = APIC_DM_NMI; /* unmask and set to NMI */ + apic_write_around(APIC_LVT0, v); +} int get_maxlvt(void) { @@ -47,8 +57,7 @@ v = apic_read(APIC_LVR); ver = GET_APIC_VERSION(v); - /* 82489DXs do not report # of LVT entries. */ - maxlvt = APIC_INTEGRATED(ver) ? GET_APIC_MAXLVT(v) : 2; + maxlvt = GET_APIC_MAXLVT(v); return maxlvt; } @@ -878,7 +887,7 @@ * accordingly. */ for (i = 0; i < NR_CPUS; ++i) - prof_multiplier[i] = multiplier; + per_cpu(prof_multiplier, i) = multiplier; return 0; } @@ -910,11 +919,13 @@ * * Interrupts are already masked off at this point. */ - per_cpu(prof_counter, cpu) = prof_multiplier[cpu]; - if (per_cpu(prof_counter, cpu) != prof_old_multiplier[cpu]) { + per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu); + if (per_cpu(prof_counter, cpu) != + per_cpu(prof_old_multiplier, cpu)) { __setup_APIC_LVTT(calibration_result/ per_cpu(prof_counter, cpu)); - prof_old_multiplier[cpu] = per_cpu(prof_counter, cpu); + per_cpu(prof_old_multiplier, cpu) = + per_cpu(prof_counter, cpu); } #ifdef CONFIG_SMP diff -Nru a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S --- a/arch/x86_64/kernel/entry.S Sun Feb 23 22:25:23 2003 +++ b/arch/x86_64/kernel/entry.S Sun Feb 23 22:25:23 2003 @@ -98,9 +98,8 @@ * A newly forked process directly context switches into this. */ ENTRY(ret_from_fork) -#if CONFIG_SMP || CONFIG_PREEMPT + movq %rax,%rdi /* prev task, returned by __switch_to -> arg1 */ call schedule_tail -#endif GET_THREAD_INFO(%rcx) bt $TIF_SYSCALL_TRACE,threadinfo_flags(%rcx) jc rff_trace @@ -115,6 +114,7 @@ rff_trace: movq %rsp,%rdi call syscall_trace + GET_THREAD_INFO(%rcx) jmp rff_action /* @@ -569,7 +569,7 @@ swapgs gs_change: movl %edi,%gs -2: sfence /* workaround */ +2: mfence /* workaround */ swapgs popf ret diff -Nru a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c --- a/arch/x86_64/kernel/io_apic.c Sun Feb 23 22:25:24 2003 +++ b/arch/x86_64/kernel/io_apic.c Sun Feb 23 22:25:24 2003 @@ -703,8 +703,10 @@ void __init UNEXPECTED_IO_APIC(void) { +#if 0 printk(KERN_WARNING " WARNING: unexpected IO-APIC, please mail\n"); printk(KERN_WARNING " to linux-smp@vger.kernel.org\n"); +#endif } void __init print_IO_APIC(void) @@ -1297,25 +1299,25 @@ */ static struct hw_interrupt_type ioapic_edge_irq_type = { - "IO-APIC-edge", - startup_edge_ioapic_irq, - shutdown_edge_ioapic_irq, - enable_edge_ioapic_irq, - disable_edge_ioapic_irq, - ack_edge_ioapic_irq, - end_edge_ioapic_irq, - set_ioapic_affinity, + .typename = "IO-APIC-edge", + .startup = startup_edge_ioapic_irq, + .shutdown = shutdown_edge_ioapic_irq, + .enable = enable_edge_ioapic_irq, + .disable = disable_edge_ioapic_irq, + .ack = ack_edge_ioapic_irq, + .end = end_edge_ioapic_irq, + .set_affinity = set_ioapic_affinity, }; static struct hw_interrupt_type ioapic_level_irq_type = { - "IO-APIC-level", - startup_level_ioapic_irq, - shutdown_level_ioapic_irq, - enable_level_ioapic_irq, - disable_level_ioapic_irq, - mask_and_ack_level_ioapic_irq, - end_level_ioapic_irq, - set_ioapic_affinity, + .typename = "IO-APIC-level", + .startup = startup_level_ioapic_irq, + .shutdown = shutdown_level_ioapic_irq, + .enable = enable_level_ioapic_irq, + .disable = disable_level_ioapic_irq, + .ack = mask_and_ack_level_ioapic_irq, + .end = end_level_ioapic_irq, + .set_affinity = set_ioapic_affinity, }; static inline void init_IO_APIC_traps(void) @@ -1373,26 +1375,14 @@ static void end_lapic_irq (unsigned int i) { /* nothing */ } static struct hw_interrupt_type lapic_irq_type = { - "local-APIC-edge", - NULL, /* startup_irq() not used for IRQ0 */ - NULL, /* shutdown_irq() not used for IRQ0 */ - enable_lapic_irq, - disable_lapic_irq, - ack_lapic_irq, - end_lapic_irq + .typename = "local-APIC-edge", + .startup = NULL, /* startup_irq() not used for IRQ0 */ + .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */ + .enable = enable_lapic_irq, + .disable = disable_lapic_irq, + .ack = ack_lapic_irq, + .end = end_lapic_irq, }; - -void enable_NMI_through_LVT0 (void * dummy) -{ - unsigned int v, ver; - - ver = apic_read(APIC_LVR); - ver = GET_APIC_VERSION(ver); - v = APIC_DM_NMI; /* unmask and set to NMI */ - if (!APIC_INTEGRATED(ver)) /* 82489DX */ - v |= APIC_LVT_LEVEL_TRIGGER; - apic_write_around(APIC_LVT0, v); -} static void setup_nmi (void) { diff -Nru a/arch/x86_64/kernel/ioport.c b/arch/x86_64/kernel/ioport.c --- a/arch/x86_64/kernel/ioport.c Sun Feb 23 22:25:22 2003 +++ b/arch/x86_64/kernel/ioport.c Sun Feb 23 22:25:22 2003 @@ -53,7 +53,7 @@ /* * this changes the io permissions bitmap in the current task. */ -asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on) +asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) { struct thread_struct * t = ¤t->thread; struct tss_struct * tss; diff -Nru a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c --- a/arch/x86_64/kernel/mpparse.c Sun Feb 23 22:25:23 2003 +++ b/arch/x86_64/kernel/mpparse.c Sun Feb 23 22:25:23 2003 @@ -105,21 +105,12 @@ if (!(m->mpc_cpuflag & CPU_ENABLED)) return; - printk("Processor #%d %d:%d APIC version %d\n", + printk(KERN_INFO "Processor #%d %d:%d APIC version %d\n", m->mpc_apicid, (m->mpc_cpufeature & CPU_FAMILY_MASK)>>8, (m->mpc_cpufeature & CPU_MODEL_MASK)>>4, m->mpc_apicver); - if (m->mpc_featureflag&(1<<0)) - Dprintk(" Floating point unit present.\n"); - if (m->mpc_featureflag&(1<<7)) - Dprintk(" Machine Exception supported.\n"); - if (m->mpc_featureflag&(1<<8)) - Dprintk(" 64 bit compare & exchange supported.\n"); - if (m->mpc_featureflag&(1<<9)) - Dprintk(" Internal APIC present.\n"); - if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { Dprintk(" Bootup CPU\n"); boot_cpu_id = m->mpc_apicid; @@ -127,7 +118,7 @@ num_processors++; if (m->mpc_apicid > MAX_APICS) { - printk("Processor #%d INVALID. (Max ID: %d).\n", + printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", m->mpc_apicid, MAX_APICS); return; } @@ -138,7 +129,7 @@ * Validate version */ if (ver == 0x0) { - printk("BIOS bug, APIC version is 0 for CPU#%d! fixing up to 0x10. (tell your hw vendor)\n", m->mpc_apicid); + printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! fixing up to 0x10. (tell your hw vendor)\n", m->mpc_apicid); ver = 0x10; } apic_version[m->mpc_apicid] = ver; @@ -163,8 +154,7 @@ } else if (strncmp(str, "MCA", 3) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA; } else { - printk("Unknown bustype %s\n", str); - panic("cannot handle bus - mail to linux-smp@vger.kernel.org"); + printk(KERN_ERR "Unknown bustype %s\n", str); } } @@ -176,7 +166,7 @@ printk("I/O APIC #%d Version %d at 0x%X.\n", m->mpc_apicid, m->mpc_apicver, m->mpc_apicaddr); if (nr_ioapics >= MAX_IO_APICS) { - printk("Max # of I/O APICs (%d) exceeded (found %d).\n", + printk(KERN_ERR "Max # of I/O APICs (%d) exceeded (found %d).\n", MAX_IO_APICS, nr_ioapics); panic("Recompile kernel with bigger MAX_IO_APICS!.\n"); } @@ -256,13 +246,13 @@ } memcpy(str,mpc->mpc_oem,8); str[8]=0; - printk("OEM ID: %s ",str); + printk(KERN_INFO "OEM ID: %s ",str); memcpy(str,mpc->mpc_productid,12); str[12]=0; - printk("Product ID: %s ",str); + printk(KERN_INFO "Product ID: %s ",str); - printk("APIC at: 0x%X\n",mpc->mpc_lapic); + printk(KERN_INFO "APIC at: 0x%X\n",mpc->mpc_lapic); /* save the local APIC address, it might be non-default */ if (!acpi_lapic) @@ -357,12 +347,12 @@ * If it does, we assume it's valid. */ if (mpc_default_type == 5) { - printk("ISA/PCI bus type with no IRQ information... falling back to ELCR\n"); + printk(KERN_INFO "ISA/PCI bus type with no IRQ information... falling back to ELCR\n"); if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) || ELCR_trigger(13)) - printk("ELCR contains invalid data... not using ELCR\n"); + printk(KERN_ERR "ELCR contains invalid data... not using ELCR\n"); else { - printk("Using ELCR to identify PCI interrupts\n"); + printk(KERN_INFO "Using ELCR to identify PCI interrupts\n"); ELCR_fallback = 1; } } @@ -437,7 +427,7 @@ bus.mpc_busid = 0; switch (mpc_default_type) { default: - printk("???\nUnknown standard configuration %d\n", + printk(KERN_ERR "???\nUnknown standard configuration %d\n", mpc_default_type); /* fall through */ case 1: @@ -508,10 +498,10 @@ printk("Intel MultiProcessor Specification v1.%d\n", mpf->mpf_specification); if (mpf->mpf_feature2 & (1<<7)) { - printk(" IMCR and PIC compatibility mode.\n"); + printk(KERN_INFO " IMCR and PIC compatibility mode.\n"); pic_mode = 1; } else { - printk(" Virtual Wire compatibility mode.\n"); + printk(KERN_INFO " Virtual Wire compatibility mode.\n"); pic_mode = 0; } @@ -520,7 +510,7 @@ */ if (mpf->mpf_feature1 != 0) { - printk("Default MP configuration #%d\n", mpf->mpf_feature1); + printk(KERN_INFO "Default MP configuration #%d\n", mpf->mpf_feature1); construct_default_ISA_mptable(mpf->mpf_feature1); } else if (mpf->mpf_physptr) { @@ -543,7 +533,7 @@ if (!mp_irq_entries) { struct mpc_config_bus bus; - printk("BIOS bug, no explicit IRQ entries, using default mptable. (tell your hw vendor)\n"); + printk(KERN_ERR "BIOS bug, no explicit IRQ entries, using default mptable. (tell your hw vendor)\n"); bus.mpc_type = MP_BUS; bus.mpc_busid = 0; @@ -556,7 +546,7 @@ } else BUG(); - printk("Processors: %d\n", num_processors); + printk(KERN_INFO "Processors: %d\n", num_processors); /* * Only use the first configuration found. */ @@ -564,12 +554,13 @@ static int __init smp_scan_config (unsigned long base, unsigned long length) { + extern void __bad_mpf_size(void); unsigned int *bp = phys_to_virt(base); struct intel_mp_floating *mpf; Dprintk("Scan SMP from %p for %ld bytes.\n", bp,length); if (sizeof(*mpf) != 16) - printk("Error: MPF size\n"); + __bad_mpf_size(); while (length > 0) { mpf = (struct intel_mp_floating *)bp; @@ -580,7 +571,7 @@ || (mpf->mpf_specification == 4)) ) { smp_found_config = 1; - printk("found SMP MP-table at %08lx\n", + printk(KERN_INFO "found SMP MP-table at %08lx\n", virt_to_phys(mpf)); reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE); if (mpf->mpf_physptr) @@ -628,8 +619,6 @@ address = *(unsigned short *)phys_to_virt(0x40E); address <<= 4; smp_scan_config(address, 0x1000); - if (smp_found_config) - printk(KERN_WARNING "WARNING: MP table in the EBDA can be UNSAFE, contact linux-smp@vger.kernel.org if you experience SMP problems!\n"); } /* @@ -761,7 +750,7 @@ mp_ioapic_routing[idx].irq_end = irq_base + io_apic_get_redir_entries(idx); - printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " + printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " "IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, mp_ioapic_routing[idx].irq_start, diff -Nru a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c --- a/arch/x86_64/kernel/nmi.c Sun Feb 23 22:25:24 2003 +++ b/arch/x86_64/kernel/nmi.c Sun Feb 23 22:25:24 2003 @@ -300,11 +300,11 @@ asmlinkage void do_nmi(struct pt_regs * regs, long error_code) { - int cpu; + int cpu = safe_smp_processor_id(); - nmi_enter(); + init_tss[cpu].ist[NMI_STACK] -= 2048; /* this shouldn't be needed. */ - cpu = smp_processor_id(); + nmi_enter(); add_pda(__nmi_count,1); @@ -312,6 +312,8 @@ default_do_nmi(regs); nmi_exit(); + + init_tss[cpu].ist[NMI_STACK] += 2048; } void set_nmi_callback(nmi_callback_t callback) diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c --- a/arch/x86_64/kernel/process.c Sun Feb 23 22:25:24 2003 +++ b/arch/x86_64/kernel/process.c Sun Feb 23 22:25:24 2003 @@ -328,7 +328,7 @@ * - fold all the options into a flag word and test it with a single test. * - could test fs/gs bitsliced */ -void __switch_to(struct task_struct *prev_p, struct task_struct *next_p) +struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct *next_p) { struct thread_struct *prev = &prev_p->thread, *next = &next_p->thread; @@ -439,6 +439,8 @@ tss->io_map_base = INVALID_IO_BITMAP_OFFSET; } } + + return prev_p; } /* diff -Nru a/arch/x86_64/kernel/profile.c b/arch/x86_64/kernel/profile.c --- a/arch/x86_64/kernel/profile.c Sun Feb 23 22:25:24 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,45 +0,0 @@ -/* - * linux/arch/x86_64/kernel/profile.c - * - * (C) 2002 John Levon - * - */ - -#include -#include -#include -#include -#include - -static struct notifier_block * profile_listeners; -static rwlock_t profile_lock = RW_LOCK_UNLOCKED; - -int register_profile_notifier(struct notifier_block * nb) -{ - int err; - write_lock_irq(&profile_lock); - err = notifier_chain_register(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - return err; -} - - -int unregister_profile_notifier(struct notifier_block * nb) -{ - int err; - write_lock_irq(&profile_lock); - err = notifier_chain_unregister(&profile_listeners, nb); - write_unlock_irq(&profile_lock); - return err; -} - - -void x86_profile_hook(struct pt_regs * regs) -{ - /* we would not even need this lock if - * we had a global cli() on register/unregister - */ - read_lock(&profile_lock); - notifier_call_chain(&profile_listeners, 0, regs); - read_unlock(&profile_lock); -} diff -Nru a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c --- a/arch/x86_64/kernel/ptrace.c Sun Feb 23 22:25:23 2003 +++ b/arch/x86_64/kernel/ptrace.c Sun Feb 23 22:25:23 2003 @@ -459,11 +459,8 @@ if (!(current->ptrace & PT_PTRACED)) return; - current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) - ? 0x80 : 0); - 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 diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c Sun Feb 23 22:25:21 2003 +++ b/arch/x86_64/kernel/setup.c Sun Feb 23 22:25:21 2003 @@ -88,8 +88,6 @@ extern int root_mountflags; extern char _text, _etext, _edata, _end; -static int disable_x86_fxsr __initdata = 0; - char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; @@ -387,18 +385,6 @@ #endif } -#ifndef CONFIG_X86_TSC -static int tsc_disable __initdata = 0; - -static int __init tsc_setup(char *str) -{ - tsc_disable = 1; - return 1; -} - -__setup("notsc", tsc_setup); -#endif - static int __init get_model_name(struct cpuinfo_x86 *c) { unsigned int *v; @@ -417,25 +403,36 @@ static void __init display_cacheinfo(struct cpuinfo_x86 *c) { - unsigned int n, dummy, ecx, edx; + unsigned int n, dummy, eax, ebx, ecx, edx; n = cpuid_eax(0x80000000); if (n >= 0x80000005) { - cpuid(0x80000005, &dummy, &dummy, &ecx, &edx); + cpuid(0x80000005, &dummy, &ebx, &ecx, &edx); printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n", edx>>24, edx&0xFF, ecx>>24, ecx&0xFF); - c->x86_cache_size=(ecx>>24)+(edx>>24); + c->x86_cache_size = (ecx>>24)+(edx>>24); + /* DTLB and ITLB together, but only 4K */ + c->x86_tlbsize = ((ebx >> 16) & 0xff) + (ebx & 0xff); } - if (n < 0x80000006) - return; - + if (n >= 0x80000006) { + cpuid(0x80000006, &dummy, &ebx, &ecx, &edx); ecx = cpuid_ecx(0x80000006); c->x86_cache_size = ecx >> 16; + c->x86_tlbsize += ((ebx >> 16) & 0xff) + (ebx & 0xff); printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n", c->x86_cache_size, ecx & 0xFF); + } + + if (n >= 0x80000007) + cpuid(0x80000007, &dummy, &dummy, &dummy, &c->x86_power); + if (n >= 0x80000008) { + cpuid(0x80000008, &eax, &dummy, &dummy, &dummy); + c->x86_virt_bits = (eax >> 8) & 0xff; + c->x86_phys_bits = eax & 0xff; + } } @@ -478,15 +475,6 @@ char *model_names[16]; }; -int __init x86_fxsr_setup(char * s) -{ - disable_x86_fxsr = 1; - return 1; -} -__setup("nofxsr", x86_fxsr_setup); - - - /* * This does the hard work of actually picking apart the CPU stuff... */ @@ -514,13 +502,17 @@ /* Note that the vendor-specific code below might override */ /* Intel-defined flags: level 0x00000001 */ - if ( c->cpuid_level >= 0x00000001 ) { + if (c->cpuid_level >= 0x00000001) { __u32 misc; cpuid(0x00000001, &tfms, &misc, &junk, &c->x86_capability[0]); - c->x86 = (tfms >> 8) & 15; - c->x86_model = (tfms >> 4) & 15; - c->x86_mask = tfms & 15; + c->x86 = (tfms >> 8) & 0xf; + c->x86_model = (tfms >> 4) & 0xf; + c->x86_mask = tfms & 0xf; + if (c->x86 == 0xf) { + c->x86 += (tfms >> 20) & 0xff; + c->x86_model += ((tfms >> 16) & 0xF) << 4; + } if (c->x86_capability[0] & (1<<19)) c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; } else { @@ -567,37 +559,6 @@ break; } - printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n", - c->x86_capability[0], - c->x86_capability[1], - c->x86_capability[2], - c->x86_capability[3]); - - /* - * The vendor-specific functions might have changed features. Now - * we do "generic changes." - */ - - /* TSC disabled? */ -#ifndef CONFIG_X86_TSC - if ( tsc_disable ) - clear_bit(X86_FEATURE_TSC, &c->x86_capability); -#endif - - /* FXSR disabled? */ - if (disable_x86_fxsr) { - clear_bit(X86_FEATURE_FXSR, &c->x86_capability); - clear_bit(X86_FEATURE_XMM, &c->x86_capability); - } - - /* Now the feature flags better reflect actual CPU features! */ - - printk(KERN_DEBUG "CPU: After generic, caps: %08x %08x %08x %08x\n", - c->x86_capability[0], - c->x86_capability[1], - c->x86_capability[2], - c->x86_capability[3]); - /* * On SMP, boot_cpu_data holds the common feature set between * all CPUs; so make sure that we indicate which features are @@ -665,6 +626,13 @@ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; + static char *x86_power_flags[] = { + "ts", /* temperature sensor */ + "fid", /* frequency id control */ + "vid", /* voltage id control */ + "ttp", /* thermal trip */ + }; + #ifdef CONFIG_SMP if (!(cpu_online_map & (1<<(c-cpu_data)))) @@ -712,9 +680,30 @@ seq_printf(m, " %s", x86_cap_flags[i]); } - seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n", + seq_printf(m, "\nbogomips\t: %lu.%02lu\n", c->loops_per_jiffy/(500000/HZ), (c->loops_per_jiffy/(5000/HZ)) % 100); + + if (c->x86_tlbsize > 0) + seq_printf(m, "TLB size\t: %d 4K pages\n", c->x86_tlbsize); + seq_printf(m, "clflush size\t: %d\n", c->x86_clflush_size); + + seq_printf(m, "address sizes\t: %u bits physical, %u bits virtual\n", + c->x86_phys_bits, c->x86_virt_bits); + + seq_printf(m, "power management:"); + { + int i; + for (i = 0; i < 32; i++) + if (c->x86_power & (1 << i)) { + if (i < ARRAY_SIZE(x86_power_flags)) + seq_printf(m, " %s", x86_power_flags[i]); + else + seq_printf(m, " [%d]", i); + } + } + + seq_printf(m, "\n\n"); return 0; } diff -Nru a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c --- a/arch/x86_64/kernel/setup64.c Sun Feb 23 22:25:22 2003 +++ b/arch/x86_64/kernel/setup64.c Sun Feb 23 22:25:22 2003 @@ -99,7 +99,7 @@ pda->irqcount = -1; pda->cpudata_offset = 0; pda->kernelstack = - (unsigned long)current_thread_info() - PDA_STACKOFFSET + THREAD_SIZE; + (unsigned long)stack_thread_info() - PDA_STACKOFFSET + THREAD_SIZE; if (cpu == 0) { /* others are initialized in smpboot.c */ diff -Nru a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c --- a/arch/x86_64/kernel/smp.c Sun Feb 23 22:25:22 2003 +++ b/arch/x86_64/kernel/smp.c Sun Feb 23 22:25:22 2003 @@ -344,9 +344,11 @@ void flush_tlb_all(void) { + preempt_disable(); smp_call_function (flush_tlb_all_ipi,0,1,1); do_flush_tlb_all_local(); + preempt_enable(); } void smp_kdb_stop(void) diff -Nru a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c --- a/arch/x86_64/kernel/smpboot.c Sun Feb 23 22:25:27 2003 +++ b/arch/x86_64/kernel/smpboot.c Sun Feb 23 22:25:27 2003 @@ -127,7 +127,7 @@ int buggy = 0; extern unsigned cpu_khz; - printk("checking TSC synchronization across %u CPUs: ",num_booting_cpus()); + printk(KERN_INFO "checking TSC synchronization across %u CPUs: ",num_booting_cpus()); one_usec = cpu_khz; @@ -262,9 +262,8 @@ phys_id = GET_APIC_ID(apic_read(APIC_ID)); cpuid = smp_processor_id(); if (test_and_set_bit(cpuid, &cpu_callin_map)) { - printk("huh, phys CPU#%d, CPU#%d already present??\n", + panic("smp_callin: phys CPU#%d, CPU#%d already present??\n", phys_id, cpuid); - BUG(); } Dprintk("CPU#%d (phys ID: %d) waiting for CALLOUT\n", cpuid, phys_id); @@ -290,9 +289,8 @@ } if (!time_before(jiffies, timeout)) { - printk("BUG: CPU%d started up but did not get a callout!\n", + panic("smp_callin: CPU%d started up but did not get a callout!\n", cpuid); - BUG(); } /* @@ -429,7 +427,7 @@ char *names[] = { "ID", "VERSION", "SPIV" }; int timeout, status; - printk("Inquiring remote APIC #%d...\n", apicid); + printk(KERN_INFO "Inquiring remote APIC #%d...\n", apicid); for (i = 0; i < sizeof(regs) / sizeof(*regs); i++) { printk("... APIC #%d %s: ", apicid, names[i]); @@ -576,9 +574,9 @@ Dprintk("After Startup.\n"); if (send_status) - printk("APIC never delivered???\n"); + printk(KERN_ERR "APIC never delivered???\n"); if (accept_status) - printk("APIC delivery error (%lx).\n", accept_status); + printk(KERN_ERR "APIC delivery error (%lx).\n", accept_status); return (send_status | accept_status); } @@ -621,7 +619,7 @@ init_tss[cpu].rsp0 = init_rsp; initial_code = initialize_secondary; - printk("Booting processor %d/%d rip %lx rsp %lx rsp2 %lx\n", cpu, apicid, + printk(KERN_INFO "Booting processor %d/%d rip %lx rsp %lx rsp2 %lx\n", cpu, apicid, start_rip, idle->thread.rsp, init_rsp); /* @@ -680,7 +678,7 @@ if (test_bit(cpu, &cpu_callin_map)) { /* number CPUs logically, starting from 1 (BSP is 0) */ Dprintk("OK.\n"); - printk("CPU%d: ", cpu); + printk("KERN_INFO CPU%d: ", cpu); print_cpu_info(&cpu_data[cpu]); Dprintk("CPU has booted.\n"); } else { @@ -744,10 +742,10 @@ cache_decay_ticks = (long)cacheflush_time/cpu_khz * HZ / 1000; - printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n", + printk(KERN_INFO "per-CPU timeslice cutoff: %ld.%02ld usecs.\n", (long)cacheflush_time/(cpu_khz/1000), ((long)cacheflush_time*100/(cpu_khz/1000)) % 100); - printk("task migration cache decay timeout: %ld msecs.\n", + printk(KERN_INFO "task migration cache decay timeout: %ld msecs.\n", (cache_decay_ticks + 1) * 1000 / HZ); } @@ -763,7 +761,7 @@ * Setup boot CPU information */ smp_store_cpu_info(0); /* Final full version of the data */ - printk("CPU%d: ", 0); + printk(KERN_INFO "CPU%d: ", 0); print_cpu_info(&cpu_data[0]); current_thread_info()->cpu = 0; @@ -795,7 +793,7 @@ * CPU too, but we do it for the sake of robustness anyway. */ if (!test_bit(boot_cpu_id, &phys_cpu_present_map)) { - printk("weird, boot CPU (#%d) not listed by the BIOS.\n", + printk(KERN_NOTICE "weird, boot CPU (#%d) not listed by the BIOS.\n", boot_cpu_id); phys_cpu_present_map |= (1 << hard_smp_processor_id()); } diff -Nru a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c --- a/arch/x86_64/kernel/time.c Sun Feb 23 22:25:25 2003 +++ b/arch/x86_64/kernel/time.c Sun Feb 23 22:25:25 2003 @@ -123,6 +123,7 @@ time_esterror = NTP_PHASE_LIMIT; write_sequnlock_irq(&xtime_lock); + clock_was_set(); } /* diff -Nru a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c --- a/arch/x86_64/kernel/vsyscall.c Sun Feb 23 22:25:25 2003 +++ b/arch/x86_64/kernel/vsyscall.c Sun Feb 23 22:25:25 2003 @@ -51,13 +51,14 @@ #include #define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr))) +#define force_inline __attribute__((always_inline)) inline int __sysctl_vsyscall __section_sysctl_vsyscall = 1; seqlock_t __xtime_lock __section_xtime_lock = SEQLOCK_UNLOCKED; #include -static inline void timeval_normalize(struct timeval * tv) +static force_inline void timeval_normalize(struct timeval * tv) { time_t __sec; @@ -69,7 +70,7 @@ } } -static inline void do_vgettimeofday(struct timeval * tv) +static force_inline void do_vgettimeofday(struct timeval * tv) { long sequence, t; unsigned long sec, usec; @@ -80,7 +81,7 @@ sync_core(); rdtscll(t); sec = __xtime.tv_sec; - usec = (__xtime.tv_nsec * 1000) + + usec = (__xtime.tv_nsec / 1000) + (__jiffies - __wall_jiffies) * (1000000 / HZ) + (t - __hpet.last_tsc) * (1000000 / HZ) / __hpet.ticks + __hpet.offset; @@ -91,12 +92,12 @@ } /* RED-PEN may want to readd seq locking, but then the variable should be write-once. */ -static inline void do_get_tz(struct timezone * tz) +static force_inline void do_get_tz(struct timezone * tz) { *tz = __sys_tz; } -static inline int gettimeofday(struct timeval *tv, struct timezone *tz) +static force_inline int gettimeofday(struct timeval *tv, struct timezone *tz) { int ret; asm volatile("syscall" diff -Nru a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c --- a/arch/x86_64/kernel/x8664_ksyms.c Sun Feb 23 22:25:22 2003 +++ b/arch/x86_64/kernel/x8664_ksyms.c Sun Feb 23 22:25:22 2003 @@ -29,6 +29,7 @@ #include #include #include +#include extern spinlock_t rtc_lock; @@ -71,6 +72,7 @@ EXPORT_SYMBOL(csum_partial_copy_nocheck); /* Delay loops */ EXPORT_SYMBOL(__udelay); +EXPORT_SYMBOL(__ndelay); EXPORT_SYMBOL(__delay); EXPORT_SYMBOL(__const_udelay); @@ -132,8 +134,6 @@ EXPORT_SYMBOL(rtc_lock); -EXPORT_SYMBOL_GPL(register_profile_notifier); -EXPORT_SYMBOL_GPL(unregister_profile_notifier); EXPORT_SYMBOL_GPL(set_nmi_callback); EXPORT_SYMBOL_GPL(unset_nmi_callback); diff -Nru a/arch/x86_64/lib/delay.c b/arch/x86_64/lib/delay.c --- a/arch/x86_64/lib/delay.c Sun Feb 23 22:25:23 2003 +++ b/arch/x86_64/lib/delay.c Sun Feb 23 22:25:23 2003 @@ -1,5 +1,5 @@ /* - * Precise Delay Loops for i386 + * Precise Delay Loops for x86-64 * * Copyright (C) 1993 Linus Torvalds * Copyright (C) 1997 Martin Mares @@ -42,4 +42,9 @@ void __udelay(unsigned long usecs) { __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ +} + +void __ndelay(unsigned long nsecs) +{ + __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ } diff -Nru a/arch/x86_64/mm/Makefile b/arch/x86_64/mm/Makefile --- a/arch/x86_64/mm/Makefile Sun Feb 23 22:25:25 2003 +++ b/arch/x86_64/mm/Makefile Sun Feb 23 22:25:25 2003 @@ -6,3 +6,8 @@ obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o obj-$(CONFIG_DISCONTIGMEM) += numa.o obj-$(CONFIG_K8_NUMA) += k8topology.o + +$(obj)/hugetlbpage.c: + @ln -sf ../../i386/mm/hugetlbpage.c $(obj)/hugetlbpage.c + +clean-files += hugetlbpage.c diff -Nru a/arch/x86_64/mm/hugetlbpage.c b/arch/x86_64/mm/hugetlbpage.c --- a/arch/x86_64/mm/hugetlbpage.c Sun Feb 23 22:25:24 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,403 +0,0 @@ -/* - * x86-64 Huge TLB Page Support for Kernel. - * - * Copyright (C) 2002, Rohit Seth - * Minor hacks by Andi Kleen for x86-64 - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static long htlbpagemem; -int htlbpage_max; -static long htlbzone_pages; - -static LIST_HEAD(htlbpage_freelist); -static spinlock_t htlbpage_lock = SPIN_LOCK_UNLOCKED; - -static struct page *alloc_hugetlb_page(void) -{ - int i; - struct page *page; - - spin_lock(&htlbpage_lock); - if (list_empty(&htlbpage_freelist)) { - spin_unlock(&htlbpage_lock); - return NULL; - } - - page = list_entry(htlbpage_freelist.next, struct page, list); - list_del(&page->list); - htlbpagemem--; - spin_unlock(&htlbpage_lock); - set_page_count(page, 1); - for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i) - clear_highpage(&page[i]); - return page; -} - -static pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) -{ - pgd_t *pgd; - pmd_t *pmd = NULL; - - pgd = pgd_offset(mm, addr); - pmd = pmd_alloc(mm, pgd, addr); - return (pte_t *) pmd; -} - -static pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) -{ - pgd_t *pgd; - pmd_t *pmd = NULL; - - pgd = pgd_offset(mm, addr); - pmd = pmd_offset(pgd, addr); - return (pte_t *) pmd; -} - -#define mk_pte_huge(entry) {pte_val(entry) |= (_PAGE_PRESENT | _PAGE_PSE);} - -static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, struct page *page, pte_t * page_table, int write_access) -{ - pte_t entry; - - mm->rss += (HPAGE_SIZE / PAGE_SIZE); - if (write_access) { - entry = - pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); - } else - entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot)); - entry = pte_mkyoung(entry); - mk_pte_huge(entry); - set_pte(page_table, entry); -} - -/* - * This function checks for proper alignment of input addr and len parameters. - */ -int is_aligned_hugepage_range(unsigned long addr, unsigned long len) -{ - if (len & ~HPAGE_MASK) - return -EINVAL; - if (addr & ~HPAGE_MASK) - return -EINVAL; - return 0; -} - -int -copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, - struct vm_area_struct *vma) -{ - pte_t *src_pte, *dst_pte, entry; - struct page *ptepage; - unsigned long addr = vma->vm_start; - unsigned long end = vma->vm_end; - - while (addr < end) { - dst_pte = huge_pte_alloc(dst, addr); - if (!dst_pte) - goto nomem; - src_pte = huge_pte_offset(src, addr); - entry = *src_pte; - ptepage = pte_page(entry); - get_page(ptepage); - set_pte(dst_pte, entry); - dst->rss += (HPAGE_SIZE / PAGE_SIZE); - addr += HPAGE_SIZE; - } - return 0; - -nomem: - return -ENOMEM; -} - -int -follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, - struct page **pages, struct vm_area_struct **vmas, - unsigned long *st, int *length, int i) -{ - pte_t *ptep, pte; - unsigned long start = *st; - unsigned long pstart; - int len = *length; - struct page *page; - - do { - pstart = start; - ptep = huge_pte_offset(mm, start); - pte = *ptep; - -back1: - page = pte_page(pte); - if (pages) { - page += ((start & ~HPAGE_MASK) >> PAGE_SHIFT); - get_page(page); - pages[i] = page; - } - if (vmas) - vmas[i] = vma; - i++; - len--; - start += PAGE_SIZE; - if (((start & HPAGE_MASK) == pstart) && len && - (s