# 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.70 -> 1.1307 # drivers/i2c/chips/w83781d.c 1.7 -> 1.9 # drivers/base/sys.c 1.16 -> 1.24 # drivers/net/8139too.c 1.55 -> 1.57 # drivers/hotplug/cpqphp_core.c 1.17 -> 1.19 drivers/pci/hotplug/cpqphp_core.c (moved) # arch/ppc/boot/prep/vreset.c 1.7 -> 1.8 # include/asm-ppc64/smp.h 1.7 -> 1.8 # arch/m68k/lib/Makefile 1.4 -> 1.5 # arch/sparc64/kernel/pci.c 1.29 -> 1.30 # drivers/hotplug/acpiphp_pci.c 1.4 -> 1.6 drivers/pci/hotplug/acpiphp_pci.c (moved) # include/linux/rocket.h 1.1 -> 1.2 drivers/char/rocket.h (moved) # include/asm-alpha/agp_backend.h 1.2 -> 1.3 # drivers/net/defxx.c 1.17 -> 1.18 # drivers/scsi/arm/oak.c 1.18 -> 1.19 # net/ipv4/netfilter/ip_conntrack_core.c 1.29 -> 1.30 # include/asm-i386/mpspec.h 1.12 -> 1.13 # drivers/mtd/maps/Makefile 1.8 -> 1.9 # drivers/hotplug/ibmphp_pci.c 1.6 -> 1.7 drivers/pci/hotplug/ibmphp_pci.c (moved) # fs/jfs/inode.c 1.28 -> 1.29 # drivers/mtd/devices/slram.c 1.6 -> 1.7 # include/linux/proc_fs.h 1.18 -> 1.22 # drivers/scsi/megaraid.c 1.45 -> 1.47 # drivers/pcmcia/cs_internal.h 1.13 -> 1.17 # Documentation/DocBook/kernel-api.tmpl 1.25 -> 1.26 # include/pcmcia/ds.h 1.10 -> 1.11 # drivers/i2c/chips/Makefile 1.5 -> 1.6 # arch/ppc64/kernel/signal.c 1.27 -> 1.28 # include/pcmcia/cs.h 1.3 -> 1.4 # include/asm-sparc64/parport.h 1.6 -> 1.7 # drivers/pci/search.c 1.3 -> 1.8 # fs/jffs2/compr_zlib.c 1.7 -> 1.8 # include/linux/mtd/cfi_endian.h 1.2 -> 1.3 # drivers/net/irda/nsc-ircc.c 1.23 -> 1.25 # include/linux/kernel.h 1.37 -> 1.38 # drivers/scsi/dpti.h 1.9 -> 1.10 # drivers/scsi/aic7xxx/aic79xx_core.c 1.24 -> 1.28 # include/linux/acpi.h 1.24 -> 1.25 # include/asm-alpha/pci.h 1.13 -> 1.14 # include/asm-x86_64/smp.h 1.6 -> 1.8 # drivers/char/specialix_io8.h 1.2 -> 1.4 # drivers/mtd/devices/doc2000.c 1.5 -> 1.6 # drivers/scsi/imm.h 1.8 -> 1.10 # drivers/scsi/in2000.h 1.10 -> 1.11 # include/net/route.h 1.21 -> 1.22 # drivers/mtd/maps/cfi_flagadm.c 1.3 -> 1.4 # arch/ppc64/lib/Makefile 1.8 -> 1.9 # arch/arm/mach-sa1100/pfs168.c 1.12 -> 1.13 # arch/ppc/kernel/align.c 1.6 -> 1.7 # arch/alpha/kernel/head.S 1.2 -> 1.3 # include/asm-ppc/hardirq.h 1.19 -> 1.20 # arch/ppc/xmon/xmon.c 1.12 -> 1.13 # drivers/net/tc35815.c 1.10 -> 1.11 # arch/ppc/8260_io/enet.c 1.8 -> 1.11 # drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped 1.10 -> 1.12 # include/asm-h8300/bug.h 1.1 -> 1.2 # drivers/usb/input/hid.h 1.24 -> 1.26 # drivers/mtd/devices/Makefile 1.4 -> 1.5 # drivers/char/esp.c 1.19 -> 1.24 # drivers/usb/media/konicawc.c 1.21 -> 1.22 # drivers/video/matrox/matroxfb_maven.c 1.12 -> 1.13 # sound/oss/cs46xx.c 1.30 -> 1.31 # net/ipv4/syncookies.c 1.13 -> 1.14 # net/llc/af_llc.c 1.41 -> 1.42 # drivers/scsi/ips.c 1.57 -> 1.58 # drivers/usb/misc/usblcd.c 1.8 -> 1.9 # arch/sparc64/boot/Makefile 1.8 -> 1.9 # net/ipx/ipx_proc.c 1.6 -> 1.7 # net/bluetooth/rfcomm/core.c 1.21 -> 1.22 # include/asm-ppc/processor.h 1.29 -> 1.31 # drivers/usb/input/kbtab.c 1.2 -> 1.3 # fs/jffs2/background.c 1.18 -> 1.19 # drivers/net/irda/toshoboe.c 1.17 -> 1.19 # kernel/rcupdate.c 1.4 -> 1.5 # arch/ppc/4xx_io/serial_sicc.c 1.9 -> 1.14 # include/sound/initval.h 1.9 -> 1.10 # sound/i2c/cs8427.c 1.6 -> 1.7 # drivers/usb/storage/protocol.c 1.9 -> 1.10 # fs/libfs.c 1.19 -> 1.20 # drivers/char/vme_scc.c 1.18 -> 1.24 # arch/x86_64/kernel/traps.c 1.21 -> 1.22 # fs/reiserfs/file.c 1.19 -> 1.20 # drivers/ide/ide-taskfile.c 1.18 -> 1.19 # drivers/scsi/fcal.h 1.7 -> 1.8 # fs/nfs/nfs4state.c 1.3 -> 1.4 # drivers/media/video/cpia_usb.c 1.20 -> 1.21 # arch/um/drivers/daemon_kern.c 1.3 -> 1.4 # arch/x86_64/mm/fault.c 1.12 -> 1.13 # drivers/scsi/aic7xxx/aic7xxx_proc.c 1.10 -> 1.11 # sound/drivers/opl3/Makefile 1.12 -> 1.14 # drivers/acpi/sleep/main.c 1.22 -> 1.23 # drivers/net/ptifddi.c 1.4 -> (deleted) # arch/um/drivers/mcast_kern.c 1.4 -> 1.5 # sound/pci/Makefile 1.12 -> 1.14 # arch/arm/mach-sa1100/adsbitsy.c 1.16 -> 1.17 # net/ipv4/tcp_diag.c 1.8 -> 1.9 # kernel/ksyms.c 1.200 -> 1.203 # drivers/scsi/scsi_devinfo.h 1.1 -> 1.2 # arch/ppc/xmon/start.c 1.12 -> 1.14 # sound/pci/korg1212/korg1212.c 1.22 -> 1.23 # drivers/video/matrox/matroxfb_Ti3026.c 1.6 -> 1.7 # drivers/isdn/hardware/avm/avm_cs.c 1.7.1.1 -> 1.9 # sound/pci/ac97/ac97_patch.h 1.6 -> 1.7 # include/asm-ppc/uaccess.h 1.7 -> 1.8 # drivers/char/watchdog/i810-tco.c 1.16 -> 1.17 # drivers/mtd/nand/Makefile 1.6 -> 1.7 # include/linux/jffs2_fs_sb.h 1.9 -> 1.10 # arch/i386/kernel/cpu/cpufreq/powernow-k7.c 1.13 -> 1.15 # sound/ppc/tumbler.c 1.10 -> 1.12 # drivers/i2c/Makefile 1.10 -> 1.11 # scripts/kconfig/lkc.h 1.3 -> 1.5 # arch/ppc/xmon/ppc-opc.c 1.3 -> 1.4 # drivers/net/tulip/de4x5.c 1.28 -> 1.29 # drivers/mtd/nftlcore.c 1.43 -> 1.44 # drivers/net/pci-skeleton.c 1.21 -> 1.22 # drivers/scsi/g_NCR5380.h 1.8 -> 1.10 # drivers/scsi/pci2220i.c 1.21 -> 1.22 # include/asm-arm/dma-mapping.h 1.5 -> 1.6 # include/asm-arm/bug.h 1.2 -> 1.3 # arch/alpha/kernel/sys_sio.c 1.6 -> 1.7 # include/linux/aio.h 1.9 -> 1.10 # arch/ppc/mm/mem_pieces.c 1.5 -> 1.6 # include/asm-ia64/bug.h 1.1 -> 1.2 # arch/mips64/sgi-ip22/Makefile 1.6 -> 1.7 # include/linux/mtd/mtd.h 1.5 -> 1.6 # drivers/usb/class/usb-midi.c 1.17 -> 1.18 # drivers/char/isicom.c 1.18 -> 1.24 # drivers/char/Kconfig 1.13 -> 1.14 # drivers/scsi/scsi_pc98.c 1.2 -> 1.3 # drivers/video/Kconfig 1.22 -> 1.23 # drivers/net/bmac.c 1.15 -> 1.16 # include/linux/kobject.h 1.20 -> 1.22 # drivers/pnp/pnpbios/core.c 1.30 -> 1.31 # drivers/i2c/i2c-elektor.c 1.16 -> 1.17 # Documentation/sound/alsa/CMIPCI.txt 1.4 -> 1.5 # fs/jffs2/readinode.c 1.8 -> 1.9 # drivers/usb/storage/jumpshot.c 1.17 -> 1.18 # fs/jffs2/malloc.c 1.6 -> 1.7 # net/core/flow.c 1.2 -> 1.5 # drivers/atm/Makefile 1.19 -> 1.20 # net/sctp/associola.c 1.45 -> 1.46 # drivers/net/3c509.c 1.36 -> 1.37 # include/linux/timex.h 1.5 -> 1.6 # drivers/usb/net/cdc-ether.c 1.28 -> 1.30 # scripts/kconfig/qconf.cc 1.5 -> 1.7 # drivers/hotplug/cpcihp_zt5550.h 1.1 -> 1.2 drivers/pci/hotplug/cpcihp_zt5550.h (moved) # drivers/mtd/devices/mtdram.c 1.4 -> 1.5 # include/asm-arm/hardware.h 1.1 -> 1.2 # arch/x86_64/kernel/setup.c 1.14 -> 1.16 # sound/sparc/cs4231.c 1.10 -> 1.11 # fs/sysfs/file.c 1.4 -> 1.6 # drivers/telephony/ixj.c 1.22 -> 1.23 # arch/um/os-Linux/drivers/ethertap_kern.c 1.3 -> 1.4 # arch/i386/kernel/cpu/mtrr/main.c 1.27 -> 1.28 # arch/ia64/sn/io/pciba.c 1.7 -> 1.8 # include/linux/mtd/pmc551.h 1.2 -> 1.3 # include/linux/matroxfb.h 1.1 -> 1.2 # drivers/net/net_init.c 1.12 -> 1.17 # drivers/scsi/fcal.c 1.10 -> 1.11 # drivers/block/ioctl.c 1.54 -> 1.55 # drivers/scsi/aha152x.c 1.30 -> 1.31 # drivers/serial/8250.c 1.28.1.8 -> 1.32 # sound/pci/ice1712/ice1712.h 1.7 -> 1.9 # drivers/scsi/hosts.c 1.64.1.1 -> 1.70 # lib/Makefile 1.22 -> 1.23 # drivers/net/dgrs.c 1.16 -> 1.17 # drivers/usb/input/wacom.c 1.27 -> 1.28 # sound/core/hwdep.c 1.13 -> 1.14 # arch/i386/mach-generic/default.c 1.2 -> 1.3 # include/linux/i2c-id.h 1.11 -> 1.12 # drivers/net/skfp/skfddi.c 1.12 -> 1.14 # arch/i386/mach-visws/visws_apic.c 1.8 -> 1.9 # net/sctp/input.c 1.28 -> 1.29 # sound/arm/sa11xx-uda1341.c 1.11 -> 1.12 # arch/i386/lib/Makefile 1.11 -> 1.12 # fs/fat/dir.c 1.15 -> 1.17 # arch/arm/mach-sa1100/dma.c 1.3 -> 1.4 # sound/isa/sb/sb8_midi.c 1.5 -> 1.7 # arch/ppc/kernel/ppc_htab.c 1.13 -> 1.14 # drivers/base/core.c 1.68 -> 1.70 # net/ipv6/ip6_output.c 1.26 -> 1.30 # drivers/net/sb1000.c 1.19 -> 1.20 # drivers/scsi/aic7xxx/aic7xxx_pci.c 1.14 -> 1.17 # drivers/scsi/cpqfcTSinit.c 1.37 -> 1.39 # net/ipv4/ip_input.c 1.15 -> 1.16 # drivers/net/sk98lin/skproc.c 1.6 -> 1.7 # drivers/scsi/atp870u.h 1.9 -> 1.10 # net/llc/llc_conn.c 1.26 -> 1.28 # drivers/usb/serial/io_edgeport.c 1.44 -> 1.45 # drivers/scsi/aic7xxx/aiclib.h 1.8 -> 1.9 # arch/sparc64/lib/Makefile 1.10 -> 1.11 # drivers/base/init.c 1.3 -> 1.4 # arch/x86_64/lib/usercopy.c 1.5 -> 1.6 # arch/i386/kernel/irq.c 1.36 -> 1.37 # include/linux/raid/md.h 1.27 -> 1.29 # net/sctp/sm_statefuns.c 1.48 -> 1.49 # arch/s390/lib/Makefile 1.9 -> 1.10 # include/asm-i386/stat.h 1.3 -> 1.4 # arch/ppc/syslib/Makefile 1.5 -> 1.6 # Documentation/usb/proc_usb_info.txt 1.4 -> 1.5 # drivers/net/wireless/hermes.h 1.13 -> 1.14 # drivers/video/matrox/matroxfb_misc.h 1.2 -> 1.3 # drivers/usb/core/inode.c 1.49 -> 1.50 # drivers/usb/gadget/net2280.c 1.9 -> 1.10 # drivers/scsi/aic7xxx/aic7xxx_osm.c 1.36.1.1 -> 1.42 # mm/page_alloc.c 1.158 -> 1.163 # drivers/scsi/scsi_proc.c 1.22 -> 1.25 # arch/ppc/8260_io/uart.c 1.18 -> 1.24 # arch/alpha/kernel/pci.c 1.31 -> 1.33 # include/asm-ppc64/pci-bridge.h 1.6 -> 1.7 # arch/ppc/syslib/prom.c 1.19 -> 1.20 # sound/pci/cs46xx/cs46xx_lib.c 1.33 -> 1.34 # net/ipv6/ipv6_sockglue.c 1.19 -> 1.20 # arch/arm/mm/init.c 1.21 -> 1.22 # drivers/scsi/sun3_scsi.h 1.6 -> 1.7 # include/linux/if_ec.h 1.4 -> 1.5 # drivers/char/dz.c 1.20 -> 1.26 # net/x25/x25_timer.c 1.10 -> 1.12 # net/ipv6/sysctl_net_ipv6.c 1.5 -> 1.6 # include/asm-ppc/pci-bridge.h 1.10 -> 1.11 # arch/mips/lib/Makefile 1.6 -> 1.7 # drivers/isdn/eicon/Divas_mod.c 1.7 -> 1.8 # include/net/ipx.h 1.10 -> 1.11 # arch/i386/kernel/smp.c 1.31 -> 1.32 # include/asm-mips64/pci.h 1.8 -> 1.9 # arch/m68knommu/platform/68328/entry.S 1.4 -> 1.5 # drivers/serial/mcfserial.h 1.2 -> 1.4 # drivers/base/interface.c 1.14 -> 1.15 # drivers/isdn/eicon/linchr.c 1.7 -> 1.8 # net/ipv6/datagram.c 1.10 -> 1.11 # arch/alpha/kernel/core_marvel.c 1.11 -> 1.12 # drivers/scsi/arm/cumana_1.c 1.17 -> 1.18 # net/llc/llc_proc.c 1.10 -> 1.11 # drivers/macintosh/via-cuda.c 1.8 -> 1.9 # arch/ia64/sn/io/sn2/pci_bus_cvlink.c 1.2 -> 1.3 # Documentation/sound/alsa/ALSA-Configuration.txt 1.5 -> 1.9 # drivers/acorn/char/Makefile 1.13 -> 1.14 # net/x25/x25_out.c 1.8 -> 1.9 # include/linux/init_task.h 1.25 -> 1.26 # drivers/scsi/sun3_NCR5380.c 1.15.1.1 -> 1.17 # sound/oss/emu10k1/audio.c 1.16 -> 1.17 # include/linux/serialP.h 1.8 -> 1.10 # arch/mips64/mips-boards/generic/pci.c 1.5 -> 1.6 # drivers/net/tokenring/skisa.c 1.9 -> 1.10 # fs/jffs2/erase.c 1.10 -> 1.11 # include/linux/sched.h 1.148 -> 1.151 # kernel/fork.c 1.122 -> 1.123 # net/sunrpc/svcsock.c 1.48 -> 1.50 # include/linux/ptrace.h 1.9 -> 1.10 # sound/isa/als100.c 1.13 -> 1.14 # arch/i386/kernel/cpu/cpufreq/acpi.c 1.6 -> 1.7 # sound/pci/ice1712/delta.c 1.8 -> 1.9 # drivers/macintosh/nvram.c 1.6 -> 1.7 # kernel/sys.c 1.45 -> 1.46 # drivers/net/Space.c 1.20 -> 1.21 # drivers/block/ll_rw_blk.c 1.170 -> 1.173 # kernel/sysctl.c 1.42 -> 1.45 # drivers/scsi/ibmmca.c 1.18 -> 1.19 # sound/core/seq/seq_memory.c 1.7 -> 1.8 # fs/jffs2/os-linux.h 1.9 -> 1.10 # net/atm/mpc.h 1.1 -> 1.2 # net/ipv4/xfrm4_tunnel.c 1.6 -> 1.7 # drivers/atm/ambassador.c 1.12 -> 1.13 # drivers/pcmcia/i82092aa.h 1.4 -> 1.5 # include/linux/writeback.h 1.20 -> 1.21 # drivers/hotplug/ibmphp.h 1.7 -> 1.8 drivers/pci/hotplug/ibmphp.h (moved) # include/linux/mtd/nand_ids.h 1.1 -> (deleted) # drivers/video/Makefile 1.84 -> 1.85 # drivers/usb/image/hpusbscsi.h 1.11 -> 1.12 # include/asm-ppc64/thread_info.h 1.7 -> 1.8 # arch/v850/kernel/rte_cb_leds.c 1.3 -> 1.4 # drivers/usb/core/hub.h 1.14 -> 1.16 # include/net/tcp.h 1.39 -> 1.44 # drivers/scsi/dtc.h 1.8 -> 1.9 # drivers/mtd/maps/pcmciamtd.c 1.3 -> 1.5 # include/linux/serial_core.h 1.23 -> 1.24 # net/ipv4/xfrm4_input.c 1.5 -> 1.6 # arch/arm/mach-sa1100/badge4.c 1.12 -> 1.13 # drivers/base/platform.c 1.9 -> 1.10 # arch/v850/kernel/head.S 1.2 -> 1.3 # lib/zlib_deflate/deflate.c 1.1 -> 1.13 # drivers/s390/net/lcs.c 1.14 -> 1.15 # sound/core/seq/seq_clientmgr.c 1.17 -> 1.18 # drivers/serial/amba.c 1.15.1.6 -> 1.20 # sound/isa/cs423x/cs4236.c 1.14 -> 1.17 # drivers/net/amd8111e.h 1.1 -> 1.2 # drivers/pci/syscall.c 1.2 -> 1.3 # scripts/docproc.c 1.3 -> 1.4 # drivers/net/tlan.c 1.22 -> 1.24 # sound/oss/esssolo1.c 1.27 -> 1.29 # fs/dcache.c 1.56 -> 1.58 # drivers/ieee1394/sbp2.c 1.31 -> 1.34 # net/sctp/endpointola.c 1.23 -> 1.24 # drivers/oprofile/event_buffer.h 1.4 -> 1.5 # fs/attr.c 1.15 -> 1.17 # Documentation/vm/hugetlbpage.txt 1.5 -> 1.6 # include/asm-i386/thread_info.h 1.11 -> 1.12 # net/ipv4/af_inet.c 1.50 -> 1.54 # mm/vmscan.c 1.158 -> 1.159 # fs/smbfs/proc.c 1.29 -> 1.30 # sound/pci/rme9652/hammerfall_mem.c 1.13 -> 1.15 # arch/i386/kernel/cpu/cpufreq/powernow-k6.c 1.14 -> 1.15 # include/net/llc_c_ev.h 1.7 -> 1.8 # include/net/rose.h 1.2 -> 1.3 # drivers/s390/char/sclp_tty.c 1.9 -> 1.12 # drivers/scsi/NCR_D700.c 1.10 -> 1.12 # fs/proc/proc_misc.c 1.77 -> 1.78 # drivers/macintosh/via-pmu68k.c 1.9 -> 1.10 # drivers/char/agp/frontend.c 1.38 -> 1.39 # drivers/serial/sa1100.c 1.16.1.9 -> 1.21 # sound/isa/cmi8330.c 1.14 -> 1.15 # arch/mips/kernel/irq.c 1.9 -> 1.10 # include/asm-ppc64/bug.h 1.2 -> 1.3 # lib/zlib_inflate/inffast.h 1.1 -> 1.2 # drivers/block/cpqarray.c 1.76 -> 1.77 # net/sctp/sm_make_chunk.c 1.46 -> 1.47 # drivers/scsi/dc395x.c 1.2 -> 1.6 # net/ax25/ax25_dev.c 1.7 -> 1.8 # drivers/i2c/i2c-core.c 1.38 -> 1.40 # arch/x86_64/kernel/apic.c 1.17 -> 1.18 # drivers/net/sk98lin/skge.c 1.17 -> 1.20 # arch/ia64/hp/common/sba_iommu.c 1.20 -> 1.23 # include/asm-i386/bug.h 1.2 -> 1.3 # drivers/net/wan/lmc/lmc_ver.h 1.3 -> 1.4 # sound/core/rawmidi.c 1.24 -> 1.25 # include/linux/genhd.h 1.53 -> 1.55 # drivers/cpufreq/proc_intf.c 1.2 -> 1.3 # arch/i386/Kconfig 1.57 -> 1.58 # drivers/sbus/char/aurora.c 1.24 -> 1.30 # drivers/video/matrox/matroxfb_crtc2.h 1.3 -> 1.4 # sound/core/control.c 1.20.1.1 -> 1.23 # drivers/base/node.c 1.11 -> 1.14 # drivers/scsi/53c700.c 1.29 -> 1.33 # arch/v850/kernel/ma.c 1.2 -> 1.3 # drivers/hotplug/ibmphp_ebda.c 1.9 -> 1.10 drivers/pci/hotplug/ibmphp_ebda.c (moved) # drivers/hotplug/cpci_hotplug.h 1.1 -> 1.2 drivers/pci/hotplug/cpci_hotplug.h (moved) # arch/x86_64/kernel/x8664_ksyms.c 1.14 -> 1.15 # drivers/atm/he.c 1.7 -> 1.12 # net/x25/x25_proc.c 1.3 -> 1.4 # include/linux/if_pppox.h 1.9 -> 1.10 # drivers/sbus/char/envctrl.c 1.14 -> 1.15 # net/ax25/ax25_in.c 1.9 -> 1.11 # drivers/mtd/maps/cstm_mips_ixx.c 1.4 -> 1.5 # arch/x86_64/kernel/i8259.c 1.5 -> 1.7 # include/asm-um/processor-ppc.h 1.1 -> 1.2 # net/ipv4/udp.c 1.40 -> 1.42 # net/ipx/af_ipx.c 1.34 -> 1.36 # sound/isa/opti9xx/opti92x-ad1848.c 1.13.1.2 -> 1.18 # include/asm-sparc64/pci.h 1.13 -> 1.14 # fs/jbd/journal.c 1.32 -> 1.33 # arch/v850/kernel/process.c 1.5 -> 1.7 # drivers/mtd/maps/octagon-5066.c 1.6 -> 1.7 # drivers/char/rocket_int.h 1.4 -> 1.7 # arch/x86_64/lib/Makefile 1.10 -> 1.11 # arch/ppc64/boot/zlib.c 1.2 -> 1.4 # fs/devfs/base.c 1.90 -> 1.92 # init/main.c 1.99 -> 1.102 # drivers/scsi/fd_mcs.h 1.7 -> 1.8 # arch/ppc/boot/simple/misc-embedded.c 1.7 -> 1.8 # drivers/net/wireless/hermes.c 1.12 -> 1.13 # arch/i386/kernel/Makefile 1.41 -> 1.42 # include/linux/i2c.h 1.30 -> 1.31 # drivers/scsi/g_NCR5380.c 1.18 -> 1.19 # drivers/usb/media/ultracam.c 1.12 -> 1.13 # sound/core/init.c 1.16.1.1 -> 1.20 # include/linux/signal.h 1.11 -> 1.13 # include/net/bluetooth/l2cap.h 1.7 -> 1.8 # drivers/mtd/maps/tqm8xxl.c 1.2 -> 1.3 # net/bluetooth/af_bluetooth.c 1.18 -> 1.19 # drivers/pcmcia/sa11xx_core.c 1.2 -> 1.6 # drivers/scsi/dc390.h 1.6 -> 1.7 # arch/ppc/mm/pgtable.c 1.11 -> 1.12 # fs/jffs2/nodemgmt.c 1.8 -> 1.9 # arch/sparc64/kernel/Makefile 1.24 -> 1.25 # drivers/mtd/maps/impa7.c 1.2 -> 1.3 # drivers/mtd/Kconfig 1.1 -> 1.2 # drivers/net/ixgb/ixgb_main.c 1.5 -> 1.6 # include/asm-x86_64/hardirq.h 1.4 -> 1.5 # drivers/scsi/scsi_sysfs.c 1.16 -> 1.21 # net/sctp/transport.c 1.20 -> 1.21 # arch/m68knommu/kernel/ints.c 1.3 -> (deleted) # include/asm-v850/bug.h 1.1 -> 1.2 # include/asm-alpha/ptrace.h 1.1 -> 1.3 # include/linux/cpu.h 1.6 -> 1.8 # sound/oss/ite8172.c 1.15 -> 1.16 # drivers/serial/sunsu.c 1.30.1.6 -> 1.35 # drivers/md/raid5.c 1.67 -> 1.74 # drivers/pcmcia/pci_socket.h 1.5 -> (deleted) # include/asm-v850/sim.h 1.3 -> 1.4 # arch/ppc/platforms/residual.c 1.9 -> 1.10 # include/net/bluetooth/sco.h 1.1 -> 1.2 # fs/partitions/mac.c 1.4 -> 1.5 # sound/drivers/opl3/opl3_lib.c 1.8 -> 1.9 # include/asm-m68knommu/bug.h 1.1 -> 1.2 # lib/zlib_inflate/inffixed.h 1.1 -> 1.2 # net/sctp/output.c 1.30 -> 1.31 # arch/ppc/kernel/traps.c 1.19 -> 1.23 # drivers/char/synclinkmp.c 1.13 -> 1.18 # drivers/serial/anakin.c 1.12.1.4 -> 1.15 # kernel/cpufreq.c 1.32 -> 1.35 # net/atm/atm_misc.c 1.3 -> 1.4 # drivers/char/cyclades.c 1.22 -> 1.27 # drivers/atm/nicstar.c 1.17 -> 1.18 # sound/isa/cs423x/cs4231_lib.c 1.15 -> 1.16 # drivers/i2c/Kconfig 1.8 -> 1.10 # drivers/usb/image/microtek.h 1.7 -> 1.8 # drivers/char/dz.h 1.1 -> 1.7 # include/linux/xfrm.h 1.9 -> 1.11 # include/asm-ppc/pgtable.h 1.22 -> 1.23 # drivers/char/watchdog/amd7xx_tco.c 1.5 -> 1.6 # arch/m68knommu/kernel/process.c 1.2 -> 1.3 # include/asm-ppc/thread_info.h 1.7 -> 1.8 # include/linux/istallion.h 1.2 -> 1.4 # include/linux/usbdevice_fs.h 1.7 -> 1.8 # arch/ppc/mm/init.c 1.29 -> 1.30 # net/ipv6/xfrm6_policy.c 1.6 -> 1.7 # drivers/net/fc/iph5526.c 1.22 -> 1.25 # include/linux/blkdev.h 1.105 -> 1.108 # include/net/ip6_route.h 1.8 -> 1.9 # drivers/scsi/NCR53C9x.c 1.22 -> 1.23 # include/video/edid.h 1.1 -> 1.2 # kernel/time.c 1.11 -> 1.12 # drivers/mtd/maps/fortunet.c 1.2 -> 1.3 # drivers/block/cciss_scsi.c 1.14 -> 1.15 # include/asm-ppc/ocp.h 1.2 -> 1.3 # drivers/message/fusion/mptbase.c 1.10 -> 1.12 # drivers/block/nbd.c 1.55 -> 1.56 # include/linux/udp.h 1.6 -> 1.7 # drivers/scsi/wd33c93.h 1.5 -> 1.6 # drivers/usb/serial/safe_serial.c 1.13 -> 1.14 # sound/isa/Makefile 1.11 -> 1.12 # drivers/acorn/char/defkeymap-acorn.map 1.1 -> (deleted) # drivers/serial/core.c 1.61 -> 1.66 # drivers/scsi/3w-xxxx.h 1.21 -> 1.22 # drivers/ieee1394/ieee1394_core.c 1.30 -> 1.32 # sound/isa/ad1816a/ad1816a.c 1.8 -> 1.9 # fs/nfs/idmap.c 1.1 -> 1.2 # sound/pci/ice1712/ews.c 1.8 -> 1.9 # scripts/kconfig/mconf.c 1.5 -> 1.6 # drivers/net/wan/sdladrv.c 1.7 -> 1.8 # lib/zlib_deflate/defutil.h 1.1 -> 1.3 # arch/m68knommu/platform/68VZ328/de2/config.c 1.3 -> 1.4 # drivers/base/bus.c 1.47 -> 1.48 # drivers/net/rrunner.c 1.16 -> 1.17 # drivers/media/video/bw-qcam.c 1.11 -> 1.12 # Documentation/00-INDEX 1.8 -> 1.9 # drivers/net/ethertap.c 1.7 -> 1.8 # drivers/scsi/NCR5380.c 1.17 -> 1.18 # net/bluetooth/sco.c 1.17 -> 1.19 # arch/um/drivers/stdio_console.c 1.10 -> 1.12 # drivers/net/wireless/Kconfig 1.6 -> 1.9 # kernel/softirq.c 1.39 -> 1.41 # net/ipv4/Makefile 1.18 -> 1.19 # scripts/kconfig/symbol.c 1.4 -> 1.12 # net/x25/x25_subr.c 1.9 -> 1.11 # drivers/oprofile/oprof.c 1.8 -> 1.9 # net/key/af_key.c 1.37 -> 1.41 # drivers/mtd/maps/sa1100-flash.c 1.10 -> 1.12 # drivers/scsi/sr.c 1.78 -> 1.80 # drivers/scsi/aha1740.c 1.15 -> 1.16 # arch/x86_64/kernel/smp.c 1.15 -> 1.16 # drivers/char/rio/rioboot.c 1.7 -> 1.8 # arch/i386/pci/i386.c 1.14 -> 1.15 # include/asm-x86_64/uaccess.h 1.9 -> 1.10 # include/linux/ethtool.h 1.14 -> 1.16 # lib/zlib_deflate/deftree.c 1.1 -> 1.6 # drivers/net/irda/irtty.c 1.18 -> 1.20 # net/bridge/br_input.c 1.12 -> 1.13 # drivers/scsi/scsi.h 1.79 -> 1.83 # include/linux/i2c-dev.h 1.8 -> 1.9 # arch/v850/kernel/rte_mb_a_pci.c 1.6 -> 1.7 # fs/jffs2/wbuf.c 1.6 -> 1.7 # include/asm-generic/percpu.h 1.6 -> 1.7 # drivers/pcmcia/cs.c 1.28 -> 1.38 # include/linux/fs.h 1.248 -> 1.250 # include/asm-ia64/hardirq.h 1.12 -> 1.13 # drivers/video/sa1100fb.c 1.28 -> 1.29 # drivers/usb/storage/usb.c 1.60 -> 1.66 # drivers/net/tokenring/abyss.c 1.8 -> 1.9 # fs/fat/file.c 1.19 -> 1.20 # arch/ppc/kernel/module.c 1.8 -> 1.9 # drivers/scsi/t128.h 1.7 -> 1.8 # drivers/acpi/pci_root.c 1.13 -> 1.14 # arch/i386/kernel/entry.S 1.62 -> 1.63 # Documentation/kobject.txt 1.6 -> 1.7 # drivers/usb/media/ibmcam.c 1.18 -> 1.19 # drivers/pcmcia/cardbus.c 1.27 -> 1.28 # net/ax25/ax25_std_timer.c 1.5 -> 1.7 # drivers/mtd/chips/Makefile 1.6 -> 1.7 # include/linux/trdevice.h 1.3 -> 1.4 # include/asm-x86_64/apicdef.h 1.2 -> 1.3 # drivers/md/dm-ioctl.c 1.22 -> 1.23 # drivers/oprofile/buffer_sync.c 1.18 -> 1.20 # drivers/sgi/char/sgiserial.c 1.14 -> 1.19 # drivers/usb/image/scanner.c 1.59 -> 1.62 # drivers/hotplug/ibmphp_hpc.c 1.10 -> 1.11 drivers/pci/hotplug/ibmphp_hpc.c (moved) # arch/ppc64/defconfig 1.27 -> 1.28 # arch/mips/arc/Makefile 1.4 -> 1.5 # fs/jffs2/gc.c 1.12 -> 1.13 # include/net/sctp/sctp.h 1.37 -> 1.38 # drivers/scsi/aic7xxx/aic79xx_osm_pci.c 1.7 -> 1.8 # arch/arm/mach-sa1100/generic.c 1.18 -> 1.19 # drivers/mtd/chips/amd_flash.c 1.5 -> 1.6 # include/asm-i386/node.h 1.3 -> 1.4 # drivers/char/ser_a2232.c 1.10 -> 1.16 # drivers/net/pcnet32.c 1.34 -> 1.35 # net/ipv4/tcp.c 1.40 -> 1.43 # drivers/char/n_hdlc.c 1.15 -> 1.16 # Documentation/scsi/aic7xxx.txt 1.7 -> 1.8 # lib/zlib_inflate/infcodes.h 1.1 -> 1.3 # drivers/pcmcia/sa1111_generic.c 1.14 -> 1.16 # net/ipv6/netfilter/ip6_queue.c 1.10 -> 1.12 # Documentation/filesystems/proc.txt 1.14 -> 1.15 # drivers/pci/pci.c 1.53 -> 1.56 # arch/m68knommu/kernel/Makefile 1.4 -> 1.5 # arch/m68knommu/lib/Makefile 1.2 -> 1.3 # arch/ppc/8xx_io/enet.c 1.10 -> 1.13 # drivers/net/Makefile 1.61 -> 1.63 # arch/alpha/kernel/smp.c 1.35 -> 1.36 # drivers/mtd/chips/cfi_cmdset_0001.c 1.7 -> 1.8 # include/linux/fcdevice.h 1.3 -> 1.4 # net/ipv4/ip_fragment.c 1.8 -> 1.10 # drivers/mtd/nand/nand_ecc.c 1.4 -> 1.5 # drivers/ide/ide.c 1.66 -> 1.73 # drivers/md/md.c 1.169 -> 1.173 # arch/x86_64/ia32/Makefile 1.14 -> 1.16 # arch/alpha/kernel/core_titan.c 1.16 -> 1.17 # net/atm/proc.c 1.15 -> 1.17 # sound/oss/via82cxxx_audio.c 1.27 -> 1.28 # drivers/serial/clps711x.c 1.12.1.5 -> 1.15 # net/unix/garbage.c 1.7 -> 1.8 # drivers/mtd/chips/Kconfig 1.1 -> 1.3 # drivers/scsi/ncr53c8xx.c 1.27.1.1 -> 1.29 # sound/Makefile 1.16 -> 1.17 # net/ipv4/ip_sockglue.c 1.16 -> 1.17 # drivers/scsi/advansys.c 1.33 -> 1.34 # drivers/ieee1394/ieee1394.h 1.6 -> 1.7 # drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 1.8 -> 1.9 # drivers/mtd/maps/vmax301.c 1.6 -> 1.7 # include/asm-ppc/module.h 1.7 -> 1.8 # arch/ppc/boot/lib/zlib.c 1.4 -> 1.6 # drivers/mtd/devices/doc2001.c 1.4 -> 1.5 # net/ipv6/icmp.c 1.32 -> 1.34 # kernel/kmod.c 1.27 -> 1.28 # drivers/scsi/inia100.c 1.22 -> 1.23 # drivers/net/wireless/orinoco.h 1.12 -> 1.13 # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 1.8 -> 1.10 # net/sunrpc/rpc_pipe.c 1.12 -> 1.14 # sound/usb/usbmixer.c 1.12.1.1 -> 1.15 # include/linux/wanrouter.h 1.7 -> 1.8 # drivers/usb/media/se401.c 1.36 -> 1.37 # include/asm-ia64/pgtable.h 1.18 -> 1.19 # arch/ppc/platforms/gemini_pci.c 1.7 -> 1.8 # mm/bootmem.c 1.16 -> 1.17 # arch/mips/au1000/common/serial.c 1.16 -> 1.22 # drivers/usb/serial/visor.c 1.61 -> 1.62 # drivers/net/wan/lmc/lmc_debug.c 1.3 -> 1.4 # arch/i386/kernel/mpparse.c 1.42 -> 1.43 # net/ipv6/reassembly.c 1.12 -> 1.16 # drivers/isdn/hisax/sedlbauer_cs.c 1.8 -> 1.9 # drivers/pcmcia/cistpl.c 1.13 -> 1.15 # arch/sparc64/kernel/ebus.c 1.14 -> 1.15 # include/sound/sndmagic.h 1.11 -> 1.13 # include/asm-arm/pci.h 1.19 -> 1.20 # drivers/mtd/chips/map_ram.c 1.5 -> 1.6 # sound/isa/cs423x/cs4236_lib.c 1.6 -> 1.7 # include/asm-parisc/thread_info.h 1.2 -> 1.3 # fs/jffs2/read.c 1.6 -> 1.7 # fs/jffs2/compr.c 1.4 -> 1.5 # net/irda/ircomm/ircomm_tty.c 1.21 -> 1.25 # net/irda/af_irda.c 1.43 -> 1.45 # drivers/usb/media/ov511.c 1.44 -> 1.45 # drivers/net/wan/lmc/lmc_main.c 1.14 -> 1.17 # drivers/scsi/hosts.h 1.63 -> 1.67 # drivers/base/cpu.c 1.11 -> 1.14 # drivers/scsi/NCR53C9x.h 1.7 -> 1.8 # drivers/char/pty.c 1.17 -> 1.21 # arch/v850/kernel/rte_cb_multi.c 1.5 -> 1.6 # drivers/usb/misc/emi26.c 1.7 -> 1.8 # net/sctp/outqueue.c 1.34 -> 1.35 # drivers/video/i810/i810_main.c 1.9 -> 1.10 # arch/ppc/boot/common/mpc10x_memory.c 1.3 -> 1.4 # include/linux/serial167.h 1.3 -> 1.5 # drivers/tc/zs.h 1.3 -> 1.5 # net/ipv4/tcp_ipv4.c 1.57 -> 1.59 # fs/intermezzo/vfs.c 1.19 -> 1.20 # fs/reiserfs/inode.c 1.77 -> 1.78 # drivers/ieee1394/ieee1394_transactions.c 1.11 -> 1.12 # drivers/message/fusion/linux_compat.h 1.8 -> 1.9 # include/asm-um/thread_info.h 1.3 -> 1.4 # fs/jffs2/super.c 1.23 -> 1.24 # fs/char_dev.c 1.18 -> 1.21 # drivers/hotplug/acpiphp_glue.c 1.10 -> 1.13 drivers/pci/hotplug/acpiphp_glue.c (moved) # arch/i386/kernel/io_apic.c 1.67 -> 1.70 # include/linux/sunrpc/rpc_pipe_fs.h 1.2 -> 1.3 # net/core/filter.c 1.4 -> 1.6 # net/atm/lec.h 1.5 -> 1.6 # drivers/pcmcia/yenta.h 1.1 -> 1.2 # sound/core/pcm_native.c 1.30.1.1 -> 1.36 # arch/sparc64/defconfig 1.86 -> 1.87 # drivers/usb/media/vicam.c 1.36 -> 1.38 # drivers/scsi/scsi_devinfo.c 1.1 -> 1.2 # sound/pci/ice1712/ice1712.c 1.13 -> 1.16 # sound/pci/rme9652/hdsp.c 1.17 -> 1.18 # scripts/kconfig/lkc_proto.h 1.1 -> 1.3 # sound/oss/skeleton.c 1.3 -> 1.4 # mm/filemap.c 1.193 -> 1.197 # drivers/acpi/acpi_ksyms.c 1.24 -> 1.26 # include/asm-h8300/thread_info.h 1.1 -> 1.2 # drivers/char/ip2/i2lib.h 1.4 -> 1.6 # arch/m68knommu/platform/5206e/config.c 1.3 -> 1.4 # net/ipv4/netfilter/ipt_ULOG.c 1.8 -> 1.9 # fs/namei.c 1.72 -> 1.74 # net/decnet/dn_nsp_in.c 1.10 -> 1.12 # drivers/usb/serial/whiteheat.c 1.37 -> 1.38 # Documentation/kbuild/kconfig-language.txt 1.2 -> 1.3 # sound/isa/sb/emu8000.c 1.9 -> 1.10 # net/ax25/ax25_ip.c 1.7 -> 1.8 # arch/sparc/prom/console.c 1.4 -> 1.5 # drivers/char/agp/generic.c 1.51 -> 1.52 # drivers/mtd/chips/chipreg.c 1.5 -> 1.6 # drivers/char/pcmcia/synclink_cs.c 1.16 -> 1.22 # drivers/pci/pci.h 1.4 -> 1.8 # drivers/hotplug/cpqphp_ctrl.c 1.11 -> 1.12 drivers/pci/hotplug/cpqphp_ctrl.c (moved) # drivers/net/wan/sbni.c 1.17 -> 1.18 # arch/h8300/lib/Makefile 1.1 -> 1.2 # drivers/mtd/maps/ceiva.c 1.3 -> 1.4 # drivers/ide/pci/cs5530.c 1.11 -> 1.12 # drivers/acorn/char/keyb_arc.c 1.5 -> (deleted) # include/linux/fddidevice.h 1.2 -> 1.3 # net/socket.c 1.64 -> 1.65 # include/asm-i386/mach-generic/mach_apic.h 1.2 -> 1.3 # sound/pci/Kconfig 1.5 -> 1.7 # drivers/usb/media/dsbr100.c 1.16 -> 1.17 # arch/sh/kernel/irq.c 1.11 -> 1.12 # drivers/char/synclink.c 1.35 -> 1.40 # drivers/scsi/gdth.h 1.12 -> 1.13 # drivers/pcmcia/ti113x.h 1.5 -> 1.6 # fs/smbfs/sock.c 1.14 -> 1.15 # include/asm-alpha/string.h 1.1 -> 1.2 # drivers/scsi/aic7xxx/aic7xxx_osm.h 1.44 -> 1.49 # arch/mips/ddb5476/pci.c 1.8 -> 1.9 # net/netrom/nr_in.c 1.5 -> 1.7 # drivers/scsi/sr.h 1.9 -> 1.10 # scripts/kconfig/expr.c 1.1 -> 1.4 # drivers/net/e1000/e1000_main.c 1.70 -> 1.71 # drivers/char/agp/sworks-agp.c 1.32 -> 1.33 # arch/arm/mach-pxa/lubbock.c 1.10 -> 1.11 # ipc/sem.c 1.18 -> 1.19 # drivers/net/sunqe.c 1.14 -> 1.17 # arch/arm/Makefile 1.39 -> 1.42 # drivers/char/hw_random.c 1.10 -> 1.11 # sound/oss/rme96xx.c 1.13 -> 1.14 # sound/pci/ac97/ac97_codec.c 1.35 -> 1.40 # include/sound/version.h 1.53 -> 1.60 # fs/ncpfs/sock.c 1.14 -> 1.15 # drivers/hotplug/pci_hotplug.h 1.7 -> 1.8 drivers/pci/hotplug/pci_hotplug.h (moved) # arch/v850/as85ep1-rom.ld 1.1 -> 1.2 # drivers/net/irda/sa1100_ir.c 1.11 -> 1.13 # drivers/net/irda/w83977af_ir.c 1.19 -> 1.21 # drivers/base/base.h 1.26 -> 1.27 # arch/i386/kernel/dmi_scan.c 1.34 -> 1.35 # drivers/scsi/fd_mcs.c 1.13 -> 1.14 # sound/drivers/mpu401/mpu401_uart.c 1.16 -> 1.17 # fs/proc/proc_tty.c 1.6 -> 1.7 # include/linux/sysfs.h 1.26 -> 1.27 # arch/mips/dec/prom/Makefile 1.6 -> 1.7 # include/linux/ide.h 1.53 -> 1.56 # fs/exec.c 1.84 -> 1.85 # drivers/net/hp100.c 1.17 -> 1.18 # drivers/scsi/nsp32.c 1.11 -> 1.13 # drivers/mtd/mtdblock.c 1.43 -> 1.44 # arch/cris/drivers/lpslave/e100lpslavenet.c 1.5 -> 1.6 # include/asm-v850/thread_info.h 1.2 -> 1.3 # drivers/usb/storage/transport.c 1.71 -> 1.77 # drivers/scsi/aacraid/linit.c 1.18 -> 1.19 # net/sunrpc/clnt.c 1.37 -> 1.39 # drivers/serial/sunsab.c 1.27 -> 1.29 # include/asm-ppc64/pci.h 1.5 -> 1.6 # sound/pci/ice1712/Makefile 1.5 -> 1.9 # drivers/mtd/maps/pci.c 1.2 -> 1.3 # include/linux/isicom.h 1.3 -> 1.5 # fs/eventpoll.c 1.19 -> 1.21 # net/llc/llc_main.c 1.28 -> 1.29 # include/net/snmp.h 1.7 -> 1.8 # arch/mips/mips-boards/generic/pci.c 1.7 -> 1.8 # include/linux/mtd/map.h 1.6 -> 1.7 # drivers/hotplug/acpiphp_res.c 1.2 -> 1.3 drivers/pci/hotplug/acpiphp_res.c (moved) # include/linux/mtd/cfi.h 1.6 -> 1.8 # net/ipv6/raw.c 1.29 -> 1.30 # arch/arm/kernel/bios32.c 1.22 -> 1.23 # drivers/acpi/tables.c 1.12 -> 1.13 # include/asm-alpha/unaligned.h 1.1 -> 1.2 # kernel/signal.c 1.85 -> 1.86 # drivers/usb/storage/transport.h 1.23 -> 1.27 # drivers/usb/image/scanner.h 1.35 -> 1.36 # drivers/scsi/cpqfcTS.h 1.8 -> 1.9 # arch/sparc64/solaris/timod.c 1.14 -> 1.15 # drivers/scsi/pcmcia/nsp_cs.h 1.9 -> 1.10 # drivers/usb/storage/initializers.c 1.5 -> 1.6 # include/net/irda/ircomm_tty.h 1.7 -> 1.9 # include/asm-ppc64/paca.h 1.7 -> 1.8 # drivers/char/pcxx.h 1.2 -> 1.4 # net/ipv6/proc.c 1.14 -> 1.16 # drivers/net/irda/ali-ircc.c 1.19 -> 1.21 # drivers/usb/misc/auerswald.c 1.31 -> 1.32 # net/atm/br2684.c 1.2 -> 1.3 # drivers/message/fusion/mptscsih.c 1.23 -> 1.24 # drivers/scsi/atp870u.c 1.20 -> 1.22 # drivers/char/rtc.c 1.26 -> 1.27 # sound/isa/dt019x.c 1.13 -> 1.14 # sound/oss/awe_wave.c 1.12 -> 1.13 # drivers/mtd/devices/Kconfig 1.1 -> 1.3 # drivers/char/sx.c 1.30 -> 1.37 # net/netsyms.c 1.77 -> 1.80 # net/ipv4/netfilter/ipfwadm_core.c 1.16 -> 1.17 # arch/i386/pci/common.c 1.37 -> 1.38 # drivers/mtd/maps/dc21285.c 1.5 -> 1.6 # drivers/ide/setup-pci.c 1.13 -> 1.15 # drivers/ide/ide-disk.c 1.44 -> 1.46 # include/linux/pci_ids.h 1.101 -> 1.102 # drivers/scsi/aic7xxx_old.c 1.49 -> 1.50 # drivers/usb/serial/usb-serial.c 1.78 -> 1.83 # drivers/hotplug/Kconfig 1.7 -> 1.8 drivers/pci/hotplug/Kconfig (moved) # include/linux/irq.h 1.6 -> 1.7 # sound/core/pcm_lib.c 1.19 -> 1.21 # sound/pci/ymfpci/ymfpci.c 1.11 -> 1.12 # drivers/macintosh/macserial.h 1.6 -> 1.8 # sound/pci/trident/trident_synth.c 1.5 -> 1.6 # drivers/sbus/char/bbc_envctrl.c 1.4 -> 1.5 # drivers/sbus/sbus.c 1.18 -> 1.19 # include/scsi/sg.h 1.11 -> 1.12 # drivers/net/ptifddi_asm.h 1.1 -> (deleted) # arch/m68knommu/vmlinux.lds.S 1.8 -> 1.9 # include/asm-i386/mach-numaq/mach_apic.h 1.17 -> 1.19 # drivers/usb/input/hid-input.c 1.17 -> 1.19 # include/asm-ppc/system.h 1.18 -> 1.19 # include/asm-alpha/unistd.h 1.18 -> 1.20 # scripts/kconfig/qconf.h 1.3 -> 1.4 # arch/arm/mach-sa1100/graphicsmaster.c 1.17 -> 1.18 # include/asm-ppc64/signal.h 1.4.1.1 -> 1.6 # include/asm-x86_64/pci.h 1.7 -> 1.8 # sound/isa/es18xx.c 1.16.1.2 -> 1.18 # sound/usb/usbquirks.h 1.13 -> 1.14 # drivers/md/linear.c 1.30 -> 1.34 # include/asm-i386/pci.h 1.21 -> 1.22 # drivers/net/ptifddi.h 1.1 -> (deleted) # mm/shmem.c 1.121 -> 1.124 # drivers/usb/input/hiddev.c 1.33 -> 1.34 # arch/ia64/mm/init.c 1.35 -> 1.36 # arch/ia64/kernel/module.c 1.4 -> 1.5 # include/asm-m68knommu/thread_info.h 1.2 -> 1.3 # drivers/sgi/char/sgiserial.h 1.2 -> 1.4 # drivers/serial/mcfserial.c 1.10 -> 1.15 # arch/x86_64/kernel/irq.c 1.15 -> 1.16 # Documentation/networking/ip-sysctl.txt 1.16 -> 1.17 # drivers/mtd/chips/cfi_cmdset_0002.c 1.8 -> 1.9 # arch/sparc64/kernel/systbls.S 1.38 -> 1.39 # drivers/mtd/Makefile 1.10 -> 1.11 # lib/zlib_inflate/infcodes.c 1.1 -> 1.4 # drivers/char/serial167.c 1.23 -> 1.29 # arch/x86_64/kernel/pci-gart.c 1.10 -> 1.11 # drivers/net/sis900.c 1.36 -> 1.37 # drivers/net/hamradio/dmascc.c 1.13 -> 1.16 # include/asm-i386/mach-summit/mach_mpparse.h 1.6 -> 1.8 # include/linux/usb.h 1.77 -> 1.79 # arch/ppc64/kernel/irq.c 1.25 -> 1.28 # drivers/hotplug/cpci_hotplug_core.c 1.5 -> 1.6 drivers/pci/hotplug/cpci_hotplug_core.c (moved) # arch/arm/common/Makefile 1.2 -> 1.3 # drivers/mtd/devices/lart.c 1.1 -> 1.2 # drivers/net/irda/donauboe.c 1.8 -> 1.10 # drivers/media/radio/radio-cadet.c 1.13 -> 1.14 # fs/jffs2/fs.c 1.11 -> 1.12 # arch/sparc/prom/Makefile 1.3 -> 1.4 # drivers/net/wan/pc300_tty.c 1.10 -> 1.13 # include/asm-v850/rte_cb.h 1.2 -> 1.3 # sound/isa/sb/sb8_main.c 1.5 -> 1.6 # sound/oss/sonicvibes.c 1.22 -> 1.23 # fs/fat/inode.c 1.65 -> 1.68 # drivers/net/tun.c 1.17 -> 1.18 # drivers/ide/ide-cd.c 1.45 -> 1.49 # arch/ia64/pci/pci.c 1.29 -> 1.30 # sound/pci/rme9652/rme9652.c 1.18 -> 1.19 # arch/cris/drivers/ethernet.c 1.11 -> 1.12 # scripts/kernel-doc 1.11 -> 1.12 # fs/reiserfs/super.c 1.63 -> 1.65 # net/core/dv.c 1.6 -> 1.7 # fs/binfmt_elf.c 1.45 -> 1.46 # drivers/acpi/pci_irq.c 1.16 -> 1.18 # drivers/net/wan/lmc/lmc_var.h 1.4 -> 1.5 # sound/pci/ice1712/ice1724.c 1.3 -> 1.6 # include/sound/sb.h 1.7 -> 1.9 # drivers/md/multipath.c 1.48 -> 1.52 # drivers/video/matrox/matroxfb_DAC1064.c 1.14 -> 1.15 # fs/jfs/super.c 1.33.1.2 -> 1.36 # drivers/scsi/sg.c 1.56 -> 1.58 # drivers/usb/serial/pl2303.c 1.40 -> 1.41 # net/sched/sch_atm.c 1.10 -> 1.11 # drivers/char/riscom8.c 1.15 -> 1.21 # drivers/scsi/BusLogic.h 1.14 -> 1.15 # arch/ppc/8260_io/fcc_enet.c 1.9 -> 1.13 # arch/v850/Kconfig 1.10 -> 1.11 # fs/aio.c 1.31 -> 1.32 # drivers/scsi/aic7xxx/aic7xxx_core.c 1.28 -> 1.31 # arch/x86_64/kernel/nmi.c 1.10 -> 1.11 # include/asm-m68k/pci.h 1.4 -> 1.5 # drivers/usb/usb-skeleton.c 1.36 -> 1.37 # drivers/usb/serial/ir-usb.c 1.28 -> 1.29 # drivers/usb/serial/digi_acceleport.c 1.33 -> 1.34 # net/sunrpc/auth_gss/auth_gss.c 1.5 -> 1.9 # drivers/pcmcia/ricoh.h 1.5 -> 1.6 # drivers/md/dm.h 1.3 -> 1.6 # drivers/ide/Kconfig 1.11 -> 1.13 # drivers/net/arcnet/rfc1201.c 1.5 -> 1.6 # drivers/net/8139cp.c 1.38 -> 1.39 # drivers/net/acenic.c 1.31 -> 1.32 # drivers/usb/core/hub.c 1.63 -> 1.70 # net/core/netfilter.c 1.20 -> 1.21 # drivers/usb/net/catc.c 1.23 -> 1.26 # drivers/video/matrox/i2c-matroxfb.c 1.8 -> 1.9 # arch/ppc/kernel/pci.c 1.26 -> 1.30 # drivers/mtd/maps/pnc2000.c 1.4 -> 1.5 # drivers/pci/setup-irq.c 1.3 -> 1.4 # drivers/block/genhd.c 1.88 -> 1.89 # arch/ppc64/kernel/setup.c 1.24.1.2 -> 1.28 # drivers/net/e100/e100_main.c 1.72 -> 1.76 # include/linux/pci.h 1.77 -> 1.90 # arch/um/drivers/net_kern.c 1.11 -> 1.14 # drivers/scsi/aic7xxx/aic79xx_inline.h 1.10 -> 1.12 # drivers/scsi/aic7xxx/aic79xx_pci.c 1.10 -> 1.12 # include/asm-arm/thread_info.h 1.6 -> 1.7 # fs/jffs2/write.c 1.10 -> 1.11 # drivers/scsi/osst.c 1.45 -> 1.46 # arch/i386/kernel/setup.c 1.82 -> 1.84 # net/wanrouter/wanproc.c 1.19 -> 1.20 # drivers/isdn/hisax/elsa_cs.c 1.5 -> 1.6 # include/linux/tcp.h 1.10 -> 1.11 # drivers/md/dm-stripe.c 1.5 -> 1.6 # Documentation/DocBook/Makefile 1.39 -> 1.41 # arch/alpha/kernel/signal.c 1.18 -> 1.19 # include/asm-um/bug.h 1.1 -> 1.2 # arch/um/sys-ppc/Makefile 1.3 -> 1.4 # drivers/mtd/mtdcore.c 1.4 -> 1.5 # arch/ppc/kernel/process.c 1.34 -> 1.36 # drivers/atm/idt77252.c 1.13 -> 1.14 # drivers/scsi/scsi_debug.h 1.15 -> 1.16 # drivers/video/aty/aty128fb.c 1.37 -> 1.38 # drivers/scsi/gdth_proc.c 1.13 -> 1.14 # include/sound/pcm.h 1.14 -> 1.16 # arch/mips/ddb5074/pci.c 1.9 -> 1.10 # arch/arm/mach-sa1100/neponset.c 1.18 -> 1.19 # drivers/mtd/devices/docecc.c 1.6 -> 1.7 # net/ipv4/ipmr.c 1.19 -> 1.20 # drivers/scsi/AM53C974.c 1.13 -> 1.14 # arch/i386/kernel/cpu/cpufreq/gx-suspmod.c 1.8 -> 1.9 # drivers/mtd/mtdblock_ro.c 1.26 -> 1.27 # arch/arm/mach-sa1100/xp860.c 1.10 -> 1.11 # arch/sh/lib/Makefile 1.6 -> 1.7 # drivers/char/agp/intel-agp.c 1.42 -> 1.43 # arch/ia64/hp/sim/simserial.c 1.16 -> 1.21 # arch/x86_64/kernel/suspend.c 1.5 -> 1.6 # include/asm-ia64/smp.h 1.9 -> 1.10 # fs/jfs/jfs_xtree.c 1.9 -> 1.10 # drivers/mtd/maps/elan-104nc.c 1.5 -> 1.6 # arch/ppc/boot/common/misc-common.c 1.9 -> 1.10 # include/linux/hugetlb.h 1.16 -> 1.17 # net/ipx/ipx_route.c 1.1 -> 1.2 # drivers/net/tokenring/smctr.c 1.20 -> 1.21 # sound/isa/sb/es968.c 1.12.1.1 -> 1.16 # arch/i386/kernel/time.c 1.32 -> 1.34 # include/asm-v850/nb85e_cache.h 1.3 -> 1.4 # include/linux/msdos_fs_sb.h 1.9 -> 1.10 # arch/alpha/lib/csum_partial_copy.c 1.3 -> 1.4 # drivers/net/wan/sdla_chdlc.c 1.27 -> 1.31 # include/linux/spinlock.h 1.23 -> 1.24 # drivers/scsi/scsi_syms.c 1.36 -> 1.38 # net/econet/af_econet.c 1.18 -> 1.20 # drivers/ide/ide-floppy.c 1.27 -> 1.28 # drivers/usb/storage/isd200.c 1.29 -> 1.30 # drivers/media/video/zr36120.c 1.18 -> 1.19 # arch/ppc/boot/of1275/Makefile 1.3 -> 1.4 # sound/oss/dmasound/Kconfig 1.1 -> 1.2 # net/netrom/nr_out.c 1.5 -> 1.6 # include/net/dn_fib.h 1.6 -> 1.7 # drivers/scsi/scsi_lib.c 1.90 -> 1.92 # net/rose/af_rose.c 1.23 -> 1.26 # net/netrom/af_netrom.c 1.25 -> 1.27 # net/llc/llc_if.c 1.21 -> 1.22 # fs/sysfs/bin.c 1.5 -> 1.7 # include/asm-alpha/bitops.h 1.10 -> 1.11 # sound/core/ioctl32/rawmidi32.c 1.11 -> 1.13 # sound/i2c/l3/uda1341.c 1.8 -> 1.9 # drivers/usb/storage/scsiglue.c 1.42 -> 1.45 # scripts/Makefile.lib 1.18 -> 1.19 # drivers/message/fusion/mptlan.c 1.9 -> 1.10 # drivers/usb/core/devio.c 1.47 -> 1.50 # arch/mips/ddb5xxx/ddb5477/pci.c 1.1 -> 1.2 # arch/alpha/lib/memmove.S 1.1 -> 1.2 # drivers/usb/input/xpad.c 1.14 -> 1.15 # drivers/video/matrox/matroxfb_base.h 1.19 -> 1.22 # net/netlink/af_netlink.c 1.25 -> 1.27 # fs/coda/inode.c 1.25 -> 1.26 # fs/ncpfs/inode.c 1.42 -> 1.43 # net/ipv6/ipcomp6.c 1.3 -> 1.4 # drivers/scsi/dmx3191d.h 1.6 -> 1.7 # arch/um/drivers/ssl.c 1.7 -> 1.9 # drivers/s390/char/sclp_con.c 1.6 -> 1.7 # net/core/dev.c 1.83 -> 1.84 # kernel/compat.c 1.14 -> 1.15 # drivers/ide/legacy/pdc4030.c 1.9 -> 1.10 # net/xfrm/xfrm_policy.c 1.27 -> 1.34 # drivers/net/irda/irda-usb.c 1.38 -> 1.40 # net/ipv6/Kconfig 1.4 -> 1.6 # net/decnet/netfilter/dn_rtmsg.c 1.2 -> 1.3 # drivers/char/generic_serial.c 1.10 -> 1.12 # fs/jffs2/build.c 1.5 -> 1.6 # drivers/char/mem.c 1.38 -> 1.42 # arch/ppc64/kernel/traps.c 1.16.1.1 -> 1.18 # drivers/scsi/scsi.c 1.112 -> 1.113 # drivers/usb/core/usb.c 1.123 -> 1.125 # arch/ppc/platforms/pmac_pci.c 1.15 -> 1.16 # drivers/usb/storage/initializers.h 1.4 -> 1.5 # include/linux/reiserfs_fs_sb.h 1.22 -> 1.23 # drivers/net/r8169.c 1.10 -> 1.11 # kernel/posix-timers.c 1.16 -> 1.17 # arch/ppc64/kernel/head.S 1.31 -> 1.35 # drivers/isdn/hardware/eicon/divamnt.c 1.6 -> 1.7 # sound/ppc/awacs.c 1.10 -> 1.12 # drivers/scsi/atari_scsi.h 1.5 -> 1.6 # arch/v850/kernel/ptrace.c 1.1 -> 1.2 # lib/zlib_inflate/inflate.c 1.3 -> 1.7 # drivers/scsi/arm/arxescsi.c 1.19 -> 1.20 # drivers/scsi/arm/acornscsi.c 1.30 -> 1.31 # drivers/s390/char/tubio.h 1.12 -> 1.13 # net/sunrpc/auth.c 1.11 -> 1.12 # include/asm-ppc/ptrace.h 1.6 -> 1.7 # drivers/hotplug/cpcihp_generic.c 1.2 -> 1.3 drivers/pci/hotplug/cpcihp_generic.c (moved) # drivers/isdn/hysdn/hysdn_init.c 1.4 -> 1.5 # arch/x86_64/ia32/ia32_ioctl.c 1.27 -> 1.28 # sound/pci/emu10k1/emufx.c 1.20 -> 1.22 # drivers/pci/pci.ids 1.44 -> 1.45 # net/decnet/af_decnet.c 1.25 -> 1.26 # include/asm-ppc64/uaccess.h 1.6 -> 1.7 # include/linux/mtd/nand_ecc.h 1.1 -> 1.2 # drivers/s390/char/sclp_tty.h 1.4 -> 1.5 # drivers/char/serial_tx3912.c 1.13 -> 1.18 # drivers/scsi/megaraid.h 1.18 -> 1.19 # drivers/scsi/NCR5380.h 1.7 -> 1.8 # sound/isa/gus/gus_synth.c 1.6 -> 1.7 # include/linux/sunrpc/auth.h 1.8 -> 1.9 # include/asm-ppc/semaphore.h 1.9 -> 1.10 # drivers/net/pcmcia/ibmtr_cs.c 1.13 -> 1.14 # include/asm-h8300/pci.h 1.1 -> 1.2 # include/net/bluetooth/hci_core.h 1.12 -> 1.13 # Documentation/DMA-mapping.txt 1.14 -> 1.15 # drivers/net/wireless/ieee802_11.h 1.2 -> 1.3 # sound/oss/cmpci.c 1.22 -> 1.24 # include/asm-x86_64/suspend.h 1.5 -> 1.6 # include/sound/ac97_codec.h 1.18 -> 1.19 # drivers/ide/ide-proc.c 1.10 -> 1.13 # arch/arm/Kconfig 1.18 -> 1.19 # drivers/scsi/aic7xxx/aic7xxx.h 1.13 -> 1.15 # arch/m68k/atari/hades-pci.c 1.6 -> 1.7 # include/linux/mtd/doc2000.h 1.4 -> 1.5 # drivers/usb/net/usbnet.c 1.52 -> 1.54 # net/bluetooth/rfcomm/tty.c 1.20 -> 1.25 # drivers/usb/image/mdc800.c 1.30 -> 1.31 # sound/isa/gus/interwave.c 1.12.1.1 -> 1.15 # drivers/md/raid1.c 1.62 -> 1.68 # drivers/base/firmware.c 1.6 -> 1.7 # fs/proc/kcore.c 1.7 -> 1.8 # include/asm-x86_64/cpufeature.h 1.3 -> 1.4 # include/net/netrom.h 1.2 -> 1.3 # arch/x86_64/kernel/asm-offsets.c 1.3 -> 1.4 # arch/i386/kernel/nmi.c 1.18 -> 1.20 # fs/jffs2/nodelist.c 1.8 -> 1.9 # fs/cifs/cifsfs.c 1.14.1.2 -> 1.16 # drivers/pnp/isapnp/core.c 1.35 -> 1.36 # arch/ppc64/Kconfig 1.15 -> 1.19 # drivers/md/raid0.c 1.26 -> 1.33 # arch/parisc/lib/Makefile 1.6 -> 1.7 # drivers/hotplug/pcihp_skeleton.c 1.2 -> 1.3 drivers/pci/hotplug/pcihp_skeleton.c (moved) # arch/ppc64/kernel/xics.c 1.22.1.2 -> 1.24 # include/linux/sysctl.h 1.44 -> 1.47 # drivers/net/saa9730.c 1.6 -> 1.7 # arch/ppc/kernel/head.S 1.31 -> 1.32 # drivers/i2c/chips/Kconfig 1.10 -> 1.11 # include/pcmcia/driver_ops.h 1.4 -> (deleted) # drivers/md/dm-linear.c 1.4 -> 1.5 # drivers/scsi/sym53c8xx_comm.h 1.10 -> 1.11 # include/asm-ppc/mmu_context.h 1.12 -> 1.13 # include/linux/zlib.h 1.2 -> 1.8 # drivers/s390/net/ctctty.c 1.12 -> 1.18 # drivers/net/tg3.c 1.69 -> 1.71 # include/linux/smp.h 1.23 -> 1.25 # arch/i386/mm/discontig.c 1.13 -> 1.14 # sound/core/ioctl32/timer32.c 1.11 -> 1.13 # arch/sparc64/kernel/sys_sparc.c 1.19 -> 1.21 # include/asm-i386/memblk.h 1.3 -> 1.4 # arch/v850/lib/Makefile 1.2 -> 1.3 # drivers/net/wan/lmc/lmc_proto.c 1.7 -> 1.8 # fs/nfsd/nfssvc.c 1.36 -> 1.37 # include/linux/mmzone.h 1.37 -> 1.39 # net/ipv4/raw.c 1.31 -> 1.33 # drivers/scsi/aic7xxx/aic79xx_osm.c 1.42 -> 1.46 # include/linux/list.h 1.29 -> 1.33 # include/asm-v850/bitops.h 1.2 -> 1.3 # drivers/pcmcia/tcic.c 1.22 -> 1.25 # net/ipv6/af_inet6.c 1.44 -> 1.51 # net/ipv6/tcp_ipv6.c 1.56 -> 1.59 # drivers/net/sungem.h 1.11 -> 1.12 # net/bluetooth/hci_sock.c 1.21 -> 1.22 # drivers/usb/serial/kl5kusb105.c 1.22 -> 1.23 # sound/pci/ice1712/ak4524.c 1.9 -> (deleted) # sound/i2c/Makefile 1.9 -> 1.10 # drivers/net/wireless/wavelan_cs.c 1.22.1.1 -> 1.24 # drivers/scsi/mac_scsi.h 1.4 -> 1.5 # arch/ppc/boot/common/Makefile 1.5 -> 1.7 # net/xfrm/xfrm_user.c 1.21 -> 1.26 # drivers/ide/pci/hpt366.c 1.18 -> 1.19 # fs/Kconfig 1.26 -> 1.27 # drivers/net/amd8111e.c 1.4 -> 1.5 # drivers/mtd/chips/sharp.c 1.6 -> 1.8 # drivers/usb/media/dabusb.c 1.28 -> 1.29 # drivers/video/matrox/matroxfb_accel.c 1.8 -> 1.9 # drivers/char/epca.h 1.3 -> 1.5 # drivers/mtd/redboot.c 1.3 -> 1.4 # drivers/block/loop.c 1.88 -> 1.98 # drivers/char/agp/Kconfig 1.21 -> 1.22 # fs/buffer.c 1.200 -> 1.202 # drivers/pnp/resource.c 1.12 -> 1.13 # drivers/mtd/maps/iq80321.c 1.2 -> (deleted) # net/decnet/dn_timer.c 1.4 -> 1.5 # drivers/pci/proc.c 1.24 -> 1.29 # net/x25/x25_facilities.c 1.9 -> 1.10 # include/sound/trident.h 1.7.1.1 -> 1.9 # arch/m68knommu/platform/5206/config.c 1.3 -> 1.4 # drivers/scsi/atari_NCR5380.c 1.12.1.1 -> 1.14 # net/ipv4/esp.c 1.29 -> 1.31 net/ipv4/esp4.c (moved) # drivers/usb/core/hcd.c 1.63 -> 1.64 # drivers/usb/input/hid-core.c 1.56 -> 1.58 # drivers/scsi/dmx3191d.c 1.12 -> 1.13 # include/pcmcia/bus_ops.h 1.4 -> (deleted) # arch/ppc64/mm/init.c 1.43 -> 1.44 # drivers/usb/serial/belkin_sa.c 1.35 -> 1.36 # drivers/scsi/aha1740.h 1.6 -> 1.7 # drivers/char/epca.c 1.22 -> 1.28 # include/linux/raid/raid1.h 1.16 -> 1.17 # net/rose/rose_in.c 1.6 -> 1.8 # Documentation/sound/alsa/OSS-Emulation.txt 1.2 -> 1.3 # arch/mips/baget/prom/Makefile 1.4 -> 1.5 # include/asm-i386/smp.h 1.25 -> 1.26 # drivers/scsi/ppa.c 1.21 -> 1.23 # drivers/mtd/nand/spia.c 1.5 -> 1.6 # lib/zlib_inflate/infblock.h 1.1 -> 1.3 # drivers/char/tty_io.c 1.101 -> 1.111 # drivers/mtd/chips/jedec.c 1.9 -> 1.11 # arch/x86_64/pci/irq.c 1.8 -> 1.9 # drivers/mtd/maps/sbc_gxx.c 1.4 -> 1.5 # drivers/usb/input/powermate.c 1.13 -> 1.14 # fs/bio.c 1.44 -> 1.48 # net/ipv6/ndisc.c 1.38 -> 1.42 # arch/ppc/boot/Makefile 1.16 -> 1.17 # arch/ppc64/kernel/process.c 1.32 -> 1.34 # drivers/char/pcxx.c 1.11 -> 1.16 # sound/pci/maestro3.c 1.20 -> 1.22 # include/sound/asequencer.h 1.3 -> 1.4 # drivers/hotplug/cpqphp_nvram.h 1.1 -> 1.2 drivers/pci/hotplug/cpqphp_nvram.h (moved) # include/linux/selection.h 1.1 -> 1.2 # MAINTAINERS 1.140 -> 1.148 # net/sctp/ipv6.c 1.41 -> 1.43 # drivers/net/sundance.c 1.42 -> 1.44 # net/sctp/protocol.c 1.48 -> 1.51 # drivers/usb/net/rtl8150.c 1.24 -> 1.27 # fs/reiserfs/journal.c 1.68 -> 1.69 # sound/pci/intel8x0.c 1.33 -> 1.35 # include/linux/oprofile.h 1.6 -> 1.7 # sound/pci/ice1712/revo.c 1.1 -> 1.3 # include/linux/zutil.h 1.2 -> 1.7 # net/core/dst.c 1.12 -> 1.13 # kernel/exec_domain.c 1.14 -> 1.15 # arch/ppc64/kernel/pci_dma.c 1.14 -> 1.16 # drivers/pcmcia/rsrc_mgr.c 1.15 -> 1.18 # drivers/pcmcia/yenta.c 1.22 -> 1.23 # drivers/media/radio/radio-maestro.c 1.8 -> 1.9 # fs/reiserfs/prints.c 1.22 -> 1.23 # include/linux/cpufreq.h 1.24 -> 1.25 # drivers/scsi/scsi_debug.c 1.37 -> 1.38 # drivers/char/rio/rio_linux.c 1.20 -> 1.27 # sound/core/ioctl32/pcm32.c 1.13 -> 1.15 # net/core/datagram.c 1.9 -> 1.10 # drivers/pcmcia/sa1100_generic.c 1.30 -> 1.32 # drivers/hotplug/cpcihp_zt5550.c 1.1 -> 1.2 drivers/pci/hotplug/cpcihp_zt5550.c (moved) # net/atm/lec.c 1.22 -> 1.25 # drivers/scsi/aic7xxx/aic79xx_osm.h 1.29 -> 1.33 # drivers/char/istallion.c 1.22 -> 1.29 # drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped 1.11 -> 1.12 # mm/mmap.c 1.84 -> 1.85 # fs/proc/base.c 1.47 -> 1.48 # drivers/ieee1394/eth1394.c 1.13 -> 1.15 # arch/ia64/hp/sim/simeth.c 1.7 -> 1.8 # drivers/video/i810/i810_main.h 1.5 -> 1.6 # sound/usb/usbaudio.h 1.14 -> 1.15 # scripts/kconfig/expr.h 1.4 -> 1.10 # drivers/mtd/maps/physmap.c 1.4 -> 1.7 # drivers/mtd/chips/map_rom.c 1.5 -> 1.6 # sound/pci/ac97/Makefile 1.11 -> 1.12 # drivers/hotplug/acpiphp_core.c 1.2 -> 1.3 drivers/pci/hotplug/acpiphp_core.c (moved) # drivers/scsi/gdth.c 1.28 -> 1.29 # sound/core/timer.c 1.17 -> 1.18 # include/sound/cs8427.h 1.1 -> 1.2 # drivers/message/i2o/i2o_core.c 1.20 -> 1.22 # net/unix/af_unix.c 1.44 -> 1.46 # arch/alpha/kernel/systbls.S 1.6 -> 1.8 # Documentation/filesystems/jfs.txt 1.4 -> 1.5 # include/asm-sparc64/bug.h 1.2 -> 1.3 # arch/um/os-Linux/drivers/tuntap_kern.c 1.3 -> 1.4 # include/net/x25.h 1.7 -> 1.8 # include/linux/tty_driver.h 1.7 -> 1.11 # net/ipv6/esp6.c 1.16 -> 1.17 # drivers/net/tokenring/ibmtr.c 1.14 -> 1.15 # arch/v850/vmlinux.lds.S 1.8 -> 1.9 # include/asm-arm/uaccess.h 1.10 -> 1.11 # include/asm-i386/mach-summit/mach_apic.h 1.26 -> 1.28 # drivers/net/arcnet/rfc1051.c 1.4 -> 1.5 # drivers/usb/class/cdc-acm.c 1.40 -> 1.44 # drivers/usb/input/hid-tmff.c 1.2 -> 1.3 # drivers/usb/misc/rio500.c 1.21 -> 1.23 # drivers/net/pppoe.c 1.25 -> 1.28 # sound/pci/trident/trident_main.c 1.19 -> 1.20 # drivers/scsi/osst.h 1.9 -> 1.10 # drivers/hotplug/cpci_hotplug_pci.c 1.7 -> 1.10 drivers/pci/hotplug/cpci_hotplug_pci.c (moved) # arch/ppc/boot/ld.script 1.4 -> 1.6 # drivers/base/power.c 1.18 -> 1.23 # arch/mips/baget/vacserial.c 1.13 -> 1.18 # drivers/scsi/ide-scsi.c 1.24 -> 1.25 # drivers/scsi/st.c 1.62 -> 1.63 # net/bluetooth/rfcomm/sock.c 1.17 -> 1.20 # net/rose/rose_timer.c 1.8 -> 1.10 # fs/vfat/namei.c 1.31 -> 1.32 # drivers/scsi/eata_pio.c 1.17.1.1 -> 1.19 # sound/core/oss/mixer_oss.c 1.17 -> 1.18 # sound/isa/sb/sb8.c 1.11 -> 1.12 # sound/ppc/pmac.h 1.4 -> 1.5 # drivers/usb/storage/usb.h 1.25 -> 1.28 # drivers/isdn/i4l/isdn_tty.h 1.16 -> 1.20 # fs/cifs/smberr.h 1.1 -> 1.2 # arch/m68knommu/kernel/setup.c 1.3 -> 1.4 # fs/namespace.c 1.45 -> 1.46 # drivers/scsi/arm/powertec.c 1.25 -> 1.26 # net/atm/svc.c 1.9 -> 1.10 # net/sunrpc/auth_gss/gss_mech_switch.c 1.1 -> 1.2 # arch/x86_64/kernel/sys_x86_64.c 1.8 -> 1.9 # drivers/usb/serial/keyspan_pda.c 1.30 -> 1.31 # include/asm-ia64/ptrace.h 1.10 -> 1.11 # include/asm-sh/pci.h 1.11 -> 1.12 # drivers/video/matrox/matroxfb_misc.c 1.9 -> 1.10 # include/net/ax25.h 1.10 -> 1.12 # net/atm/pppoatm.c 1.6 -> 1.7 # net/sctp/sm_sideeffect.c 1.43 -> 1.44 # drivers/scsi/pci2000.c 1.16 -> 1.17 # kernel/resource.c 1.10 -> 1.12 # arch/arm/lib/Makefile 1.16 -> 1.17 # fs/jfs/resize.c 1.8 -> 1.9 # include/asm-m68k/thread_info.h 1.4 -> 1.5 # Makefile 1.406.1.2 -> 1.408 # drivers/isdn/hisax/avma1_cs.c 1.4.1.1 -> 1.6 # fs/fcntl.c 1.26 -> 1.28 # sound/pci/cmipci.c 1.23 -> 1.24 # include/net/dn.h 1.7 -> 1.8 # drivers/mtd/nftlmount.c 1.7 -> 1.8 # fs/jffs2/compr_rtime.c 1.4 -> 1.5 # drivers/pci/power.c 1.5 -> 1.6 # drivers/usb/serial/mct_u232.c 1.37 -> 1.38 # fs/ext3/inode.c 1.67 -> 1.68 # include/asm-ppc/prep_nvram.h 1.4 -> 1.5 # drivers/scsi/sym53c8xx.c 1.34.1.1 -> 1.37 # net/packet/af_packet.c 1.27 -> 1.29 # drivers/char/agp/amd-k8-agp.c 1.41 -> 1.43 # drivers/net/irda/irport.c 1.18 -> 1.20 # drivers/net/pcmcia/fmvj18x_cs.c 1.20 -> 1.21 # drivers/scsi/aic7xxx/aic79xx.h 1.11 -> 1.12 # arch/cris/drivers/serial.c 1.17 -> 1.22 # include/asm-i386/cpu.h 1.3 -> 1.4 # drivers/scsi/ibmmca.h 1.8 -> 1.9 # drivers/usb/media/stv680.c 1.26 -> 1.27 # include/asm-s390/thread_info.h 1.4 -> 1.5 # drivers/mtd/maps/sun_uflash.c 1.3 -> 1.4 # fs/dquot.c 1.62 -> 1.63 # sound/core/sound.c 1.27 -> 1.30 # mm/page-writeback.c 1.64 -> 1.69 # net/sunrpc/xprt.c 1.59 -> 1.62 # drivers/scsi/wd33c93.c 1.13 -> 1.14 # arch/sh/kernel/pci-sh7751.c 1.7 -> 1.8 # drivers/net/wireless/orinoco_pci.c 1.5 -> 1.6 # drivers/net/arcnet/arcnet.c 1.12 -> 1.13 # sound/core/sgbuf.c 1.4.1.1 -> 1.6 # arch/x86_64/defconfig 1.20 -> 1.21 # include/net/ip.h 1.21 -> 1.22 # net/bluetooth/bnep/core.c 1.17 -> 1.18 # drivers/char/mxser.c 1.22 -> 1.27 # net/ipv4/tcp_output.c 1.27 -> 1.30 # drivers/video/sis/sis_main.c 1.21 -> 1.23 # arch/ppc64/mm/numa.c 1.4 -> 1.5 # drivers/usb/serial/keyspan.h 1.18 -> 1.19 # drivers/acpi/processor.c 1.38 -> 1.39 # arch/cris/lib/Makefile 1.5 -> 1.6 # net/ax25/ax25_route.c 1.10 -> 1.11 # drivers/video/matrox/matroxfb_base.c 1.35 -> 1.37 # drivers/scsi/scsi_priv.h 1.6 -> 1.13 # net/bluetooth/l2cap.c 1.28 -> 1.30 # drivers/mtd/mtdchar.c 1.13 -> 1.14 # drivers/scsi/pas16.h 1.7 -> 1.8 # include/linux/device-mapper.h 1.2 -> 1.4 # drivers/s390/char/con3215.c 1.20 -> 1.23 # drivers/char/rocket.c 1.20 -> 1.29 # drivers/ide/legacy/ide-cs.c 1.9 -> 1.10 # net/ax25/ax25_ds_in.c 1.5 -> 1.7 # security/Kconfig 1.5 -> 1.6 # arch/m68knommu/Kconfig 1.11 -> 1.12 # sound/core/Makefile 1.26 -> 1.30 # arch/ppc64/kernel/syscalls.c 1.10 -> 1.11 # drivers/mtd/maps/nora.c 1.4 -> (deleted) # include/sound/uda1341.h 1.3 -> 1.4 # drivers/mtd/maps/scx200_docflash.c 1.1 -> 1.2 # include/asm-x86_64/thread_info.h 1.11 -> 1.12 # include/linux/page-flags.h 1.39 -> 1.40 # drivers/pcmcia/sa11xx_core.h 1.1 -> 1.2 # drivers/scsi/gdth_proc.h 1.4 -> 1.5 # include/asm-mips/pci.h 1.9 -> 1.10 # drivers/mtd/devices/docprobe.c 1.5 -> 1.6 # arch/ppc64/kernel/sys_ppc32.c 1.61 -> 1.62 # drivers/char/vt_ioctl.c 1.24 -> 1.26 # drivers/pci/pci-driver.c 1.26 -> 1.29 # include/linux/ipv6.h 1.8 -> 1.9 # sound/drivers/Makefile 1.8 -> 1.9 # arch/arm/mach-integrator/arch.c 1.8 -> 1.10 arch/arm/mach-integrator/core.c (moved) # drivers/mtd/cmdline.c 1.3 -> 1.5 drivers/mtd/cmdlinepart.c (moved) # drivers/pci/probe.c 1.39 -> 1.43 # drivers/video/riva/fbdev.c 1.46 -> 1.47 # drivers/scsi/fdomain.c 1.21 -> 1.22 # sound/pci/sonicvibes.c 1.16 -> 1.17 # drivers/hotplug/Makefile 1.14 -> 1.15 drivers/pci/hotplug/Makefile (moved) # include/net/tcp_ecn.h 1.4 -> 1.5 # include/asm-sparc64/thread_info.h 1.10 -> 1.11 # sound/core/Kconfig 1.1 -> 1.2 # drivers/isdn/i4l/isdn_tty.c 1.47 -> 1.53 # arch/i386/kernel/cpu/cpufreq/longrun.c 1.13 -> 1.14 # arch/arm/mach-integrator/pci_v3.c 1.15 -> 1.16 # Documentation/filesystems/fat_cvf.txt 1.2 -> (deleted) # drivers/usb/net/kaweth.c 1.41 -> 1.43 # arch/ppc64/kernel/prom.c 1.25.1.1 -> 1.28 # drivers/scsi/arm/cumana_2.c 1.27 -> 1.28 # net/ipv6/ipv6_syms.c 1.13 -> 1.15 # drivers/net/wan/z85230.h 1.4 -> 1.6 # drivers/mtd/chips/map_absent.c 1.2 -> 1.3 # include/asm-mips/bug.h 1.1 -> 1.2 # arch/m68knommu/platform/5206/ARNEWSH/crt0_ram.S 1.1 -> 1.2 # include/asm-x86_64/pgtable.h 1.19 -> 1.20 # kernel/module.c 1.82 -> 1.86 # net/xfrm/xfrm_state.c 1.26 -> 1.28 # sound/pci/emu10k1/irq.c 1.6 -> 1.7 # include/asm-parisc/pci.h 1.7 -> 1.8 # drivers/scsi/in2000.c 1.19.1.1 -> 1.21 # sound/usb/usbaudio.c 1.34.1.1 -> 1.39 # include/net/sock.h 1.40 -> 1.43 # include/asm-ppc64/elf.h 1.10 -> 1.12 # drivers/scsi/qlogicfc.c 1.32 -> 1.33 # arch/ppc/8xx_io/uart.c 1.24 -> 1.30 # arch/ppc64/kernel/iSeries_setup.c 1.12 -> 1.13 # include/asm-parisc/bug.h 1.3 -> 1.4 # net/netrom/nr_timer.c 1.7 -> 1.9 # drivers/usb/serial/Kconfig 1.7 -> 1.8 # net/rxrpc/transport.c 1.2 -> 1.3 # drivers/mtd/mtdconcat.c 1.1 -> 1.2 # drivers/acorn/char/defkeymap-acorn.c_shipped 1.3 -> (deleted) # lib/zlib_inflate/infblock.c 1.1 -> 1.6 # include/asm-ppc/pci.h 1.16 -> 1.17 # net/ipv4/sysctl_net_ipv4.c 1.10 -> 1.11 # net/core/sock.c 1.25 -> 1.27 # include/net/af_unix.h 1.4 -> 1.5 # Documentation/sysctl/vm.txt 1.9 -> 1.10 # arch/ppc64/kernel/smp.c 1.35 -> 1.37 # drivers/net/ppp_async.c 1.10 -> 1.11 # drivers/net/eepro.c 1.17 -> 1.18 # drivers/ide/pci/pdc202xx_new.c 1.15 -> 1.16 # include/asm-sparc/pci.h 1.9 -> 1.10 # scripts/kconfig/zconf.l 1.6 -> 1.7 # include/asm-m68k/bug.h 1.1 -> 1.2 # include/asm-s390/bug.h 1.1 -> 1.2 # net/bluetooth/bnep/netdev.c 1.3 -> 1.4 # net/ipv6/ip6_input.c 1.12 -> 1.13 # include/asm-ppc/bug.h 1.2 -> 1.4 # drivers/mtd/mtdpart.c 1.4 -> 1.5 # drivers/s390/block/xpram.c 1.39 -> 1.41 # include/net/ip6_fib.h 1.5 -> 1.7 # include/asm-i386/pgtable.h 1.35 -> 1.36 # sound/oss/nec_vrc5477.c 1.13 -> 1.14 # Documentation/kbuild/makefiles.txt 1.8 -> 1.9 # include/linux/raid/multipath.h 1.15 -> 1.17 # lib/zlib_inflate/infutil.h 1.2 -> 1.4 # net/ipv6/route.c 1.40 -> 1.45 # drivers/serial/21285.c 1.13.1.6 -> 1.17 # include/asm-ia64/percpu.h 1.7 -> 1.8 # drivers/char/stallion.c 1.23 -> 1.31 # drivers/usb/class/bluetty.c 1.41 -> 1.45 # net/ipv4/tcp_input.c 1.36 -> 1.39 # sound/oss/es1371.c 1.26 -> 1.27 # sound/isa/wavefront/wavefront.c 1.11.1.1 -> 1.14 # drivers/pcmcia/Kconfig 1.5 -> 1.7 # include/sound/info.h 1.8 -> 1.9 # include/linux/zconf.h 1.2 -> 1.9 # drivers/scsi/sd.c 1.113 -> 1.117 # drivers/mtd/maps/epxa10db-flash.c 1.3 -> 1.4 # net/ax25/ax25_std_in.c 1.5 -> 1.7 # arch/um/include/line.h 1.5 -> 1.6 # drivers/acorn/char/mouse_ps2.c 1.6 -> (deleted) # net/ipv4/tcp_minisocks.c 1.33 -> 1.35 # drivers/usb/input/aiptek.c 1.15 -> 1.16 # drivers/video/matrox/matroxfb_accel.h 1.3 -> 1.4 # drivers/pcmcia/ds.c 1.27.1.1 -> 1.35 # net/ipv6/Makefile 1.13 -> 1.14 # sound/oss/i810_audio.c 1.38 -> 1.40 # drivers/usb/input/hid-lgff.c 1.4 -> 1.5 # sound/oss/trident.c 1.41 -> 1.42 # include/net/dn_nsp.h 1.4 -> 1.5 # arch/ppc64/kernel/pacaData.c 1.6 -> 1.7 # drivers/net/bonding/bond_3ad.c 1.1 -> 1.2 # net/ipv4/Kconfig 1.7 -> 1.8 # drivers/block/DAC960.c 1.59 -> 1.60 # drivers/usb/media/pwc-if.c 1.34 -> 1.36 # drivers/scsi/aic7xxx/aic79xx_proc.c 1.9 -> 1.10 # arch/alpha/Kconfig 1.13 -> 1.15 # arch/ppc64/kernel/stab.c 1.10 -> 1.11 # drivers/mtd/chips/cfi_probe.c 1.5 -> 1.6 # fs/jfs/namei.c 1.25 -> 1.26 # drivers/sbus/char/aurora.h 1.2 -> 1.4 # drivers/i2c/i2c-dev.c 1.30 -> 1.31 # net/atm/signaling.c 1.8 -> 1.9 # drivers/usb/storage/unusual_devs.h 1.38 -> 1.40 # net/llc/llc_sap.c 1.18 -> 1.19 # drivers/net/tokenring/olympic.c 1.21 -> 1.22 # arch/ia64/sn/io/pci_bus_cvlink.c 1.6 -> 1.7 # Documentation/scsi/scsi_mid_low_api.txt 1.12 -> 1.13 # arch/v850/kernel/irq.c 1.6 -> 1.9 # drivers/mtd/devices/pmc551.c 1.10 -> 1.12 # arch/arm/mach-footbridge/isa-irq.c 1.6 -> 1.7 # drivers/mtd/nand/Kconfig 1.1 -> 1.2 # include/linux/hayesesp.h 1.2 -> 1.4 # include/asm-x86_64/bootsetup.h 1.2 -> 1.3 # include/linux/bio.h 1.30 -> 1.32 # mm/slab.c 1.81 -> 1.87 # include/linux/module.h 1.63 -> 1.65 # arch/i386/kernel/suspend.c 1.16 -> 1.17 # arch/alpha/kernel/irq.c 1.21 -> 1.22 # net/sched/sch_ingress.c 1.13 -> 1.14 # drivers/md/dm.c 1.18 -> 1.22 # include/asm-alpha/uaccess.h 1.5 -> 1.6 # include/sound/pcm_sgbuf.h 1.7 -> (deleted) # drivers/mtd/maps/integrator-flash.c 1.3 -> 1.4 # drivers/mtd/maps/netsc520.c 1.3 -> 1.4 # include/net/bluetooth/rfcomm.h 1.8 -> 1.9 # arch/arm/mm/consistent.c 1.11 -> 1.12 # drivers/usb/serial/ftdi_sio.c 1.42 -> 1.43 # drivers/sbus/char/bbc_i2c.c 1.3 -> 1.4 # drivers/pcmcia/Makefile 1.23 -> 1.24 # include/asm-s390/pgtable.h 1.18 -> 1.19 # include/net/udp.h 1.10 -> 1.11 # arch/x86_64/Kconfig 1.19 -> 1.20 # include/linux/rtnetlink.h 1.15 -> 1.17 # fs/filesystems.c 1.16 -> 1.17 # include/linux/msdos_fs.h 1.23 -> 1.25 # drivers/scsi/scsi_scan.c 1.85 -> 1.87 # sound/pci/fm801.c 1.17 -> 1.18 # arch/v850/kernel/simcons.c 1.4 -> 1.7 # drivers/scsi/aic7xxx/aic7xxx.seq 1.9 -> 1.11 # sound/core/seq/oss/seq_oss.c 1.4 -> 1.5 # kernel/sched.c 1.186 -> 1.190 # fs/jffs2/dir.c 1.25 -> 1.26 # include/linux/atalk.h 1.5 -> 1.6 # arch/m68knommu/platform/5307/Makefile 1.5 -> 1.6 # drivers/scsi/mac_NCR5380.c 1.8.1.1 -> 1.10 # drivers/block/deadline-iosched.c 1.20 -> 1.21 # drivers/Makefile 1.33 -> 1.35 # net/ipv6/netfilter/ip6t_owner.c 1.4 -> 1.5 # sound/isa/sb/sb16.c 1.15 -> 1.17 # net/ipv6/ip6_fib.c 1.18 -> 1.20 # include/linux/mtd/nftl.h 1.3 -> 1.4 # drivers/acpi/osl.c 1.36 -> 1.37 # drivers/s390/char/tubtty.c 1.11 -> 1.14 # net/llc/llc_mac.c 1.21 -> 1.22 # include/linux/if_arp.h 1.9 -> 1.10 # include/net/ipv6.h 1.14 -> 1.19 # drivers/ieee1394/iso.c 1.5 -> 1.6 # arch/um/kernel/irq.c 1.8 -> 1.9 # scripts/Makefile.build 1.36 -> 1.38 # drivers/scsi/st.h 1.13 -> 1.14 # arch/v850/kernel/rte_ma1_cb.c 1.3 -> 1.4 # net/atm/mpc.c 1.15 -> 1.17 # drivers/s390/char/tuball.c 1.12 -> 1.13 # drivers/scsi/dpt_i2o.c 1.29 -> 1.30 # arch/ppc/kernel/irq.c 1.26 -> 1.29 # sound/pci/ens1370.c 1.29 -> 1.32 # arch/ppc/boot/lib/Makefile 1.4 -> 1.5 # drivers/video/matrox/matroxfb_g450.c 1.12 -> 1.13 # drivers/hotplug/pci_hotplug_core.c 1.38 -> 1.39 drivers/pci/hotplug/pci_hotplug_core.c (moved) # net/ipv6/udp.c 1.36 -> 1.38 # include/linux/atmdev.h 1.13 -> 1.14 # drivers/hotplug/cpqphp.h 1.9 -> 1.10 drivers/pci/hotplug/cpqphp.h (moved) # drivers/usb/serial/ipaq.c 1.29 -> 1.30 # drivers/mtd/ftl.c 1.46 -> 1.47 # arch/sparc64/prom/Makefile 1.10 -> 1.11 # arch/alpha/kernel/traps.c 1.24 -> 1.25 # sound/core/seq/instr/Makefile 1.14 -> 1.15 # include/asm-ppc/io.h 1.12 -> 1.13 # lib/zlib_inflate/infutil.c 1.1 -> 1.4 # arch/sparc64/kernel/sparc64_ksyms.c 1.48 -> 1.49 # drivers/mtd/maps/l440gx.c 1.2 -> 1.3 # include/asm-alpha/bug.h 1.1 -> 1.2 # fs/fat/cache.c 1.16 -> 1.19 # arch/x86_64/kernel/reboot.c 1.5 -> 1.7 # include/net/xfrm.h 1.39 -> 1.43 # kernel/timer.c 1.53 -> 1.57 # arch/ia64/hp/sim/hpsim_console.c 1.7 -> 1.8 # sound/pci/via82xx.c 1.31 -> 1.33 # drivers/video/matrox/matroxfb_crtc2.c 1.23 -> 1.24 # scripts/kconfig/zconf.tab.c_shipped 1.6 -> 1.12 # fs/sysfs/inode.c 1.85 -> 1.86 # drivers/tc/zs.c 1.16 -> 1.22 # drivers/net/pcmcia/pcnet_cs.c 1.18 -> 1.19 # drivers/serial/nb85e_uart.c 1.11 -> 1.12 # include/linux/raid/raid5.h 1.15 -> 1.17 # arch/ppc64/kernel/sys32.S 1.13 -> (deleted) # include/linux/shmem_fs.h 1.11 -> 1.12 # net/ipv4/netfilter/ipchains_core.c 1.15 -> 1.16 # drivers/scsi/ppa.h 1.8 -> 1.9 # drivers/scsi/aic7xxx/aic79xx.seq 1.10 -> 1.13 # include/linux/mtd/compatmac.h 1.5 -> 1.6 # arch/mips64/lib/Makefile 1.5 -> 1.6 # drivers/ieee1394/ohci1394.c 1.36 -> 1.38 # fs/fat/misc.c 1.14 -> 1.16 # drivers/char/vt.c 1.45 -> 1.52 # drivers/char/hvc_console.c 1.17 -> 1.20 # sound/isa/cs423x/Makefile 1.9 -> 1.10 # include/linux/generic_serial.h 1.4 -> 1.6 # drivers/net/Kconfig 1.28 -> 1.29 # arch/ppc64/kernel/pci.c 1.30 -> 1.33 # arch/ppc64/boot/Makefile 1.13 -> 1.14 # arch/arm/mach-sa1100/system3.c 1.17 -> 1.18 # fs/jfs/jfs_dmap.c 1.14 -> 1.15 # drivers/hotplug/ibmphp_res.c 1.6 -> 1.7 drivers/pci/hotplug/ibmphp_res.c (moved) # include/linux/jffs2.h 1.5 -> 1.6 # drivers/scsi/eata.c 1.32 -> 1.33 # net/ipv4/ipcomp.c 1.10 -> 1.11 # net/ipv6/mcast.c 1.20 -> 1.21 # sound/pci/nm256/nm256.c 1.16 -> 1.19 # include/sound/mpu401.h 1.10 -> 1.11 # sound/core/oss/pcm_oss.c 1.22 -> 1.24 # sound/isa/Kconfig 1.3 -> 1.5 # drivers/pci/setup-res.c 1.17 -> 1.18 # include/net/llc_conn.h 1.13 -> 1.14 # net/sunrpc/sunrpc_syms.c 1.21 -> 1.22 # include/asm-m68k/pgtable.h 1.7 -> 1.8 # drivers/base/driver.c 1.21 -> 1.22 # sound/pci/ymfpci/ymfpci_main.c 1.19 -> 1.20 # drivers/usb/serial/kobil_sct.c 1.8 -> 1.10 # drivers/net/tokenring/tmspci.c 1.11 -> 1.12 # include/linux/stallion.h 1.2 -> 1.4 # arch/ppc64/kernel/misc.S 1.58 -> 1.59 # arch/sparc64/Kconfig 1.19 -> 1.20 # drivers/acpi/thermal.c 1.23 -> 1.24 # drivers/video/cirrusfb.c 1.23 -> 1.24 # sound/oss/maestro.c 1.29 -> 1.30 # arch/ia64/kernel/irq.c 1.23 -> 1.24 # drivers/ieee1394/eth1394.h 1.6 -> 1.8 # net/ipv4/ah.c 1.23 -> 1.24 net/ipv4/ah4.c (moved) # drivers/usb/serial/omninet.c 1.29 -> 1.30 # lib/zlib_inflate/inftrees.c 1.1 -> 1.8 # arch/ppc/kernel/entry.S 1.27 -> 1.29 # include/asm-x86_64/apic.h 1.6 -> 1.7 # include/net/flow.h 1.7 -> 1.8 # drivers/usb/input/pid.c 1.7 -> 1.8 # drivers/video/fbmon.c 1.8 -> 1.9 # include/net/irda/af_irda.h 1.3 -> 1.4 # include/asm-x86_64/proto.h 1.9 -> 1.10 # drivers/char/ser_a2232.h 1.1 -> 1.3 # arch/um/drivers/line.c 1.17 -> 1.19 # include/linux/reiserfs_fs.h 1.48 -> 1.49 # drivers/char/specialix.c 1.15 -> 1.22 # arch/arm/mach-integrator/Makefile 1.7 -> 1.8 # fs/cifs/netmisc.c 1.6 -> 1.7 # drivers/hotplug/cpqphp_nvram.c 1.7 -> 1.8 drivers/pci/hotplug/cpqphp_nvram.c (moved) # include/asm-ppc/types.h 1.7 -> 1.8 # drivers/media/video/zoran_procfs.c 1.2 -> 1.3 # include/asm-ppc/dma.h 1.5 -> 1.6 # drivers/mtd/chips/gen_probe.c 1.1 -> 1.2 # include/linux/mtd/flashchip.h 1.2 -> 1.3 # drivers/pcmcia/i82365.c 1.30 -> 1.34 # arch/x86_64/kernel/bluesmoke.c 1.10 -> 1.11 # arch/alpha/kernel/ptrace.c 1.14 -> 1.15 # sound/oss/maestro3.c 1.26 -> 1.27 # include/asm-sh/bug.h 1.1 -> 1.2 # kernel/cpu.c 1.3 -> 1.4 # arch/arm/lib/putuser.S 1.3 -> 1.4 # include/linux/mtd/nand.h 1.1 -> 1.2 # net/core/net-sysfs.c 1.2 -> 1.4 # fs/hugetlbfs/inode.c 1.24 -> 1.26 # fs/proc/inode.c 1.22 -> 1.23 # arch/sparc64/kernel/ioctl32.c 1.63 -> 1.65 # net/appletalk/atalk_proc.c 1.3 -> 1.4 # drivers/scsi/aic7xxx_old/aic7xxx_proc.c 1.8 -> 1.9 # arch/cris/drivers/serial.h 1.6 -> 1.8 # drivers/net/wireless/orinoco_cs.c 1.19.1.1 -> 1.22 # scripts/kconfig/menu.c 1.5 -> 1.11 # drivers/scsi/Kconfig 1.21 -> 1.22 # sound/core/seq/Makefile 1.24 -> 1.27 # drivers/net/wan/lmc/lmc_media.c 1.5 -> 1.6 # fs/cifs/connect.c 1.17 -> 1.18 # include/linux/device.h 1.91 -> 1.100 # drivers/net/pppox.c 1.13 -> 1.14 # drivers/macintosh/via-pmu.c 1.19 -> 1.21 # arch/arm/kernel/process.c 1.28 -> 1.29 # arch/alpha/kernel/srmcons.c 1.2 -> 1.5 # sound/drivers/dummy.c 1.15 -> 1.17 # include/linux/percpu.h 1.5 -> 1.7 # drivers/net/dl2k.h 1.11 -> 1.12 # scripts/kconfig/conf.c 1.5 -> 1.9 # arch/ppc/kernel/ppc_ksyms.c 1.39 -> 1.41 # drivers/usb/serial/cyberjack.c 1.27 -> 1.28 # lib/kobject.c 1.21 -> 1.25 # drivers/pci/Makefile 1.28 -> 1.29 # arch/ppc64/kernel/signal32.c 1.39 -> 1.40 # scripts/kconfig/zconf.y 1.5 -> 1.11 # include/asm-alpha/thread_info.h 1.5 -> 1.6 # sound/Kconfig 1.2 -> 1.3 # arch/ppc/kernel/misc.S 1.43 -> 1.44 # arch/arm/common/sa1111.c 1.25 -> 1.26 # drivers/net/ppp_deflate.c 1.10 -> 1.11 # scripts/kconfig/lex.zconf.c_shipped 1.6 -> 1.7 # drivers/mtd/maps/iq80310.c 1.4 -> 1.5 # net/ax25/af_ax25.c 1.22 -> 1.24 # drivers/pci/hotplug.c 1.14 -> 1.15 # include/asm-ia64/pci.h 1.16 -> 1.17 # sound/isa/gus/gus_irq.c 1.5 -> 1.6 # drivers/video/i810/i810.h 1.6 -> 1.7 # arch/v850/kernel/entry.S 1.7 -> 1.11 # drivers/serial/68328serial.h 1.3 -> 1.5 # net/ax25/ax25_ds_timer.c 1.9 -> 1.11 # arch/m68knommu/mm/memory.c 1.1 -> 1.2 # drivers/mtd/afs.c 1.2 -> 1.3 # Documentation/Changes 1.35 -> 1.36 # drivers/net/setup.c 1.13 -> (deleted) # drivers/scsi/aic7xxx/aic79xx.reg 1.10 -> 1.12 # sound/pci/ac97/ac97_patch.c 1.10 -> 1.14 # net/ipv4/tcp_timer.c 1.13 -> 1.15 # drivers/mtd/maps/uclinux.c 1.2 -> 1.3 # arch/i386/kernel/i8259.c 1.23 -> 1.25 # sound/oss/mpu401.c 1.12 -> 1.13 # drivers/media/video/Kconfig 1.6 -> 1.7 # include/linux/mtd/partitions.h 1.2 -> 1.3 # drivers/net/bonding/bond_main.c 1.22 -> 1.23 # net/atm/raw.c 1.3 -> 1.4 # include/linux/irq_cpustat.h 1.7 -> 1.8 # include/linux/sunrpc/gss_api.h 1.1 -> 1.2 # drivers/usb/core/Kconfig 1.2 -> 1.3 # fs/jffs2/scan.c 1.9 -> 1.10 # drivers/pci/pool.c 1.12 -> 1.14 # net/ipv4/netfilter/ipt_owner.c 1.8 -> 1.9 # net/ipv6/addrconf.c 1.45 -> 1.50 # drivers/char/agp/isoch.c 1.7 -> 1.8 # crypto/Kconfig 1.14 -> 1.16 # drivers/bluetooth/hci_usb.c 1.28 -> 1.29 # drivers/char/moxa.c 1.18 -> 1.23 # drivers/hotplug/cpqphp_pci.c 1.18 -> 1.21 drivers/pci/hotplug/cpqphp_pci.c (moved) # drivers/scsi/3w-xxxx.c 1.32 -> 1.34 # drivers/usb/input/usbmouse.c 1.25 -> 1.26 # sound/pci/ali5451/ali5451.c 1.26 -> 1.28 # drivers/usb/host/ohci-q.c 1.40 -> 1.41 # net/ax25/ax25_subr.c 1.6 -> 1.8 # drivers/mtd/maps/autcpu12-nvram.c 1.2 -> 1.3 # drivers/mtd/maps/sc520cdp.c 1.3 -> 1.4 # include/asm-i386/mach-bigsmp/mach_apic.h 1.12 -> 1.13 # net/ipv4/icmp.c 1.30 -> 1.31 # drivers/net/ppp_generic.c 1.30 -> 1.32 # arch/i386/oprofile/nmi_int.c 1.12 -> 1.14 # arch/v850/kernel/memcons.c 1.3 -> 1.6 # net/sctp/ulpqueue.c 1.22 -> 1.24 # sound/core/pcm_sgbuf.c 1.11 -> (deleted) # arch/ppc/8xx_io/fec.c 1.13 -> 1.16 # arch/sparc64/prom/console.c 1.1 -> 1.2 # arch/ppc/kernel/setup.c 1.38 -> 1.39 # include/linux/netdevice.h 1.38 -> 1.40 # drivers/net/tokenring/madgemc.c 1.14 -> 1.15 # drivers/isdn/hisax/st5481_init.c 1.8 -> 1.9 # drivers/macintosh/apm_emu.c 1.6 -> 1.7 # drivers/usb/Makefile 1.43 -> 1.45 # scripts/kconfig/gconf.c 1.3 -> 1.4 # sound/isa/azt2320.c 1.10 -> 1.12 # crypto/sha512.c 1.1 -> 1.2 # fs/nfs/unlink.c 1.7 -> 1.8 # arch/ia64/Kconfig 1.21 -> 1.23 # drivers/scsi/BusLogic.c 1.19 -> 1.21 # drivers/mtd/maps/solutionengine.c 1.2 -> 1.3 # drivers/hotplug/cpqphp_sysfs.c 1.8 -> 1.9 drivers/pci/hotplug/cpqphp_sysfs.c (moved) # include/linux/node.h 1.2 -> 1.4 # include/asm-ppc64/pgtable.h 1.22 -> 1.23 # net/x25/af_x25.c 1.25 -> 1.27 # include/pcmcia/ss.h 1.11 -> 1.16 # include/asm-ppc64/mmzone.h 1.10 -> 1.11 # arch/ia64/lib/Makefile 1.16 -> 1.17 # include/asm-sparc/thread_info.h 1.4 -> 1.5 # arch/ppc/kernel/syscalls.c 1.9 -> 1.11 # drivers/isdn/capi/capi.c 1.43 -> 1.46 # drivers/scsi/arm/ecoscsi.c 1.16 -> 1.18 # drivers/atm/iphase.c 1.21 -> 1.22 # drivers/pnp/pnpbios/proc.c 1.8 -> 1.9 # sound/usb/usbmixer_maps.c 1.2 -> 1.3 # sound/core/sound_oss.c 1.5 -> 1.6 # drivers/pci/bus.c 1.4 -> 1.6 # sound/core/info.c 1.26 -> 1.28 # drivers/usb/input/usbkbd.c 1.29 -> 1.30 # drivers/char/sh-sci.c 1.19 -> 1.25 # sound/ppc/keywest.c 1.8 -> 1.9 # include/asm-cris/bug.h 1.1 -> 1.2 # drivers/char/selection.c 1.4 -> 1.6 # net/appletalk/aarp.c 1.10 -> 1.11 # include/linux/raid/linear.h 1.4 -> 1.5 # include/linux/compat_ioctl.h 1.3 -> 1.5 # drivers/net/arcnet/arc-rawmode.c 1.4 -> 1.5 # drivers/net/sungem.c 1.36 -> 1.37 # drivers/serial/68360serial.c 1.12 -> 1.17 # arch/x86_64/pci/x86-64.c 1.6 -> 1.7 # arch/arm/mach-sa1100/irq.c 1.13 -> 1.14 # arch/alpha/lib/Makefile 1.14 -> 1.15 # drivers/net/tokenring/proteon.c 1.2 -> 1.3 # arch/sparc/lib/Makefile 1.5 -> 1.6 # include/linux/bitops.h 1.3 -> 1.4 # drivers/video/radeonfb.c 1.28 -> 1.29 # drivers/net/ns83820.c 1.25 -> 1.26 # drivers/block/cciss.c 1.81 -> 1.82 # arch/um/drivers/pcap_kern.c 1.2 -> 1.3 # arch/ppc/platforms/prep_pci.c 1.19 -> 1.20 # drivers/net/wireless/orinoco_plx.c 1.10 -> 1.11 # arch/sparc/kernel/ebus.c 1.8 -> 1.9 # lib/zlib_inflate/inffast.c 1.1 -> 1.4 # drivers/net/wireless/airport.c 1.13 -> 1.14 # drivers/usb/serial/io_ti.c 1.17 -> 1.18 # drivers/macintosh/macserial.c 1.21 -> 1.28 # drivers/parport/parport_pc.c 1.38 -> 1.39 # drivers/mtd/maps/dbox2-flash.c 1.3 -> 1.4 # include/linux/isapnp.h 1.8 -> 1.9 # security/root_plug.c 1.2 -> 1.3 # drivers/net/wireless/netwave_cs.c 1.16.1.1 -> 1.18 # drivers/usb/gadget/ether.c 1.4 -> 1.5 # drivers/net/hamradio/mkiss.c 1.10 -> 1.11 # drivers/serial/68328serial.c 1.8 -> 1.13 # net/rose/rose_route.c 1.7 -> 1.9 # drivers/usb/core/devices.c 1.20 -> 1.21 # net/atm/clip.c 1.12 -> 1.13 # drivers/net/tokenring/lanstreamer.c 1.17 -> 1.19 # include/asm-ppc64/topology.h 1.7 -> 1.8 # drivers/mtd/maps/Kconfig 1.4 -> 1.6 # net/rose/rose_subr.c 1.7 -> 1.9 # arch/m68knommu/platform/68328/pilot/crt0_rom.S 1.2 -> 1.3 # include/asm-mips64/bug.h 1.1 -> 1.2 # net/wanrouter/af_wanpipe.c 1.24 -> 1.26 # sound/core/memalloc.c 1.4.1.1 -> 1.8 # include/linux/if_wanpipe.h 1.5 -> 1.6 # net/decnet/dn_nsp_out.c 1.8 -> 1.10 # net/llc/llc_c_ac.c 1.20 -> 1.21 # sound/isa/opl3sa2.c 1.16.1.2 -> 1.19 # drivers/usb/class/audio.c 1.36 -> 1.37 # kernel/kallsyms.c 1.9 -> 1.10 # drivers/usb/net/pegasus.h 1.24 -> 1.26 # arch/ppc64/kernel/Makefile 1.23 -> 1.24 # arch/arm/lib/div64.S 1.1 -> 1.2 # net/x25/x25_in.c 1.10 -> 1.12 # drivers/mtd/maps/ocelot.c 1.3 -> 1.4 # arch/ppc64/lib/copyuser.S 1.3 -> 1.4 # include/linux/msdos_fs_i.h 1.4 -> 1.6 # include/linux/mtd/jedec.h 1.2 -> 1.3 # drivers/scsi/qlogicisp.c 1.20 -> 1.21 # drivers/usb/serial/empeg.c 1.37 -> 1.39 # drivers/md/dm-table.c 1.14 -> 1.19 # arch/ppc/kernel/signal.c 1.22 -> 1.23 # arch/ppc/kernel/head_4xx.S 1.13 -> 1.14 # include/asm-x86_64/bug.h 1.1 -> 1.2 # scripts/kconfig/confdata.c 1.4 -> 1.9 # drivers/usb/net/pegasus.c 1.46 -> 1.49 # arch/ppc/Kconfig 1.21 -> 1.23 # drivers/scsi/esp.c 1.26 -> 1.27 # drivers/md/dm-target.c 1.8 -> 1.10 # net/ipv4/ip_output.c 1.36 -> 1.37 # drivers/scsi/pcmcia/nsp_cs.c 1.21 -> 1.22 # drivers/net/tokenring/3c359.c 1.8 -> 1.9 # drivers/scsi/aic7xxx/aic79xx_seq.h_shipped 1.10 -> 1.13 # include/linux/raid/raid0.h 1.2 -> 1.4 # drivers/scsi/wd7000.c 1.24 -> 1.25 # drivers/scsi/advansys.h 1.10 -> 1.11 # drivers/parport/parport_cs.c 1.7 -> 1.8 # arch/ppc64/kernel/iSeries_pci.c 1.10 -> 1.11 # arch/mips64/arc/Makefile 1.5 -> 1.6 # drivers/usb/storage/datafab.c 1.15 -> 1.16 # drivers/pcmcia/pci_socket.c 1.17 -> (deleted) # net/bridge/br_if.c 1.15 -> 1.16 # fs/inode.c 1.96 -> 1.97 # drivers/scsi/arm/eesox.c 1.27 -> 1.28 # arch/ia64/kernel/smp.c 1.24 -> 1.25 # drivers/serial/sunzilog.c 1.30 -> 1.31 # drivers/hotplug/acpiphp.h 1.4 -> 1.5 drivers/pci/hotplug/acpiphp.h (moved) # sound/oss/cs4281/cs4281m.c 1.23 -> 1.24 # drivers/base/class.c 1.28.1.1 -> 1.36 # net/ipv4/route.c 1.61 -> 1.62 # drivers/scsi/imm.c 1.20 -> 1.22 # drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 1.10 -> 1.13 # drivers/usb/image/hpusbscsi.c 1.26 -> 1.30 # drivers/mtd/maps/rpxlite.c 1.5 -> 1.6 # drivers/net/sk98lin/h/skdrv2nd.h 1.3 -> 1.4 # drivers/scsi/aic7xxx/aic7xxx.reg 1.9 -> 1.10 # arch/v850/kernel/mach.h 1.2 -> 1.3 # sound/oss/es1370.c 1.25 -> 1.26 # include/linux/slab.h 1.22 -> 1.23 # drivers/block/acsi.c 1.50 -> 1.51 # drivers/atm/fore200e.c 1.14 -> 1.15 # include/asm-ppc64/system.h 1.17 -> 1.18 # drivers/char/ip2/i2lib.c 1.6 -> 1.7 # include/linux/hippidevice.h 1.2 -> 1.3 # drivers/usb/storage/freecom.c 1.25 -> 1.26 # drivers/block/scsi_ioctl.c 1.27 -> 1.29 # drivers/scsi/qla1280.h 1.15 -> 1.18 # drivers/base/memblk.c 1.7 -> 1.10 # include/linux/dcache.h 1.31 -> 1.33 # include/sound/core.h 1.22 -> 1.25 # drivers/mtd/chips/jedec_probe.c 1.5 -> 1.7 # fs/jffs2/file.c 1.19 -> 1.20 # net/appletalk/ddp.c 1.23 -> 1.25 # arch/i386/pci/irq.c 1.23 -> 1.24 # arch/alpha/kernel/asm-offsets.c 1.9 -> 1.10 # arch/arm/kernel/pm.c 1.2 -> 1.3 # include/linux/isdn.h 1.81 -> 1.84 # arch/ppc64/kernel/ioctl32.c 1.32 -> 1.33 # drivers/char/amiserial.c 1.21 -> 1.26 # drivers/message/fusion/mptscsih.h 1.16 -> 1.17 # drivers/scsi/qla1280.c 1.33 -> 1.38 # arch/arm/mach-integrator/irq.c 1.4 -> (deleted) # include/linux/cyclades.h 1.5 -> 1.7 # sound/drivers/mpu401/Makefile 1.12 -> 1.15 # arch/mips64/sgi-ip32/ip32-pci.c 1.6 -> 1.7 # arch/ppc/platforms/chrp_pci.c 1.12 -> 1.13 # arch/i386/kernel/apic.c 1.38 -> 1.40 # sound/core/pcm.c 1.13.1.1 -> 1.15 # drivers/scsi/aic7xxx/aic7xxx_inline.h 1.10 -> 1.11 # include/linux/loop.h 1.12 -> 1.13 # drivers/pci/access.c 1.5 -> 1.6 # drivers/char/riscom8.h 1.1 -> 1.3 # drivers/net/wan/sdla.c 1.10 -> 1.12 # drivers/macintosh/adb.c 1.19 -> 1.20 # arch/ppc/platforms/Makefile 1.17 -> 1.18 # drivers/mtd/maps/cdb89712.c 1.2 -> 1.3 # drivers/pcmcia/i82092.c 1.18 -> 1.20 # drivers/video/pm2fb.c 1.20 -> 1.22 # include/asm-sparc/bug.h 1.2 -> 1.3 # include/asm-arm/arch-iop3xx/iop321.h 1.2 -> 1.3 # sound/ppc/pmac.c 1.13 -> 1.15 # drivers/net/wireless/orinoco.c 1.23 -> 1.24 # fs/msdos/namei.c 1.27 -> 1.28 # net/rose/rose_out.c 1.4 -> 1.5 # drivers/usb/serial/bus.c 1.8 -> 1.9 # drivers/hotplug/ibmphp_core.c 1.26 -> 1.32 drivers/pci/hotplug/ibmphp_core.c (moved) # Documentation/scsi/dc395x.txt 1.1 -> 1.2 # sound/pci/ice1712/envy24ht.h 1.2 -> 1.3 # drivers/mtd/maps/edb7312.c 1.2 -> 1.3 # drivers/usb/image/microtek.c 1.29 -> 1.31 # arch/arm/mach-sa1100/jornada720.c 1.11 -> 1.12 # include/asm-ppc/ipc.h 1.3 -> 1.4 # lib/zlib_inflate/inftrees.h 1.1 -> 1.3 # net/core/iovec.c 1.5 -> 1.9 # arch/arm/mach-integrator/mm.c 1.4 -> (deleted) # drivers/char/ip2main.c 1.31 -> 1.38 # arch/ppc64/boot/main.c 1.6 -> 1.7 # include/linux/reboot.h 1.3 -> 1.4 # fs/jffs2/nodelist.h 1.8 -> 1.9 # Documentation/kernel-parameters.txt 1.21 -> 1.23 # net/core/rtnetlink.c 1.14 -> 1.15 # net/bluetooth/bnep/sock.c 1.10 -> 1.11 # net/ipv4/netfilter/ip_queue.c 1.13 -> 1.14 # arch/ppc64/kernel/pSeries_pci.c 1.23 -> 1.24 # drivers/pcmcia/bulkmem.c 1.7 -> 1.11 # net/netrom/nr_subr.c 1.6 -> 1.8 # drivers/mtd/nand/nand.c 1.2 -> 1.3 # drivers/scsi/sym53c8xx_2/sym_glue.c 1.20.1.1 -> 1.23 # net/atm/common.c 1.25 -> 1.27 # net/sctp/socket.c 1.69 -> 1.71 # drivers/usb/serial/usb-serial.h 1.31 -> 1.32 # drivers/scsi/tmscsim.c 1.19 -> 1.21 # arch/ppc/vmlinux.lds.S 1.19 -> 1.20 # arch/mips/sni/pci.c 1.7 -> 1.8 # drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped 1.11 -> 1.12 # drivers/net/wireless/Makefile 1.10 -> 1.12 # (new) -> 1.1 arch/arm26/boot/compressed/hw-bse.c # (new) -> 1.1 sound/pcmcia/Makefile # (new) -> 1.3 sound/pci/ice1712/ak4xxx.c # (new) -> 1.1 drivers/mtd/devices/doc2001plus.c # (new) -> 1.2 drivers/i2c/i2c-iop3xx.h # (new) -> 1.1 include/asm-arm26/socket.h # (new) -> 1.1 arch/arm26/lib/strchr.S # (new) -> 1.1 include/asm-arm26/ipcbuf.h # (new) -> 1.1 include/asm-arm26/memory.h # (new) -> 1.1 include/asm-arm26/mmu_context.h # (new) -> 1.1 arch/arm26/lib/gcclib.h # (new) -> 1.1 include/asm-arm26/parport.h # (new) -> 1.1 include/asm-arm26/types.h # (new) -> 1.1 sound/pci/vx222/vx222_ops.c # (new) -> 1.1 include/linux/ip6_tunnel.h # (new) -> 1.1 arch/arm26/machine/small_page.c # (new) -> 1.1 include/asm-arm26/linkage.h # (new) -> 1.1 include/asm-arm26/calls.h # (new) -> 1.1 include/asm-arm26/resource.h # (new) -> 1.1 drivers/mtd/mtd_blkdevs.c # (new) -> 1.1 include/asm-arm26/fpstate.h # (new) -> 1.1 sound/pcmcia/vx/vxp_mixer.c # (new) -> 1.1 include/asm-arm26/delay.h # (new) -> 1.1 arch/arm26/lib/setbit.S # (new) -> 1.1 arch/arm26/nwfpe/softfloat-specialize # (new) -> 1.1 include/asm-arm26/mach-types.h # (new) -> 1.2 drivers/mtd/maps/map_funcs.c # (new) -> 1.1 arch/arm26/boot/compressed/ll_char_wr.S # (new) -> 1.2 sound/pcmcia/vx/vx_entry.c # (new) -> 1.1 include/asm-arm26/mman.h # (new) -> 1.1 drivers/mtd/devices/ms02-nv.c # (new) -> 1.1 include/asm-arm26/unaligned.h # (new) -> 1.2 sound/pcmcia/vx/Makefile # (new) -> 1.1 arch/arm26/lib/io-readsw-armv3.S # (new) -> 1.1 arch/arm/common/platform.c # (new) -> 1.1 include/sound/vx_core.h # (new) -> 1.1 include/asm-arm26/softirq.h # (new) -> 1.1 arch/arm26/lib/kbd.c # (new) -> 1.1 drivers/mtd/inftlmount.c # (new) -> 1.1 include/asm-arm26/statfs.h # (new) -> 1.1 net/ipv6/ip6_tunnel.c # (new) -> 1.1 include/asm-arm26/current.h # (new) -> 1.1 arch/arm26/lib/floppydma.S # (new) -> 1.1 sound/drivers/vx/vx_pcm.c # (new) -> 1.1 arch/arm26/lib/io-writesw-armv3.S # (new) -> 1.1 include/asm-arm26/siginfo.h # (new) -> 1.1 drivers/mtd/inftlcore.c # (new) -> 1.1 arch/arm26/vmlinux-armo.lds.in # (new) -> 1.1 arch/arm26/lib/copy_page.S # (new) -> 1.1 include/asm-arm26/pgtable.h # (new) -> 1.1 include/asm-arm26/sembuf.h # (new) -> 1.1 sound/drivers/vx/Makefile # (new) -> 1.1 arch/arm26/lib/clearbit.S # (new) -> 1.1 include/asm-arm26/limits.h # (new) -> 1.1 include/asm-arm26/string.h # (new) -> 1.2 sound/isa/sscape.c # (new) -> 1.1 arch/arm26/boot/compressed/vmlinux.lds.in # (new) -> 1.1 include/asm-arm26/uaccess.h # (new) -> 1.1 include/asm-arm26/signal.h # (new) -> 1.1 arch/arm26/kernel/entry.S # (new) -> 1.1 arch/arm26/lib/csumpartial.S # (new) -> 1.1 include/asm-arm26/user.h # (new) -> 1.1 drivers/net/wireless/orinoco_tmd.c # (new) -> 1.1 drivers/mtd/nand/autcpu12.c # (new) -> 1.1 include/asm-arm26/elf.h # (new) -> 1.1 drivers/mtd/maps/lasat.c # (new) -> 1.1 include/asm-arm26/serial.h # (new) -> 1.2 sound/pcmcia/vx/vxpocket.c # (new) -> 1.1 arch/arm26/nwfpe/entry.S # (new) -> 1.1 drivers/mtd/maps/h720x-flash.c # (new) -> 1.1 arch/arm26/nwfpe/fpa11.c # (new) -> 1.1 include/asm-arm26/div64.h # (new) -> 1.1 arch/arm26/kernel/setup.c # (new) -> 1.1 include/asm-arm26/hardware.h # (new) -> 1.1 include/asm-arm26/ucontext.h # (new) -> 1.1 arch/arm26/machine/irq.c # (new) -> 1.1 arch/arm26/kernel/time-acorn.c # (new) -> 1.1 sound/pcmcia/vx/vxp440.c # (new) -> 1.1 drivers/mtd/maps/dilnetpc.c # (new) -> 1.1 arch/arm26/kernel/asm-offsets.c # (new) -> 1.1 arch/arm26/nwfpe/single_cpdo.c # (new) -> 1.1 sound/i2c/other/Makefile # (new) -> 1.1 arch/arm26/boot/compressed/Makefile # (new) -> 1.1 arch/arm26/mm/Makefile # (new) -> 1.1 include/asm-arm26/ptrace.h # (new) -> 1.1 include/asm-arm26/setup.h # (new) -> 1.1 include/linux/tiocl.h # (new) -> 1.1 include/asm-arm26/bugs.h # (new) -> 1.1 include/asm-arm26/hdreg.h # (new) -> 1.1 sound/pcmcia/vx/vxp_ops.c # (new) -> 1.1 arch/arm26/machine/arch.c # (new) -> 1.1 include/asm-arm26/smp.h # (new) -> 1.1 include/asm-arm26/sockios.h # (new) -> 1.1 arch/arm26/nwfpe/fpmodule.inl # (new) -> 1.1 include/asm-arm26/thread_info.h # (new) -> 1.1 sound/drivers/vx/vx_mixer.c # (new) -> 1.2 drivers/mtd/maps/amd76xrom.c # (new) -> 1.1 drivers/mtd/maps/nettel.c # (new) -> 1.1 arch/arm26/kernel/init_task.c # (new) -> 1.1 drivers/net/wireless/atmel.c # (new) -> 1.1 sound/drivers/opl4/opl4_mixer.c # (new) -> 1.1 arch/arm26/kernel/signal.c # (new) -> 1.1 arch/arm26/lib/udivdi3.c # (new) -> 1.1 arch/arm26/defconfig # (new) -> 1.1 arch/arm26/boot/compressed/misc.c # (new) -> 1.1 arch/arm26/kernel/semaphore.c # (new) -> 1.1 drivers/mtd/mtdblock.h # (new) -> 1.1 arch/arm26/nwfpe/Makefile # (new) -> 1.1 sound/pcmcia/vx/vxpocket.h # (new) -> 1.1 sound/drivers/vx/vx_uer.c # (new) -> 1.1 drivers/mtd/maps/mbx860.c # (new) -> 1.1 arch/arm26/mm/fault.c # (new) -> 1.1 arch/arm26/lib/testchangebit.S # (new) -> 1.1 arch/arm26/nwfpe/softfloat-macros # (new) -> 1.1 arch/m68knommu/platform/5307/ints.c # (new) -> 1.1 include/asm-arm26/ioc.h # (new) -> 1.1 arch/arm26/lib/io-writesb.S # (new) -> 1.1 arch/arm26/machine/oldlatches.c # (new) -> 1.1 include/asm-arm26/tlbflush.h # (new) -> 1.1 include/asm-arm26/sizes.h # (new) -> 1.1 drivers/mtd/chips/cfi_cmdset_0020.c # (new) -> 1.1 sound/pci/ice1712/aureon.c # (new) -> 1.1 sound/drivers/vx/vx_hwdep.c # (new) -> 1.1 drivers/mtd/maps/arctic-mtd.c # (new) -> 1.1 drivers/i2c/chips/lm85.c # (new) -> 1.1 include/asm-arm26/uncompress.h # (new) -> 1.1 arch/arm26/lib/ashldi3.c # (new) -> 1.1 drivers/mtd/nand/nand_ids.c # (new) -> 1.1 arch/arm26/kernel/armksyms.c # (new) -> 1.1 include/asm-arm26/hardirq.h # (new) -> 1.1 include/asm-arm26/xor.h # (new) -> 1.1 sound/drivers/vx/vx_cmd.h # (new) -> 1.1 include/net/ip6_tunnel.h # (new) -> 1.1 sound/parisc/harmony.c # (new) -> 1.1 arch/arm26/nwfpe/fpa11_cprt.c # (new) -> 1.1 include/asm-arm26/kmap_types.h # (new) -> 1.1 arch/arm26/mm/extable.c # (new) -> 1.1 include/asm-arm26/checksum.h # (new) -> 1.1 include/asm-arm26/fiq.h # (new) -> 1.1 include/asm-arm26/rmap.h # (new) -> 1.1 arch/arm26/Makefile # (new) -> 1.1 include/asm-arm26/namei.h # (new) -> 1.1 include/asm-arm26/atomic.h # (new) -> 1.1 arch/arm26/nwfpe/ARM-gcc.h # (new) -> 1.1 arch/arm26/machine/Makefile # (new) -> 1.1 arch/arm26/nwfpe/softfloat.c # (new) -> 1.1 include/asm-arm26/ecard.h # (new) -> 1.1 include/asm-arm26/keyboard.h.old # (new) -> 1.1 arch/arm26/lib/memzero.S # (new) -> 1.1 arch/arm26/kernel/Makefile # (new) -> 1.1 arch/arm26/lib/findbit.S # (new) -> 1.1 include/asm-arm26/msgbuf.h # (new) -> 1.1 arch/arm26/boot/compressed/ofw-shark.c # (new) -> 1.1 arch/arm26/boot/compressed/uncompress.h # (new) -> 1.1 sound/drivers/opl4/opl4_local.h # (new) -> 1.1 sound/drivers/opl4/opl4_synth.c # (new) -> 1.1 arch/arm26/lib/csumpartialcopy.S # (new) -> 1.1 arch/arm26/nwfpe/fpopcode.c # (new) -> 1.1 arch/i386/kernel/summit.c # (new) -> 1.1 Documentation/DocBook/gadget.tmpl # (new) -> 1.1 include/sound/opl4.h # (new) -> 1.1 drivers/net/wireless/atmel_cs.c # (new) -> 1.1 drivers/mtd/devices/ms02-nv.h # (new) -> 1.1 sound/drivers/opl4/opl4_seq.c # (new) -> 1.1 sound/pcmcia/Kconfig # (new) -> 1.1 include/asm-arm26/scatterlist.h # (new) -> 1.1 arch/arm26/kernel/ptrace.c # (new) -> 1.1 Documentation/rocket.txt # (new) -> 1.1 arch/arm26/nwfpe/extended_cpdo.c # (new) -> 1.1 arch/arm26/nwfpe/double_cpdo.c # (new) -> 1.1 sound/pci/vx222/vx222.c # (new) -> 1.2 drivers/i2c/i2c-iop3xx.c # (new) -> 1.1 arch/arm26/lib/testsetbit.S # (new) -> 1.1 drivers/mtd/maps/scb2_flash.c # (new) -> 1.1 include/asm-arm26/module.h # (new) -> 1.1 arch/arm26/lib/csumpartialcopyuser.S # (new) -> 1.1 include/asm-arm26/suspend.h # (new) -> 1.1 arch/arm26/lib/csumpartialcopygeneric.S # (new) -> 1.1 arch/arm26/kernel/arch.c # (new) -> 1.1 arch/arm26/machine/head.S # (new) -> 1.1 arch/arm26/lib/putuser.S # (new) -> 1.1 sound/parisc/Kconfig # (new) -> 1.1 arch/arm26/Kconfig # (new) -> 1.1 include/asm-arm26/processor.h # (new) -> 1.4 include/linux/sysdev.h # (new) -> 1.1 arch/arm26/kernel/sys_arm.c # (new) -> 1.1 arch/arm26/nwfpe/fpa11_cpdo.c # (new) -> 1.1 sound/pci/azt3328.c # (new) -> 1.1 arch/arm26/nwfpe/ChangeLog # (new) -> 1.1 include/asm-arm26/sysirq.h # (new) -> 1.1 include/asm-arm26/segment.h # (new) -> 1.1 arch/arm26/lib/uaccess-user.S # (new) -> 1.1 include/asm-arm26/ioctls.h # (new) -> 1.1 include/asm-arm26/io.h # (new) -> 1.1 arch/arm26/kernel/traps.c # (new) -> 1.1 include/asm-arm26/termbits.h # (new) -> 1.1 include/asm-arm26/a.out.h # (new) -> 1.1 include/asm-arm26/sigcontext.h # (new) -> 1.1 arch/arm26/lib/ecard.S # (new) -> 1.1 arch/arm26/lib/ucmpdi2.c # (new) -> 1.1 include/linux/mtd/blktrans.h # (new) -> 1.1 drivers/mtd/maps/beech-mtd.c # (new) -> 1.1 arch/arm26/nwfpe/fpa11_cpdt.c # (new) -> 1.1 include/asm-arm26/posix_types.h # (new) -> 1.1 arch/arm26/nwfpe/fpmodule.h # (new) -> 1.1 include/asm-arm26/mc146818rtc.h # (new) -> 1.1 include/asm-arm26/stat.h # (new) -> 1.1 arch/arm26/lib/memset.S # (new) -> 1.1 arch/arm26/kernel/time.c # (new) -> 1.1 include/asm-arm26/ipc.h # (new) -> 1.1 include/asm-arm26/poll.h # (new) -> 1.1 arch/arm26/lib/Makefile # (new) -> 1.1 include/asm-arm26/timex.h # (new) -> 1.1 include/asm-arm26/ioctl.h # (new) -> 1.1 drivers/mtd/maps/lubbock-flash.c # (new) -> 1.1 arch/arm26/config.in # (new) -> 1.1 arch/arm26/lib/io-readsl-armv3.S # (new) -> 1.1 include/asm-arm26/page.h # (new) -> 1.1 include/asm-arm26/pci.h # (new) -> 1.1 include/asm-arm26/floppy.h # (new) -> 1.2 include/linux/topology.h # (new) -> 1.1 include/asm-i386/mach-generic/mach_apicdef.h # (new) -> 1.1 drivers/mtd/maps/redwood.c # (new) -> 1.1 arch/arm26/machine/dma.c # (new) -> 1.1 arch/arm26/vmlinux.lds.S # (new) -> 1.1 sound/drivers/vx/vx_cmd.c # (new) -> 1.1 arch/arm26/lib/changebit.S # (new) -> 1.1 include/asm-arm26/cacheflush.h # (new) -> 1.1 arch/arm26/lib/backtrace.S # (new) -> 1.1 include/asm-arm26/mmu.h # (new) -> 1.1 arch/arm26/lib/io-readsb.S # (new) -> 1.2 include/sound/ak4xxx-adda.h # (new) -> 1.1 include/asm-arm26/fcntl.h # (new) -> 1.1 include/asm-arm26/byteorder.h # (new) -> 1.1 include/asm-arm26/irq.h # (new) -> 1.1 arch/arm26/kernel/fiq.c # (new) -> 1.1 arch/arm26/lib/lshrdi3.c # (new) -> 1.1 include/asm-arm26/termios.h # (new) -> 1.1 arch/arm26/kernel/dma.c # (new) -> 1.1 arch/arm26/boot/compressed/head.S # (new) -> 1.1 arch/arm26/kernel/compat.c # (new) -> 1.1 include/asm-arm26/procinfo.h # (new) -> 1.1 arch/arm26/lib/lib1funcs.S # (new) -> 1.1 arch/arm26/nwfpe/fpmodule.c # (new) -> 1.1 arch/arm26/nwfpe/fpopcode.h # (new) -> 1.1 arch/arm26/lib/strrchr.S # (new) -> 1.1 arch/arm26/nwfpe/fpsr.h # (new) -> 1.1 include/asm-arm26/percpu.h # (new) -> 1.1 include/asm-arm26/topology.h # (new) -> 1.1 arch/arm26/lib/memcpy.S # (new) -> 1.1 drivers/mtd/maps/ebony.c # (new) -> 1.1 sound/pci/vx222/Makefile # (new) -> 1.1 arch/arm26/lib/csumipv6.S # (new) -> 1.1 include/asm-arm26/assembler.h # (new) -> 1.1 sound/drivers/opl4/Makefile # (new) -> 1.1 include/asm-arm26/constants.h # (new) -> 1.1 arch/arm26/nwfpe/milieu.h # (new) -> 1.1 arch/arm26/boot/install.sh # (new) -> 1.1 include/asm-arm26/linux_logo.h # (new) -> 1.1 arch/arm26/lib/testclearbit.S # (new) -> 1.1 arch/arm26/kernel/process.c # (new) -> 1.1 arch/arm26/lib/io-writesl.S # (new) -> 1.1 arch/arm26/mm/proc-funcs.S # (new) -> 1.1 include/asm-arm26/dma.h # (new) -> 1.1 include/asm-arm26/irqchip.h # (new) -> 1.1 include/asm-arm26/proc-fns.h # (new) -> 1.1 arch/arm26/kernel/irq.c # (new) -> 1.1 include/asm-arm26/locks.h # (new) -> 1.2 sound/drivers/vx/vx_core.c # (new) -> 1.1 arch/arm26/mm/fault.h # (new) -> 1.1 include/linux/mtd/inftl.h # (new) -> 1.1 arch/arm26/lib/longlong.h # (new) -> 1.1 arch/arm26/Config.help # (new) -> 1.1 arch/arm26/lib/memchr.S # (new) -> 1.1 include/asm-arm26/oldlatches.h # (new) -> 1.1 include/asm-arm26/uaccess-asm.h # (new) -> 1.1 drivers/mtd/maps/tsunami_flash.c # (new) -> 1.1 sound/drivers/opl4/opl4_lib.c # (new) -> 1.1 sound/drivers/opl4/opl4_proc.c # (new) -> 1.1 arch/arm26/kernel/ptrace.h # (new) -> 1.1 arch/arm26/nwfpe/fpa11.inl # (new) -> 1.1 include/asm-arm26/ian_char.h # (new) -> 1.1 arch/arm26/mm/init.c # (new) -> 1.2 sound/i2c/other/ak4xxx-adda.c # (new) -> 1.1 include/asm-arm26/bitops.h # (new) -> 1.1 fs/compat_ioctl.c # (new) -> 1.1 sound/pci/vx222/vx222.h # (new) -> 1.1 include/asm-arm26/arch.h # (new) -> 1.1 arch/arm26/lib/io-acorn.S # (new) -> 1.1 arch/arm26/lib/muldi3.c # (new) -> 1.1 sound/parisc/Makefile # (new) -> 1.1 arch/arm26/lib/delay.S # (new) -> 1.1 arch/arm26/lib/ashrdi3.c # (new) -> 1.1 include/asm-arm26/map.h # (new) -> 1.1 include/asm-arm26/param.h # (new) -> 1.1 include/asm-arm26/errno.h # (new) -> 1.1 include/asm-arm26/semaphore-helper.h # (new) -> 1.1 arch/arm26/mm/mm-memc.c # (new) -> 1.1 include/asm-arm26/bug.h # (new) -> 1.1 arch/arm26/lib/getuser.S # (new) -> 1.1 include/asm-arm26/shmparam.h # (new) -> 1.1 include/asm-arm26/semaphore.h # (new) -> 1.1 include/asm-arm26/spinlock.h # (new) -> 1.1 drivers/mtd/nand/edb7312.c # (new) -> 1.1 sound/pci/ice1712/aureon.h # (new) -> 1.1 include/asm-arm26/system.h # (new) -> 1.1 arch/arm26/nwfpe/fpa11.h # (new) -> 1.1 include/asm-arm26/leds.h # (new) -> 1.1 drivers/mtd/maps/pb1xxx-flash.c # (new) -> 1.1 include/asm-arm26/shmbuf.h # (new) -> 1.1 include/asm-arm26/tlb.h # (new) -> 1.1 arch/arm26/ACKNOWLEDGEMENTS # (new) -> 1.1 sound/pci/azt3328.h # (new) -> 1.1 drivers/mtd/maps/ich2rom.c # (new) -> 1.1 include/asm-arm26/ide.h # (new) -> 1.1 include/asm-arm26/pgalloc.h # (new) -> 1.1 include/asm-arm26/unistd.h # (new) -> 1.1 sound/drivers/opl4/yrw801.c # (new) -> 1.1 arch/arm26/boot/Makefile # (new) -> 1.1 arch/arm26/kernel/ecard.c # (new) -> 1.1 include/asm-arm26/cache.h # (new) -> 1.1 arch/arm26/lib/uaccess-kernel.S # (new) -> 1.1 arch/arm26/nwfpe/softfloat.h # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/05/26 torvalds@home.transmeta.com 1.1215.17.33 # Linux v2.5.70 # -------------------------------------------- # 03/05/27 davej@codemonkey.org.uk 1.1215.18.1 # [AGPGART] Compilation fix. # Death of a typedef in an earlier cset broke i810fb # -------------------------------------------- # 03/05/27 davej@codemonkey.org.uk 1.1215.18.2 # [AGPGART] Remove useless early agp_init() from i810fb # agp_init() just printk's a banner. This is unnecessary at this early stage. # -------------------------------------------- # 03/05/26 jejb@raven.il.steeleye.com 1.1215.19.1 # Automerge # -------------------------------------------- # 03/05/26 jejb@raven.il.steeleye.com 1.1215.17.34 # 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/05/27 davej@tetrachloride.(none) 1.1215.20.1 # Merge tetrachloride.(none):/mnt/raid/src/kernel/2.5/bk-linus # into tetrachloride.(none):/mnt/raid/src/kernel/2.5/agpgart # -------------------------------------------- # 03/05/26 jejb@raven.il.steeleye.com 1.1215.17.35 # Merge raven.il.steeleye.com:/mnt1/jejb/BK/scsi-aic-2.5 # into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5 # -------------------------------------------- # 03/05/26 akpm@digeo.com 1.1215.21.1 # [PATCH] truncate and timestamps # # This patch will put us back to the 2.4 behaviour while preserving the # truncation speedup. It's a bit dopey (why do the timestamp update in # the fs at all?) but changing this stuff tends to cause subtle # problems. # -------------------------------------------- # 03/05/27 paulus@samba.org 1.1215.1.26 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/05/26 acme@conectiva.com.br 1.1215.22.1 # o wanrouter: fix bug introduced by latest namespace fix # # Thanks to Adrian Bunk for reporting. # -------------------------------------------- # 03/05/26 torvalds@home.transmeta.com 1.1215.17.36 # Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/26 bcollins@debian.org 1.1215.17.37 # [PATCH] Update IEEE1394 (r939) # # - Adds fragementation support to eth1394 # - Fix race conditition in packet completion task call # - Fix lack of proper logic in tlabel allocation # - Fix brokeness introduced by "stanford checker fixes for memset" in # ohci1394 # - Add trivial PM resume callback in ohci1394 to support sleep/resume. # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.38 # [PATCH] callout removal: ircomm_tty # # callout removal: ircomm_tty # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.39 # [PATCH] callout removal: mcfserial # # callout removal: mcfserial # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.40 # [PATCH] callout removal: 68360 # # callout removal: 68360 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.41 # [PATCH] callout removal: tc_zs # # callout removal: tc_zs # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.42 # [PATCH] callout removal: sgiserial # # callout removal: sgiserial # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.43 # [PATCH] callout removal: aurora # # callout removal: aurora # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.44 # [PATCH] callout removal: stallion # # callout removal: stallion # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.45 # [PATCH] callout removal: rio # # callout removal: rio # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.46 # [PATCH] callout removal: sx # # callout removal: sx # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.47 # [PATCH] callout removal: specialix # # callout removal: specialix # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.48 # [PATCH] callout removal: a2232 # # callout removal: a2232 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.49 # [PATCH] callout removal: riscom8 # # callout removal: riscom8 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.50 # [PATCH] callout removal: istallion # # callout removal: istallion # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.51 # [PATCH] callout removal: sci # # callout removal: sci # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.52 # [PATCH] callout removal: vme # # callout removal: vme # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.53 # [PATCH] callout removal: tx3912 # # callout removal: tx3912 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.54 # [PATCH] callout removal: generic_serial # # callout removal: generic_serial # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.55 # [PATCH] callout removal: isicom # # callout removal: isicom # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.56 # [PATCH] callout removal: 68328 # # callout removal: 68328 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.57 # [PATCH] callout removal: chdlc # # callout removal: chdlc # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.58 # [PATCH] callout removal: pc300 # # callout removal: pc300 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.59 # [PATCH] callout removal: macserial # # callout removal: macserial # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.60 # [PATCH] callout removal: synclink_cs # # callout removal: synclink_cs # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.61 # [PATCH] callout removal: synclinkmp # # callout removal: synclinkmp # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.62 # [PATCH] callout removal: synclink # # callout removal: synclink # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.63 # [PATCH] callout removal: serial167 # # callout removal: serial167 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.64 # [PATCH] callout removal: rocket # # callout removal: rocket # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.65 # [PATCH] callout removal: pcxx # # callout removal: pcxx # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.66 # [PATCH] callout removal: mxser # # callout removal: mxser # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.67 # [PATCH] callout removal: moxa # # callout removal: moxa # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.68 # [PATCH] callout removal: ip2 # # callout removal: ip2 # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.69 # [PATCH] callout removal: esp # # callout removal: esp # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.70 # [PATCH] callout removal: epca # # callout removal: epca # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.71 # [PATCH] callout removal: dz # # callout removal: dz # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.72 # [PATCH] callout removal: cyclades # # callout removal: cyclades # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.73 # [PATCH] callout removal: amiserial # # callout removal: amiserial # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.74 # [PATCH] callout removal: 8xx_uart # # callout removal: 8xx_uart # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.75 # [PATCH] callout removal: 8260_uart # # callout removal: 8260_uart # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.76 # [PATCH] callout removal: sicc # # callout removal: sicc # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.77 # [PATCH] callout removal: vacserial # # callout removal: vacserial # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.78 # [PATCH] callout removal: mips # # callout removal: mips # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.79 # [PATCH] callout removal: simserial # # callout removal: simserial # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.80 # [PATCH] callout removal: cris # # callout removal: cris # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.81 # [PATCH] callout removal: isdn # # callout removal: isdn # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.82 # [PATCH] callout removal: cleanup # # misc cleanup - switched to standard constant names for .subtype in the # drivers that had private equivalents, removed unused ->callout_termios # and friends from the last places where they were defined. # -------------------------------------------- # 03/05/26 viro@www.linux.org.uk 1.1215.17.83 # [PATCH] callout removal: callout is gone # # OK, that's it - no callout drivers left, so we drop the warning from # tty_open() and kill the code that handles them in /proc/tty/drivers. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.84 # [PATCH] md: Export bio_split_pool for md to use. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.85 # [PATCH] md: Use new single page bio splitting for raid0 and linear # # Sometimes raid0 and linear are required to take a single page bio that # spans two devices. We use bio_split to split such a bio into two. # # The the same time, bio.h is included by linux/raid/md.h so # we don't included it elsewhere anymore. # # We also modify the mergeable_bvec functions to allow a bvec # that doesn't fit if it is the first bvec to be added to # the bio, and be careful never to return a negative length from a # bvec_mergable funciton. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.86 # [PATCH] md: Handle concurrent failure of two drives in raid5 # # If two drives both fail during a write request, raid5 doesn't # cope properly and will eventually oops. # # With this patch, blocks that have already been 'written' # are failed when double drive failure is noticed, as well as # blocks that are about to be written. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.87 # [PATCH] md: Improve test for which raid1 device doesn't need to be written to. # # Instead of testing last_used (which could change in unusual circumstances) we # test against the bdev that we read frmo, and don't write back to there. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.88 # [PATCH] md: Fix simple off-by-one error in md driver. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.89 # [PATCH] md: Get rid of vmalloc/vfree from raid0 # # raid0 currently uses vmalloc instead of kmalloc. This patch # changes to kmalloc. # There is one allocation that can occasionally be very large - the hash_table. # A subsequent patch will address this issue. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.90 # [PATCH] md: Always allow a half-built md array to be stopped. # # When starting an array fails, we have to tear it down, but # in some circumstances (particularly autostart_array) the # reference count will be 3, so do_md_stop will fail. # # With this patch we only worry about the number of users # is the array has been fully started. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.91 # [PATCH] md: Improve raid0 mapping code to simplify and reduce mem usage. # # To cope with a raid0 array with differing sized devices, # raid0 divides an array into "strip zones". # The first zone covers the start of all devices, upto an offset # equal to the size of the smallest device. # # The second strip zone covers the remaining devices upto the size of the # next smallest size, etc. # # In order to determing which strip zone a given address is in, # the array is logically divided into slices the size of the smallest # zone, and a 'hash' table is created listing the first and, if relevant, # second zone in each slice. # # As the smallest slice can be very small (imagine an array with a # 76G drive and a 75.5G drive) this hash table can be rather large. # # With this patch, we limit the size of the hash table to one page, # at the possible cost of making several probes into the zone list # before we find the correct zone. # # We also cope with the possibility that a zone could be larger than # a 32bit sector address would allow. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.92 # [PATCH] md: Remove dependancy on MD_SB_DISKS from multipath # # Multipath has a dependancy on MD_SB_DISKS which is no # longer authoritative. We change it to use a separately # allocated array. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.93 # [PATCH] md: Remove dependancy on MD_SB_DISKS from raid5 # # One embeded array gets moved to end of structure and # sized dynamically. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.94 # [PATCH] md: Remove dependancy on MD_SB_DISKS from raid0 # # Arrays with type-1 superblock can have more than # MD_SB_DISKS, so we remove the dependancy on that number from # raid0, replacing several fixed sized arrays with one # dynamically allocated array. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.95 # [PATCH] md: Remove MD_SB_DISKS limits from raid1 # # raid1 uses MD_SB_DISKS to size two data structures, # but the new version-1 superblock allows for more than # this number of disks (and most actual arrays use many # fewer). # This patch sizes to two arrays dynamically. # One becomes a separate kmalloced array. # The other is moved to the end of the containing structure # and appropriate extra space is allocated. # # Also, change r1buf_pool_alloc (which allocates buffers for # a mempool for doing re-sync) to not get r1bio structures # from the r1bio pool (which could exhaust the pool) but instead # to allocate them separately. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.96 # [PATCH] md: Remove dependance on MD_SB_DISKS in linear personality # # Linear uses one array sized by MD_SB_DISKS inside a structure. # We move it to the end of the structure, declare it as size 0, # and arrange for approprate extra space to be allocated on # structure allocation. # -------------------------------------------- # 03/05/26 neilb@cse.unsw.edu.au 1.1215.17.97 # [PATCH] md: Replace bdev_partition_name with calls to bdevname # -------------------------------------------- # 03/05/26 gerg@snapgear.com 1.1215.17.98 # [PATCH] create m68knommu/coldfire specific ints.c # # Create a m68knommu/ColdFire specific ints.c. It is just simpler to # have one for each sub-architecture (which means we currently need 3 # for the 3 prominant m68knommu families). Each can handle the hardware # setup differences, and there is a few at this level. # -------------------------------------------- # 03/05/26 gerg@snapgear.com 1.1215.17.99 # [PATCH] remove common m68knommu ints.c # # Remove the m68knommu common ints.c. No longer needed with each # sub-architecture now having its own. # -------------------------------------------- # 03/05/26 gerg@snapgear.com 1.1215.17.100 # [PATCH] don't compile m68knommu/kernel ints.c # # Modify m68knommu/kernel Makefile to no longer compile removed # common ints.c. # -------------------------------------------- # 03/05/26 gerg@snapgear.com 1.1215.17.101 # [PATCH] compile m68knommu/ColdFire ints.c # # Add the m68knommu/Coldfire specific ints.c to build list. # -------------------------------------------- # 03/05/27 shmulik.hen@intel.com 1.1215.23.1 # [netdrvr bonding] fix long failover in 802.3ad mode # # This patch fixes the bug reported by Jay on April 3rd regarding long # failover time when releasing the last slave in the active aggregator. The # fix, as suggested by Jay, is to follow the spec recommendation and send a # LACPDU to the partner saying this port is no longer aggregatable and # therefore trigger an immediate re-selection of a new aggregator instead of # waiting the entire expiration timeout. # -------------------------------------------- # 03/05/27 shmulik.hen@intel.com 1.1215.23.2 # [netdrvr bonding] fix ABI version control problem # # This fix makes bonding not commit to a specific ABI version if the ioctl # command is not supported by bonding. # # (It also removes the '\n' in the continuous printk reporting the link down # event in bond_mii_monitor - it got in there by mistake in our previous # patch set and caused log messages to appear funny in some situations). # -------------------------------------------- # 03/05/27 bunk@fs.tum.de 1.1215.23.3 # [wan lmc] remove 2.0.x-era code # # The patch below removes obsolete #if'd code for kernel 2.0 and 2.2 from # drivers/net/wan/lmc/* (this includes the expansion of some #define's # that were definded differently for different kernel versions). # -------------------------------------------- # 03/05/27 edward_peng@dlink.com.tw 1.1215.23.4 # [netdrvr sundance] fix flow control bug # -------------------------------------------- # 03/05/27 edward_peng@dlink.com.tw 1.1215.23.5 # [netdrvr sundance] fix another flow control bug # -------------------------------------------- # 03/05/27 jgarzik@redhat.com 1.1215.23.6 # [netdrvr eepro] update MODULE_AUTHOR per old-author request # -------------------------------------------- # 03/05/27 engebret@us.ibm.com 1.1215.23.7 # [netdrvr pcnet32] bug fixes # # I would like to see a couple of the pcnet32 changes that I think we can # agree on be put into the trees so a couple of the potential defects can be # avoided. The following patch contains just these pieces. The only # controversial one is an arbitrary change in the number of iterations in a # while loop spinning on hardware state. No matter how this is done, I am # not especially fond of this bit of code as it has no reasonable error # recovery path -- however, as a half-way, incremental solution, increasing # the polling time should help as the 100 value was certainly found to be # insufficient. 1000 may not be sufficient either, but it is certainly no # worse. # # Both of the other changes were hit in testing (and I belive the wmb() at a # customer even), so it would help reduce some debug if these go in. Any # feedback is appreciated - thanks. # -------------------------------------------- # 03/05/27 paulus@samba.org 1.1215.1.27 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/05/26 torvalds@home.transmeta.com 1.1215.17.102 # Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/26 torvalds@home.transmeta.com 1.1215.17.103 # Remove a few zero-sized files, as noted by David Gibson. # -------------------------------------------- # 03/05/26 davem@nuts.ninka.net 1.1215.16.27 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/05/27 davem@nuts.ninka.net 1.1215.16.28 # Merge bk://kernel.bkbits.net/acme/net-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/05/27 yoshfuji@linux-ipv6.org 1.1215.16.29 # [CRYPTO]: Fix compiler warnings in sha512.c # -------------------------------------------- # 03/05/27 yoshfuji@linux-ipv6.org 1.1215.16.30 # [IPV6]: Fix possible idev leakage in icmp.c # -------------------------------------------- # 03/05/27 davem@nuts.ninka.net 1.1215.16.31 # [NET]: One too many IRQ_HANDLED added to sunqe.c driver. # -------------------------------------------- # 03/05/27 yoshfuji@linux-ipv6.org 1.1215.16.32 # [IPV6]: Fix possible oops in ndisc_send_na. # -------------------------------------------- # 03/05/27 herbert@gondor.apana.org.au 1.1215.16.33 # [IPSEC]: Order SPD using priority. # -------------------------------------------- # 03/05/27 paulus@samba.org 1.1215.1.28 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/05/27 davej@codemonkey.org.uk 1.1215.20.2 # [AGPGART] Yet another missed typedef compile fix. # -------------------------------------------- # 03/05/27 davej@tetrachloride.(none) 1.1215.17.104 # Merge tetrachloride.(none):/mnt/raid/src/kernel/2.5/bk-linus # into tetrachloride.(none):/mnt/raid/src/kernel/2.5/agpgart # -------------------------------------------- # 03/05/27 oliver@vermuden.neukum.org 1.1164.12.1 # 01-debug-cleanup.patch # -------------------------------------------- # 03/05/27 shaggy@shaggy.austin.ibm.com 1.1215.24.1 # Merge jfs@jfs.bkbits.net:linux-2.5 # into shaggy.austin.ibm.com:/shaggy/bk/jfs-2.5 # -------------------------------------------- # 03/05/27 axboe@suse.de 1.1215.25.1 # [PATCH] remove buggy BUG_ON in ide-cd # # Alan (or someone else) added a buggy BUG_ON() in ide-cd. We can address > # 32-bit just fine with 2kb block size. People are hitting this, just got # one more report today... # -------------------------------------------- # 03/05/27 torvalds@home.transmeta.com 1.1215.26.1 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/27 cifs.adm@hostme.bitkeeper.com 1.1215.27.1 # Merge bk://linux.bkbits.net/linux-2.5 # into hostme.bitkeeper.com:/ua/repos/c/cifs/linux-2.5cifs # -------------------------------------------- # 03/05/27 agrover@groveronline.com 1.1215.28.1 # ACPI: fix extra semicolon (Pavel Machek) # -------------------------------------------- # 03/05/27 stevef@smfhome1.austin.rr.com 1.1215.27.2 # adjust for change of devname to const char (new mount format) # -------------------------------------------- # 03/05/27 torvalds@penguin.transmeta.com 1.1215.17.105 # Merge bk://cifs.bkbits.net/linux-2.5cifs # into penguin.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/27 viro@parcelfarce.linux.theplanet.co.uk 1.1215.17.106 # [PATCH] Fix sound lockup - missing chardev init # # Argh. Missing initialization in char_dev.c - it's definitely # responsible for crap on unload. Load side appears to be something else, # though... # -------------------------------------------- # 03/05/27 axboe@suse.de 1.1215.17.107 # [PATCH] blk layer tag resize # # This allows drivers to resize their tag depth at run-time. # -------------------------------------------- # 03/05/27 torvalds@home.transmeta.com 1.1215.26.2 # Merge bk://linus@bkbits.net/linux-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/28 anton@samba.org 1.1215.29.1 # ppc64: merge some conflicts # -------------------------------------------- # 03/05/28 anton@samba.org 1.1215.29.2 # ppc64: merge conflicts # -------------------------------------------- # 03/05/27 viro@parcelfarce.linux.theplanet.co.uk 1.1215.26.3 # [PATCH] procfs bug exposed by cdev changes # # fs/inode.c assumes that any ->delete_inode() will call clear_inode(). # procfs instance doesn't. It had passed unpunished for a while; cdev changes # combined with ALSA creating character devices in procfs made it fatal. # # Patch follows. It had fixed ALSA-triggered memory corruption here - # what happens in vanilla 2.5.70 is that clear_inode() is not called when # procfs character device inodes are freed. That leaves a freed inode on # a cyclic list, with obvious unpleasantness following when we try to traverse # it (e.g. when unregistering a device). # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.4 # [PATCH] Remove some unneeded register saving on the v850 # # These registers are now saved in a difference place, but the old code # was inadvertently left in. # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.5 # [PATCH] Include in arch/v850/kernel/rte_cb_leds.c # # This is to define `struct file'; apparently some include-file change # removed a previous implicit include. # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.6 # [PATCH] Miscellaneous v850 whitespace and comment cleanups # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.7 # [PATCH] Handle new do_fork return value on v850 # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.8 # [PATCH] Add __KERNEL__ guard to nb85e_cache.h on v850 # # This header ends up getting included by uClibc (though nothing in it is # used), so this protection is necessary to avoid problems with kernel-only # typedefs. # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.9 # [PATCH] Add leading underline to new linker-script symbols on the v850 # # This is needed to match the output of the C compiler. # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.10 # [PATCH] Whitespace and comment cleanups for v850 entry.S # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.11 # [PATCH] Add v850 support for hardware single-step (via ptrace) # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.12 # [PATCH] Update irq.c on v850 to use irqreturn_t # -------------------------------------------- # 03/05/27 miles@lsi.nec.co.jp 1.1215.26.13 # [PATCH] const-qualify memory arg in v850's __test_bit # # This silences at least one compile-time warning... :-) # -------------------------------------------- # 03/05/28 anton@samba.org 1.1215.30.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/tmp3 # -------------------------------------------- # 03/05/27 hirofumi@mail.parknet.co.jp 1.1215.26.14 # [PATCH] Adds the large partition (> 128GB) support to FAT (1/5) # # This adds large partition (> 128GB) support to FAT. # -------------------------------------------- # 03/05/27 hirofumi@mail.parknet.co.jp 1.1215.26.15 # [PATCH] Fix VFAT_IOCTL_READDIR_BOTH/_SHORT ioctl (2/5) # # This fixes the return value of ioctl() for enables using the same way as # readdir(). # # put/get_user() return code check patch from John R R Leavitt # # -------------------------------------------- # 03/05/27 hirofumi@mail.parknet.co.jp 1.1215.26.16 # [PATCH] Remove Documentation/filesystems/fat_cvf.txt (3/5) # # This removes the obsolete Documentation/filesystems/fat_cvf.txt. # -------------------------------------------- # 03/05/27 hirofumi@mail.parknet.co.jp 1.1215.26.17 # [PATCH] FAT cluster chain cache per superblock (4/5) # # This shifts the data position caches from module to per-superblock, and # cleanups. # -------------------------------------------- # 03/05/27 hirofumi@mail.parknet.co.jp 1.1215.26.18 # [PATCH] FAT cluster chain cache per inode (5/5) # # This adds a cache of lastest accessed cluster to inode for sequential # access. # # The following is 500M file of FAT-to-FAT copy test, this may be a most # different case in usual operations, because maximum readahead window # flush the all caches. # # 512 bytes blocksize, 4096 bytes cluster size. # # linux-2.5.69-bk12 # root@devron (a)[1232]# time cp file file1 # # real 7m58.900s # user 0m0.267s # sys 6m44.258s # # linux-2.5.69-bk12+patch # root@devron (a)[1576]# time cp file file1 # # real 2m44.309s # user 0m0.270s # sys 0m28.631s # -------------------------------------------- # 03/05/27 ink@jurassic.park.msu.ru 1.1215.26.19 # [PATCH] alpha: compile warning fix # # Make the "addr" arg to test_bit "const" to prevent flood of compile # warnings in networking code. # -------------------------------------------- # 03/05/27 ink@jurassic.park.msu.ru 1.1215.26.20 # [PATCH] alpha: fix panic on smp boot (fork_by_hand) # -------------------------------------------- # 03/05/27 ink@jurassic.park.msu.ru 1.1215.26.21 # [PATCH] alpha: typo in EISA bridge detection # -------------------------------------------- # 03/05/27 ink@jurassic.park.msu.ru 1.1215.26.22 # [PATCH] alpha: single-step breakpoints - updated fix # # Restore 2.4 behavior when setting the single step breakpoints. # -------------------------------------------- # 03/05/27 elenstev@mesatop.com 1.1215.26.23 # [PATCH] Use '#ifdef' to test for CONFIG options # -------------------------------------------- # 03/05/27 herbert@gondor.apana.org.au 1.1215.16.34 # [NET]: Missing refcount bump in flow cache. # -------------------------------------------- # 03/05/27 davem@nuts.ninka.net 1.1215.16.35 # [IPV4/IPV6]: Use Jenkins hash for fragment reassembly handling. # -------------------------------------------- # 03/05/27 davem@nuts.ninka.net 1.1215.16.36 # [IPV6]: Input full addresses into TCP_SYNQ hash function. # -------------------------------------------- # 03/05/28 davem@nuts.ninka.net 1.1215.16.37 # [IPV4]: Add sysctl to control ipfrag_secret_interval. # -------------------------------------------- # 03/05/28 acme@conectiva.com.br 1.1215.26.24 # o net: abstract access to struct sock ->flags # # This makes: # # 1. simpler primitive to access struct sock flags, shorter # 2. we check if the flag is valid by using enum sock_flags # 3. we can change the implementation to an open coded bit operations # if it proves to be faster than the more general bit manipulation # routines now used, i.e. we only have to change sock.h, not the # whole net tree like now # -------------------------------------------- # 03/05/28 paulus@samba.org 1.1215.1.29 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/05/28 yoshfuji@linux-ipv6.org 1.1215.16.38 # [IPV6]: Clean up ip6_dst_alloc() calls. # -------------------------------------------- # 03/05/28 bdschuym@pandora.be 1.1215.16.39 # [BRIDGE]: Remove unnecessary code in br_input. # -------------------------------------------- # 03/05/28 yoshfuji@linux-ipv6.org 1.1215.16.40 # [IPV6]: Always remove fragment header. # -------------------------------------------- # 03/05/28 yoshfuji@linux-ipv6.org 1.1215.16.41 # [IPV6]: Fix possible dst leakage in ndisc_send_redirect. # -------------------------------------------- # 03/05/28 davem@nuts.ninka.net 1.1215.16.42 # [IPV6]: Fix typo in defragmentation changes. # -------------------------------------------- # 03/05/28 oliver@vermuden.neukum.org 1.1164.12.2 # - major cleanup of the module code # -------------------------------------------- # 03/05/28 rmk@flint.arm.linux.org.uk 1.1215.31.1 # [ARM] Fix GCC3.3 build error # # GCC 3.3 complains that r2 overlaps input operands when a u64 pointer # is passed into __put_user(). Fix this by using ip as a temporary # register instead. # -------------------------------------------- # 03/05/28 shaggy@shaggy.austin.ibm.com 1.1215.32.1 # Merge jfs@jfs.bkbits.net:linux-2.5 # into shaggy.austin.ibm.com:/shaggy/bk/jfs-2.5 # -------------------------------------------- # 03/05/28 rmk@flint.arm.linux.org.uk 1.1215.31.2 # [ARM] Remove old 26-bit ARM keyboard drivers # # Also remove mouse_ps2.c which was never referenced from the Makefile. # -------------------------------------------- # 03/05/28 rmk@flint.arm.linux.org.uk 1.1215.31.3 # [ARM] Declare mmu_gathers using DEFINE_PER_CPU. # -------------------------------------------- # 03/05/28 perex@suse.cz 1.1215.10.145 # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # -------------------------------------------- # 03/05/28 proski@org.rmk.(none) 1.1127.8.2 # [PATCH] Fix crash when unloading yenta_socket in Linux 2.5.69 # # socket->base is unmapped in yenta_close(), which is called by # cardbus_remove(). The value of socket->base is not changed to # NULL, so it becomes invalid. # # Then cardbus_remove() calls class_device_unregister(), which calls # pcmcia_unregister_socket(), which it turn tries to access memory # space of the socket. # -------------------------------------------- # 03/05/28 rmk@flint.arm.linux.org.uk 1.1215.33.1 # Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5 # into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-pcmcia # -------------------------------------------- # 03/05/28 dwmw2@infradead.org 1.1215.34.1 # MTD and JFFS2 update. # # - JFFS2 bugfixes and performance improvements # - Support for 64-bit flash arrangements # - Optimise for linear mappings of flash, without out-of-line access functions # - New map drivers # - Updated NAND flash support, new board drivers # - Support for DiskOnChip Millennium Plus and INFTL translation layer # - Clean up all translation layers with a single blkdev helper library. # - Fix races in MTD device registration/deregistration # - Add support for new flash chips # - Clean up partition parsing code # # More detailed comments in per-file changelogs. # -------------------------------------------- # 03/05/28 dwmw2@infradead.org 1.1215.34.2 # Final cleanups for MTD merge. # -------------------------------------------- # 03/05/28 torvalds@home.transmeta.com 1.1215.33.2 # Make zlib_inflate look more like ANSI C code. # # Anybody who still thinks K&R makes sense should just be shot. # -------------------------------------------- # 03/05/28 torvalds@home.transmeta.com 1.1215.33.3 # Merge master.kernel.org:/home/dwmw2/BK/mtd-forlinus-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/28 Matt_Domsch@dell.com 1.1215.35.1 # dynids: use list_add_tail # # instead of list_add, such that later entries come later in the scanned list. # -------------------------------------------- # 03/05/28 Matt_Domsch@dell.com 1.1215.35.2 # dynids: free dynids on driver unload # -------------------------------------------- # 03/05/28 torvalds@home.transmeta.com 1.1215.31.4 # Merge bk://bk.arm.linux.org.uk/linux-2.5-rmk # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/28 torvalds@home.transmeta.com 1.1215.36.1 # Merge bk://ppc.bkbits.net/for-linus-ppc # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/28 davem@nuts.ninka.net 1.1215.16.43 # [TCP]: Do not access inet_sk() of a time-wait bucket. # # Bug discovered by Mandred Spraul. # -------------------------------------------- # 03/05/28 davem@nuts.ninka.net 1.1215.36.2 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/05/28 jgarzik@redhat.com 1.1215.33.4 # [netdrvr tlan] cleanup # # * use pci_{request,release}_regions for PCI devices # * use alloc_etherdev (fixes race) # * propagate error returns from pci_xxx function errors # -------------------------------------------- # 03/05/28 david@gibson.dropbear.id.au 1.1215.36.3 # [PATCH] Update orinoco driver to 0.13e # # This updates the orinoco driver, fixing many bugs and adding some minor # features. It also adds a new module, orinoco_tmd for devices based on # the TMD7168 PCI<->PCMCIA adaptor. # -------------------------------------------- # 03/05/28 jgarzik@redhat.com 1.1215.33.5 # [netdrvr] s/init_etherdev/alloc_etherdev/ in code comments, # in 8139too and pci-skeleton drivers. # -------------------------------------------- # 03/05/29 jgarzik@redhat.com 1.1215.33.6 # [netdrvr 8139too] respond to "isn't this racy?" comment # -------------------------------------------- # 03/05/29 jgarzik@redhat.com 1.1215.33.7 # Merge redhat.com:/garz/repo/init-etherdev-2.5 # into redhat.com:/garz/repo/net-drivers-2.5 # -------------------------------------------- # 03/05/28 anton@samba.org 1.1215.36.4 # [PATCH] compat_wait4 fix # # sys_wait4 can return a pid and in this case we want to copy the struct # rusage out to userspace. # -------------------------------------------- # 03/05/29 jgarzik@redhat.com 1.1215.33.8 # [netdrvr r8169] use alloc_etherdev, pci_disable_device # -------------------------------------------- # 03/05/28 davem@nuts.ninka.net 1.1215.37.1 # [SPARC64]: Fix probe error handling in envctrl.c driver. # -------------------------------------------- # 03/05/28 davem@nuts.ninka.net 1.1215.37.2 # [SPARC64]: Fix probe error handling in bbc_{envctrl,i2c}.c driver. # -------------------------------------------- # 03/05/29 anton@samba.org 1.1215.30.2 # ppc64: Always pass non segment faults on the 0xc region up to do_page_fault # -------------------------------------------- # 03/05/29 dwmw2@infradead.org 1.1215.36.5 # Merge master.kernel.org:/home/torvalds/BK/linux-2.5 # into infradead.org:/inst/bk/linus-2.5 # -------------------------------------------- # 03/05/29 yoshfuji@linux-ipv6.org 1.1215.38.1 # [IPV6]: Fix default router selection in some cases. # -------------------------------------------- # 03/05/29 davem@nuts.ninka.net 1.1215.37.3 # [SPARC64]: Do not export {un,}register_ioctl32_converstion twice. # -------------------------------------------- # 03/05/29 davem@nuts.ninka.net 1.1215.38.2 # Merge bk://kernel.bkbits.net/acme/net-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/05/29 hch@lst.de 1.1215.38.3 # [NET]: Remove sdla from setup.c # -------------------------------------------- # 03/05/29 hch@lst.de 1.1215.37.4 # [SPARC64]: Kill sys_aplib. # -------------------------------------------- # 03/05/29 chas@cmf.nrl.navy.mil 1.1215.38.4 # [ATM]: lane and mpoa module refcounting and locking cleanup. # -------------------------------------------- # 03/05/29 jgarzik@redhat.com 1.1215.38.5 # [ROSE]: Kill kfree of net_device->name. # -------------------------------------------- # 03/05/29 yoshfuji@linux-ipv6.org 1.1215.38.6 # [IPV6]: Add ip6frag sysctls. # -------------------------------------------- # 03/05/29 dwmw2@infradead.org 1.1215.36.6 # Fix some accidental regressions which slipped in with the MTD merge. # # - Unrevert strncpy->strlcpy change in JEDEC chip driver # - Fix partition handling in physmap map driver # - Switch sa1100-flash map driver back to rmk's version. # -------------------------------------------- # 03/05/29 paulus@samba.org 1.1215.1.30 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/05/29 davem@nuts.ninka.net 1.1215.38.7 # [NET}: Fix typo in sock_set_flag changes. # -------------------------------------------- # 03/05/30 anton@samba.org 1.1215.39.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/tmp3 # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.36.7 # [PATCH] fix calls to do_fork() # # Change the m68knommu specific calls to do_fork() to match # its pid return vlue. # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.36.8 # [PATCH] remove obsolete BLKMEM driver reference # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.36.9 # [PATCH] cleanup is_in_rom() checker # # Clean up the dodgy is_in_rom() code for m68knommu targets. # # Now that all the m68knommu sub-architectures (68x328, 68360 # and ColdFire) have the same memory setup support we can # make this code the same for all targets. # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.36.10 # [PATCH] fix broken trace flag check in 68328 system call entry # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.36.11 # [PATCH] security init call support in linker script # # Linker script updates for m68knommu architecture: # # - fix _ramend for DragonEngine2 board # - add security init call support # -------------------------------------------- # 03/05/29 shaggy@shaggy.austin.ibm.com 1.1215.32.2 # JFS: resize fixes # # Bmap control page was not always being updated. # Superblock's s_size field was incorrectly set on big-endian hardware. # -------------------------------------------- # 03/05/29 shaggy@shaggy.austin.ibm.com 1.1215.40.1 # Merge jfs@jfs.bkbits.net:linux-2.5 # into shaggy.austin.ibm.com:/shaggy/bk/jfs-2.5 # -------------------------------------------- # 03/05/29 alan@lxorguk.ukuu.org.uk 1.1215.33.9 # [netdrvr tlan] fix 64-bit issues # -------------------------------------------- # 03/05/29 perex@suse.cz 1.1215.36.12 # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.1 # o drivers/bluetooth/hci_usb: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.2 # o drivers/isdn/hisax/st5481: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.3 # o drivers/media/video/cpia_usb: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.4 # o drivers/net/irda/irda-usb: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.5 # o drivers/class/audio: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.6 # o drivers/class/bluetty: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.7 # o drivers/class/cdc-acm: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.8 # o drivers/class/usb-midi: initialize struct usb_driver ->owner field # # And remove MOD_{INC,DEC}_USE_COUNT # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.9 # o drivers/usb/core/devio: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.10 # o drivers/usb/core/hub: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.11 # o drivers/usb/image/hpusbscsi: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.12 # o drivers/usb/image/microtek: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.13 # o drivers/usb/image/scanner: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.14 # o drivers/usb/input/aiptek: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.15 # o drivers/usb/input/hid-core: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.16 # o drivers/usb/input/hiddev: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.17 # o drivers/usb/input/kbtab: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.18 # o drivers/usb/input/powermate: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.19 # o drivers/usb/input/usbkbd: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.20 # o drivers/usb/input/usbmouse: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.21 # o drivers/usb/input/wacom: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.22 # o drivers/usb/input/xpad: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.23 # o drivers/usb/media/dabusb: initialize struct usb_driver ->owner field # # Also remove MOD_{INC,DEC}_USE_COUNT # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.24 # o drivers/usb/media/dsbr100: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.25 # o drivers/usb/media/ibmcam: remove MOD_{INC,DEC}_USE_COUNT # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.26 # o drivers/usb/media/konicawc: remove MOD_{DEC,INC}_USE_COUNT # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.27 # o drivers/usb/media/ov511: initialize struct usb_driver ->owner field # # Also remove MOD_{INC,DEC}_USE_COUNT # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.28 # o drivers/usb/media/pwc-if: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.29 # o drivers/usb/media/se401: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.30 # o drivers/usb/media/stv680: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.31 # o drivers/usb/media/ultracam: remove MOD_{INC,DEC}_USE_COUNT # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.32 # o drivers/usb/media/vicam: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.33 # o drivers/usb/misc/auerswald: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.34 # o drivers/usb/misc/emi26: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.35 # o drivers/usb/misc/rio500: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.36 # o drivers/usb/misc/usblcd: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.37 # o drivers/usb/net/catc: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.38 # o drivers/usb/net/cdc-ether: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.39 # o drivers/usb/net/pegasus: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.40 # o drivers/usb/net/rtl8150: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.41 # o drivers/usb/net/usbnet: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.42 # o drivers/usb/serial/belkin_sa: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 reeja.john@amd.com 1.1215.33.10 # [netdrvr amd8111e] interrupt coalescing, libmii, bug fixes # # * Dynamic interrupt coalescing # * mii lib support # * dynamic IPG support (disabled by default) # * jumbo frame fix # * vlan fix # * rx irq coalescing fix # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.43 # o drivers/usb/serial/cyberjack: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.44 # o drivers/usb/serial/digi_acceleport: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.45 # o drivers/usb/serial/empeg: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.46 # o drivers/usb/serial/ftdi_sio: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.47 # o drivers/usb/serial/io_edgeport: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 shemminger@osdl.org 1.1215.33.11 # [netdrvr e100] initialize callbacks before registering netdev # # Ouch. # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.48 # o drivers/usb/serial/io_ti: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/30 anton@samba.org 1.1215.39.2 # ppc64: Add some branch prediction # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.49 # o drivers/usb/serial/ipaq: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.50 # o drivers/usb/serial/ir-usb: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.51 # o drivers/usb/serial/keyspan: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.52 # o drivers/usb/serial/kl5kusb105: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.53 # o drivers/usb/serial/mct_u232: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/30 anton@samba.org 1.1215.42.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/tmp3 # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.54 # o drivers/usb/serial/omninet: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.55 # o drivers/usb/serial/pl2303: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.56 # o drivers/usb/serial/safe_serial: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 greg@kroah.com 1.1215.43.1 # USB: build gadget drivers if they are built into the kernel. # # Somehow this got merged away... # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.57 # o drivers/usb/serial/usb-serial: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.58 # o drivers/usb/serial/visor: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.59 # o drivers/usb/serial/whiteheat: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.60 # o drivers/usb/storage/usb: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/29 acme@conectiva.com.br 1.1215.41.61 # o drivers/usb/usb-skeleton: initialize struct usb_driver ->owner field # -------------------------------------------- # 03/05/30 anton@samba.org 1.1215.42.2 # ppc64: remove ioperm # -------------------------------------------- # 03/05/29 greg@kroah.com 1.1215.43.2 # USB: fix up unusual_devs.h merge mess # # Thanks to Per Winkvist for the info and patches to do this. # -------------------------------------------- # 03/05/29 greg@kroah.com 1.1215.44.1 # Merge http://mdomsch.bkbits.net/linux-2.5-dynids # into kroah.com:/home/greg/linux/BK/pci-2.5 # -------------------------------------------- # 03/05/29 oliver@neukum.org 1.1215.43.3 # [PATCH] USB: allocate memory for reset earlier # # if we fail with -ENOMEM, we should do it before the device must be # reparsed. # -------------------------------------------- # 03/05/29 mdharm-usb@one-eyed-alien.net 1.1215.43.4 # [PATCH] USB: storage: abort and disconnect handling. # # This patch re-organizes abort handling and enhances disconnect handling. # # Not only do we keep track of the state (ABORTING, IDLE, etc.), but during # an abort we now introduce the idea of 'okay to send' or not. The idea is # that we can now implement reset-after-abort properly. # # We also track if we're disconnecting, and use that data to determine if we # can submit URBs or not. Which means we can now disconnect during an abort. # # This patch is from Alan Stern. # -------------------------------------------- # 03/05/29 mdharm-usb@one-eyed-alien.net 1.1215.43.5 # [PATCH] USB: storage: collapse one-use functions # # This patch collapses some one-use functions into their callers. It also # clones some code for control transfers so we can implement abortable # control transfers with timeout. # # This patch is from Alan Stern. # # Remove usb_stor_bulk_msg() and usb_stor_interrupt_msg(). Move their # functionality into usb_stor_bulk_transfer_buf() and # usb_stor_intr_transfer(). # # Move the functionality of usb_stor_control_msg() into # usb_stor_ctrl_transfer(). # # Remove the unused act_len parameter from usb_stor_intr_transfer(). # -------------------------------------------- # 03/05/29 hch@lst.de 1.1215.43.6 # [PATCH] use second arg to scsi_add_host in usb storage # # That way we don't need the addition scsi_set_device call. # -------------------------------------------- # 03/05/29 hch@lst.de 1.1215.43.7 # [PATCH] fix scsi_register_host abuse in usb scanner drivers # # They should be using scsi_add_host directly. I had to rewrite # half of the drivers, though to fix horrible braindamage like # leaving dangling scsi structures around after ->disconnect. # # Gettig rid of the remaining scsi_register_host callers is required # for the scsi stack to move forward so please try to forward this # to Linus in a timely mannor, thanks! # -------------------------------------------- # 03/05/29 torvalds@home.transmeta.com 1.1215.45.1 # Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/29 elenstev@mesatop.com 1.1215.45.2 # [PATCH] K&R to ANSI C conversions for zlib # # Here are some more K&R to ANSI C conversions. # -------------------------------------------- # 03/05/29 elenstev@mesatop.com 1.1215.45.3 # [PATCH] Yet more K&R to ANSI C conversions # # More K&R to ANSI C conversions for lib/zlib_deflate. # -------------------------------------------- # 03/05/29 jgarzik@redhat.com 1.1215.33.12 # Cset exclude: shemminger@osdl.org|ChangeSet|20030529205634|46794 # # The needed fix winds up breaking SG, checksumming, and other stuff # in the process. # -------------------------------------------- # 03/05/29 jgarzik@redhat.com 1.1215.45.4 # Merge redhat.com:/garz/repo/linus-2.5 # into redhat.com:/garz/repo/net-drivers-2.5 # -------------------------------------------- # 03/05/29 scott.feldman@intel.com 1.1215.45.5 # [netdrvr e100] move register_netdev below netdev struct init # # (i.e. the better fix) # -------------------------------------------- # 03/05/29 chas@cmf.nrl.navy.mil 1.1215.38.8 # [ATM]: HE driver coding style conformance. # -------------------------------------------- # 03/05/29 chas@cmf.nrl.navy.mil 1.1215.38.9 # [ATM]: HE driver misc irq handler cleanups. # -------------------------------------------- # 03/05/29 chas@cmf.nrl.navy.mil 1.1215.38.10 # [ATM]: Move rategrid off stack in HE driver. # -------------------------------------------- # 03/05/29 shemminger@osdl.org 1.1215.38.11 # [BRIDGE]: Make delete bridge work with current unregister semantics. # -------------------------------------------- # 03/05/29 shemminger@osdl.org 1.1215.38.12 # [NET]: Sysfs netdev cleanup and bugfix. # # A couple of bugs in netdev_unregister_sysfs; still working on the harder # refcount issues. # - if driver sets get_stats after register then unregister # will attempt to delete kobject that has not be initialized. # - unregister should call kobject_unregister not kobject_del. # # cleanup's: # - use strlcpy instead of snprintf # - don't need to memset the stats kobject # -------------------------------------------- # 03/05/29 jmm@informatik.uni-bremen.de 1.1215.38.13 # [CRYPTO]: Default CRYPTO and MD5 to y if IPV6_PRIVACY is enabled. # -------------------------------------------- # 03/05/29 shemminger@osdl.org 1.1215.38.14 # [NET]: Kill deprecated if_port_text and users. # -------------------------------------------- # 03/05/29 davem@nuts.ninka.net 1.1215.38.15 # [ATM]: Fix driver Makefile clean-files. # -------------------------------------------- # 03/05/29 greg@kroah.com 1.1215.41.62 # Merge bk://kernel.bkbits.net/acme/usb-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/05/29 davem@kernel.bkbits.net 1.1215.46.1 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.45.6 # [PATCH] conditional ROMfs copy for ARNEWSH/5206 setup # # Make the ROMfs copy in the startup code for ARNEWSH/5260 board # conditional on actually using a ROMfs setup. # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.45.7 # [PATCH] support BOOTPARAM's on m68knommu/5206 targets # # Support pre-configured boot arguments on m68knommu/5206 targets. # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.45.8 # [PATCH] support BOOTPARAM's on m68knommu/5206e targets # # Support pre-configured boot arguments on m68knommu/5206e targets. # -------------------------------------------- # 03/05/29 gerg@snapgear.com 1.1215.45.9 # [PATCH] m68knommu/pilot startup copy init segment to RAM # # The m68knommu/pilot startup code is not copying the init segment to # RAM currently. Fix it to copy all of the data and init sections to RAM. # -------------------------------------------- # 03/05/29 davem@kernel.bkbits.net 1.1215.45.10 # Merge davem@nuts.ninka.net:/home/davem/src/BK/sparc-2.5 # into kernel.bkbits.net:/home/davem/sparc-2.5 # -------------------------------------------- # 03/05/29 bcollins@debian.org 1.1215.41.63 # [PATCH] USB Multi-input quirk # -------------------------------------------- # 03/05/29 david-b@pacbell.net 1.1215.41.64 # [PATCH] USB: ethernet "gadget", rx overflows happen # # I tightened up rx overflow logic in the net2280 driver # a while back, and it broke MTU size packets in this # driver (host pads them out). This patch accomodates it # by allocating a slightly larger buffer (almost 3*512). # -------------------------------------------- # 03/05/29 hwahl@hwahl.de 1.1215.41.65 # [PATCH] USB: Patch for Samsung Digimax 410 # # *** a/drivers/usb/storage/unusual_devs.h 2003-05-22 20:54:26.000000000 +0200 # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.1 # [PATCH] fix typo in coda # # We want an "|" in there, not "||". # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.2 # [PATCH] Fix suspend with pccardd running # # From: Pavel Machek # # This fixes suspend when pccards are used... # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.3 # [PATCH] fix oops on resume from apm bios initiated suspend # # From: Milton Miller # # mm is NULL for kernel threads without their own context. active_mm is # maintained the one we lazly switch from. # # Without this patch, apm bios initiated suspend events (eg panel close) # cause an oops on resume in the LDT restore, killing kapmd, which causes # further events to not be polled. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.4 # [PATCH] export mmu_cr4_features to modules # # From: Jan Marek # # The DRM modules (i810) need this symbol. # # As this is a special-case for one particular in-kernel module I changed Jan's # patch from EXPORT_SYMBOL to EXPORT_SYMBOL_GPL. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.5 # [PATCH] [VISWS] irqreturn_t conversion # # From: Andrey Panin # # This small patch (against 2.5.70) updates visws_apic.c in accordance # with linux irq handling changes. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.6 # [PATCH] Fix CONFIG_PROCFS=n # # From: Manfred Spraul # # three build fixes for CONFIG_PROC_FS=n: # # include/linux/procfs.h: # # - add missing proc_pid_unhash, proc_pid_flush declarations. static # inline functions that do nothing. # # - move semicolons around for kclist_{add,del}. gcc-3.2.2 doesn't like # the current syntax. # # drivers/net/pppoe.c: # # - proc_net doesn't exist if CONFIG_PROC_FS=n. # # drivers/scsi/scsi_priv.h: # # - add missing brackets to macro definition. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.7 # [PATCH] zoran user-pointer fix # # From: Hollis Blanchard # # Fix a user pointer deref, found by the Stanford checker. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.8 # [PATCH] irq balance logic fix # # From: Andi Kleen # # The logic is: the global variable is set to the magic value # IRQBALANCE_CHECK_ARCH. It can be overwritten by a __setup function. If # the magic value is still set when the irq balancer is started it asks the # subarchitecture using the NO_BALANCE_IRQ macro. This is defined to a # genapic field in the generic architecture, otherwise constant. Then the # global variable is set and when it is true no balancing happens. # # Previously I had this wrong in that it always disabled it. # # This part should be correct, but it still doesn't seem to work. # # (I left the printk in there until the problem is debugged, could be removed # of course) # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.9 # [PATCH] kill lock_kernel() in inode_setattr() # # All we're doing in there is writing things into the inode. I see no need for # the lock_kernel(). # # And holding lock_kernel() across mark_inode_dirty() hurts on big SMP. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.10 # [PATCH] i2o memleak comment # # From: Andy Whitcroft # # There's a spot in i2o where we deliberately leak some memory when the # hardware plays up. The alternative is to let the hardware scribble on it at # some unknown time in the future. # # Things like the Stanford checker keep alleging that this is a bug. So shut # them up with a comment # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.11 # [PATCH] write_one_page() fixlets # # - set the number of pages to be written to "1". # # - Don't test PG_writeback twice. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.12 # [PATCH] speed up the unlink speedup # # I'm not sure why I used igrab() in unlink(). igrab takes the oft-taken # inode_lock. # # The caller has a ref, so a simple increment of i_count will suffice. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.13 # [PATCH] Remove unneeded fcntl check # # The NR_OPEN check in F_DUPFD is unneeded. viro says: # # "We check the limits in locate_fd() (called by dupfd()). Check for NR_OPEN # can (and should) be dropped - locate_fd() will never go beyond that # (expand_fd() will check it and refuse to go). # # "IOW, simply lose the check. We _might_ want to check signedness, but that's # it (IOW, check that arg will fit into 0..MAX_INT; second argument of dupfd() # is an int). OTOH, we might actually make dupfd() et.al. take unsigned long # and kill that crap completely." # # And indeed, the signedness is suspicious, so make various things in there # unsigned too. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.14 # [PATCH] unregister_netdev cleanups # # Replace # # rtnl_lock(); # register_netdevice(dev); # rtnl_unlock(); # # with the equivalent # # register_netdev(); # # in numerous places. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.15 # [PATCH] support 64 bit pci_alloc_consistent # # From: Jes Sorensen # # This is patch which provides support for 64 bit address allocations from # pci_alloc_consistent(), based on the address mask set through # pci_set_consistent_dma_mask(). This is necessary on some platforms which # are unable to provide physical memory in the lower 4GB block and do not # provide IOMMU support for cards operating in certain bus modes, such as # PCI-X on the SGI SN2. # # The default mask for pci_alloc_consistent() is still 32 bit as there are 64 # bit capable hardware out there that doesn't support 64 bit addresses for # descripters etc. Likewise, platforms which provide IOMMU support in all # bus modes can ignore struct pci_dev->consistent_dma_mask and just return a # 32 bit address as before. # # The patch also includes changes to tg3.c to make it use the new api as well # as a documentation update. I have done my best on the documentation part, # if anyone feel the can make my scribbles clearer, please do. # # Thanks to Dave Miller, Grant Grundler, James Bottomley, Colin Ngam, and # Jeremy Higdon for input and code/documentation portions. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.16 # [PATCH] svcsock use-after-free fix # # From: Neil Brown # # Extract ->stamp from skb *before* freeing it in svcsock.c # # As we sometime copy and free an skb, and sometime us it in-place, we must # be careful to extract information from it *before* it might be freed, not # after. # # Manfred's page-unmapping debug patch found this one. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.17 # [PATCH] Fix writev when a segment generates EFAULT # # From: Martin Schwidefsky # # If writev() is passed a vector in which the second or later segment generates # a fault it will currently return -EFAULT. # # It shouldn't. It should write what it can and return the number of bytes # which were successfully copied. # # Fix that up by writing the partial result and then returning the right value. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.47.18 # [PATCH] Fixes trivial error in # # From: Herbert Xu # # This patch adds a pair of missing quotes. # -------------------------------------------- # 03/05/29 akpm@digeo.com 1.1215.38.16 # [NET]: Convert rtnl_lock/register_netdevice/rtnl_unlock to register_netdev. # -------------------------------------------- # 03/05/29 davem@kernel.bkbits.net 1.1215.46.2 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/05/29 torvalds@home.transmeta.com 1.1215.47.19 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/29 torvalds@home.transmeta.com 1.1215.45.11 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/30 paulus@samba.org 1.1215.1.31 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/05/30 shaggy@shaggy.austin.ibm.com 1.1215.45.12 # Merge jfs@jfs.bkbits.net:linux-2.5 # into shaggy.austin.ibm.com:/shaggy/bk/jfs-2.5 # -------------------------------------------- # 03/05/30 greg@kroah.com 1.1215.41.66 # [PATCH] USB: remove some old references to /proc/bus/usb/drivers # # This is needed, as the file was deleted over a year ago... # -------------------------------------------- # 03/05/30 stern@rowland.harvard.edu 1.1215.41.67 # [PATCH] USB: fix address assignment after device reset # # Until my ambitious project gets going, this patch at least fixes the # problem of assigning a device's new address following a device reset. # The only change needed to David's original suggestion was to handle the # pathway involved in registering root hubs. # -------------------------------------------- # 03/05/30 proski@gnu.org 1.1215.41.68 # [PATCH] USB: name uninitialized in scanner.c # # Linux 2.5.69-bk18 prints something strange to the kernel log when the USB # scanner is attached. It turns out drivers/usb/image/scanner.c uses # uninitialized variable "name" in probe_scanner() in the printk() call. # That means that random memory is read and output to the kernel log. # -------------------------------------------- # 03/05/30 hch@lst.de 1.1215.48.1 # [PATCH] driver model for scsi upper drivers, take 2 # # On Tue, May 27, 2003 at 09:32:18AM +0200, Christoph Hellwig wrote: # > - removed the tape sysfs pseudodevice crap that caused hangs # > - switched sg to a class_interface. This means sg can be used # > on devices already claimed be an upper driver again. This # > also means I had to remove the sg sysfs attributes temporarily # > because the old mechanism is gone, but I'll restore them # > differently in a followon patch. # # Yikes, this was the old patch again. Here's the right one: # -------------------------------------------- # 03/05/30 jejb@raven.il.steeleye.com 1.1215.48.2 # Fix __exit routine of NCR_D700 # -------------------------------------------- # 03/05/30 greg@kroah.com 1.1215.41.69 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/05/30 hch@lst.de 1.1215.48.3 # [PATCH] LDM-based scsi host lookup # # Replace scsi_host_hn_get with scsi_host_lookup that walks # through the shost class and gets a proper reference to the # host. This should fix the OOPS that Douglas saw last week. # -------------------------------------------- # 03/05/30 hch@lst.de 1.1215.48.4 # [PATCH] switch /proc/scsi/scsi to seq_file and proper device model # -------------------------------------------- # 03/05/30 hch@lst.de 1.1215.48.5 # [PATCH] kill scsi_host_get_next # # The only reamining user was a horrible hack with a big XXX: # in scsi_pc98.c. Remove it and add an even bigger XXX there, # we don't want to keep this function (and the scsi hostlist) # around just for this. # -------------------------------------------- # 03/05/30 B.Zolnierkiewicz@elka.pw.edu.pl 1.1215.49.1 # [PATCH] allow "hdX=scsi" for modular scsi/ide-scsi # # Allow a user to mark a device as for scsi # emulation at boot even with modular scsi/ide-scsi. # (from 2.4 patch by Matan Ziv-Av) # -------------------------------------------- # 03/05/30 B.Zolnierkiewicz@elka.pw.edu.pl 1.1215.49.2 # [PATCH] kill "hdX=noremap" # # Since Andries killed ide-geometry, remove "hdX=noremap" # parameter as it is no longer needed. # -------------------------------------------- # 03/05/30 B.Zolnierkiewicz@elka.pw.edu.pl 1.1215.49.3 # [PATCH] fix two IDE list_head problems # # Fix two problems related to list_head's (there are more, wip). # Second bug was uncovered by wli's list_head debugging patch, thanks wli! # # - Remove ata_unused list and use &idedefault_driver->drives only, # fixes list corruption (ata_unused will be later ressurected for hotplug). # # - Do not add same device twice to &idedefault_driver->drives, triggered # by first calling ide_unregister_subdriver() and later ata_attach(). # -------------------------------------------- # 03/05/30 hch@lst.de 1.1215.48.6 # [PATCH] kill remaining direct uses of scsi_register_host # # Together with a patch for the usb imaging drivers I just sent to # Greg this will allow us to get rid of scsi_register_host as exported # API, leaving it only for use of scsi_module.c. # -------------------------------------------- # 03/05/30 axboe@suse.de 1.1215.49.4 # [PATCH] copy the tag_map # # From: Milton Miller # -------------------------------------------- # 03/05/30 axboe@suse.de 1.1215.49.5 # [PATCH] ide-cd buglets # # Assorted small ide-cd fixes, found and fixed by Andy Polyakov # . # # - CHECK_CONDITION really wants to be SAM_STAT_CHECK_CONDITION, the damn # bit shift by one bit again # # - Set sense_len correctly # # - Do post_transform() on the right buffer. # -------------------------------------------- # 03/05/30 axboe@suse.de 1.1215.49.6 # [PATCH] scsi_ioctl HZ fixes # # According to http://www.torque.net/sg/p/sg_v3_ho.html, SG HOWTO, # SG_[GET|SET]_TIMEOUTs are measured in "jiffies," while timeout field # of SG_IO structure - in milliseconds. Inconsistent? Yes. Yet it's no # excuse to disregard the specification. "Jiffies" are USER_HZ, 10ms on # IA-32 platforms and has to be scaled to kernel "jiffies," as suggested # below. As for "(jiffies - start_time) * (1000 / HZ)" vs. # "((jiffies - start_time) * 1000) / HZ." Just think that HZ is 1024 on # some platforms... # -------------------------------------------- # 03/05/30 jejb@raven.il.steeleye.com 1.1215.48.7 # Automerge # -------------------------------------------- # 03/05/30 axboe@suse.de 1.1215.50.1 # [PATCH] ide-cd/scsi/block fixups for SG_IO # # - Kill the bogus ret transformation in block/ioctl.c if we return # -EINVAL, doesn't make any sense. # # - Don't allow sg_reserved_size to be set bigger than a request we can # deal with... # # - timeout fixes. # # - Cleanup of user access. # # - Set SAM_STAT_CHECK_CONDITION, not CHECK_CONDITION which needs to be # bit shifted 1 up. # # - Set sense_len correctly. # # - Account sense_len correctly, don't just increment by 1... # # - Use the correct pointer in post transform. # # - Fix oops in bio_map_user(), it must get the extra reference prior to # calling bio_unmap_user() itself too. # -------------------------------------------- # 03/05/30 torvalds@home.transmeta.com 1.1215.49.7 # Heh. Jens clashes with himself. # -------------------------------------------- # 03/05/30 torvalds@home.transmeta.com 1.1215.45.13 # Merge http://jfs.bkbits.net/linux-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/30 akpm@digeo.com 1.1215.45.14 # [PATCH] fix generic_file_write() # # The recent writev() fix broke the invariant that ->commit_write _must_ be # called after a successful ->prepare_write(). It leaves ext3 with a # transaction stuck open and the filesystem locks up. # -------------------------------------------- # 03/05/30 greg@kroah.com 1.1215.41.70 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/05/30 henning@meier-geinitz.de 1.1215.41.71 # [PATCH] USB: new vendor/product ids for scanner driver # # This patch adds some new vendor/product ids for the USB scanner # driver. # -------------------------------------------- # 03/05/30 paulkf@microgate.com 1.1215.45.15 # [PATCH] tty_register_driver # # This patch reinstates the ability of tty devices to use dynamically # allocated major numbers yet specify the minor numbers statically. # # The synclink drivers do this. # -------------------------------------------- # 03/05/30 torvalds@penguin.transmeta.com 1.1215.41.72 # Merge bk://kernel.bkbits.net/gregkh/linux/linus-2.5 # into penguin.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/05/30 bellucda@tiscali.it 1.1215.51.1 # [PATCH] USB: replaced BKL in rio500.c # -------------------------------------------- # 03/05/31 anton@samba.org 1.1215.41.73 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/tmp3 # -------------------------------------------- # 03/05/30 mochel@osdl.org 1.1215.52.1 # Merge bk://ldm.bkbits.net/linux-2.5-core # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/05/30 dougg@torque.net 1.1215.53.1 # [PATCH] sg driver for lk 2.5.70 # # This is a bug fix for a flawed patch I put in lk 2.4.19 # (sg version 3.1.24) and has been carried through into # the 2.5 series. Thanks to Andy Polyakov # for pointing this out (more than once). # # The sg.h header didn't get updated last time I submitted # an sg patch so this patch also addresses that. # -------------------------------------------- # 03/05/30 greg@kroah.com 1.1215.54.1 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/05/30 jejb@raven.il.steeleye.com 1.1215.48.8 # Automerge # -------------------------------------------- # 03/05/30 jejb@raven.il.steeleye.com 1.1215.48.9 # Merge raven.il.steeleye.com:/home/jejb/BK/scsi-sg-2.5 # into raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5 # -------------------------------------------- # 03/05/31 paulus@samba.org 1.1215.1.32 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/05/30 acme@conectiva.com.br 1.1215.55.1 # o n_hdlc: CodingStyle cleanups and removal of old stuff # # - remove include kerneld.h, long gone # - some 80 column reformatting # - removal of typedefs # - c99 style documentation, using the existing function documentation # - add MODULE_AUTHOR # - remove GET_USER, COPY_TO_USER and friends # - remove ssize_t typedef, already in the kernel headers # - remove rw_count_t and rw_ret_t, use simple int and size_t as in the # tty ops prototypes and avoiding casts for return # - make strings in printk in init/exit module routines __initdata/__exitdata # saving some bytes after module init and for the case where this driver is # statically linked in the kernel (__exitdata is trown away) # # This makes this driver comply with parts of CodingStyle (more to be done) and # makes it looks more like the rest of the kernel, making it easier to read/debug. # # Have been using this modifications with ADSL/syncppp for some time, working well. # -------------------------------------------- # 03/05/31 davem@nuts.ninka.net 1.1215.56.1 # [SPARC64]: Fix sys_shmat handling for 64-bit binaries. # -------------------------------------------- # 03/05/31 herbert@gondor.apana.org.au 1.1215.57.1 # [XFRM]: u64 --> __u64 in linux/xfrm.h # -------------------------------------------- # 03/05/31 perex@suse.cz 1.1215.36.13 # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # -------------------------------------------- # 03/05/31 vandrove@vc.cvut.cz 1.1215.56.2 # [PATCH] matroxfb update to new API # # This updates the matroxfb driver to the new framebuffer API. # # I'm sorry that it is quite large, but due to completely changed # underlying API there is no reasonable way how to split it into smaller # pieces. # # - Removed support for text mode. No way for it with current API. # - Removed support for hardware cursor. Generic cursor code has enough # troubles as is, in software mode. # - No reasonable fbset support... It is especially annoying on multihead # system, as 'stty cols XXX rows YYY' does not change pixclock... # - Removed fastfont support. No way for it with current API. # # (Mis)features inherited from generic fbdev API: # - Cursor on other framebuffers than primary one does not blink. # - Contents of visible, but not foreground, display is not updated. # -------------------------------------------- # 03/05/31 elenstev@mesatop.com 1.1215.56.3 # [PATCH] More ANSI C cleanup of zlib # # More zlib K&R to ANSI C function header conversions. # -------------------------------------------- # 03/05/31 manfred@colorfullife.com 1.1215.56.4 # [PATCH] Prepare for page unmapper # # Avoid touching the next page in the NMI handler stack validity check. # # That way, we can start unmapping pages that aren't in use, without # triggering this case. # -------------------------------------------- # 03/05/31 acme@conectiva.com.br 1.1215.56.5 # o net: reduce the data dependency of struct sock/struct tcp_tw_bucket # # With this the area that is shared among struct sock and struct tcp_tw_bucket # is exact, i.e. there is no fields that are in struct sock and only reused # for other reasons in tcp_tw_bucket, while keeping both struct free of holes. # -------------------------------------------- # 03/06/01 anton@samba.org 1.1215.41.74 # ppc64: threaded coredump support # -------------------------------------------- # 03/06/01 anton@samba.org 1.1215.41.75 # ppc64: fix copy_from_user leak, from Milton Miller # -------------------------------------------- # 03/06/01 anton@samba.org 1.1215.41.76 # ppc64: Add warning for unhandled irqs # -------------------------------------------- # 03/05/31 davem@nuts.ninka.net 1.1215.58.1 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/05/31 herbert@gondor.apana.org.au 1.1215.58.2 # [XFRM_USER]: Fix xfrm_state_lookup args in xfrm_add_sa. # -------------------------------------------- # 03/05/31 herbert@gondor.apana.org.au 1.1215.58.3 # [XFRM_USER]: Rename confusing member of struct xfrm_usersa_id. # -------------------------------------------- # 03/05/31 kaber@trash.net 1.1215.58.4 # [PPP] fix memory leak in ioctl error path # -------------------------------------------- # 03/05/31 herbert@gondor.apana.org.au 1.1215.58.5 # [XFRM]: Too many reference drops of delpol in xfrm_policy_insert. # -------------------------------------------- # 03/06/01 davem@nuts.ninka.net 1.1215.56.6 # Merge bk://kernel.bkbits.net/acme/sock-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/06/01 davem@nuts.ninka.net 1.1215.56.7 # [XFRM]: Handle use_time expiration properly. # -------------------------------------------- # 03/06/01 perex@suse.cz 1.1215.36.14 # ALSA update 0.9.4 # - added drivers for Digigram VXPocket V2, VXPocket 440 (pcmcia) # - added driver for Digigram VXP220 V2/Mic (PCI) # - added driver Harmony chipset (parisc) # - added OPL4 driver # - code cleanups - removed 2.2 and 2.4 code # - nm256 driver - added Dell Latitude LS workaround # - ac97 driver - fixes in intialization # - usb audio driver - strlcat() fixes # -------------------------------------------- # 03/06/02 paulus@samba.org 1.1215.1.33 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/06/01 torvalds@home.transmeta.com 1.1215.36.15 # Merge http://linux-sound.bkbits.net/linux-sound # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/01 viro@parcelfarce.linux.theplanet.co.uk 1.1215.36.16 # [PATCH] Fix disk partitioning with multiple IDE disks # # Now that we use idedefault_driver.drives instead of ata_unused, the order # of drives on the driver->drives becomes significant; note that when we added # to ata_unused, we had done that to the end of list. # # So we should do the same with the "drives" list. # -------------------------------------------- # 03/06/01 greg@kroah.com 1.1215.54.2 # Cset exclude: greg@kroah.com|ChangeSet|20030529215347|05329 # -------------------------------------------- # 03/06/01 mdharm-usb@one-eyed-alien.net 1.1215.54.3 # [PATCH] USB: usb-storage: fix typo # # Typo fix. We need bitwise-OR here. # -------------------------------------------- # 03/06/01 mdharm-usb@one-eyed-alien.net 1.1215.54.4 # [PATCH] USB: usb-storage: timeouts and aborts # # This patch adds timeouts to usb_stor_control_msg(). Now we will no longer # have to use the usb_control_msg() routine in the usb core, so all our # control messages can be interrupted by scsi aborts or disconnects. # # This also includes the new serial-number for auto-REQUEST-SENSE change. # The new serial number has one bit toggled from the old, guaranteeing that # it is unique. # # Following a suggestion of David Brownell, this makes the transport-reset # function attempt to clear a halt condition on both bulk pipes even if one # of them fails. # -------------------------------------------- # 03/06/01 mdharm-usb@one-eyed-alien.net 1.1215.54.5 # [PATCH] USB: usb-storage: usb_stor_control_msg() and stuff # # This patch replaces usb_control_msg() with usb_stor_control_msg() everywhere, # which allows better abort/disconnect processing. # # Some comments are fixed-up. # # The GetMaxLUN function is moved later so URBs are initialized (now that it # uses the new control_msg() ). # # There is also some locking cleanup during reset. # -------------------------------------------- # 03/06/01 mdharm-usb@one-eyed-alien.net 1.1215.54.6 # [PATCH] USB: usb-storage: change result codes # # This patch changes to SAM_STAT_ result codes, which is (a) preferred, # according to the code comments, and (b) removes some odd-looking # bit-shifting. # -------------------------------------------- # 03/06/01 oliver@neukum.org 1.1215.54.7 # [PATCH] USB: return errors when disabling a port # # this allows us to learn about a port that cannot be disabled. It's needed # for a superrobust usb_reset_device(). # -------------------------------------------- # 03/06/01 mochel@osdl.org 1.1215.36.17 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/02 paulus@samba.org 1.1215.1.34 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.59.1 # [SOUND]: Revert buggy ALSA merge ioctl32 changes. # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.59.2 # [SOUND]: vx/vx_core.c needs linux/init.h # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.59.3 # [SOUND]: Fix sparc cs4231 driver build due to pcm list changes. # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.59.4 # [SPARC64]: Update defconfig. # -------------------------------------------- # 03/06/02 davidvh@cox.net 1.1215.48.10 # [PATCH] Fix compilation errors in ppa and imm modules # # This patch is a resend from LKML since it has yet to be applied in # either bk7. Patrick suggested I send it here. This patch fixes # compilation failures in ppa.c and imm.c that were introduced in 2.5.70-bk1. # # * Removes the 'int hostno' parameter from imm_proc_info(). # Parameter isn't used and breaks the pointer matching for Scsi_Host. # * Added the prototype for imm_proc_info() in imm.h # * Modified line 280 of ppa.c to match concept on line 263 of imm.c. # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.60.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/tmp3 # -------------------------------------------- # 03/06/02 mhoffman@lightlink.com 1.1215.61.1 # [PATCH] I2C: fix oops w83781d during rmmod # # This fixes the oops during w83781d module removal by putting the # subclient registration back in. While I was in there, I split # w83781d_detect in half in an attempt to reduce the goto madness. # # So, the /sys tree looks like this, where 48 & 49 are the subclients. # There are no entries (besides name & power) for the subclients. # # /sys/bus/i2c/ # |-- devices # | |-- 0-002d -> ../../../devices/pci0/00:02.1/i2c-0/0-002d # | |-- 0-0048 -> ../../../devices/pci0/00:02.1/i2c-0/0-0048 # | `-- 0-0049 -> ../../../devices/pci0/00:02.1/i2c-0/0-0049 # `-- drivers # |-- i2c_adapter # `-- w83781d # |-- 0-002d -> ../../../../devices/pci0/00:02.1/i2c-0/0-002d # |-- 0-0048 -> ../../../../devices/pci0/00:02.1/i2c-0/0-0048 # `-- 0-0049 -> ../../../../devices/pci0/00:02.1/i2c-0/0-0049 # # Also, I fixed a bug where this driver would request and release an # ISA region, then poke around in that region, then finally request # it again. # # This patch against 2.5.70 works for me vs. an SMBus adapter. It needs # re-testing against an ISA adapter since my particular chip is SMBus only. # -------------------------------------------- # 03/06/02 bunk@fs.tum.de 1.1215.54.8 # [PATCH] SECURITY_ROOTPLUG must depend on USB # # The following patch lets SECURITY_ROOTPLUG depend on USB (otherwise # there are link errors since Root Plug Support needs # usb_bus_list{,_lock}): # -------------------------------------------- # 03/06/02 greg@kroah.com 1.1215.54.9 # [PATCH] USB: add usb_find_device() function to USB core. # -------------------------------------------- # 03/06/02 greg@kroah.com 1.1215.54.10 # [PATCH] Root plug: remove USB bus walking functions, now use usb_find_device(). # # Also fixed compiler warnings about the dbg() function. # -------------------------------------------- # 03/06/02 wahrenbruch@kobil.de 1.1215.54.11 # [PATCH] USB: kobil_sct.c added support for KAAN SIM Reader # # as promised - here is the patch for 2.5.70: # Added support for KAAN SIM in kobil_sct. # -------------------------------------------- # 03/06/02 greg@kroah.com 1.1215.54.12 # [PATCH] USB: added .owner to kobil_sct driver # -------------------------------------------- # 03/06/02 greg@kroah.com 1.1215.59.5 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.60.2 # ppc64: remove sys32.S # -------------------------------------------- # 03/06/02 davidel@xmailserver.org 1.1215.62.1 # [PATCH] epoll race fix # # The was a race triggered by heavy MT usage that could have caused # processes in D state. Bad Davide, bad ... # # Also, the semaphore is now per-epoll-fd and not global. Plus some comment # adjustment. # -------------------------------------------- # 03/06/02 bcollins@debian.org 1.1215.62.2 # [PATCH] Update IEEE1394 (r946) # # ETH1394: Use 64bit EUI as the hardware address. # ETH1394: Support broadcast packets. # SBP2 : Fix max_payload for > S400 # CORE : Fix iso.c compilation by including linux/sched.h directly. # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.63.1 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/tmp3 # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.3 # [PATCH] Remove old code and macros # # Remove old code and debugging macros which were used by the cml1->kconfig # converter. # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.4 # [PATCH] Change P_ROOTMENU into a MENU_ROOT flag # # This changes P_ROOTMENU into a MENU_ROOT flag and also fixes some qconf # usability problems. # # Some gconf fixes by Romain Lievin . # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.5 # [PATCH] add new keywords to parser # # Add the following new keywords: def_tristate, def_bool, def_boolean, # select, enable and range. # # Add support for def_tristate and def_bool, which combines default and # bool/tristate into a single statement and a allows simpler definition # of derived symbols. # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.6 # [PATCH] expression support # # "default" accepts now not only a single symbol but also an expression # which can be assigned to boolean and tristate symbols. # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.7 # [PATCH] reverse dependency support # # The 'select' keyword defines a lower limit for symbols and allows to # select other symbols when a symbol is selected, e.g.: # # config JOLIET # bool "Microsoft Joliet CDROM extensions" # select NLS # # This means when JOLIET is selected, NLS will be selected as well. # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.8 # [PATCH] support for 'range' # # The 'range' keyword allows to define a lower and upper limit for integer # and hex symbols. # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.9 # [PATCH] add more warnings # # Add a number of warnings to avoid misuse of the previously added features # (most important check for recursive dependencies). # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.10 # [PATCH] front end updates # # conf: better choice interface # don't ask for unchangable symbols # # mconf: mark unchangable symbols with '---' # update exit text (from Sam Ravnborg ) # # qconf: update debug output # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.11 # [PATCH] create configuration in the destination directory # # This creates the configuration in the destination directory instead of # the current directory. # -------------------------------------------- # 03/06/02 zippel@linux-m68k.org 1.1215.62.12 # [PATCH] update kconfig documentation # # Fix various typos and and information about the new kconfig features. # -------------------------------------------- # 03/06/02 viro@parcelfarce.linux.theplanet.co.uk 1.1215.62.13 # [PATCH] ->minor_shift removal # # disk->minor_shift is not used anymore. Remove it. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.14 # [PATCH] magazine layer for slab # # From: Manfred Spraul # # slab.c is not very efficient for passing objects between cpus. Usually this # is a rare event, but with network routing and cpu-affine NICs it is possible # that nearly all allocation operations will occur on one cpu, and nearly all # free operations on another cpu. # # This causes slab memory to be returned to slab's free page list rather than # being cached on behalf of the particular slab cache. # # The attached patch solves that by adding an array of objects that is shared # by all cpus. Instead of multiple linked list operations per object, object # pointers are now passed to/from the shared array (and thus between cpus) with # memcopy operations. On uniprocessor, the default array size is 0, because # the shared array and the per-cpu head array are redundant. # # Additionally, the patch exports more statistics in /proc/slabinfo and make # the array sizes tunable by writing to /proc/slabinfo. Both changes break # backward compatibility, user space scripts must look at the slabinfo version # and act accordingly. # # The size of the new shared array may be altered at runtime, by writing to # /proc/slabinfo. # # The new parameters for writing to /proc/slabinfo are: # # #echo "cache-name limit batchcount shared" > /proc/slabinfo # # For example "size-4096 120 60 8" improves the slab efficiency for network # routing, because the default values (24 12 8) are too small for the large # series generated due to irq mitigation. Note that only root has write # permissions to /proc/slabinfo. # # These changes provided an overall 12% speedup in Robert Olson's gigE # packet-formwarding testing on 2-way. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.15 # [PATCH] Additional fields in slabinfo # # From: Manfred Spraul # # We need to present more information in /proc/slabinfo now the magazine # layer has been added. # # The slabinfo version has been updated to 2.0. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.16 # [PATCH] initialise vma->vm_next in do_mmap_pgoff() # # We end up inspecting this field in zap_page_range(), on the mmap error path. # Best initialise it to something... # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.17 # [PATCH] More irq balance fixes # # From: Andi Kleen # # John Stultz noticed that kirqd didn't start because of another logic error, # which broke irq balancing. This was still a fallout from the generic # subarchitecture changes. # # Actually it still refuses to balance anything on my test box, but perhaps # I'm just not able to generate enough interrupts. # # Anyways, with this patch the thread is running again at least. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.18 # [PATCH] dirty_writeback_centisecs fixes # # This /proc tunable sets the kupdate interval. It has a couple of problems: # # - No way to turn it off completely (userspace dirty memory management # solutions require this). # # - If it has been set to one hour and then the user resets it to five # seconds, that resetting will not take effect for up to an hour. # # Fix that up by providing a sysctl handler. Setting the tunable to zero now # disables the kupdate function. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.19 # [PATCH] Copy nanosecond stat values for i386 # # From: Andi Kleen # # A brown paper bag bug, noticed by Ralf Baechle. # # i386 needs to define STAT_HAVE_NSEC too, otherwise it won't copy # the nanosecond values to user space. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.20 # [PATCH] Some subarch warning fixes # # From: Andi Kleen # # Some recent subarch interface changes caused macro redefinition warnings # for GET_APIC_ID and APIC_ID_MASK with the generic subarchitecture. Fixing # it properly required some reorganization by giving the generic arch a # mach_apicdef.h too. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.21 # [PATCH] MTD build fix # # From: Adrian Bunk # # Fix this: # # drivers/mtd/maps/map_funcs.c: In function `simple_map_read64': # drivers/mtd/maps/map_funcs.c:38: warning: implicit declaration of # function `__raw_readll' # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.22 # [PATCH] improved core support for time-interpolation # # From: David Mosberger # # Basically, what the patch does is provide two hooks such that platforms # (and subplatforms) can provide time-interpolation in a way that guarantees # that two causally related gettimeofday() calls will never see time going # backwards (unless there is a settimeofday() call, of course). # # There is some evidence that the current scheme does work: we use it on ia64 # both for cycle-counter-based interpolation and the SGI folks use it with a # chipset-based high-performance counter. # # # It seems like enough platforms do this sort of thing to provide _some_ # support in the core, especially because it's rather tricky to guarantee # that time never goes backwards (short of a settimeofday, of course). # # This patch is based on something Jes Sorensen wrote for the SGI Itanium 2 # platform (which has a chipset-internal high-res clock). I adapted it so it # can be used for cycle-counter interpolation also. The net effect is that # "last_time_offset" can be removed completely from the kernel. # # The basic idea behind the patch is simply: every time you advance xtime by # N nanoseconds, you call update_wall_time_hook(NSEC). Every time the time # gets set (i.e., discontinuity is OK), reset_wall_time_hook() is called. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.23 # [PATCH] ext3: fix for blocksize < PAGE_CACHE_SIZE # # If a buffer_head is outside i_size, block_write_full_page() will leave it # !buffer_mapped(). We shouldn't attach that buffer to the transaction for # writeout! # # This bug has been in 2.5 for some time. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.24 # [PATCH] /proc/kcore fixes # # From: Tony Luck # # /proc/kcore has been broken on some architectures for a long time. Problems # surround the fact that some architectures allocate memory for vmalloc() and # thus modules at addresses below PAGE_OFFSET, which results in negative file # offsets in the virtual core file image provided by /proc/kcore. There are # also pending problems for discontig memory systems as /proc/kcore just # pretends that there are no holes between "PAGE_OFFSET" and "high_memory", so # an unwary user (ok super-user) can read non-existant memory which may do bad # things. There may also be kernel objects that would be nice to view in # /proc/kcore, but do not show up there. # # A pending change on ia64 to allow booting on machines that don't have # physical memory in any convenient pre-determined place will make things even # worse, because the kernel itself won't show up in the current implementation # of /proc/kcore! # # The patch attached provides enough hooks that each architecture should be # able to make /proc/kcore useful. The patch is INCOMPLETE in that *use* of # those hooks is ONLY PROVIDED FOR IA64. # # Here's how it works. The default code in fs/proc/kcore.c doesn't set up any # "elf_phdr" sections ... it is left to each architecture to make appropriate # calls to "kclist_add()" to specify a base address and size for each piece of # kernel virtual address space that needs to be made accessible through # /proc/kcore. To get the old functionality, you'll need two calls that look # something like: # # kclist_add(&kcore_mem, __va(0), # max_low_pfn * PAGE_SIZE); # kclist_add(&kcore_vmem, (void *)VMALLOC_START, # VMALLOC_END-VMALLOC_START); # # The first makes all of memory visible (__i386__, __mc68000__ and __x86_64__ # should use __va(PAGE_SIZE) to duplicate the original lack of access to page # 0). The second provides a single map for all "vmalloc" space (the code still # searches the vmlist to see what actually exists before accessing it). # # Other blocks of kernel virtual space can be added as needed, and removed # again (with kclist_del()). E.g. discontiguous memory machines can add an # entry for each block of memory. Architectures that allocate memory for # modules someplace outside of vmalloc-land can add/remove entries on module # insert and remove. # # The second piece of abstraction is the kc_vaddr_to_offset() and # kc_offset_to_vaddr() macros. These provide mappings from kernel virtual # addresses to offsets in the virtual file that /proc/kcore instantiates. I # hope they are sufficient to avoid negative offset problems that plagued the # old /proc/kcore. Default versions are provided for the old behaviour # (mapping simply adds/subtracts PAGE_OFFSET). For ia64 I just need to use a # different offset as all kernel virtual allocations are in the high 37.5% of # the 64-bit virtual address space. x86_64 was the other architecture with # this problem. I don't know enough (anything) about the kernel memory map on # x86_64, so I hope these provide a big enough hook. I'm hoping that you have # some low stuff, and some high stuff with a big hole in the middle ... in # which case the macros might look something like: # # #define kc_vaddr_to_offset(v) ((v) < 0x1000000000000000 ? (v) : \ # ((v) - 0xF000000000000000)) # # But if you have interesting stuff scattered across *every* part of the # unsigned address range, then you won't be able to squeeze it all into a # signed file offset. # # There are a couple of bug fixes too: # 1) get_kcore_size() didn't account for the elf_prstatus, elf_prpsinfo # and task_struct that are placed in the PT_NOTE section that is # part of the header. We were saved on most configurations by the # round-up to PAGE_SIZE ... but it's possible that some architectures # or machines corrupted memory beyond the space allocated for the # header. # # 2) The size of the PT_NOTES section was incorrectly set to the size # of the last note, rather than the sum of the sizes of all the notes. # -------------------------------------------- # 03/06/02 akpm@digeo.com 1.1215.62.25 # [PATCH] remove 16-bit pid assumption from ipc/sem.c # # From: Manfred Spraul # # SysV sem operations that involve multiple semaphores can fail in the # middle, and then sempid (pid of the last successful operation) must be # restored. This happens with "sempid >>= 16" - broken due to the 32-bit pid # values. The attached patch fixes that by reordering the updates of the # semaphore fields. # # Additionally, the patch fixes the corruption of the sempid value that occurs # if a wait-for-zero operation fails. # # The patch is more than two years old, and was in -dj and -ak kernels. # -------------------------------------------- # 03/06/03 paulus@samba.org 1.1215.1.35 # Merge samba.org:/home/paulus/kernel/linux-2.5 # into samba.org:/home/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/06/02 jim.houston@attbi.com 1.1215.62.26 # [PATCH] preallocate signal queue resource - Posix timers # # This adds a new interface to kernel/signal.c which allows signals to be # sent using preallocated sigqueue structures. It also modifies # kernel/posix-timers.c to use this interface. # # The current timer code may fail to deliver a timer expiry signal if # there are no sigqueue structures available at the time of the expiry. # The Posix specification is clear that the signal queuing resource should # be allocated at timer_create time. This allows the error to be returned # to the application rather than silently losing the signal. # # This patch does not change the sigqueue structure allocation policy. I # hope to revisit that in another patch. # # Here is the definition for the new interface: # # struct sigqueue *sigqueue_alloc(void) # Preallocate a sigqueue structure for use with the functions # described below. # # void sigqueue_free(struct sigqueue *q) # Free a preallocated sigqueue structure. If the sigqueue # structure being freed is still queued, it will be removed # from the queue. I currently leave the signal pending. # It may be delivered without the siginfo structure. # # int send_sigqueue(int sig, struct sigqueue *q, struct task_struct *p) # This function is equivalent to send_sig_info(). It queues # a signal to the specified thread using the supplied sigqueue # structure. The caller is expected to fill in the siginfo_t # which is part of the sigqueue structure. # # int send_group_sigqueue(int sig, struct sigqueue *q, struct task_struct *p) # This function is equivalent to send_group_sig_info(). It queues # the signal to a process allowing the system to select which thread # will receive the signal in a multi-threaded process. # Again, the sigqueue structure is used to queue the signal. # # Both send_sigqueue() and send_group_sigqueue() return 0 if the signal # is queued. They return 1 if the signal was not queued because the # process is ignoring the signal. # # Both versions include code to increment the si_overrun count if the # sigqueue entry is for a Posix timer and they are called while the # sigqueue entry is still queued. Yes, I know that the current code # doesn't rearm the timer until the signal is delivered. Having this # extra bit of code doesn't do any harm, and I plan to use it. # # These routines do not check if there already is a legacy (non-realtime) # signal pending. They always queue the signal. This requires that # collect_signal() always checks if there is another matching siginfo # before clearing the signal bit. # -------------------------------------------- # 03/06/02 torvalds@home.transmeta.com 1.1215.59.6 # Merge penguin:v2.5/linux # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/02 viro@parcelfarce.linux.theplanet.co.uk 1.1215.64.1 # [NET]: Eliminate {init,register,unregister}_fcdev. # -------------------------------------------- # 03/06/02 viro@parcelfarce.linux.theplanet.co.uk 1.1215.64.2 # [NET]: Eliminate init_hippi_dev and {un,}register_hipdev. # -------------------------------------------- # 03/06/02 viro@parcelfarce.linux.theplanet.co.uk 1.1215.64.3 # [NET]: Convert most tokenring drivers away from {init,register,unregister}_trdev, only ibmtr remains. # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.64.4 # [NET]: Kill PTI fddi driver, never completed and no plans to finish. # -------------------------------------------- # 03/06/02 viro@parcelfarce.linux.theplanet.co.uk 1.1215.64.5 # [NET]: Eliminate init_fddidev. # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.63.2 # ppc64: ppc64 update # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.64.6 # [NET]: Fix CONFIG_HIPPI build. # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.64.7 # [NET]: Fix typos in init_trdev changes to lanstreamer.c # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.59.7 # Merge samba.org:/scratch/anton/linux-2.5 # into samba.org:/scratch/anton/tmp3 # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.59.8 # ppc64: copy_tofrom_user exception handling fix from Paul Mackerras # -------------------------------------------- # 03/06/02 davem@nuts.ninka.net 1.1215.64.8 # [NET]: Eliminate {init,register,unregister}_trdev(). # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.59.9 # ppc64: kcore support # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.59.10 # ppc64: Increase maximum allocation size to 16MB for largepage support # -------------------------------------------- # 03/06/03 davem@nuts.ninka.net 1.1215.64.9 # [NET]: Eliminate init_etherdev usage from arch/um drivers. # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.59.11 # ppc64: FORCE_MAX_ZONEORDER is actually order + 1, from Dave Gibson # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.59.12 # ppc64: fix compile error introduced in threaded coredump patch # -------------------------------------------- # 03/06/03 davem@nuts.ninka.net 1.1215.64.10 # [IPV6]: In ipv6_add_dev dont call __ipv6_regen_rndid without initial reference held. # # Based upon a report from Andrew Morton. # -------------------------------------------- # 03/06/03 davem@nuts.ninka.net 1.1215.64.11 # [NET]: Use INIT_LIST_HEAD in arch/um/drivers/net_kern.c # -------------------------------------------- # 03/06/03 davem@kernel.bkbits.net 1.1215.65.1 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/03 davem@nuts.ninka.net 1.1215.64.12 # [NET]: Typo in iph5527.c driver changes. # -------------------------------------------- # 03/06/03 davem@kernel.bkbits.net 1.1215.65.2 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/03 herbert@gondor.apana.org.au 1.1215.65.3 # [PATCH] Fix ide-mod unload crash # # This patch fixes an unload crash when no PCI drivers are loaded. # -------------------------------------------- # 03/06/03 hch@lst.de 1.1215.65.4 # [PATCH] fix signal.h compilation on PPC # # signal.h uses spinlock_t now so it needs to include spinlock.h. # Without this compilation failes on PPC. # -------------------------------------------- # 03/06/03 torvalds@home.transmeta.com 1.1215.59.13 # Merge http://ppc.bkbits.net/for-linus-ppc64 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/03 davidm@napali.hpl.hp.com 1.1215.59.14 # [PATCH] fix TCP roundtrip time update code # # One of those very-hard-to-track-down, trivial-to-fix kind of problems: # without this patch, TCP roundtrip time measurements will corrupt the # routing cache's RTT estimates under heavy network load (the bug causes # RTAX_RTT to go negative, but since its type is u32, you end up with a # huge positive value...). From there on, later TCP connections quickly # will go south. # # The typo was introduced 8 months ago in v1.29 of the file by the patch # entitled "Cleanup DST metrics and abstrct MSS/PMTU further". # -------------------------------------------- # 03/06/03 anton@samba.org 1.1215.59.15 # [PATCH] fix matroxfb compile on ppc64] # # Here we really want CONFIG_ALL_PPC, since these headers are only valid # for PPC Mac machines (barf: badly named config option). # -------------------------------------------- # 03/06/03 agrover@groveronline.com 1.1215.28.2 # ACPI: Trivial name init patch (Bjorn Helgaas) # -------------------------------------------- # 03/06/03 markh@osdl.org 1.1215.59.16 # [PATCH] megaraid driver fix for 2.5.70 # # A recent change to the megaraid driver to fix some memset calls resulted # in overflowing the arrays being cleared and causing a system panic. # This patch fixes the problem by making sure that the arrays being # cleared are dimensioned to the correct size. The patch has been tested # on osdl's stp machines that have megaraid controllers. # -------------------------------------------- # 03/06/03 jejb@raven.il.steeleye.com 1.1215.59.17 # 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/06/03 mochel@osdl.org 1.1215.36.18 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/03 sam@mars.ravnborg.org 1.1215.66.1 # kbuild: Updated make help # # Patches originally by Adrian Bunk and Rudmer van Dijk. # Included "make V=0|1" and "make C=1" # -------------------------------------------- # 03/06/03 sam@mars.ravnborg.org 1.1215.66.2 # kbuild: Silence kbuild with make V=0 # # With make version 3.80 kbuild echo'ed the fixdep command # executed each time a c file was compiled. # This has been tracked down to a bug in version 3.80 of make. # Avoiding newlines in canned command sequences avoid this problem. # # At the same time consolidated similar code in Makefile.build, # and avoiding a few ifdef/endif pairs resulting in a more readable makefile. # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.19 # [driver model] Clean up CPU unregistration. # # From Dave Jones. # -------------------------------------------- # 03/06/03 sam@mars.ravnborg.org 1.1215.66.3 # kbuild: CROSS_COMPILE and ARCH definitions # # Patch originally by Jesse Barnes # # Previously the user were required to supply CROSS_COMPILE and ARCH on the # commandline to make, alternatively they patched the Makefile direct. # The following patch allows the user to specify the value of these in # a variable assigned during init or similar. # # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.20 # Driver Class: don't call put_device() when we never called get_device() # # From Greg: # # This fixes a oops when unplugging pci network devices. # -------------------------------------------- # 03/06/04 paulus@samba.org 1.1215.1.36 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.21 # [driver model] Clean up class release handling. # # Based on a patch by Stephen Hemminger. # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.22 # [kobject] Update Documentation and licenses. # # - Make it very explicit that supplying an object desctructor is imperative # if using the interface for object reference counting. # # - Add GPL statement to the source files. # # - Add GFL (http://www.fsf.org/licenses/fdl.html) statement to documentation. # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.23 # [driver model] Update copyrights and license statements. # # It's a slow afternoon. # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.24 # [driver model] fix comment in device.h # -------------------------------------------- # 03/06/03 ldm.adm@hostme.bitkeeper.com 1.1215.67.1 # Merge hostme.bitkeeper.com:/ua/repos/l/ldm/linux-2.5 # into hostme.bitkeeper.com:/ua/repos/l/ldm/linux-2.5-core # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.2 # [PATCH] PCI: make pci_setup_device(), pci_alloc_primary_bus() and pci_alloc_primary_bus_parented() static # # No one is calling these functions. # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.3 # [PATCH] PCI: make pools_lock and pci_lock static. # # No one is using them outside the pci core. # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.4 # [PATCH] ACPI PCI Hotplug: remove hand made pci_find_bus function # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.5 # [PATCH] IBM PCI hotplug: remove hand made pci_find_bus function. # -------------------------------------------- # 03/06/03 B.Zolnierkiewicz@elka.pw.edu.pl 1.1215.59.18 # [PATCH] create /proc/ide/hdX/capacity only once # # In ide_register_subdriver() create drive->proc entries only if driver is # not idedefault_driver. # # [ There won't be /proc/ide/hdX/capacity for devices attached # to idedefault_driver now, it reported 0x7fffffff previously. ] # # Do not create drive->proc entries in create_proc_ide_drives(), they are # added later in ide_register_subdriver(). # -------------------------------------------- # 03/06/03 B.Zolnierkiewicz@elka.pw.edu.pl 1.1215.59.19 # [PATCH] kill recreate_proc_ide_device() # # It is unused and not needed # -------------------------------------------- # 03/06/03 hawkes@oss.sgi.com 1.1215.59.20 # [PATCH] 2.5.70 remove smp_send_reschedule() cruft # # smp_send_reschedule_all() is unused in 2.5 and can be eliminated. # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.25 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/03 mochel@osdl.org 1.1215.36.26 # Merge bk://ldm@bkbits.net/linux-2.5-core # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/03 ahaas@airmail.net 1.1215.59.21 # [PATCH] C99 patches for fs/ # # Add C99 initializers to fs/bio.c and fs/dquot.c. And fs/libfs.c had an # obsolete GCC style initialzers that is converted to C99 style. # -------------------------------------------- # 03/06/03 ahaas@airmail.net 1.1215.59.22 # [PATCH] C99 struct initializers for kernel files # -------------------------------------------- # 03/06/03 torvalds@home.transmeta.com 1.1215.36.27 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.6 # [PATCH] IBM PCI hotplug: remove direct access of pci_devices variable. # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.7 # PCI Hotplug: move drivers/hotplug/* to drivers/pci/hotplug/* # # This will let include/linux/pci.h get smaller, and is what I should # have done in the first place 2 years ago... # -------------------------------------------- # 03/06/03 davem@nuts.ninka.net 1.1215.68.1 # Merge bk://kernel.bkbits.net/acme/net-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/06/03 chas@cmf.nrl.navy.mil 1.1215.68.2 # [ATM]: more cleanup in HE driver # -------------------------------------------- # 03/06/03 davem@nuts.ninka.net 1.1215.68.3 # [NET]: Use INIT_LIST_HEAD correctly in arch/um/drivers/net_kern.c # -------------------------------------------- # 03/06/03 rddunlap@osdl.org 1.1215.68.4 # [NET]: add RFC references for Linux SNMP MIBs. # -------------------------------------------- # 03/06/03 rddunlap@osdl.org 1.1215.68.5 # [NET]: Typo corrections only. # -------------------------------------------- # 03/06/03 rddunlap@osdl.org 1.1215.68.6 # [IPV6]: Add IPv6 routing table statistic: fib_discarded_routes. # -------------------------------------------- # 03/06/03 yoshfuji@linux-ipv6.org 1.1215.68.7 # [NET]: Add ip-sysctl.txt entries for missing ip{,6}frag_* sysctls. # -------------------------------------------- # 03/06/03 hch@lst.de 1.1215.68.8 # [NET]: Move dmascc away from setup.c # -------------------------------------------- # 03/06/03 yoshfuji@linux-ipv6.org 1.1215.68.9 # [IPV6]: Set dead flag on idev if snmp6_register_dev() fails. # -------------------------------------------- # 03/06/03 davem@nuts.ninka.net 1.1215.68.10 # [IPSEC]: {esp,ah} --> {esp4,ah4}. # -------------------------------------------- # 03/06/03 hch@lst.de 1.1215.68.11 # [NET]: Fix non-modular sdla.c build. # -------------------------------------------- # 03/06/03 yoshfuji@linux-ipv6.org 1.1215.68.12 # [IPV6]: Fix several errors in udpv6_connect(). # # - Pointer within an automatic storage class variable fl was illegally # cached using ip6_dst_store() # - uninitialized saddr was copied to fl.fl6_src # - dont cache if ipv6_saddr_get() failed. # # Based upon patch from Ville Nuorvala (vnuorval@tcs.hut.fi) # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.8 # [PATCH] PCI: Remove a lot of PCI core only functions from include/linux/pci.h # -------------------------------------------- # 03/06/03 jmorris@intercode.com.au 1.1215.68.13 # [CRYPTO]: Use "select" kconfig facility instead of fragile defaults. # -------------------------------------------- # 03/06/03 greg@kroah.com 1.1215.44.9 # [PATCH] PCI: remove CONFIG_PROC_FS checks in .c files. # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.10 # [PATCH] PCI: Move more functions out of include/linux/pci.h that don't need to be there. # -------------------------------------------- # 03/06/04 yoshfuji@linux-ipv6.org 1.1215.68.14 # [IPV6]: typo, unrequired #undef and bad operator precedence. # - no need to #undef CONFIG_IPV6_SUBTREE # - use parentheses around "&" and "|". # - fib_repair_tree() is typo. # -------------------------------------------- # 03/06/04 hch@lst.de 1.1215.68.15 # [NET]: Kill useless/wrong Version line from net/core/dv.c # -------------------------------------------- # 03/06/04 hch@lst.de 1.1215.68.16 # [NET]: net/core/dst.c typo. # -------------------------------------------- # 03/06/04 hch@lst.de 1.1215.68.17 # [NET]: Fix coding style in net/core/filter.c # -------------------------------------------- # 03/06/04 hch@lst.de 1.1215.68.18 # [NET]: Fix coding style in net/core/iovec.c # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1215.68.19 # [NET]: Move sk98lin driver away from init_etherdev(). # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1215.68.20 # [NET]: Move 3c509 driver away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@kernel.bkbits.net 1.1215.36.28 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/04 rmk@flint.arm.linux.org.uk 1.1215.69.1 # [ARM] Fix more missing irqreturn_t and remove a static no_action func. # -------------------------------------------- # 03/06/04 herbert@gondor.apana.org.au 1.1215.68.21 # [IPSEC]: Include linux/slab.h where necessary. # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1215.68.22 # [NET]: Move sunqe.c driver away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.23 # [NET]: Move arch/cris drivers away from init_etherdev(). # -------------------------------------------- # 03/06/04 viro@parcelfarce.linux.theplanet.co.uk 1.1215.68.24 # [NET]: Move bmac.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.25 # [NET]: Convert ia64 simeth.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.26 # [NET]: Convert PPC 8260_io/enet.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.27 # [NET]: Convert PPC 8260_io/fcc_enet.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.28 # [NET]: Convert PPC 8xx_io/enet.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.29 # [NET]: Convert PPC 8xx_io/fec.c away from init_etherdev(). # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.30 # [NET]: Actually apply Al's sunqe.c changes. # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.68.31 # [NET]: Fix thinkos in PPC 8260_io/fcc_enet.c changes. # -------------------------------------------- # 03/06/04 thomas@osterried.de 1.1215.68.32 # [AX25]: AX.25 bug fixes. # - Flxnet CRC handling fix for mkiss.c # - Use after free bug in ax25_ip.c # -------------------------------------------- # 03/06/04 davej@codemonkey.org.uk 1.1215.70.1 # [AGPGART] Report fixing of errata, and add missing printk stuff (\n's, KERN_INFO, PFX) # -------------------------------------------- # 03/06/04 davej@codemonkey.org.uk 1.1215.70.2 # [AGPGART] Kill useless printk in frontend. # This has served no useful purpose ever afaics. # -------------------------------------------- # 03/06/04 davej@codemonkey.org.uk 1.1215.70.3 # [AGPGART] Missing printk levels. # -------------------------------------------- # 03/06/04 torvalds@home.transmeta.com 1.1215.36.29 # Merge bk://linux-sam.bkbits.net/kbuild # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/04 rmk@flint.arm.linux.org.uk 1.1215.69.2 # [ARM] Move dma_alloc_coherent() to consistent.c # -------------------------------------------- # 03/06/04 davej@halogen.(none) 1.1215.71.1 # Merge halogen.(none):/home/davej/src/kernel/2.5/bk-linus # into halogen.(none):/home/davej/src/kernel/2.5/agpgart # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.11 # [PATCH] PCI: Grab reference count on pci_dev if the pci driver binds to the device. # # And remember to decrement the count after remove() is called. # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.12 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/core/memalloc.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.13 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/esssolo1.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.14 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/maestro.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.15 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/via82cxxx_audio.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.16 # [PATCH] PCI: remove usage of pci_for_each_dev() in sound/pci/rme9652/hammerfall_mem.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.17 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/acpi/pci_irq.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.18 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/agp/amd-k8-agp.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.19 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/agp/generic.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.20 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/agp/isoch.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.21 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/hw_random.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.22 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/watchdog/amd7xx_tco.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.23 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/watchdog/i810-tco.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.24 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/pci/cs5530.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.25 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/pci/hp2366.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.26 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/pci/pdc202xx_new.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.27 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/ide/setup-pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.28 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/macintosh/via-pmu.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.29 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/message/fusion/mptbase.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.30 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/message/i2o/i2o_core.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.31 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/net/e100/e100_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.32 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/net/e1000/e1000_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.33 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/net/ixgb/ixgb_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.34 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/parport/parport_pc.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.35 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/hotplug/ibmphp_core.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.36 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.37 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/proc.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.38 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/search.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.39 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pci/setup-irq.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.40 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/pnp/resource.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.41 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/video/pm2fb.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.42 # [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/video/sis/sis_main.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.43 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/i386/pci/irq.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.44 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/i386/kernel/cpu/cpufreq/gx-suspmod.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.44.45 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/i386/pci/i386.c # -------------------------------------------- # 03/06/04 rmk@flint.arm.linux.org.uk 1.1215.69.3 # [ARM] Convert platform devices to use platform_device # # Since struct platform_device now has the ability to pass resources, # defined by the platform to the device driver, we can now use this # to handle platform specific devices. One such instance is the # StrongARM SA1111 companion chip, which can appear in various address # spaces, and connected to different IRQ lines depending on how many # cups of coffee the hardware designer had, the direction of the wind # outside the designers office that day. # # We also convert some of the other StrongARM peripheral on-chip # devices to use struct platform_device. # # ARM also provides a platform_add_devices() function which can be # used by platform code to bulk-register a tabular set of platform # devices. # -------------------------------------------- # 03/06/04 rmk@flint.arm.linux.org.uk 1.1215.69.4 # [ARM] Tidy up Integrator core support. # # This merges arch.c, irq.c and mm.c into one core file for this # platform; it's pointless keeping these separate. # -------------------------------------------- # 03/06/04 agrover@groveronline.com 1.1215.36.30 # Merge groveronline.com:/root/bk/linux-2.5 # into groveronline.com:/root/bk/linux-acpi # -------------------------------------------- # 03/06/05 paulus@samba.org 1.1215.1.37 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.1 # Merge gregkh@kernel.bkbits.net:/home/gregkh/linux/pci-good-2.5 # into kroah.com:/home/greg/linux/BK/p-2.5 # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.2 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/alpha/kernel/sys_sio.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.3 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/arm/kernel/bios32.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.4 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ia64/hp/common/sba_iommu.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.5 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ia64/sn/io/pci_bus_cvlink.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.6 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ia64/sn/io/pciba.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.7 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ia64/sn/io/sn2/pci_bus_cvlink.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.8 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/mips/ddb5074/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.9 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/mips/ddb5476/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.10 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/mips/ddb5xxx/ddb5477/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.11 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/mips/mips-boards/generic/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.12 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/mips/sni/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.13 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/mips64/mips-boards/generic/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.14 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/mips64/sgi-ip32/ip32-pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.15 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc/kernel/pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.16 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc/platforms/chrp_pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.17 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc/platforms/gemini_pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.18 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc/platforms/pmac_pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.19 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc/platforms/prep_pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.20 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc64/kernel/iSeries_pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.21 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc64/kernel/pSeries_pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.22 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc64/kernel/pci_dma.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.23 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/sh/kernel/pci-sh7751.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.24 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/v850/kernel/rte_mb_a_pci.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.25 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/x86_64/kernel/bluesmoke.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.26 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/x86_64/kernel/pci-gart.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.27 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/x86_64/pci/irq.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.28 # [PATCH] PCI: remove usage of pci_for_each_dev() in arch/x86_64/pci/x86-64.c # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.29 # [PATCH] PCI: finally remove pci_for_each_dev() now that all users of it are gone. # -------------------------------------------- # 03/06/04 greg@kroah.com 1.1215.72.30 # PCI: remove usage of pci_for_each_dev() in arch/ppc64/kernel/pci.c # -------------------------------------------- # 03/06/04 acme@conectiva.com.br 1.1215.73.1 # o net: create struct sock_common and use in struct sock & tcp_tw_bucket # # With this the data dependency is reduced to just making sure that the first # member of both struct sock and struct tcp_tw_bucket are a struct sock_common. # # Also makes it easier to grep for struct sock and struct tcp_tw_bucket usage in # the tree as all the members in those structs are prefixed, respectively, with # sk_ and tw_, like struct inode (i_), struct block_device (bd_), etc. # # Checked namespace with make tags/ctags, just one colision with the macros for # the struct sock members, with a wanrouter struct, fixed that # s/sk_state/state_sk/g in the wanrouter struct. # # Checked as well if the names of the members in both structs collided with some # macro, none found. # -------------------------------------------- # 03/06/04 Jeff.Wiedemeier@hp.com 1.1215.74.1 # [PATCH] compile fix for agp_memory struct definitition change # # In 2.5.70, the agp_memory struct changed from: # typedef struct agp_memory # to: # struct agp_memory # # This patch propagates that change into include/asm-alpha/agp_backend.h and # arch/alpha/kernel/core_{titan,marvel}.c # # /jeff # -------------------------------------------- # 03/06/04 rth@kanga.twiddle.net 1.1215.74.2 # [ALPHA] Add posix timer and clock syscalls. # -------------------------------------------- # 03/06/04 torvalds@home.transmeta.com 1.1215.75.1 # Merge bk://bk.arm.linux.org.uk/linux-2.5-rmk # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/04 torvalds@home.transmeta.com 1.1215.72.31 # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 jgarzik@redhat.com 1.1215.72.32 # [netdrvr] gcc 3.3 cleanups # # Mostly adding 'ULL' modifier to 64-bit constants. # -------------------------------------------- # 03/06/05 jgarzik@redhat.com 1.1215.72.33 # [netdrvr skge] add ULL modifier to 64-bit constant # -------------------------------------------- # 03/06/05 reeja.john@amd.com 1.1215.72.34 # [netdrvr amd8111e] link against mii lib # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.76.1 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.1 # [PATCH] fix broken networking # # Fix broken "cleanup" # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.76.2 # [NET]: Fix broken cleanups in net/core/iovec.c # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.2 # [PATCH] aio: small cleanups # # - comment fixes # # - duplicated assignments # # - Remove a prototype which is in aio.h already # # - Some __user annotation # # - use the existing symbolic names, not magic numbers. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.3 # [PATCH] clean up timer interpolation code # # From: Christoph Hellwig # # - don't add one level of indentation when taking a lock # # - remove useless ti_global struct # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.4 # [PATCH] radio-cadet.c: remove unnecessary copy_to_user() # # From: Hollis Blanchard # # As pointed out by the Stanford checker, 'v' is not tainted. The driver # shouldn't be using copy_to_user() in cadet_do_ioctl() at all: # # cadet_do_ioctl() is being called by drivers/media/video/videodev.c: # video_usercopy(), which has already copied the buffer 'arg' (aka 'v') # into kernel space, and will copy it back after cadet_do_ioctl() # returns. So all the direct 'v' accesses are correct. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.5 # [PATCH] cmpci: fix improper access to userspace # # From: Hollis Blanchard # # Fix a direct userspace access, found by the Stanford checker. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.6 # [PATCH] zr36120: fix improper access to userspace # # From: Hollis Blanchard # # Fix a direct userspace access, found by the Stanford checker. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.7 # [PATCH] remove unsafe BUG_ON() # # From: Hugh Dickins # # PageDirty BUG_ON in __remove_inode_page is, and always has been, unsafe for # SMP or preemption: truncation may be racing against unmapping's # set_page_dirty in zap_pte_range (amongst a few other possibilities). # !PageUptodate error in __set_page_dirty_buffers is unsafe then too. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.8 # [PATCH] pnpbios dereferencing user pointer # # From: Hollis Blanchard # # Another simple case of a memcpy that should be copy_from_user... # # Also fix some error-path memory leaks. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.9 # [PATCH] fix bw-qcam.c bad copy_to_user # # From: Hollis Blanchard # # Like radio-cadet.c, bw-qcam.c is calling copy_to_user() where it shouldn't. # The user buffer is copied to/from kernel space by # drivers/media/video/videodev.c:video_usercopy(). # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.10 # [PATCH] Graceful failure in devfs_remove() # # From: Pavel Roskin , via Christoph Hellwig # # It's already the second time that I encounter a kernel panic in the same # place. When devfs_remove() is called on a non-existent file entry, the # kernel panics and I have to reboot the system. # # First time it was unregistering of pseudoterminals. This time it's # ide-floppy module that doesn't register devfs entries if the media is absent # but still tries to unregister them. The bug in ide-floppy will be reported # separately. # # The point of this message is that the failure in devfs_remove() is possible, # especially with rarely used drivers. Secondly, is not fatal enough to # justify an immediate panic and reboot. Thirdly, devfs misses a chance to # tell the user what's going wrong. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.11 # [PATCH] Fix generic_file_write() again. # # From: "Milton D. Miller II" # # The code at present has a small problem: when a fault is encountered we will # run commit_write() to cover the amount of data which was successfully copied # in from userspace. # # But filemap_copy_from_user() may have zeroed out some more of the page. So # pagecache now has zeroes and the buffer_head which represents those zeroes is # not dirtied. So a subsequent eviction and re-read of the file in the window # beyond the faulting offset will return the file's old contents and not the # zeroes. # # So we change filemap_copy_from_user_iovec() to have the same behaviour as the # non-iovec filemap_copy_from_user(), and ensure that the commit_write() covers # the parts of the page which copy_from_user() zeroed out. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.12 # [PATCH] reiserfs option parser fix and ability to pass # # From: Oleg Drokin # # This patch adds support for remounting taking into account all extra options # you may want to pass it. (by Jeff Mahooney). # # Also it reworks the parser to correctly deal with mutually exclusive options. # Now whatever option was specified last will take an effect. # # - If you pass more than one jdev= option, the error will be reported and # mount/remount refused. # # - If you pass incorrect alloc= suboptions, the mount/remount will fail. # (it did not before). # # - nolargeio now actually looks at its argument. Argument is expected to be # numeric. If it is zero, default io size is set to 128k (default setting), # if it is non-zero, default io size is set to PAGE_SIZE. # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.13 # [PATCH] reiserfs support for blocksizes other than 4096 bytes # # From: Oleg Drokin # # This patch allows reiserfs to support blocksizes from 1024 bytes and up to # PAGE_CACHE_SIZE. Also it fixes two glitches that prevent reiserfs from # working correctly in case if PAGE_CACHE_SIZE is bigger than blocksize. # # Originally this patch was created by Edward Shushkin and Vladimir Saveliev, # and then it was adapted to modern 2.4 and 2.5 by me. # # Also people should be aware that 1024 bytes blocksize is not very good thing # as tree grows very fast. mkreiserfs is able to create filesystems with # different blocksizes for quite a while already (-b switch). # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.14 # [PATCH] hugetlbfs: mount options and permissions # # From: "Seth, Rohit" # # This patch enables system administrators to more flexibly assign read/write # permissions to files in hugetlbfs. Mount options are added which will # specify the uid, gid and mode of the filesystem's root directory. # # This patch also enables super users to do chown/chgrp on files in hugetlbfs. # # Also included in this patch is the support for uid, gid and mode command line # options for mount command for hugetlbfs. # # The following mount options are added to hugetlbfs: # # uid=value gid=value mode=value # # The values may be specified in hex (0xNNN), decimal or octal (0NNN). # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.15 # [PATCH] DEADLINE: hash removal fix # # From Jens: It fixes the occasional # # BUG_ON(list_empty(&req->queuelist)); # # which people have been hitting in include/linux/blkdev.h: # blkdev_dequeue_request() # -------------------------------------------- # 03/06/04 akpm@digeo.com 1.1215.77.16 # [PATCH] ext3: fix deadlock in journal_create() # # From: Mark Fasheh # # journal_create() is called under down_write(s_umount) on the mount path. But # it calls fsync_bdev(), which wants down_write(s_umount). # # Change journal_create() to run sync_blockdev() instead. Just to write out # the new journal's blocks. # -------------------------------------------- # 03/06/04 davidm@napali.hpl.hp.com 1.1215.77.17 # [PATCH] allow thread_info to be allocated as part of task_struct # # This re-organizes the thread info allocations a bit, so that # architectures like ia64 that want to allocate the thread_info structure # as part of the task structure allocation can do so. # # The bulk of the patch is adding the "tsk" information to the thread # info allocator (ignored by all non-ia64 architectures), and switching # the order of the allocators to make this all possible. # -------------------------------------------- # 03/06/04 davem@nuts.ninka.net 1.1215.76.3 # [PCI]: Move pci_remove_bus_device back to include/linux/pci.h, discussed with greg@kroah.com # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1215.77.18 # [PATCH] Fix raid5 bug where wrong 'dev' is used. # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1215.77.19 # [PATCH] Fix raid1 handling of writing to multiple devices. # # When raid1 writes, it needs to schedule writes to some number # of devices, and when all writes have completed, the r1_bio # structure that holds it all together must be freed. # However we must make sure not to free it before all devices # have been considered for submitting writes to. # # This happens in two places: when submitting a normal write request # and when submiting a write as part of resync. # # This patch makes both these places: # the same # simpler # more correct. # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1215.77.20 # [PATCH] Fix up freeing of kmalloc structures # # Some paths free things twice, others free un-initialised values :-( # Not any more. # -------------------------------------------- # 03/06/04 neilb@cse.unsw.edu.au 1.1215.77.21 # [PATCH] Fix bug in /proc/mdstat # # If /proc/mdstat is large, or reads are for a small size, # then the last line of /proc/mdstat is repeated infinitely. # # This patch will fix it. # -------------------------------------------- # 03/06/04 zippel@linux-m68k.org 1.1215.77.22 # [PATCH] choice handling fixes # # A few choice handling fixes: # - only visible choice values define the new state of the complete choice # - improve handling of choices without visible value # - two new warnings # -------------------------------------------- # 03/06/04 shemminger@osdl.org 1.1215.76.4 # [NET]: Fix device unregister in TUN driver. # -------------------------------------------- # 03/06/04 davem@kernel.bkbits.net 1.1215.76.5 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/05 davem@nuts.ninka.net 1.1215.78.1 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/06/05 viro@parcelfarce.linux.theplanet.co.uk 1.1215.78.2 # [NET]: Convert USB drivers away from init_etherdev(). # -------------------------------------------- # 03/06/05 bde@nwlink.com 1.1215.77.23 # [SPARC64]: Fix transmit handling in sunsab.c serial driver. # -------------------------------------------- # 03/06/05 steve@gw.chygwyn.com 1.1215.78.3 # [AX25]: Sanitize ax25 netdevice private handling. # -------------------------------------------- # 03/06/05 bcollins@debian.org 1.1215.77.24 # [SPARC64]: Final image strip not to strip too much. # -------------------------------------------- # 03/06/05 elenstev@mesatop.com 1.1215.77.25 # [SPARC]: Fix non-ansi parameter lists. # -------------------------------------------- # 03/06/05 bcollins@debian.org 1.1215.79.1 # [PATCH] USB: fix keyboard leds # # > Ben, it looks like your patch broke something for USB keyboards, any # > idea? # # Yep, my patch killed hid-input from scanning HID_OUTPUT_REPORT's. Fixed # with this patch for 2.5.70+bk. I'll send one for 2.4.x in a few minutes. # -------------------------------------------- # 03/06/05 david-b@pacbell.net 1.1215.79.2 # [PATCH] USB: kerneldoc for gadget API # # Here's the non-inlined doc for the gadget API. # -------------------------------------------- # 03/06/05 oliver@neukum.org 1.1215.79.3 # [PATCH] USB: cut usb_set_config from hpusbscsi # # this cuts out old cruft. # -------------------------------------------- # 03/06/05 oliver@neukum.org 1.1215.79.4 # [PATCH] USB: usb_set_configuration in empeg.c # # you should not drop errors. # - proper error detection during initialisation # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.80.1 # Merge bk://are.twiddle.net/axp-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 axboe@suse.de 1.1215.80.2 # [PATCH] kill old stuff # # and fix the start/stop thing as well. I think this is all of them. # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.76.6 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1215.81.1 # [CPUFREQ] Make powernow-k7 leap big buildings^Wranges. # When scaling upwards, we need to change the voltage before the frequency. # When scaling downwards, the opposite. # This may fix some of the hangs people have been seeing when jumping # from a low frequency to a very high frequency. # -------------------------------------------- # 03/06/05 paulus@samba.org 1.1215.76.7 # [PATCH] get rid of CONFIG_ALL_PPC # # This patch gets rid of CONFIG_ALL_PPC, which was a very confusing # option, since it didn't actually mean "ALL" at all, it was more a # "common set" thing. # # The primary replacement for CONFIG_ALL_PPC is CONFIG_PPC_MULTIPLATFORM. # I have also defined CONFIG_PPC_PMAC, CONFIG_PPC_PREP and CONFIG_PPC_CHRP # for selecting code which is only needed for one of the three platforms # that CONFIG_ALL_PPC represented. This is something that we (the PPC # community) have been talking about doing for some time. There is also a # CONFIG_PPC_OF which is for PPC machines with Open Firmware, which is # currently powermacs and CHRP machines. # # At the moment, CONFIG_PPC_{PMAC,PREP,CHRP,OF} get unconditionally # defined if CONFIG_PPC_MULTIPLATFORM is selected, but in future this # split will let us have more control over what gets included, so that # for example we don't necessarily have to include powermac bits in a # kernel for a PReP machine. # # I have gone through the uses of CONFIG_ALL_PPC one by one and decided # which of the new symbols best represents the set of machines that need # the code in question. In fact most of the uses of CONFIG_ALL_PPC in # the drivers have been replaced by CONFIG_PPC_PMAC. The other symbols # are mostly confined to the PPC architecture code. # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1215.82.1 # [fs] Remove kobject support for filesystems # # It was initially added for the immediate gain of being able to see what # filesystems were registered in the system. However, it was done without # proper analysis of the lifetime rules associated with them. # # Someday, we should convert struct filesystem_type and struct super_block to # use kobjects, though it will take sufficent time and effort to get it right. # Until then, we go without.. # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1215.81.2 # [CPUFREQ] kill cpufreq_driver export. # From Dominik Brodowski. # This removes the special export of cpufreq_driver for proc_intf.c. Instead, # the behaviour of /proc/cpufreq previous of Greg's class re-write is back: # the check whether cpufreq_driver is loaded is done within cpufreq_cpu_get # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1215.81.3 # [CPUFREQ] Kill unused variables. # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1215.82.2 # [kobject] Remove kobj_lock and use lockless refcounting. # # The only thing preventing this from happening earlier was the circular sysfs # registration dependency - it would need to be initialized before it was # registered, but needed to be registered before it was initialized. # # With kobjects gone from struct filesystem_type, the dependency no longer # exists and we don't have to special-case the possibility that a kobject will # be passed to kobject_get with a refcount == 0. # # Note that a kobject with a count of 0 in that function is still a bug, but # one in the subsystem making the call. We should add a debugging hook to dump # the stack if it does happen. # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1215.81.4 # [CPUFREQ] CodingStyle fixes # -------------------------------------------- # 03/06/05 davej@codemonkey.org.uk 1.1215.81.5 # [CPUFREQ] Fix ACPI P-State driver. # from Dmitry Torokhov. # # I have the following problems with ACPI P-States driver: # # - It crashes because it tries to switch CPU speed without registering cpufreq # driver first but acpi_processor_set_performance calls cpufreq_notify_transition. # # - When testing for capable CPUs it skips all online ones so for my single CPU # notebook it can't activate at all. # # - If a processor does not support throttling then it will say that "limit" # interface is not supported even after activating performance control. # # The patch below should fix these issues. It also adds some info messages since # /proc/acpi/processor/*/performance interface is marked obsolete but i still # would like to see if P-states were recognized during boot. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.8 # [PATCH] PCI: remove direct access of pci_devices from arch/m68k/atari/hades-pci.c # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.9 # [PATCH] PCI: remove direct access of pci_devices from drivers/macintosh/via-pmu68k.c # # Yeah, this is commented out code, but just trying to be complete... # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.10 # [PATCH] PCI: fix up previous fusion driver pci changes # # This makes the driver build properly now, and removes a direct access # of the pci_devices variable. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.11 # [PATCH] PCI: add pci_find_device_reverse() for users of pci_find_each_dev_reverse() to use # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.12 # [PATCH] PCI: remove usage of pci_for_each_dev_reverse() in # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.13 # [PATCH] PCI: remove pci_for_each_dev_reverse() now that all users of it are gone. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.14 # [PATCH] PCI: move pci_present() into drivers/pci/search.c # # This will let not have to export the pci_devices variable. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.15 # [PATCH] PCI: remove EXPORT_SYMBOL(pci_devices) # # Now the only users of this directly should be the pci core and arch specific # pci core code. # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.83.1 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 mhoffman@lightlink.com 1.1215.61.2 # [PATCH] I2C: more w83781d fixes # # This patch fixes the various return values in the w83781d_detect() # error paths. It also cleans up some formatting here and there. # It should be applied on top of the previous one. # # It works for me; same caveat as above w.r.t. ISA. # -------------------------------------------- # 03/06/05 aschultz@warp10.net 1.1215.61.3 # [PATCH] I2C: fix unsafe usage of list_for_each in i2c-core # # i2c-core.c contains 2 loops that iterate over the list of the clients attached # to an adapter and detaches them. Detaching the clients will actually remove # them from the list the loop is iterating over. Therefore the # list_for_each_safe() method has to be used. # -------------------------------------------- # 03/06/05 shemminger@osdl.org 1.1215.83.2 # [PATCH] typo in new class_device_release # # There is a typo in the current 2.5.70 bk version of class_device_release that # was not there in my original patch. By confusing the class and the class_device, # the release function oops. cd->release is always the function itself (class_device_release), # cls->release is the one setup for the class (net_class in my case). # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.61.4 # [PATCH] I2C: sync i2c-id.h with cvs version. # -------------------------------------------- # 03/06/05 Kurt.Robideau@comtrol.com 1.1215.84.1 # [PATCH] Rocketport driver against 2.5.70-bk7 # # Update the Rocketport driver # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.83.3 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/i2c-2.5 # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1215.82.3 # [driver model] Add device_for_each_child iterator. # # From Mike Anderson: # # I have been using it on an outstanding patch for scsi_set_host_offline. It # appears to work fine in my testing. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.85.1 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/tty-2.5 # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.86.1 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.76.16 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/pci-2.5 # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1215.82.4 # [kobject] Add warning + back trace if kobject_get() is called with 0 refcount. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.85.2 # TTY: add a release function for tty_class devices. # # This fixes a race with looking at files in /sys/class/tty/ and removing a # tty device. # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1215.87.1 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.76.17 # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.76.18 # Merge bk://kernel.bkbits.net/gregkh/linux/i2c-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 mochel@osdl.org 1.1215.87.2 # [driver model] Remove extraneous class device release method. # # What happens when you get a patch that does something an applied patch # already does, but a little better, and merge it sloppily: You end up calling # the wrong function because you've defined equivalent methods in two places. # # Bad Pat, Bad. # -------------------------------------------- # 03/06/05 greg@kroah.com 1.1215.85.3 # TTY: release function should be set in the class, not the class_device. # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.76.19 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.76.20 # Merge bk://kernel.bkbits.net/gregkh/linux/tty-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/06 paulus@samba.org 1.1215.1.38 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/06/05 joern@wohnheim.fh-wedel.de 1.1215.76.21 # [PATCH] zlib cleanup: remove FAR macro # # This removes FAR, the typedefs using FAR (Bytef and friends) and the # function prototypes for zalloc and zfree that should have gone earlier # already. # -------------------------------------------- # 03/06/05 joern@wohnheim.fh-wedel.de 1.1215.76.22 # [PATCH] zlib cleanup: __32BIT__ and STDC # # Remove unused __32BIT__ and STDC macros # -------------------------------------------- # 03/06/05 joern@wohnheim.fh-wedel.de 1.1215.76.23 # [PATCH] zlib cleanup: ZEXTERN # # This one was just simple s/ZEXTERN/extern/g. # -------------------------------------------- # 03/06/05 joern@wohnheim.fh-wedel.de 1.1215.76.24 # [PATCH] zlib cleanup: ZEXPORT # # Just a simple s/ZEXPORT//. # -------------------------------------------- # 03/06/05 joern@wohnheim.fh-wedel.de 1.1215.76.25 # [PATCH] zlib cleanup: z_off_t # # This nice macro must have been one of the good intentions on the road # to hell. Completely unused. :) # -------------------------------------------- # 03/06/05 joern@wohnheim.fh-wedel.de 1.1215.76.26 # [PATCH] zlib cleanup: OF # # Remove the stale support for K&R function declarations through the OF() # macro. # # This is the last patch to clean up zconf.h, at least for now. # -------------------------------------------- # 03/06/05 torvalds@home.transmeta.com 1.1215.76.27 # zlib cleanup: final fixups # # Jörn missed a few places of FAR conversion in inflate # -------------------------------------------- # 03/06/05 rth@kanga.twiddle.net 1.1215.74.3 # [ALPHA] Add semtimedop syscall. # -------------------------------------------- # 03/06/05 rth@kanga.twiddle.net 1.1215.88.1 # Merge kanga.twiddle.net:/home/rth/work/linux/linus-2.5 # into kanga.twiddle.net:/home/rth/work/linux/axp-2.5 # -------------------------------------------- # 03/06/05 hollisb@us.ibm.com 1.1215.76.28 # [PATCH] awe_wave.c user pointer dereference # # Two ioctl functions in sound/oss/awe_wave.c were directly dereferencing # a user-supplied pointer in a few places. # -------------------------------------------- # 03/06/06 paulus@samba.org 1.1215.1.39 # PPC32: Compile fix for array initialization from Christoph Hellwig. # -------------------------------------------- # 03/06/06 porter@cox.net 1.1215.1.40 # PPC32: Resolve colliding includes in boot wrappers. # -------------------------------------------- # 03/06/06 paulus@samba.org 1.1215.1.41 # PPC32: Cleanups from Christoph Hellwig and Tom Rini. # -------------------------------------------- # 03/06/06 shemminger@osdl.org 1.1215.72.35 # [PATCH] sb1000 driver bugs # # Inspecting the sb1000 driver showed some interesting bugs: # - net device pointer is used before the device is allocated; gcc # does catch this. # - unregister is called even though device not registered successfully # - net device is not freed on remove. # # Compiles but don't have hardware to test. Don't know how it ever worked though. # -------------------------------------------- # 03/06/06 srk@thekelleys.org.uk 1.1215.72.36 # [netdrvr] add atmel[_cs], new wireless driver # # Attached is a driver for Atmel at76c50x WiFi cards. This code started # out as a GPL release from Atmel of pretty horrible quality and I've # extensively re-worked it with the aim of making it acceptable in the # kernel. Please could you take a look and either pass it into the patch # stream or let me know what's wrong with it? # # The code has been tested on at least three different brand cards by # different people. Jean Tourrilhes took a look at an earlier version an # was positive. He's put incorporating this into 2.6 as a priority 1. # The patch works fine on 2.5.70. # # The firmware issue has been addressed now. The only firmware in the # driver is a small stub which reads the MAC address from NVRAM on the # card. The source for that is included so there are no GPL issues. The # main firmware is loaded from userspace using Manuel Estrada Sainz's # sysfs firmware class. I know that the patch for that has been # accepted but it hasn't turned up anywhere I can see yet. The # driver compiles fine even without the firmware class. I've made a # package of the firmware images which is available from my website. # # The remaining issues with the driver are migrating PCMCIA to the new # driver model and PCI support. I'm happy to produce followup patches as # the PCMCIA system gets evolved to the new driver model: the timing on # that is controlled by others. This set of chips includes a PCI version # and the driver should support that, but AFAIK there is no PCI hardware # available anywhere. If Atmel can provide me with some it will be # simple to add PCI support. # # The driver uses the CRC32 library module and the firmware loader. I've # not put in dependencies on those, but when the lastest set of patches # go into Kconfig I'll set it up so that selecting the Atmel driver # selects CRC32 and FW_LOADER too. # -------------------------------------------- # 03/06/06 jgarzik@redhat.com 1.1215.72.37 # [netdrvr] add MAINTAINERS entry for atmel wireless driver # -------------------------------------------- # 03/06/06 zwane@linuxpower.ca 1.1215.72.38 # [PATCH] cli/sti cleanup for fmvj18x # # This one should be safe as we're protected by the xmit_lock in all instances # -------------------------------------------- # 03/06/06 scott.feldman@intel.com 1.1215.72.39 # [PATCH] 10GbE ethtool support # # Add 10GbE support for ethtool. # -------------------------------------------- # 03/06/06 scott.feldman@intel.com 1.1215.72.40 # [PATCH] remove ethtool privileged references # # dev_ioctl already checks capable(CAP_NET_ADMIN) for SOICETHTOOL, so # privileged reference are not necessary. # -------------------------------------------- # 03/06/06 yoshfuji@linux-ipv6.org 1.1215.72.41 # [netdrvr] C99 initializers for arcnet # -------------------------------------------- # 03/06/06 jgarzik@redhat.com 1.1215.72.42 # Merge redhat.com:/garz/repo/linus-2.5 # into redhat.com:/garz/repo/net-drivers-2.5 # -------------------------------------------- # 03/06/06 davem@nuts.ninka.net 1.1215.76.29 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.5 # into nuts.ninka.net:/home/davem/src/BK/net-2.5 # -------------------------------------------- # 03/06/06 hch@lst.de 1.1215.76.30 # [NET]: Convert ppc early-init drivers to initcalls. Ack'd by Paul Mackerras. # -------------------------------------------- # 03/06/06 davem@nuts.ninka.net 1.1215.76.31 # [NET]: Kill drivers/net/setup.c, it no longer does anything. # -------------------------------------------- # 03/06/06 kuznet@oops.inr.ac.ru 1.1215.76.32 # tcp_output.c, tcp.c, tcp.h: # reconciling TCP_CORK and TCP_NODELAY # -------------------------------------------- # 03/06/06 rth@kanga.twiddle.net 1.1215.72.43 # Merge kanga.twiddle.net:/home/rth/work/linux/linus-2.5 # into kanga.twiddle.net:/home/rth/work/linux/axp-2.5 # -------------------------------------------- # 03/06/06 davem@nuts.ninka.net 1.1215.76.33 # [IPSEC]: Implement xfrm type module autoloading. # -------------------------------------------- # 03/06/06 perex@suse.cz 1.1215.89.1 # ALSA update # - added AZT3328 driver # - added Terratec Aureon support to ICE1724 driver # - fixed possible PCI posting problems # - ENS1370, ENS1371, FM801, ICE1712, ICE1724, VIA82xx # - AC'97 code # - added new IDs # - fixed typo in S/PDIF code # - C-Media related fixes # - USB driver # - added nrpacks module option # - added hack for AudioTrak Optoplay # - removed OLD_USB stuff # -------------------------------------------- # 03/06/06 davem@nuts.ninka.net 1.1215.76.34 # Merge bk://kernel.bkbits.net/acme/sock-2.5 # into nuts.ninka.net:/home/davem/src/BK/sock-2.5 # -------------------------------------------- # 03/06/06 davem@nuts.ninka.net 1.1215.76.35 # [NET]: Some stuff missed during acme's struct sock cleanup. # -------------------------------------------- # 03/06/06 davem@kernel.bkbits.net 1.1215.90.1 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/06 davem@nuts.ninka.net 1.1215.76.36 # [NET]: Missing __KERNEL__ ifdefs in linux/{tcp,udp}.h # -------------------------------------------- # 03/06/06 davem@kernel.bkbits.net 1.1215.90.2 # Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5 # into kernel.bkbits.net:/home/davem/net-2.5 # -------------------------------------------- # 03/06/06 zippel@linux-m68k.org 1.1215.91.1 # [PATCH] boolean symbol state fix # # This is an important fix to allow changing boolean symbols, whose # dependency is 'm'. All internal symbol states must be converted from # the tristate into boolean the state. # # I missed this change while adding expression support for defaults, # please apply. # -------------------------------------------- # 03/06/06 zippel@linux-m68k.org 1.1215.91.2 # [PATCH] ignore attempts to change unchangable symbols # # This fixes a problem which can show up with the new select facility, e.g. # a symbol is forced to 'y', so we should never even try to change such # symbols. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.3 # [PATCH] kmalloc_percpu: interface change # # From: Rusty Russell # # Several tweaks to the kmalloc_percpu()/kfree_percpu() interface, to # allow future implementations to be more flexible, and make easier to # use now we can see how it's actually being used. # # 1) No flags argument: GFP_ATOMIC doesn't make much sense, # # 2) Explicit alignment argument, so we don't have to give SMP_CACHE_BYTES # alignment always, # # 3) Zeros memory, since most callers want that and it's not entirely # trivial, # # 4) Convenient type-safe wrapper which takes a typename, and # # 5) Rename to alloc_percpu/__alloc_percpu, since usage no longer matches # kmalloc. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.4 # [PATCH] per-cpu support inside modules (minimal) # # From: Rusty Russell # # OK, this does the *minimum* required to support DEFINE_PER_CPU inside # modules. If we decide to change kmalloc_percpu later, great, we can turf # this out. # # Basically, overallocates the amount of per-cpu data at boot to at least # PERCPU_ENOUGH_ROOM if CONFIG_MODULES=y (arch-specific by default 32k: I have # only 7744 bytes of percpu data in my kernel here, so makes sense), and a # special allocator in module.c dishes it out. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.5 # [PATCH] IRQs: handle bad return values from handlers # # Attempt to do something intelligent with IRQ handlers which don't return # IRQ_HANDLED. # # - If they return neither IRQ_HANDLED nor IRQ_NONE, complain. # # - If they return IRQ_NONE more than 99900 times in 100000 interrupts, complain # and disable the IRQ. # # I did have it at 750-in-1000, but someone had an otherwise-functioning # system which triggered it. # # The 99.9% ratio is designed to address the problem wherein the babbling # device shares an IRQ with a good device. We don't want the good device's # trickle of IRQ_HANDLED callouts to defeat the lockup detector. (fat chance # os this working right). # # - Add a kernel boot parameter `noirqdebug' to turn the whole thing off. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.6 # [PATCH] IRQs: fix up irq_desc initialisation for non-ia32 # # The addition of more fields to irq_desc_t may have broken compilation of # other architectures. Go through and C99ify them (was needed anyway). # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.7 # [PATCH] force_successful_syscall_return() # # From: David Mosberger , Christoph Hellwig # # I believe this is the last outstanding piece that prevents ia64 from being # fully in sync with Linus' tree (yes, there are some minor ACPI changes # outstanding and a toolchain bug that's left to fix, but other than that, I # think we're clean). # # Many architectures (alpha, ia64, ppc, ppc64, sparc, and sparc64 at least) # use a syscall convention which provides for a return value and a separate # error flag. On those architectures, it can be beneficial if the kernel # provides a mechanism to signal that a syscall call has completed # successfully, even when the returned value is potentially a (small) # negative number. The patch below provides a hook for such a mechanism via # a macro called force_successful_syscall_return(). On x86, this would be # simply a no-op (because on x86, user-level has to be hacked to handle such # cases). On Alpha, it would be something along the lines of: # # #define force_successful_syscall_return() ptregs->r0 = 0 # # where "ptregs" is a pointer to the user's ptregs structure of the current # task. On ia64, we have been using this for a long time: # # static inline void force_successful_syscall_return (void) { # ia64_task_regs(current)->r8 = 0; # } # # The other architectures (ppc, ppc64, sparc, and sparc64) currently have no # mechanism to force a syscall return to be successful. But since the # syscall convention already provide for a separate error flag, the arch # maintainers could change this if they wanted to. # # There are only 3 places in the platform-independent portion of the kernel # that need this macro: # # - memory_lseek() in drivers/char/mem.c # - fs/fcntl.c for F_GETOWN # - lseek for /proc/mem in fs/proc/array.c # # Ideally, there are a couple of other places that could benefit from this # macro: # # - sys_getpriority() # - sys_shmat() # - sys_brk() # - do_mmap2() # - do_mremap() # # but these are not so critical, because the can be worked around in # platform-specific code (e.g., see arch/ia64/kernel/sys_ia64.c). # # Note that for the above 3 cases, handling them in user level is rather # suboptimal: # # - it would affect all lseek() syscalls, even though only /proc/mem and # /dev/mem need the special treatment (at least until there are # filesystems that can handle files >= 2^63 bytes) # # - all fcntl() calls would be affected, even though only F_GETOWN needs # the special treatment # # so I think handling these in the kernel for the platforms that can makes # tons of sense. # # The only limitation of force_successful_syscall_return() is that it doesn't # help with system calls performed by the kernel. But the kernel does that # so rarely and for such a limited set of syscalls that this is not a real # problem. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.8 # [PATCH] fix wobbly /proc/stat:btime # # From: john stultz # # Since jiffies didn't necessarily start incrementing at a second boundary, # jiffies/HZ doesn't increment at the same moment as xtime.tv_sec. This # causes one second wobbles in the calculation of btime (xtime.tv_sec - # jiffies/HZ). # # This fix increases the precision of the calculation so the usec component # of xtime is used as well. Additionally it fixes some of the non-atomic # reading of time values. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.9 # [PATCH] Console blanking fix # # From: Samuel Thibault # # Some fixes for console blanking: on some laptops, doing VESA blanking after # the bios did an apm blanking because of a screen closure thrashes the # recovery (the video board doesn't seem to have synchronisation registers # correctly initialized, since the LCD panel progressively turns white, maybe # damaging it ?). # # I hence moved the schedule for vesa powerdown after the apm blank hook # call, so that if it succeeds, it won't be called. I also moved the apm # unblank & palette restoration after the vesa unblank, to have a more lifo # scheme (also required, or the screen remains black). # # Btw, why del_timer_sync was called twice in timer_do_blank_screen when # vesa_off_interval==0 ? # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.10 # [PATCH] Console privacy for braille users # # From: Samuel Thibault # # Still working on kernel facilities for braille devices, the need for being # able to force blanking and unblanking raised: even when a key is pressed, the # screen must remain blank, for privacy of the blind user who is typing on the # keyboard and reading on its braille terminal. # # I merely added an ignore_poke variable which is set, and the screen blanked. # Then, poke_blanked_console returns immediatly. Upon real unblank (because of # an Oops or an explicit tioclinux), ignore_poke is reset to get back to normal # operation mode. # # I had to remove the (unnecessary ?) call to unblank_screen from set_selection # to prevent mouse selection unblanking the screen. # # I also added a way for processes to know whether the screen is blanked (the # blind user might hence know whether people can read the screen). # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.11 # [PATCH] Fix tty devfs mess # # From: Christoph Hellwig # # Currently the tty code abuses tty_driver.name as the prefix for the devfs # names of the ttys. This is a very bad idea because it means the tty name # changes depending on whether devfs is enabled or not, leading to different # names in /proc/tty/ depending on whether we have devfs or not (and not # whether it actually is mounted!) and a huge amount of ifdefs. # # The patch below adds a .devfs_name member instead, similar to the block # device changes a few weeks ago. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.12 # [PATCH] misc fixes # # - Add comment about slab ctor behaviour (Ingo Oeser) # # - mm/slab.c:fprob() shows up in profiles a lot. Rename it to something more # meaningful. # # - fatfs printk warning fix (Randy Dunlap) # # - give the the time interpolator list and lock file-static scope (hch) # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.13 # [PATCH] cs423x fixes # # From: Adam Belay # # - cs4236 doesn't check if the memory for the resource table was # successfully allocated. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.14 # [PATCH] remove get_current_user() # # As "Dmitry A. Fedorov" points out, # get_current_user() has a local variable __user which conflicts with the # sparse tagging. But get_current_user() has no callers. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.15 # [PATCH] remove triggerable BUG() from de_thread # # From: Ingo Molnar # # Apparently this BUG is triggerable due to correct and expected events. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.16 # [PATCH] Don't let processes be scheduled on CPU-less nodes (1/3) # # From: Matthew Dobson # # sched_best_cpu schedules processes on nodes based on node_nr_running. For # CPU-less nodes, this is always 0, and thus sched_best_cpu tends to migrate # tasks to these nodes, which eventually get remigrated elsewhere. # # This patch adds include/linux/topology.h, and modifies all includes of # asm/topology.h to linux/topology.h. A subsequent patch in this series adds # helper functions to linux/topology.h to ensure processes are only migrated # to nodes with CPUs. # # Test compiled and booted by Andrew Theurer (habanero@us.ibm.com) on both # x440 and ppc64. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.17 # [PATCH] Don't let processes be scheduled on CPU-less nodes (2/3) # # From: Matthew Dobson # # This patch defines a topology macro for ppc64, nr_cpus_node(node) which # returns the number of CPUs on 'node'. This patch also adds code to compute # and store these values in an array for quick lookup. # # Test compiled and booted by Andrew Theurer (habanero@us.ibm.com) on both # x440 and ppc64. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.18 # [PATCH] Don't let processes be scheduled on CPU-less nodes (3/3) # # From: Matthew Dobson # # This patch implements a generic version of the nr_cpus_node(node) macro # implemented for ppc64 by the previous patch. # # The generic version simply computes an hweight of the bitmask returned by # node_to_cpumask(node) topology macro. # # This patch also adds a generic_hweight64() function and an hweight_long() # function which are used as helpers for the generic nr_cpus_node() macro. # # This patch also adds a for_each_node_with_cpus() macro, which is used in # sched_best_cpu() in kernel/sched.c to fix the original problem of # scheduling processes on CPU-less nodes. This macro should also be used in # the future to avoid similar problems. # # Test compiled and booted by Andrew Theurer (habanero@us.ibm.com) on both # x440 and ppc64. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.19 # [PATCH] DAC960 fix for fibre channel transfer rate # # From: Dave Olien # # The change makes the transfer rate numbers come out right for the fibre # channel version of this controller. # # For 1G FC, the NegotiatedSynchronousMegaTransfers is 1000, and the # NegotiatedDataWidthBIts is 1. The old code assumed NegotiatedDataWidthBits # was always either 8 or 16. The new code is simpler, and does the # calculation correctly for all cases. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.20 # [PATCH] /proc/sys/vm/min_free_kbytes # # From: Matthew Dobson # # This resurrects the old /proc/sys/vm/free_pages functionality: the ability to # tell page reclaim how much free memory to maintain. # # This may be needed for specialised networking applications, and it provides # an interesting way to stress the kernel: set it very low so atomic # allocations can easily fail. # # Also, a 16G ppc64 box currently cruises along at 1M free memory, which is # surely too little to supporthigh-speed networking. We have not changed that # setting here, but it is now possible to do so. # # The patch also reduces the amount of free memory which the VM will maintain # in ZONE_HIGHMEM, as it is almost always wasted memory. # -------------------------------------------- # 03/06/06 akpm@digeo.com 1.1215.91.21 # [PATCH] loop: remove the balance_dirty_pages() call # # The loop thread is getting permanently stuck in balance_dirty_pages() # (nr_writeback is exceeded) because the loop thread itself is responsible for # completing writeback on behalf of higher layers. # # So we need to take that out: don't throttle the loop thread. Throttle the # tasks which are generating all the dirty data instead. # -------------------------------------------- # 03/06/06 torvalds@home.transmeta.com 1.1215.91.22 # Remove half-deleted zero-sized sound file. # -------------------------------------------- # 03/06/06 torvalds@home.transmeta.com 1.1215.89.2 # Merge http://linux-sound.bkbits.net/linux-sound # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/06 joe@wavicle.org 1.1215.89.3 # [PATCH] USB: vicam.c patch # # I noticed a version of vicam.c a few revisions ago had all the /proc fs # writing removed because I was incorrectly using potentially tainted user # space pointers. Here's a patch which I think fixes the pointer issue and # restores the /proc fs interface to vicam. If this fix is still # problematic, please let me know and I'll fix whatever comes up. # -------------------------------------------- # 03/06/06 oliver@neukum.org 1.1215.89.4 # [PATCH] USB: kill a compiler warning in hpusbscsi # # - kill useless variable # -------------------------------------------- # 03/06/06 stern@rowland.harvard.edu 1.1215.89.5 # [PATCH] USB: Don't allocate transfer buffers on the stack in hub.c # # Allocate hub status input buffers separately and not on the stack. # -------------------------------------------- # 03/06/06 stern@rowland.harvard.edu 1.1215.89.6 # [PATCH] USB: Rename static functions in hub.c and increase timeouts # # As requested by David Brownell, this patch removes the usb_ prefix from # the static functions in hub.c. It also multiplies the timeouts for # GET_STATUS and GET_DESCRIPTOR control transfers by USB_CTRL_GET_TIMEOUT. # -------------------------------------------- # 03/06/06 petkan@users.sourceforge.net 1.1215.89.7 # [PATCH] USB: pegasus patch # # better error handling and ethtool ioctl() cleanup. HOME_PNA # now should work (at least for the pegasus II based devices). # # one more vendor and device IDs. # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.42 # Merge samba.org:/stuff/paulus/kernel/linux-2.5 # into samba.org:/stuff/paulus/kernel/for-linus-ppc # -------------------------------------------- # 03/06/06 torvalds@home.transmeta.com 1.1215.92.1 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/06 rusty@rustcorp.com.au 1.1215.92.2 # [PATCH] kallsyms in proc # # This adds a /proc/kallsyms if you have CONFIG_KALLSYMS in your # kernel. The output is nm-like, with symbols in caps (global) if # exported using EXPORT_SYMBOL, rather than the normal static # vs. non-static differentiation. # # This is useful for things like performance monitoring tools (profiling # etc) that want to match addresses to names in user space. # -------------------------------------------- # 03/06/06 rusty@rustcorp.com.au 1.1215.92.3 # [PATCH] Move cpu notifiers et al to cpu.h # # Trivial patch: when these were introduced cpu.h didn't exist. # -------------------------------------------- # 03/06/06 anton@samba.org 1.1215.92.4 # [PATCH] update ppc64 MAINTAINERS entry # # An update to the ppc64 MAINTAINERS entry. # -------------------------------------------- # 03/06/07 sam@mars.ravnborg.org 1.1215.93.1 # docbook/kernel-api: include files updated # # Path to pci_hotplug_core corrected. # Added !Eli/string.h to document strlcpy and friends # -------------------------------------------- # 03/06/07 sam@mars.ravnborg.org 1.1215.93.2 # docbook: Recognize sis900 functions # # Adapted comments to follow what kernel-doc (docbook) understands # -------------------------------------------- # 03/06/07 sam@mars.ravnborg.org 1.1215.93.3 # docbook: Warn about missing parameter definitions # # Previously kernel-doc silently ignored missing parameter descriptions # but sometimes 'make sgmldocs' failed with exit code > 0. # When kernel-doc encounter parameters where the description is missing # it now prints a warning. # docproc corrected so previously exit code are recorded. # docbook makefile cleaned up a bit # -------------------------------------------- # 03/06/07 sam@mars.ravnborg.org 1.1215.93.4 # docbook: Move definition of MODULENAME_SIZE # # The location between the comment and the prototype confused kernel-doc. # Kernel-doc requires the prototype to follow after the comment section. # -------------------------------------------- # 03/06/07 sam@mars.ravnborg.org 1.1215.92.5 # Merge bk://linux-sam.bkbits.net/main # into mars.ravnborg.org:/home/sam/src/linux/kernel/bk/v2.5 # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.43 # PPC32: Start adding __user to mark pointers from userspace. # # This reduces the number of warnings from Linus' `check' program # for stuff in arch/ppc. # -------------------------------------------- # 03/06/07 hch@lst.de 1.1215.94.1 # [NET]: Fix accidental revert of init_etherdev killing in PPC net drivers. # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.44 # PPC32: Fix irq_desc initialization. # -------------------------------------------- # 03/06/07 herbert@gondor.apana.org.au 1.1215.94.2 # [XFRM_USER]: Allow del policy by id and get policy by selector. # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.45 # PPC32: Fix various minor problems pointed out by Linus' check program. # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.46 # PPC32: Convert some K&R-style functions to ANSI-style. From Steven Cole. # -------------------------------------------- # 03/06/07 rddunlap@osdl.org 1.1215.94.3 # [IPV6]: Fix spelling/typos. # -------------------------------------------- # 03/06/07 mk@linux-ipv6.org 1.1215.94.4 # [IPV6]: Fix esp6 extension headers handling. # -------------------------------------------- # 03/06/07 sri@us.ibm.com 1.1215.94.5 # [IPV6]: Allow ipv6 fragmentation via ip6_xmit() when ipfragok is set. # -------------------------------------------- # 03/06/07 shemminger@osdl.org 1.1215.94.6 # [DECNET]: Fix build warnings. # -------------------------------------------- # 03/06/07 davem@nuts.ninka.net 1.1215.94.7 # [SCTP]: Kill unused local variable in init_sctp_mibs. # -------------------------------------------- # 03/06/07 davej@codemonkey.org.uk 1.1215.81.6 # [CPUFREQ] missing export # powernow-k7 needs dmi_broken # -------------------------------------------- # 03/06/07 acme@conectiva.com.br 1.1215.95.1 # o list.h: improve hlist # # This changeset: # # 1. Implements hlist_add_after # 2. uses prefetch in hlist_for_each, using a trick that ends up being # equivalent to having the prefetch instruction in the first block # of the hlist_for_each for block, the compiler optimizes the second # "test" away, as its result is constant # 3. implements hlist_for_each_entry and hlist_for_each_entry safe, # using a struct hlist_node as iterator to avoid the extra branches a # similar implementation to list_for_each_entry would have if used # a typed iterator, but while avoiding having to have the explicit # hlist_entry as in hlist_for_each. # # 4. Converts the hlist_for_each users that had explicit prefetches, i.e. # removed the explicit prefetch # # 5. fix a harmless list_entry use in a hlist_for_each in inode.c # # -------------------------------------------- # 03/06/07 torvalds@home.transmeta.com 1.1215.1.47 # Merge bk://ppc.bkbits.net/for-linus-ppc # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/07 torvalds@home.transmeta.com 1.1215.1.48 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/07 l.s.r@web.de 1.1215.1.49 # [PATCH] hugetlbfs: fix error reporting in case of invalid mount # # hugetlbfs was unnecessarily verbose, and didn't even print out the right # thing if given invalid mount options. # # Just return EINVAL. # -------------------------------------------- # 03/06/07 ak@suse.de 1.1215.1.50 # [PATCH] Work around gcc 3.3 bug on amd64 in binfmt_elf.c # # This patch works around a gcc 3.3 bug on AMD64. On AMD64 the # get_current() function expands to a switch on sizeof which has to be # optimized away by the compiler, finally yielding an inline assembler # statement. In some cases it seems to get that wrong and forgets to # reference and use the argument. I have only seen it happen in # binfmt_elf so far. # # Work around by just computing "current" once. # -------------------------------------------- # 03/06/07 torvalds@home.transmeta.com 1.1215.1.51 # Merge bk://linux-dj.bkbits.net/cpufreq # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/07 torvalds@home.transmeta.com 1.1215.1.52 # Merge bk://kernel.bkbits.net/acme/hlist-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/07 l.s.r@web.de 1.1215.1.53 # [PATCH] Some more stuff missed during the struct sock cleanup # # The members of struct sock got a prefix of 'sk_' recently. # # This patch updates smbfs to match the new world order. # -------------------------------------------- # 03/06/07 elenstev@mesatop.com 1.1215.1.54 # [PATCH] Another final K&R to ANSI C cleanup of zlib # # Here is another final K&R to ANSI C cleanup patch for zlib. # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.55 # [PATCH] fix check warnings in drivers/macintosh # # This patch removes the warnings that the `check' program came up with # in drivers/macintosh. This involves adding __user in various places # and fixing some non-ANSI function definitions for functions that take # no arguments. # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.56 # [PATCH] Fix check warnings in PPP code # # This patch removes the warnings that the check program came up with in # the PPP code: ppp_async.c, ppp_deflate.c and ppp_generic.c. This # involved adding __user and converting K&R-style function definitions # to ANSI-style. I also took the time to add some extra comments to # ppp_deflate.c explaining in more detail what each function does and # what its arguments are. # -------------------------------------------- # 03/06/07 paulus@samba.org 1.1215.1.57 # [PATCH] Move BUG/BUG_ON/WARN_ON to asm headers # # This patch moves the definitions of BUG, BUG_ON and WARN_ON from # to (which includes), and # supplies a new implementation for PPC which uses a conditional trap # instruction for BUG_ON and WARN_ON, thus avoiding a conditional # branch. This patch trims over 50kB from the size of the kernel that I # use on powermacs. # # With this patch, on PPC we have a __bug_table section in the vmlinux # binary, and also in modules if they use BUG, BUG_ON or WARN_ON. The # __bug_table section has one entry for each BUG/BUG_ON/WARN_ON, giving # the address of the trap instruction and the corresponding line number, # filename and function name. This information is used in the exception # handler for the exception that the trap instruction produces. The # arch-specific module code handles the __bug_table section so that # BUG/BUG_ON/WARN_ON work correctly in modules. # # Several architecture maintainers have acked this change. It should be # completely benign for all of the other architectures (though they may # decide to do something similar if they have a conditional trap # instruction available). # -------------------------------------------- # 03/06/07 ak@suse.de 1.1215.1.58 # [PATCH] Make spinlock debugging compile on x86-64 # # cpu_relax is on i386 and x86-64 in processor.h, not system.h # This makes CONFIG_DEBUG_SPINLOCK compile for x86-64 # -------------------------------------------- # 03/06/07 ak@suse.de 1.1215.1.59 # [PATCH] x86-64 merge # # This brings the x86-64 port uptodate for 2.5.70. Just various bugfixes # and a few merges with other people. # # Only changes architecture specific files. # # - Fix compiling with CONFIG_IA32_EMULATION on # - Readd lost apic power management patch from Pavel (fixes oprofile too) # - Increase max IOAPICs to 16 # - Fix compiling with CONFIG_IA32_EMULATION off # - Compile fix for suspend (Pavel Machek) # - Support boxes with APIC disabled # - Remove code to forcibly enable APIC # - Small fix for APIC timer calibration. # - Fix deadlock in SMP reboot # - Some warning fixes # - Save edid info at boot (Bryan O'Sullivan) # - Add better locking to oops printing and support it for page faults. # - Don't printk handled signals. # - Update defconfig # - Add copy_in_user # -------------------------------------------- # 03/06/07 azarah@gentoo.org 1.1215.1.60 # o ethertap: fix struct sock cleanup leftover # -------------------------------------------- # 03/06/07 sam@ravnborg.org 1.1215.1.61 # [PATCH] be more flexible about creating library archives # # New makefile variable introduced: lib-y # # The lib-y syntax allows you to do the usual tricks such as: # # lib-$(CONFIG_SMP) += percpu_counter.o # # A built-in.o is always present in a directory that list .o files in # either obj-* or lib-*. # # In contrast, lib.a is made only when lib-y is defined. # # I also updated lib/Makefile, so that crc32.o is now always built-in # if selected. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.62 # [PATCH] Fix build for CONFIG_KALLSYMS=n # # From: "David S. Miller" # # add_kallsyms() doesn't exist if !CONFIG_KALLSYMS. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.63 # [PATCH] ppc64: fixup for family/sk_family rename # # Fix the ppc64 build for the great socket member renaming. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.64 # [PATCH] Fix the build with !CONFIG_PROC_FS # # From: Adrian Bunk # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.65 # [PATCH] common 32-bit ioctl code # # From: Pavel Machek # # Various 64-bit architectures are duplicating a ton of 32-bit compat code. # # Pavel's patch creates a generic 32-bit ioctl file in fs/compat_ioctl.c which # architectures will #include from within their arch/ layer. # # Has been reviewed by everyone and tested on sparc64, x86_64, ppc64 and ia32. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.66 # [PATCH] ioctl32 cleanup: sparc64 # # From: Pavel Machek # # Make sparc64 use generic ioctl32 code. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.67 # [PATCH] x86_64: use common ioctl code # # From: Pavel Machek # # Convert x86_64 to use the common ioctl code. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.68 # [PATCH] remove_proc_entry() fix # # From Bartlomiej Zolnierkiewicz # # With !CONFIG_PROC_FS, ieee1394_core fails to compile because the argument to # this inline is still evaluated. But it doesn't exist. # # A general fix is to not evaluate the arg at all. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.69 # [PATCH] JFFS_PROC_FS must depend on JFFS_FS # # From: Adrian Bunk # # Compilation fails if JFFS_PROC_FS and !PROC. The following dependency in # the Kconfig file is needed. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.70 # [PATCH] fix apic handling for NUMA-Q # # From: "Martin J. Bligh" # # All this fancy stuff in cpu_mask_to_apicid doesn't work for NUMA-Q, because # it's based on logical apicids, and we use physical. Drop back to just # always returning 0xF instead, which is the broadcast physical ID, and has # been working fine since the dawn of time. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.71 # [PATCH] cleanup conditionals in summit subarch # # From: "Martin J. Bligh" # # The "magic" switching in subarch was ugly when I put it there, and nobody # liked it then (including me). It hasn't got any prettier since. Andi's # generic arch stuff is a cleaner solution for now, so we can remove the old # hacky stuff, and significantly simplify the code. All this does is replace # "(x86_summit ? A : B)" with "A" everywhere. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.72 # [PATCH] provide bus to node mapping for Summit # # From: Matt Dobson, via Martin Bligh # # This parses the machine's BIOS tables to populate the # mp_bus_id_to_node[bus] array. Only affects Summit machines, safe, boring. # Has been in -mjb tree for ages, and works fine. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.73 # [PATCH] rocket.c: devfs fix # # Christoph says this undef is not correct. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.74 # [PATCH] add bootmem failure warning # # From: Dave Hansen # # __alloc_bootmem_core() has a couple of BUG_ON()'s. Since the handlers # aren't set up this early, if you hit it, you just get along stream of # "Unknown Interrupt" messages. It would be very nice to have a little # bit more information when something has decided to BUG() out this # early. # -------------------------------------------- # 03/06/07 akpm@digeo.com 1.1215.1.75 # [PATCH] eventpoll: fix possible use-after-free # # From: Davide Libenzi # # After the ep_remove() the "epi" is given back to the cache, so "epi->ep" # might become invalid. It was not cought by my tests because the element # wasn't immediately reused (and because I was using a single epoll fd, so # the "ep" item remained the same). # -------------------------------------------- # 03/06/07 B.Zolnierkiewicz@elka.pw.edu.pl 1.1215.1.76 # [PATCH] switch ide to taskfile IO # # - rewrite taskfile PIO handlers # (they now comply with ide state machine and use bio walking) # - switch ide-disk.c to use *only* taskfile IO # - swicth pdc4030.c to use *only* taskfile IO (untested) # - remove old cruft (>600 lines) # -------------------------------------------- # 03/06/07 sam@ravnborg.org 1.1215.1.77 # [PATCH] all archs: Replace O_TARGET with lib-y # # lib-y is the new way to define what objects belongs to a library. The # implementation was not made backwards compatible and therefore an update # to all architectures are needed. # # This is a simple replacement of obj-* to lib-* and deletion of L_TARGET. # The new mechanish where lib.a can be mixed with built-in.o is not # utilised. # -------------------------------------------- # 03/06/08 spyro@f2s.com 1.1215.1.78 # [PATCH] ARM26 architecture # # The old 26-bit ARM support was long since dropped out of the regular ARM # support, since it was different enough to not make sense to maintain as # one port. # # This re-introduces arm26 as an architecture of its own. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.79 # [PATCH] zlib cleanup: C++ workarounds # # We don't use any cplusplus in the kernel. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.80 # [PATCH] zlib merge: turboc # # This is the first bit of the missing merge towards 1.1.4. Applies on # top of the previous cleanups. # # This one rips out an ugly #ifdef and seems to catch a theoretical # error possibility. Always thought that they fixed more than they # officially admitted. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.81 # [PATCH] zlib merge: inffast.c # # Most of it is reformatting, but the functional bits should fix real # problems. A loop is introduced, just like in the turboc patch and one # of the three condition bodies has been expanded. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.82 # [PATCH] Mark Compaq MAINTAINERS entries stale # # They may have some new HP address, unknown for now. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.83 # [PATCH] zlib cleanup: local # # Simple s/local/static/. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.84 # [PATCH] zlib cleanup: Z_NULL removal # # s/Z_NULL/NULL/g. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.85 # [PATCH] zlib cleanup: unnecessary cast removal # # This removes unnecessary NULL casting. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.86 # [PATCH] zlib merge: return code # # Don't think anyone actually bothers to check specific error codes, but # it shouldn't hurt either. # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.87 # [PATCH] zlib merge: avoid 8-bit window errors # # More merging from zlib-1.1.4 # # force windowBits > 8 to avoid a bug in the encoder for a window size # of 256 bytes. (A complete fix will be available in 1.1.5). # # James Carlson: # # The problem is that s->strstart gets set to a very large # positive integer when wsize (local copy of s->w_size) is # subtracted in deflate.c:fill_window(). This happens because # MAX_DIST(s) resolves as a negative number when the window size # is 8 -- MAX_DIST(s) is defined as s->w_size-MIN_LOOKAHEAD in # deflate.h. MIN_LOOKAHEAD is MAX_MATCH+MIN_MATCH+1, and that # is 258+3+1 or 262. Since a window size of 8 gives s->w_size # 256, MAX_DIST(s) is 256-262 or -6. # # This results in read_buf() writing over memory outside of # s->window, and a crash. # -------------------------------------------- # 03/06/08 sam@mars.ravnborg.org 1.1215.96.1 # Merge mars.ravnborg.org:/home/sam/src/linux/kernel/bk/linux-2.5 # into mars.ravnborg.org:/home/sam/src/linux/kernel/bk/docbook # -------------------------------------------- # 03/06/08 torvalds@home.transmeta.com 1.1215.1.88 # Quick response to de-listing the Compaq FC/RAID controllers # from the MAINTAINERS list. How they're HP, and maintained # by Stephen Cameron. # -------------------------------------------- # 03/06/08 rth@kanga.twiddle.net 1.1215.97.1 # Merge kanga.twiddle.net:/home/rth/work/linux/linus-2.5 # into kanga.twiddle.net:/home/rth/work/linux/axp-2.5 # -------------------------------------------- # 03/06/08 torvalds@home.transmeta.com 1.1215.1.89 # Merge http://linux-sam.bkbits.net/docbook # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/08 James.Bottomley@SteelEye.com 1.1215.1.90 # [PATCH] fix character subsystem initialisation # # chr_dev_init() should be a subsys_initcall(), since it needs to # initialize before any drivers that use the character device # infrastructure. # -------------------------------------------- # 03/06/08 sam@ravnborg.org 1.1215.1.91 # [PATCH] kbuild: Document newly added lib-y # -------------------------------------------- # 03/06/08 rth@kanga.twiddle.net 1.1215.97.2 # [ALPHA] Implement bcopy. # -------------------------------------------- # 03/06/08 rth@kanga.twiddle.net 1.1215.97.3 # [ALPHA] Avoid warning in asm/unaligned.h. # -------------------------------------------- # 03/06/08 rth@kanga.twiddle.net 1.1215.97.4 # [ALPHA] Fix missed __ex_table to conversion to pc-relative relocs. # -------------------------------------------- # 03/06/08 rth@kanga.twiddle.net 1.1215.97.5 # [ALPHA] Streamline calls to __copy_user and __do_clear_user. # -------------------------------------------- # 03/06/08 rth@kanga.twiddle.net 1.1215.97.6 # [ALPHA] Fixup fallout from force_successful_syscall_return change. # -------------------------------------------- # 03/06/08 torvalds@home.transmeta.com 1.1215.1.92 # Merge bk://are.twiddle.net/axp-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/08 joern@wohnheim.fh-wedel.de 1.1215.1.93 # [PATCH] zlib changes: memlevel # # Reduce MAX_MEM_LEVEL to 8. This reduces zlib memory consumption by # 128k (from ~400k to ~270k) at the theoretical cost of worse # compression. No code currently in the kernel actually uses the better # compression, so the practical cost is zero. # -------------------------------------------- # 03/06/09 vnuorval@tcs.hut.fi 1.1215.1.94 # [IPV6]: Add ip6ip6 tunnel driver. # -------------------------------------------- # 03/06/09 elenstev@mesatop.com 1.1215.98.1 # [PATCH] Two more sources of "non-ANSI parameter list" warnings # # This removes the last sources of "non-ANSI parameter list" warnings for # zlib_deflate. # -------------------------------------------- # 03/06/09 thornber@sistina.com 1.1215.98.2 # [PATCH] dm: Replace __HIGH() and __LOW() macros # # Replace __HIGH() and __LOW() with max() and min_not_zero(). # -------------------------------------------- # 03/06/09 thornber@sistina.com 1.1215.98.3 # [PATCH] dm: signed/unsigned audit # -------------------------------------------- # 03/06/09 thornber@sistina.com 1.1215.98.4 # [PATCH] dm: new suspend/resume target methods # # Some targets may perform io of their own volition, eg. a mirror # performing recovery, a cache target pulling in different chunks. We # cannot let them perform this io while the device is suspended. This # patch adds 2 new methods to the target type, which instruct the target # to suspend/resume itself. All targets start in the suspended state, # so should expect an initial resume call. Simple targets do not need # to implement these functions. # -------------------------------------------- # 03/06/09 thornber@sistina.com 1.1215.98.5 # [PATCH] dm: Lift dm_div_up() # # Pull dm_div_up() out of dm-table.c into dm.h # -------------------------------------------- # 03/06/09 thornber@sistina.com 1.1215.98.6 # [PATCH] dm: Fix memory leak in dm_register_target() # # [From Patrick Caulfield] # -------------------------------------------- # 03/06/09 thornber@sistina.com 1.1215.98.7 # [PATCH] dm: Remove some debug messages # -------------------------------------------- # 03/06/09 thornber@sistina.com 1.1215.98.8 # [PATCH] dm: Remove an old FIXME # -------------------------------------------- # 03/06/09 herbert@gondor.apana.org.au 1.1215.1.95 # [IPSEC]: Zap killed policies from the flow cache properly. # -------------------------------------------- # 03/06/09 yoshfuji@linux-ipv6.org 1.1215.1.96 # [IPV6]: dev_get_by_name("lo") --> dev_hold(&loopback_dev). # -------------------------------------------- # 03/06/09 yoshfuji@linux-ipv6.org 1.1215.1.97 # [IPV6]: ipv6_addr_prefix() cleanup, eliminate duplication. # -------------------------------------------- # 03/06/09 geert@linux-m68k.org 1.1215.1.98 # [NET]: asm/smp.h --> linux/smp.h in sch_ingress.c # -------------------------------------------- # 03/06/09 hch@lst.de 1.1215.1.99 # [NET]: Convert skfp over to initcalls, kill fddi cruft from Space.c # -------------------------------------------- # 03/06/09 torvalds@home.transmeta.com 1.1215.1.100 # Merge bk://kernel.bkbits.net/davem/net-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/09 rmk@flint.arm.linux.org.uk 1.1215.99.1 # [PCMCIA] Fix sa11xx_core.c oops when changing cpu frequency. # -------------------------------------------- # 03/06/09 rmk@flint.arm.linux.org.uk 1.1215.99.2 # [PCMCIA] Convert sa11xx platforms to use new class code. # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.101 # PCI: remove pci_present() from arch/sparc/kernel/ebus.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.102 # PCI: remove pci_present() from arch/sparc64/kernel/ebus.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.103 # PCI: remove pci_present() from drivers/atm/ambassador.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.104 # PCI: remove pci_present() from drivers/atm/fore200e.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.105 # PCI: remove pci_present() from drivers/atm/nicstar.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.106 # PCI: remove pci_present() from drivers/char/epca.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.107 # PCI: remove pci_present() from drivers/char/ip2main.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.108 # PCI: remove pci_present() from drivers/char/isicom.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.109 # PCI: remove pci_present() from drivers/char/istallion.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.110 # PCI: remove pci_present() from drivers/char/rio/rio_linux.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.111 # PCI: remove pci_present() from drivers/char/rocket.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.112 # PCI: remove pci_present() from drivers/char/specialix.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.113 # PCI: remove pci_present() from drivers/char/stallion.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.114 # PCI: remove pci_present() from drivers/char/sx.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.115 # PCI: remove pci_present() from drivers/i2c/i2c-elektor.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.116 # PCI: remove pci_present() from drivers/ide/ide.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.117 # PCI: remove pci_present() from drivers/isdn/eicon/Divas_mod.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.118 # PCI: remove pci_present() from drivers/isdn/hysdn/hysdn_init.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.119 # PCI: remove pci_present() from drivers/media/radio/radio-maestro.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.120 # PCI: remove pci_present() from drivers/mtd/devices/pmc551.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.121 # PCI: remove pci_present() from drivers/net/acenic.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.122 # PCI: remove pci_present() from drivers/net/dgrs.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.123 # PCI: remove pci_present() from drivers/net/fc/iph5526.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.124 # PCI: remove pci_present() from drivers/net/hp100.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.125 # PCI: remove pci_present() from drivers/net/saa9730.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.126 # PCI: remove pci_present() from drivers/net/sk98lin/skge.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.127 # PCI: remove pci_present() from drivers/net/skfp/skfddi.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.128 # PCI: remove pci_present() from drivers/net/tc35815.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.129 # PCI: remove pci_present() from drivers/net/tulip/de4x5.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.130 # PCI: remove pci_present() from drivers/net/wan/lmc/lmc_main.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.131 # PCI: remove pci_present() from drivers/net/wan/sbni.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.132 # PCI: remove pci_present() from drivers/net/wan/sdladrv.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.133 # PCI: remove pci_present() from drivers/pci/proc.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.134 # PCI: remove pci_present() from drivers/pci/syscall.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.135 # PCI: remove pci_present() from drivers/scsi/3w-xxxx.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.136 # PCI: remove pci_present() from drivers/scsi/BusLogic.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.137 # PCI: remove pci_present() from drivers/scsi/aic7xxx_old.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.138 # PCI: remove pci_present() from drivers/scsi/atp870u.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.139 # PCI: remove pci_present() from drivers/scsi/cpqfcTSinit.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.140 # PCI: remove pci_present() from drivers/scsi/dmx3191d.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.141 # PCI: remove pci_present() from drivers/scsi/eata.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.142 # PCI: remove pci_present() from drivers/scsi/gdth.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.143 # PCI: remove pci_present() from drivers/scsi/inia100.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.144 # PCI: remove pci_present() from drivers/scsi/pci2000.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.145 # PCI: remove pci_present() from drivers/scsi/pci2220i.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.146 # PCI: remove pci_present() from drivers/scsi/qla1280.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.147 # PCI: remove pci_present() from drivers/scsi/qlogicfc.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.148 # PCI: remove pci_present() from drivers/scsi/qlogicisp.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.149 # PCI: remove pci_present() from drivers/scsi/sym53c8xx.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.150 # PCI: remove pci_present() from drivers/scsi/sym53c8xx_2/sym_glue.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.151 # PCI: remove pci_present() from drivers/scsi/sym53c8xx_comm.h # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.152 # PCI: remove pci_present() from drivers/scsi/tmscsim.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.153 # PCI: remove pci_present() from drivers/telephony/ixj.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.154 # PCI: remove pci_present() from drivers/video/pm2fb.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.155 # PCI: remove pci_present() from include/asm-sparc64/parport.h # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.156 # PCI: remove pci_present() from sound/oss/cmpci.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.157 # PCI: remove pci_present() from sound/oss/cs4281/cs4281m.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.158 # PCI: remove pci_present() from sound/oss/cs46xx.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.159 # PCI: remove pci_present() from sound/oss/es1370.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.160 # PCI: remove pci_present() from sound/oss/es1371.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.161 # PCI: remove pci_present() from sound/oss/esssolo1.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.162 # PCI: remove pci_present() from sound/oss/i810_audio.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.163 # PCI: remove pci_present() from sound/oss/ite8172.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.164 # PCI: remove pci_present() from sound/oss/maestro3.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.165 # PCI: remove pci_present() from sound/oss/nec_vrc5477.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.166 # PCI: remove pci_present() from sound/oss/rme96xx.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.167 # PCI: remove pci_present() from sound/oss/skeleton.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.168 # PCI: remove pci_present() from sound/oss/sonicvibes.c # -------------------------------------------- # 03/06/09 greg@kroah.com 1.1215.1.169 # PCI: remove pci_present() from sound/oss/trident.c # -------------------------------------------- # 03/06/09 mochel@osdl.org 1.1215.100.1 # [driver model] Rewrite system device API # # System devices are special, and after two years of listening to Linus # preach this, it finally sunk in enough to do something about. We don't # need to regard them as real devices that reside on a peripheral bus and # can be dynamically bound to drivers. If we discover, e.g. a CPU, we know # by default that we have a driver for it, and we know damn well that we # have a CPU. We still need to keep track of all the devices, and all the # devices of a particular type. The kobject infrastructure allows us to do # this, without the overhead of the regular model. # # A new subsystem is defined that registers as a child object of # devices_subsys, giving us: # # /sys/devices/system/ # # struct sysdev_class { # struct list_head drivers; # # /* Default operations for these types of devices */ # int (*shutdown)(struct sys_device *); # int (*suspend)(struct sys_device *, u32 state); # int (*resume)(struct sys_device *); # struct kset kset; # }; # # Defines a type of system device. These are registered on startup, by e.g. # drivers/base/cpu.c. The methods are default operations for devices of that # type that may or may not be used. For things like the i8259 controller, # these will be filled in, since it is registered by the same component that # the device controls reside in. # # For things like CPUs, generic code will register the class, but other # architecture-specific or otherwise configurable drivers may register # auxillary drivers, that look like: # # struct sysdev_driver { # struct list_head entry; # int (*add)(struct sys_device *); # int (*remove)(struct sys_device *); # int (*shutdown)(struct sys_device *); # int (*suspend)(struct sys_device *, u32 state); # int (*resume)(struct sys_device *); # }; # # # Each auxillary driver gets called during each operation on a device of a # particular class. # Auxillary drivers may register with a NULL class parameter, in which case # they will be added to a list of 'global drivers' that get called for each # device of each class. # # # Besides providing a decent of cleanup for system device drivers, this also # allows: # # - Special handling of system devices during power transitions. # # We no longer have to worry about shutting down the PIC before we shut # down any devices. We can shut down the system devices after we've shut # down every other device. # # Ditto for suspend/resume cycles. Almost (if not) all PM actions for # system devices happen with interrupts off, and require only one call, # which makes that easier. But, we can also make sure we take care of # these last during suspend and first during resume. # # - Easy expression of configurable device-specific interfaces. # # Namely cpufreq and mtrr. We don't have to worry about mispresentation in # the driver model (like recent MTRR patches) or using a cumbersome # interface ({device,class}_interface) that don't receive all the # necessary calls. # # - Consolidation of userspace representation. # # No longer do we have /sys/devices/sys, /sys/bus/sys, and /sys/class/cpu, # etc. We have only /sys/devices/system: # # # tree /sys/devices/system/ # /sys/devices/system/ # |-- cpu # | `-- cpu0 # |-- i8259 # | `-- i82590 # |-- lapic # | `-- lapic0 # |-- rtc # | `-- rtc0 # `-- timer # `-- timer0 # # Each directory in 'system' is the class, and each directory under that is # the instance of each device in that class. # -------------------------------------------- # 03/06/09 mochel@osdl.org 1.1215.100.2 # [list.h] Add list_for_each_entry_reverse # -------------------------------------------- # 03/06/09 mochel@osdl.org 1.1215.100.3 # [kobject] Add set_kset_name # # Shorthand macro for initializing only the name of an embedded kset in an # object. # -------------------------------------------- # 03/06/09 mochel@osdl.org 1.1215.100.4 # [driver model] Make sure that system devices are handled specially power-wise # # - Suspend system devices last, after interrupts have been enabled. # - Resume them first, before interrupts are enabled. # - Shut them down last, after everything else. # -------------------------------------------- # 03/06/09 mochel@osdl.org 1.1215.100.5 # [driver model] Convert to new system device API # -------------------------------------------- # 03/06/09 willy@debian.org 1.1215.1.170 # [PATCH] PCI: domain support for sysfs # -------------------------------------------- # 03/06/09 fcusack@fcusack.com 1.1215.101.1 # [PATCH] nfs_unlink() problem fix # # When foo is unlinked, nfs_unlink() does a sillyrename, this puts the # dentry on nfs_delete_queue, and (in the VFS) unhashes it from the # dcache. This causes problems, since any later access to the # silly-renamed new .nfs file will create a NEW dentry that aliases the # one we originally created, but unhashed. # # This causes various confusion, especially if we want to try to delete it # again later. # # So fix this by not unhash the dentry after silly-renaming. In 2.2, each # fs was responsible for doing a d_delete(), in 2.4 and later it happens # in the VFS layer and I think it was just an oversight that the 2.4 VFS # doesn't consider sillyrename (considering the code and comments that are # cruft). # # Also fixed up some comments while debugging this. # -------------------------------------------- # 03/06/10 perex@suse.cz 1.1215.102.1 # ALSA update # - fixed undefined symbols in PnP layer # - fixed various warnings # - azt3328 - fixed compilation in debug mode # - ice17xx drivers - fixed compilation when both are built-in # - vxpocket and vxp440 # - fixed compilation against the latest PCMCIA interface # - fixed compilation when both drivers are built-in # - removed empty sound/pci/ice1712/ak4524.c # -------------------------------------------- # 03/06/10 perex@suse.cz 1.1215.101.2 # Merge suse.cz:/home/perex/bk/linux-sound/linux-sound # into suse.cz:/home/perex/bk/linux-sound/work # -------------------------------------------- # 03/06/10 perex@suse.cz 1.1215.101.3 # ALSA micro update - fixed compilation of VXPocket drivers (missing symbols) # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.6 # [lapic] Convert to new system device API. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.7 # [i8259] Convert to use new system device API. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.8 # [nmi] Convert to use new system device API. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.9 # [timer] Convert to use new system device API. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.10 # [oprofile] Convert to use new system device API. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.11 # [x86-64 i8259] Convert to use new system device API. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.12 # [s390 xpram] Convert to use new system device API. # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.171 # [PATCH] PCI: add pci_find_next_bus() function to prevent people from walking pci bus lists themselves. # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.172 # [PATCH] PCI: remove pci_for_each_bus() usage from arch/ia64/hp/common/sba_iommu.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.173 # [PATCH] PCI: remove pci_for_each_bus() usage from drivers/pci/pci.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.174 # [PATCH] PCI: remove pci_for_each_bus() macro as there are now no more users of it. # -------------------------------------------- # 03/06/10 david-b@pacbell.net 1.1215.1.175 # [PATCH] PCI: pci pool, poison more like slab code # # This adds a new poisoning mode, distinguishing memory # that's uninitialized from memory that's freed. The # slab code has been doing this for a while now. # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.176 # [PATCH] PCI: remove pci_bus_b() call in arch/i386/pci/common.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.177 # [PATCH] PCI: remove some pci_bus_b() calls in drivers/pci/power.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.178 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/pci-2.5 # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.1.179 # Merge http://linux-sound.bkbits.net/linux-sound # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.13 # [driver model] Create include/linux/sysdev.h and define sysdev_attribute. # # Split out all system device definitions from device.h into their own header # sysdev.h # # Define struct sysdev_attribute and define functions to export attributes # in sysfs. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.14 # [driver model] Make sure right header is used for cpu.c # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.15 # [memblk] Convert to use new system device API # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.16 # [numa nodes] Convert to use new system device API # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.17 # [driver model] Remove system device definitions from device.h # # Should have been in earlier changeset. D'oh. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.18 # [apic] Use sysdev.h instead of device.h # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.19 # [i8259] Use sysdev.h instead of device.h # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.20 # [nmi] Use sysdev.h instead of device.h # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.21 # [timer] Use sysdev.h instead of device.h # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.22 # [oprofile] Use sysdev.h instead of device.h # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.23 # [x86-64 i8259] Use sysdev.h instead of device.h # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.24 # [s390 xpram] Use sysdev.h instead of device.h # -------------------------------------------- # 03/06/10 rmk@flint.arm.linux.org.uk 1.1215.103.1 # Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5 # into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-pcmcia # -------------------------------------------- # 03/06/10 linux@de.rmk.(none) 1.1215.103.2 # [PCMCIA] Move socket_info_t # # This patch introduces "struct pcmcia_socket" which is 100% equal to # the "socket_info_t" defined previously in drivers/pcmcia/cs_internal.h # # Unfortunately, a few other definitons need to be moved as well. # # drivers/pcmcia/cs.c | 4 - # drivers/pcmcia/cs_internal.h | 73 --------------------------------- # include/pcmcia/ss.h | 94 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 97 insertions(+), 74 deletions(-) # -------------------------------------------- # 03/06/10 linux@de.rmk.(none) 1.1215.103.3 # [PCMCIA] Move get_socket_info_by_nr # # This adds a list of all pcmcia sockets which will replace the current # table-based approach. Also, ds.c now relies on cs.c to get the proper # "struct pcmcia_bus_socket *" for the corresponding socket number. # -------------------------------------------- # 03/06/10 linux@de.rmk.(none) 1.1215.103.4 # [PCMCIA] Remove socket_table # # This patch removes the socket_table from cs.c and friends. # # bulkmem.c | 2 - # cs.c | 83 ++++++++++++++++++++++++---------------------------------- cs_internal.h | 7 ++-- # ds.c | 2 - # rsrc_mgr.c | 10 ++++-- # 5 files changed, 46 insertions(+), 58 deletions(-) # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.25 # [driver model] Add save() and restore() methods for system device drivers. # # It turns out that at least some system device drivers need to allocate # memory and/or sleep for one reason or another when either saving or # restoring state. # # Instead of adding a 'level' paramter to the suspend() and resume() methods, # which I despise and think is a horrible programming interface, two new # methods have been added to struct sysdev_driver: # # int (*save)(struct sys_device *, u32 state); # int (*restore)(struct sys_device *); # # that are called explicitly before and after suspend() and resume() # respectively, with interrupts enabled. This gives the drivers the # flexibility to allocate memory and sleep, if necessary. # -------------------------------------------- # 03/06/10 linux@de.rmk.(none) 1.1215.103.5 # [PCMCIA] True driver module locking # # If we use try_module_get(driver->owner) at the right place (and # module_put as well, of course), the check for (driver->use_count > 0) # can't ever return true. So get rid of it, and add the proper module # locking calls. # # ds.c | 22 +++++++--------------- # 1 files changed, 7 insertions(+), 15 deletions(-) # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.180 # [PATCH] PCI: fix up usage of pci_present in drivers/ide/ide.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.181 # [PATCH] PCI: replace usage of pci_present() in drivers/sbus/sbus.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.182 # [PATCH] PCI: pci_present() can finally be removed, as there are no more users of it. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.26 # [driver model] Don't Oops when registering global sysdev drivers. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.27 # [cpu] Use sysdev.h instead of device.h and export cpu_sysdev_class # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.28 # [mtrr] Add save()/restore() methods. # # Patch originally from Nigel Cunningham and Pavel Machek. Cleaned up and # converted to new system device API by your truly. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.29 # [cpufreq] Convert to use new system device API # # - Remove explicit call from arm PM sequence, as its handled implicitly # by sysdev_restore() in driver model core. # -------------------------------------------- # 03/06/10 olh@suse.de 1.1215.89.8 # [PATCH] USB: incorrect ethtool -i driver name # -------------------------------------------- # 03/06/10 mdharm-usb@one-eyed-alien.net 1.1215.89.9 # [PATCH] USB: usb-storage: handle babble # # This patch introduces some handling for babble conditions. # # Basically, once a babble is detected, we return sense data saying the # command was invalid. We also go on to transfer the CSW (for BBB transport) # so we stay in phase with the device. # # This isn't guaranteed to work with every device that babbles, but it can't # hurt compared to the current behavior. Properly operating devices are # unaffected by this patch. # -------------------------------------------- # 03/06/10 mdharm-usb@one-eyed-alien.net 1.1215.89.10 # [PATCH] USB: usb-storage: re-organize probe/disconnect # # This patch re-organizes probe and disconnect into smaller functions (which # are all functionally equivalent to the current code). This allows easier # verification that the code is correct, and will make for easier # implementation of the proper SCSI shutdown code. # -------------------------------------------- # 03/06/10 mdharm-usb@one-eyed-alien.net 1.1215.89.11 # [PATCH] USB: usb-storage: remove dead code # # This patch removes the code that faked the EVPD INQUIRY. The SCSI core no # longer does that, so there is no need to filter it. # -------------------------------------------- # 03/06/10 stern@rowland.harvard.edu 1.1215.89.12 # [PATCH] USB: Make hub.c DMA-aware # # This patch makes the hub status irq DMA-aware, by pre-allocating the # transfer buffer in consistent memory. Unfortunately, there doesn't seem # to be an easy way to do the same for the status report buffers. # -------------------------------------------- # 03/06/10 david-b@pacbell.net 1.1215.89.13 # [PATCH] USB: usb/core/devio: identify process # # Rather than just saying that USBDEVFS_CONTROL failed, # say also which process it failed for ... so it's easier # to figure out what's happen. # -------------------------------------------- # 03/06/10 david-b@pacbell.net 1.1215.89.14 # [PATCH] USB: net2280 patch: control-out fix, minor cleanups # # The main thing this fixes is making the control-OUT path work. # Drivers like RNDIS and DFU need it; this should resolve one # bug report. It also has some minor cleanups. # -------------------------------------------- # 03/06/10 david-b@pacbell.net 1.1215.89.15 # [PATCH] USB: ohci-hcd, remove FIXME # # The endpoint disable() change resolved the bug # identified by the FIXME ... this updates the comment. # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.100.30 # [sysfs] Get zeroed page for file read/write buffers. # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.104.1 # Re-introduce debugging code in list handling, poisoning stale # list pointers to give us a nice oops if somebody is doing something # bad. # # Also introduce hlist_del_rcu_init() - same as hlist_del_init(). # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.104.2 # Fix __d_drop() to properly initialize the d_hash fields, # so that __d_drop() can safely be done multiple times on # a dentry without corrupting other hash entries. # # Noticed by Trond Myklebust. # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.104.3 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/gregkh-2.5 # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.105.1 # Hand merge # -------------------------------------------- # 03/06/10 mochel@osdl.org 1.1215.105.2 # hand merge # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.106.1 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.106.2 # Don't make the source checker default path be quite # so hackish. # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.183 # [PATCH] PCI: sparse fixups for drivers/pci/proc.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.104.4 # [PATCH] USB: fix problem found by sparse in usb.h # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.104.5 # [PATCH] USB: sparse fixups for drivers/usb/core/devices.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.104.6 # [PATCH] USB: sparse fixups for drivers/usb/core/inode.c # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.104.7 # [PATCH] USB: lots of sparse fixups for usbfs # -------------------------------------------- # 03/06/10 greg@kroah.com 1.1215.1.184 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/pci-2.5 # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.104.8 # Merge bk://kernel.bkbits.net/gregkh/linux/linus-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.1.185 # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/10 neilb@cse.unsw.edu.au 1.1215.1.186 # [PATCH] md - Zero out some kmalloced space in md driver # # This should fix most (all??) of the recently reported problems with MD: # # Recent changes to md malloced some data structures differently and # didn't zero out those data structures, where the old code had zeroed it # out. # # This adds the relevant memsets. # -------------------------------------------- # 03/06/10 elenstev@mesatop.com 1.1215.1.187 # [PATCH] K&R to ANSI conversions for fs/jfs/jfs_dmap.c and jfs_xtree.c # -------------------------------------------- # 03/06/10 rusty@rustcorp.com.au 1.1215.1.188 # [PATCH] Fix module load failure case # # Milton Miller noticed a free-after-use problem in the cleanup path of a # failed module load. # # The problem is that mod is moved to point from the sucked-in file # (always freed last) to the module core, after which time the # "free(mod->core), reference mod->percpu" sequence is bogus, eg. when # the module_init function fails. # # This is fixed by keeping the pointer in a local variable, which solves # the problem. We no longer need to reference the free'd data structure. # -------------------------------------------- # 03/06/10 torvalds@home.transmeta.com 1.1215.1.189 # Avoid warning by using an inline function rather than a macro # for the default "pci_domain_nr()" definition. The inline function # will evaluate the argument. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.190 # [PATCH] Remove DRM ioctls for common compat ioctl code # # From: Andi Kleen # # This makes the 2.5 kernel with common ioctl32 code compile with DRM enabled # again. The DRM code in the kernel is obsolete anyways and has been long # removed. It definitely does not belong in the common ioctl emulation # layer. # # Egbert Eich is working on proper 32bit DRM emulation, but it will be likely # directly integrated in the DRI/DRM sources. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.191 # [PATCH] fix possible busywait in rtc_read() # # If two processes are waiting in rtc_read(), only one will get the data. The # other will madly spin around theloop in state TASK_RUNNING until another # interrupt happens. # # Fix it by resetting TASK_INTERRUPTIBLE _inside_ the retry loop. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.192 # [PATCH] fix discontig with 0-sized nodes # # From: Dave Hansen # # In order to turn an 8-way x440 into a 4-way for testing, we often use # mem=(1/2 of total) and maxcpus=4. maxcpus has always worked, but mem= # hasn't. The mem= parameter actually changes the kernel's e820 structure, # which manifests itself as max_pfn. node_end_pfn[] obeys this because of # find_max_pfn_node(), but node_start_pfn[] wasn't modified. # # If you have a mem= line that causes memory to stop before the beginning of # a node, you get a condition where start > end (because start was never # modified). There is a bug check for this, but it was placed just _before_ # the error was made :) # # Also, the bootmem alloc functions die if you request something of zero size # from them. This patch avoids that too. This shouldn't have much of an # effect on non-NUMA systems. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.193 # [PATCH] fix TARGET_CPUS inconsistency # # From: "Martin J. Bligh" # # Patch from Martin Bligh, based on observations by Andrew Theurer and Bill # Irwin. # # TARGET_CPUS is used as a cpu mask by some things, and an apic mask for # others. For SMP, that doesn't matter (they're the same), but for Summit it # does. This patch changes TARGET_CPUS to consistently be a cpu mask # everywhere. Should be a no-op for normal platforms. # # Invalid arguments to cpu_mask_to_apicid for clustered apic mode # architectures will now return the broadcast apicid, in order to ensure # someone still gets the interrupt (was the default init value, and is # safest). # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.194 # [PATCH] update MAINTAINERS for Compaq drivers # # From: "Ni, Michael" # # Update the MAINTANERS file for the various Compaq mass-storage drivers # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.195 # [PATCH] optimize fixed-sized kmalloc calls # # From: Manfred Spraul and Brian Gerst # # The patch performs the kmalloc cache lookup for constant kmalloc calls at # compile time. The idea is that the loop in kmalloc takes a significant # amount of time, and for kmalloc(4096,GFP_KERNEL), that lookup can happen # entirely at compile time. # # A problem has been seen with gcc-3.2.2-5 from RedHat. This code: # # if(__builtin_constant_t(size)) { # if(size < 32) return kmem_cache_alloc(...); # if(size < 64) return kmem_cache_alloc(...); # if(size < 96) return kmem_cache_alloc(...); # if(size < 128) return kmem_cache_alloc(...); # ... # } # # doesn't work, because gcc only optimizes the first two or three comparisons, # and then suddenly generates code. # # But we did it that way anyway. Apparently it's fixed in later compilers. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.196 # [PATCH] fix scheduler bug not passing idle # # From: "Martin J. Bligh" # # rebalance_tick is not properly passing the idle argument through to # load_balance in one case. The fix is trivial. Pointed out by John Hawkes. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.197 # [PATCH] fix numa meminfo # # From: Dave Hansen # # We didn't notice this for a while because we didn't have any memory holes # on the NUMA-Q, but on the x440, we do. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.198 # [PATCH] fix oops in driver/serial/core.c # # From: hugang # # It has a rather blatant null pointer deref and attempted memory leak. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.199 # [PATCH] fix hangs with nfs to localhost # # An NFS mount of localhost hangs the system under heavy writeout loads. # # This is because knfsd gets stuck in balance_dirty_pages(). It is not allowed # to exit from there until the amount of dirty+writeback+unstable memory # subsides. But it will never subside because knfsd itself is responsible for # cleaning the memory. # # This is just like the drivers/block/loop.c hang, only more complex. We # cannot simply disable knfsd's throttling because it would then swamp the # machine under real loads when the clients are remote. # # So we introduce the concept of a "less throttled" process. These processes # are allowed to exceed the preset dirty memory limits by a little. This # allows knfsd to make progrws in writing things out while the local NFS # clients are throttled. It also ensures that knfsd will not swamp the machine # when working on behalf of remote clients. # # Note that even though knfsd is allowed to exceed the default system-wide # dirty memory threshold, this does _not_ cause other memory-dirtying tasks to # get starved out. This is because they are allowed to exit # balance_dirty_pages() after having written their quota of pages, regardless # of the current dirty memory state. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.200 # [PATCH] devfs_mk_dir() fix # # From: Christoph Hellwig # # There may be multiple gendisks with the same .devfs_name in scsi and we # call devfs_mk_dir on each of them. At present that causes a nasty error # message. It is better to permit devfs_mk_dir() to appear to have succeeded. # # ie: it's a `mkdir -p'. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.201 # [PATCH] cpqarray.c: fix stack usage # # From: Jorn Engel # # Reduce stack usage in the cpqarray ioctl byt several hundred bytes. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.202 # [PATCH] dirty bit clearing on s390. # # From: Martin Schwidefsky # # The S390 hardware has the interesting characteristic that the storage key # hardware which records a page's pte-dirtiness is also marked dirty when a # page is modified by the disk hardware. # # Consequently, reading data from disk makes the page appear to be dirty and # things which were read from disk need to be written back. # # Up to now s390 uses a special bit in the pte that is set in mk_pte for the # first user of a page and makes set_pte to clear the storage key. The problem # is that this is a race condition if two processes want to access the same # page simultaneously. Then the page count is already > 1 in mk_pte and nobody # will clear the storage key. It doesn't lead to any data loss because what # happens is that a clean page is considered dirty and is written back to the # disk. The worst scenario is a read only disk where this results in i/o # errors (but no data loss). # # Martin's fix to this is to clear the page's dirty flag in SetPageUptodate(). # Which seems a bit kludgey, but I cannot think of a case in which this in # incorrect, inadequate or inappropriate. So... # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.203 # Make chr_dev_init() happen after PCI init, but before low-level # driver initializations # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1215.1.204 # [PATCH] drivers/char/mem.c cleanup # # From: David Mosberger # # Here is a simplified version of the earlier /dev/mem cleanup. This version # of the patch no longer pretends to support uncached accesses via # read()/write(). Instead, all it does is: # # - consolidate much of the ugly code in uncached_access() # # - move pgprot_noncached() macro to pgtable.h for i386, m68k, ppc, ppc64, # and x86_64 # # - fix the ia64 implementation to use efi_mem_attributes() to determine # the cacheability of an address # # Eventually, we may want to replace the #ifdef CONFIG_IA64 with #ifdef # CONFIG_EFI, but we can do this "on demand", if and when EFI-based x86 # machines become more common. # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.6 # [PCMCIA] split_init # # Split up the socket initialization in cs.c into two pieces: # # pcmcia_register_socket / pcmcia_unregister_socket # will focus on registering sockets with the device core in future, set # all necessary fields etc. # # pcmcia_add_socket / pcmcia_remove_socket # will use an interface to the device class "pcmcia_socket_class" in # future, and mainly take care of what initialization cs.c needs to work # properly. # # This patch is almost completely limited to shuffling code around # # cs.c | 157 +++++++++++++++++++++++++++++++++++-------------------------------- 1 files changed, 83 insertions(+), 74 deletions(-) # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.7 # [PCMCIA] register # # Add a more sane socket registration interface. # # Previously, it was messed up because Greg's struct class hadn't been # invented when I wrote the code: there may be multiple sockets per # "struct device", and there is the need for one "struct class_device" # for each socket. # # drivers/pcmcia/cs.c | 217 +++++++++++++++++++++----------------------- drivers/pcmcia/ds.c | 56 ++--------- # drivers/pcmcia/i82092.c | 48 ++++----- # drivers/pcmcia/i82365.c | 41 ++++---- # drivers/pcmcia/pci_socket.c | 23 +--- # drivers/pcmcia/pci_socket.h | 2 # drivers/pcmcia/tcic.c | 38 ++++--- # include/pcmcia/ss.h | 25 +++-- # 8 files changed, 210 insertions(+), 240 deletions(-) # -------------------------------------------- # 03/06/11 rmk@flint.arm.linux.org.uk 1.1215.103.8 # [PCMCIA] Update SA11xx PCMCIA support for recent changes. # # Re-enable the suspend and resume methods for SA11xx PCMCIA devices, # and update the initialisation/cleanup code for Dominik's recent # changes. # -------------------------------------------- # 03/06/11 dsaxena@com.rmk.(none) 1.1215.107.1 # [ARM PATCH] 1537/1: big-endian support for do_div64 # # Patch from Deepak Saxena # # -------------------------------------------- # 03/06/11 dsaxena@com.rmk.(none) 1.1215.107.2 # [ARM PATCH] 1538/1: arch/arm/Makefile and KConfig Big-Endian changes # # Patch from Deepak Saxena # # This patch adds some hooks to arch/arm/Makefile to enable proper building # of big-endian kernels. It also adds an option to the the top level # arm KConfig that only allows a big-endian kernel to be built if the sub-arch # KConfig sets the CONFIG_ARCH_SUPPORTS_BIG_ENDIAN boolean to true. This is # mainly there to keep people from attemtpting to build a big-endian kernel # for a system that is not capable of running in big-endian mode. # -------------------------------------------- # 03/06/11 nico@org.rmk.(none) 1.1215.107.3 # [ARM PATCH] 1545/1: correct compiler flags for ARMv5TE/XScale # # Patch from Nicolas Pitre # # The -march=armv5te issue looks to be fixed in gcc-3.3. # Since gcc-3.3 is the only gcc version >= 3 that seems to correctly # compile kernels out of the box I think it would be reasonable to # apply this patch and no bother with older gcc versions. # # Yet gcc-3.3 emits V5TE instructions only when -mcpu=xscale is used, # but that seems to have been fixed in current CVS so next gcc release # will use all available instructions properly with -march=armv5te. # -------------------------------------------- # 03/06/11 peterm@uk.rmk.(none) 1.1215.107.4 # [ARM PATCH] 1546/1: iop321 additional Hardware PMMR defines # # Patch from Peter Milne # # Peripheral Memory Mapped Register defs for Messaging, PBI, DMA, I2C # # # -------------------------------------------- # 03/06/11 davej@codemonkey.org.uk 1.1215.108.1 # [AGPGART] Add webpage link # -------------------------------------------- # 03/06/11 davej@tetrachloride.(none) 1.1215.1.205 # Merge tetrachloride.(none):/mnt/raid/src/kernel/2.5/bk-linus # into tetrachloride.(none):/mnt/raid/src/kernel/2.5/agpgart # -------------------------------------------- # 03/06/11 davej@codemonkey.org.uk 1.1215.81.7 # [CPUFREQ] More powernow-k7 hardening. # Even with the previous fixes, a stress test of rapidly changing speeds in a loop locked # up my test laptop just after a day. Making the errata 5 workaround unconditional # (previously it was only for certain steppings) seems to have cured it. It's now been # running the stress test for nearly two days without a problem. # -------------------------------------------- # 03/06/11 davej@tetrachloride.(none) 1.1215.1.206 # Merge bk://linux-dj.bkbits.net/agpgart # into tetrachloride.(none):/mnt/raid/src/kernel/2.5/agpgart # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.106.3 # [driver model] Actually implement sysdev_{create,remove}_file(). # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.106.4 # [driver model] Compile fixes for NUMA # # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.1 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/11 iwi@atm.ox.ac.uk 1.1215.110.1 # [PATCH] Missing magic number # # This fixes an oversight in the reboot code, making some reboot # incantations fail mysteriously. # -------------------------------------------- # 03/06/11 ink@jurassic.park.msu.ru 1.1215.110.2 # [PATCH] PCI domains warning # # We should set CONFIG_PCI_DOMAINS=y unconditionally on alpha to avoid # ifdefs - jensen has dummy PCI infrastructure anyway. # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.2 # [sa1100 irq] Convert to new system device API. # -------------------------------------------- # 03/06/11 agrover@groveronline.com 1.1215.110.3 # Merge groveronline.com:/root/bk/linux-2.5 # into groveronline.com:/root/bk/linux-acpi # -------------------------------------------- # 03/06/11 agrover@groveronline.com 1.1215.110.4 # ACPI: Disable ACPI sleep on SMP systems (Pavel Machek) # -------------------------------------------- # 03/06/11 agrover@groveronline.com 1.1215.110.5 # ACPI: Add access checking (Andi Kleen) # -------------------------------------------- # 03/06/11 agrover@groveronline.com 1.1215.110.6 # ACPI: Add ACPI PCI Subdriver. This enables acpiphp to work again. (Matthew Wilcox) # -------------------------------------------- # 03/06/11 agrover@groveronline.com 1.1215.110.7 # ACPI: Implement PCI Domain support (Matthew Wilcox) # -------------------------------------------- # 03/06/11 shaggy@shaggy.austin.ibm.com 1.1215.111.1 # JFS: add back read_inode super_operation # # A while back, the read_inode method was removed in favor of implementing # jfs_iget rather than just iget. However, since JFS does not implement it's # own get_dentry export_operation, the generic iget can still be called. # Therefore, we do need the read_inode method, so switch back to defining # jfs_read_inode, and use iget rather than jfs_iget. # # This fixes bugzilla.kernel.org's bug #796. # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.3 # [driver model] Turn off debugging by defualt for device iterations. # -------------------------------------------- # 03/06/11 shaggy@shaggy.austin.ibm.com 1.1215.112.1 # Merge jfs@jfs.bkbits.net:linux-2.5 # into shaggy.austin.ibm.com:/shaggy/bk/jfs-2.5 # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.207 # Merge bk://linux-dj.bkbits.net/agpgart # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.208 # Merge bk://linux-dj.bkbits.net/cpufreq # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.4 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/11 margitsw@t-online.de 1.1215.113.1 # [PATCH] I2C: add LM85 driver # # Nothing extra in sysfs (yet) but I have left the way open in the driver # to do this. # Provides vid, vrm, fan_input(1-4), fan_min(1-4), pwm(1-3), # pwm_enable(1-3), in_input(0-4), in_min(0-4), in_max(0-4), # temp_input(1-3), temp_min(1-3), temp_max(1-3), alarms. # -------------------------------------------- # 03/06/11 peterm@remware.demon.co.uk 1.1215.113.2 # [PATCH] I2C: add New bus driver: XSCALE iop3xx # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.209 # Merge http://jfs.bkbits.net/linux-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.210 # Merge http://linux-acpi.bkbits.net/linux-acpi # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.5 # [kobject] Don't specially order objects in lists based on parent. # # Previously, we would insert kobjects into their kset's lists at different # locations based on if they had a parent or not - We kept an explicit # depth-first list by placing devices directly before their parents. # # However, we don't need strict ordering. Assuming that a subordinate device # is always added after its parent (true), then by adding them to the end of # the list, then subordinate objects will always be farther down the list than # their parent objects. We don't need to do anything special.. # -------------------------------------------- # 03/06/11 greg@kroah.com 1.1215.113.3 # [PATCH] I2C: coding style updates for i2c-iop3xx driver # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.6 # [driver model] Make sure we walk lists on shutdown in right order. # # This takes advantage of the implicit list ordering of kobjects now present, # and uses list_for_each_entry() for simplicity. # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.211 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 greg@kroah.com 1.1215.113.4 # [PATCH] I2C: fix some errors found by sparse in include/linux/i2c.h # -------------------------------------------- # 03/06/11 greg@kroah.com 1.1215.113.5 # [PATCH] I2C: fix up sparse warnings in drivers/i2c/i2c-core.c # -------------------------------------------- # 03/06/11 greg@kroah.com 1.1215.113.6 # [PATCH] I2C: fix up sparse warnings in the i2c-dev driver # -------------------------------------------- # 03/06/11 greg@kroah.com 1.1215.114.1 # Merge kroah.com:/home/greg/linux/BK/bleed-2.5 # into kroah.com:/home/greg/linux/BK/i2c-2.5 # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.9 # [PCMCIA] Callbacks use pcmcia_socket not integer. # # This patch updates the callbacks to the socket drivers to take the # corresponding struct pcmcia_socket as argument instead of the "socket # number". # # drivers/pcmcia/bulkmem.c | 6 +++--- # drivers/pcmcia/cistpl.c | 4 ++-- # drivers/pcmcia/cs.c | 18 +++++++++--------- # drivers/pcmcia/i82092.c | 36 +++++++++++++++++++++++------------- # drivers/pcmcia/i82092aa.h | 20 ++++++++++---------- # drivers/pcmcia/i82365.c | 34 +++++++++++++++++++++++----------- # drivers/pcmcia/pci_socket.c | 40 ++++++++++++++++++++-------------------- # drivers/pcmcia/rsrc_mgr.c | 2 +- # drivers/pcmcia/tcic.c | 35 ++++++++++++++++++----------------- # include/pcmcia/ss.h | 22 ++++++++++++---------- # 10 files changed, 121 insertions(+), 96 deletions(-) # -------------------------------------------- # 03/06/11 rmk@flint.arm.linux.org.uk 1.1215.103.10 # [PCMCIA] sa11xx driver now takes pcmcia_socket instead of int socket. # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.11 # [PCMCIA] socket reference in client_t # # As "socket_no" is deprecated, replace it with struct pcmcia_socket in # client_handle_t. # # bulkmem.c | 4 ++-- # cs.c | 22 ++++++++++------------ # cs_internal.h | 4 ++-- # 3 files changed, 14 insertions(+), 16 deletions(-) # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.12 # [PCMCIA] Replace more socket numbers with pcmcia_socket # # Replace the socket number with struct pcmcia_socket from mtd_bind_t # and bind_req_t. # # drivers/pcmcia/cs.c | 4 ++-- # drivers/pcmcia/ds.c | 6 +++--- # include/pcmcia/cs.h | 4 ++-- # 3 files changed, 7 insertions(+), 7 deletions(-) # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.13 # [PCMCIA] Make ds.c use pcmcia_socket->sock rather than local version. # # Remove socket_no from struct pcmcia_bus_socket - it's only used in # printks, and the one additional level of indirection doesn't hurt there. # # ds.c | 10 ++++------ # 1 files changed, 4 insertions(+), 6 deletions(-) # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.212 # Merge bk://kernel.bkbits.net/gregkh/linux/i2c-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.7 # [sysfs] Add __user tag to appropriate parameters. # # From Greg Kroah-Hartman # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.14 # [PCMCIA] unify yenta.c and pci_socket.c # # Linus said [on April 25th of this year]: # > There are two reasons I did pci_socket, and one of them is stale # > and the other one is a matter of taste. # # As the second reason is stale now, too, unify yenta.c and # pci_socket.c. # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.15 # [PCMCIA] Remove socket_info_t # # Get rid of the # # typedef struct pcmcia_socket socket_info_t; # # by replacing all remaining usages of cs_internal's socket_info_t with # struct pcmcia_socket. # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.16 # [PCMCIA] i82365 depends on ISA. # # The i82365 doesn't work unless CONFIG_ISA is set -- see this from # i82365_init: # # ... # # sockets = 0; # # #ifdef CONFIG_ISA # isa_probe(); # #endif # # if (sockets == 0) { # printk("not found.\n"); # driver_unregister(&i82365_driver); # return -ENODEV; # } # # ... # # So, remove all instances of CONFIG_ISA from i82365.c and add a # dependency to the Kconfig file. # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.17 # [PCMCIA] rename i82365.c socket_info_t # # Rename the socket_info_t inside tcic.c to struct i82365_socket. At one # time there were at least five different "socket_info_t" within cardmgr # / linux/drivers/pcmcia. Let's get rid of all of them to avoid # confusion in future. # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.8 # [driver model] Remove extraneous get_device() from class_device_add(). # # From Greg: # # I took out the other put_device() in the -bk tree in class_device_del() # but forgot to remove this one. # -------------------------------------------- # 03/06/11 linux@de.rmk.(none) 1.1215.103.18 # [PCMCIA] Rename tcic.c socket_info_t # # Rename the socket_info_t inside tcic.c to struct tcic_socket. At one # time there were at least five different "socket_info_t" within cardmgr # / linux/drivers/pcmcia. Let's get rid of all of them to avoid # confusion in future. # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.109.9 # [driver model] Make sure system device drivers are added if registered late. # # From Jeremy Fitzhardinge: # # With the current system device changes (I picked them up in 2.5.70-mm8), # the system device class assumes that all system device drivers are # registered before any system devices are registered. # # Unfortunately, this is often not the case. CPU devices are registered # very early, but cpufreq registers drivers for them; since cpufreq # drivers can be loaded as modules, they clearly can't be registered # before the device is. # # This patch keeps a list of all registered devices hanging off the system # device class. When a new driver is registered, it calls the driver's # add() function with all existing devices. # # Conversely, when a driver is unregistered, it calls the driver's # remove() function for all existing devices so the driver can clean up. # # Note: the list in the class's embedded kset is used, rather than creating # a new field. # -------------------------------------------- # 03/06/12 nico@org.rmk.(none) 1.1215.107.5 # [ARM PATCH] 1540/2: fixes for gcc-3.3 # # Patch from Nicolas Pitre # # > Patch #1540/1 has had the following note added: # > # > Ok, it seems that we've had this for years and years, and it hasn't been # > causing a problem. We've now got -Wa,-mno-fpu which should catch anything # > which shouldn't be used anyway. # > # > Could you send a new patch for this change please? # > # > Update by: Russell King # # Here it is. # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.213 # Merge bk://bk.arm.linux.org.uk/linux-2.5-pcmcia # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.214 # Merge bk://bk.arm.linux.org.uk/linux-2.5-rmk # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 mochel@osdl.org 1.1215.115.1 # Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin # into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1215.1.215 # Merge bk://ldm.bkbits.net/linux-2.5-core # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/11 trond.myklebust@fys.uio.no 1.1215.1.216 # Fix udp_data_ready() to use the correct skbuff interface for extracting # the XID. Following the introduction of zero-copy under UDP, the data # may be entirely located in pages under skb_shinfo(skb)->frags[]. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.217 # gss_marshal and gss_validate depend on gss_cred_get_ctx never returning NULL; # but gss_refresh depends on gss_cred_get_ctx returning NULL whenever the cred is # not up to date. So, I replaced the single gss_cred_get_ctx by a # gss_cred_get_ctx and a gss_cred_get_uptodate_ctx. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.218 # add handling of the new CTXPROBLEM and CREDPROBLEM RPCSEC_GSS errors. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.219 # Add a "protocol: udp/tcp" line so that gssd can use the same protocol for # null calls that was specified in the mount options. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.220 # I believe we need to set a timeout before doing the sleep in gss-upcall. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.221 # allow gssd to communicate failure to initialize contexts back to the kernel, so # the kernel can return -EACCES when a user lacks credentials, instead of just # hanging until they kinit. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.222 # This makes several changes to the gss upcalls # # 1. Currently rpc_queue_upcall returns -EPIPE if we make an upcall on a pipe # that userland hasn't opened yet, and we timeout and retry later. This # can lead to an unnecessary delay on mount, because rpc.gssd is racing # to open the newly created pipe while the nfs code is making the first # upcall. If rpc.gssd loses, then we end up with a delay equal to the # length of the timeout. So instead we allow rpc_queue_upcall to queue # upcalls on pipes that aren't opened yet. To deal with the case of # other upcall-users (e.g., the name<->uid mapping upcall code) who # do want to know if the pipe isn't open (in the name<->uid case you can # choose just to map everyone to nobody if the user doesn't want to run # idmapd), we add a flag parameter to rpc_mkpipe that allows us to choose # the kind of behavior we want at the time we create the pipe. # # 2. Currently gss_msg's are destroyed the moment they have been completely # read (by the call to destroy_msg in rpc_pipe_read). This means an # rpc_wake_up is done then, and can't be done later (because the gss_msg is # gone, along with gss_msg->waitq). It will typically be some time yet # before the downcall comes, so the woken-up processes will have to wait and # retry later; as above this leads to unnecessary delays. Also, since the # gss_msg is deleted from the list of gss_msgs's, we forget that an upcall # to get creds for the user in question is still pending, so multiple # unnecessary upcalls will be made. This patch changes gss_pipe_upcall to # never update msg->copied so that rpc_pipe_read never destroys the message. # Instead, we wait till a downcall arrives to remove the upcall, using the # new function __rpc_purge_one_upcall, which searches the list of pending # rpc_pipe_msg's on the inode as well as checking the current upcall, to # deal with the case where rpc.gssd might preemptively create a context for # a user that there's already a pending upcall for. Note also that this # means that repeated reads by rpc.gssd will return the same data until # rpc.gssd does a downcall. This also gives us a better chance of # recovering from rpc.gssd crashes. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.223 # Trivial; I kept forgetting what each of the xdr_netobj's passed to the gss-api # routine meant, so I thought I'd fool with the argument names in an effort to # make them more helpful. # -------------------------------------------- # 03/06/11 bfields@citi.umich.edu 1.1215.1.224 # Trivial fix for a typo in fs/nfs/nfs4state.c # -------------------------------------------- # 03/06/11 levon@movementarian.org 1.1215.116.1 # [PATCH] OProfile: Export task->tgid in the buffer # # Export the task->tgid to userspace as well. This is needed # for forthcoming thread profiling stuff and should have been # done in the original patch ... oh well. # # This requires an upgrade to oprofile 0.5.3. You can get it from # the website, or, for the impatient, here : # # http://movementarian.org/oprofile-0.5.3.tar.gz # -------------------------------------------- # 03/06/11 levon@movementarian.org 1.1215.116.2 # [PATCH] OProfile: update Changes # # Update the version information. # -------------------------------------------- # 03/06/11 levon@movementarian.org 1.1215.116.3 # [PATCH] OProfile: remove useless code # # Remove some useless code, from Philippe Elie. # -------------------------------------------- # 03/06/11 levon@movementarian.org 1.1215.116.4 # [PATCH] OProfile: fix init / exit routine # # Ensure that the arch exit routines are always called when needed, # previously we could end up with a nasty crash if using oprofile.timer=1, # or the FS register failed. # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1218 # Manual merge # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1219 # [PATCH] irq_cpustat cleanup # # From: Christoph Hellwig # # currently only x86_64 and ia64 don't use the generic irq_cpustat code # and both have to workaround it's brokenness for the non-default case. # # x86_64 defines an empty irq_cpustat_t even if it doesn't need one and # ia64 adds CONFIG_IA64 ifdefs around all users. What about this patch # instead to make __ARCH_IRQ_STAT useable? # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1220 # [PATCH] MAINTAINERS: Compaq->HP # # From: "Ni, Michael" # # s/Compaq/HP/ in MAINTAINERS. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1221 # [PATCH] loop: file use highmem # # From: Hugh Dickins # # When loop restricts underlying file's allocation mask to avoid deadlock, it # unintentionally masks out its highmem capability, making failures at the # underlying level much more likely. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1222 # [PATCH] loop: make bio_copy private to loop # # From: Hugh Dickins # # bio_copy is used only by the loop driver, which already has to walk the bio # segments itself: so it makes sense to change it from bio.c export to loop.c # static, as prelude to working upon it there. # # bio_copy itself is unchanged by this patch, with one exception. On oom # failure it must use bio_put, instead of mempool_free to static bio_pool: # which it should have been doing all along - it was leaking the veclist. # # (Grudgingly acked by Jens) # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1223 # [PATCH] loop: loop bio renaming # # From: Hugh Dickins # # Now it's in loop not bio, better rename bio_copy to loop_copy_bio: loop # prefers names that way; and bio_transfer better named loop_transfer_bio. # Rename bio,b to rbh,bio to follow call from loop_get_buffer more easily. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1224 # [PATCH] loop: copy bio not data # # From: Hugh Dickins # # Remove copy flag and code from loop_copy_bio: wasn't used when reading, and # waste of time when writing - the loop transfer function does that. And # don't initialize bio fields immediately reinitialized by caller. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1225 # [PATCH] loop: remove an IV # # From: Hugh Dickins # # Remove unused IV from loop_make_request (loop_transfer_bio does that). # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1226 # [PATCH] loop: remove LO_FLAGS_BH_REMAP # # From: Hugh Dickins # # Jonah Sherman pointed out back in February how # LO_FLAGS_BH_REMAP is never actually set, since loop_init_xfer only calls # the init for non-0 encryption type. Fix that or scrap it? Let's scrap it # for now, that path (hacking values in bio instead of copying data) seems # never to have been tested, and adds to the number of paths through loop: # leave that optimization to some other occasion. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1227 # [PATCH] loop: remove blk_queue_bounce # # From: Hugh Dickins # # What purpose does loop_make_request's blk_queue_bounce serve? None, it's # just a relic from before the kmaps were added to loop's transfers, and ties # up mempooled resources - in the file-backed case, with no guarantee they'll # soon be freed. And what purpose does loop_set_fd's blk_queue_bounce_limit # serve? None, blk_queue_make_request did that. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1228 # [PATCH] loop: copy_bio use highmem # # From: Hugh Dickins # # loop_copy_bio uses one gfp_mask for bio_alloc and alloc_page calls. The # bio_alloc obviously can't use highmem, but the alloc_page can. Yes, the # underlying device might be unable to use highmem, and have to use one of # its bounce buffers, with an extra copy: so be it. # # (Originally I did propagate the underlying device's bounce needs down to # the loop device, to avoid that possible extra copy; but let's keep this # simple, the low end doesn't have highmem and the high end can I/O it.) # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1229 # [PATCH] loop: don't lose PF_MEMDIE # # From: Hugh Dickins # # loop_get_buffer loses PF_MEMDIE if it's added while in loop_copy_bio: not a # high probability since it's not waiting there, but could happen, and sets a # bad example (compare with add_to_swap fixed a while back). # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1230 # [PATCH] tmpfs: shmem_file_write EFAULT # # From: Hugh Dickins # # generic_file_aio_write_nolock has recently been corrected for when partial # writes hit -EFAULT: now bring shmem_file_write into line. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1231 # [PATCH] tmpfs: swapoff-truncate race # # From: Hugh Dickins # # Dissatisfied with earlier fix to race where swapoff sneaks page into tmpfs # page cache after truncate_inode_pages cleaned it: calling it a second time # can be too heavy, instead fix shmem_unuse_inode to check i_size. # (Actually, one part of this fix is in the previous patch: shmem_file_write # now has a hold on the page when it raises i_size.) # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1232 # [PATCH] tmpfs: misc fixes # # From: Hugh Dickins # # Remove shmem_nrpages, no use is made of it (even 2.4-ac, though it counts # it, does nothing with it): reintroduce if it becomes useful. Replace GPL # oneliner by the block from 2.4-ac, extend Copyright to 2003, remove two # white spaces. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1233 # [PATCH] cleanup seqfile usage in resource.c # # From: Jeff Muizelaar # # This patch against 2.5.70-bk2 removes the buffer allocation from resource.c # and lets seq_read do it instead. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1234 # [PATCH] x25 facilities parsing fix # # From: Dipankar Sarma # # Fix parsing of options for X.25 facilities # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1235 # [PATCH] eicon usercopy fix # # From: Dipankar Sarma # # Use copy_to_user, not memcpy with user buffers # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1236 # [PATCH] intermezzo symlink fix # # From: Dipankar Sarma # # Fixed copy/user problem in lento_symlink where user address was getting # passed to presto_do_symlink. (From 2.4) # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1237 # [PATCH] mdc800 usercopy fix # # From: Dipankar Sarma # # Use copy_to_user/get_char with user buffers. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1238 # [PATCH] mpu401 usercopy fix # # From: Dipankar Sarma # # Use copy_to_user to copy mpu_synth_ioctl arg. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1239 # [PATCH] emu10k1 memleak fix # # From: Dipankar Sarma # # Fix memory leak in emu10k1_audio_open. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1240 # [PATCH] rio memleak fix # # From: Dipankar Sarma # # Fix memory leak - free on copyin failure. # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1241 # [PATCH] fix resource leak in i810 driver # # From: Dipankar Sarma # # Free any read channel allocated earlier if allocation of write channel # fails. (From 2.4). # -------------------------------------------- # 03/06/11 akpm@digeo.com 1.1242 # [PATCH] tioclinux() numbers in # # From: Samuel Thibault # # Tioclinux() uses "magic numbers" that applications should know to use it. # Here is a patch which adds an include/linux/tiocl.h which holds them and # can be used by applications to properly call iotcl(TIOCLINUX). It might # stand for documentation as well, replacing the not up-to-date man # ioctl_list. # # A structure for the selection argument is also defined. # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1243 # [PATCH] tty_driver refcounting # # Fixes a couple of leaks in char_dev.c # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1244 # [PATCH] tty_driver refcounting # # ->refcount switched from int * to int. Per-driver variables gone since we had # switched from int foo = 0; driver.refcount = &foo; to driver.refcount = 0; # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1245 # [PATCH] tty_driver refcounting # # ->table[], ->termios[] and ->locked_termios[] allocated dynamically # in tty_register_driver() and freed in tty_unregister_driver(). Per-driver # arrays gone. # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1246 # [PATCH] tty_driver refcounting # # added helper functions for allocation and freeing tty_driver # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1247 # [PATCH] tty_driver refcounting # # killed the last remnants of callout stuff - we don't need to mess with # storing termios privately anymore. # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1248 # [PATCH] tty_driver refcounting # # net/irda/ircomm/ircomm_tty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1249 # [PATCH] tty_driver refcounting # # net/bluetooth/rfcomm/tty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1250 # [PATCH] tty_driver refcounting # # drivers/serial/core.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1251 # [PATCH] tty_driver refcounting # # drivers/serial/68328serial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1252 # [PATCH] tty_driver refcounting # # drivers/serial/68360serial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1253 # [PATCH] tty_driver refcounting # # drivers/serial/mcfserial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1254 # [PATCH] tty_driver refcounting # # drivers/sgi/char/sgiserial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1255 # [PATCH] tty_driver refcounting # # drivers/tc/zs.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1256 # [PATCH] tty_driver refcounting # # drivers/sbus/char/aurora.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1257 # [PATCH] tty_driver refcounting # # drivers/macintosh/macserial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1258 # [PATCH] tty_driver refcounting # # drivers/char/sx.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1259 # [PATCH] tty_driver refcounting # # drivers/char/stallion.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1260 # [PATCH] tty_driver refcounting # # drivers/char/istallion.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1261 # [PATCH] tty_driver refcounting # # drivers/char/amiserial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1262 # [PATCH] tty_driver refcounting # # drivers/char/dz.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1263 # [PATCH] tty_driver refcounting # # drivers/char/serial167.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1264 # [PATCH] tty_driver refcounting # # drivers/char/serial_tx3912.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1265 # [PATCH] tty_driver refcounting # # drivers/char/vme_scc.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1266 # [PATCH] tty_driver refcounting # # drivers/char/specialix.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1267 # [PATCH] tty_driver refcounting # # drivers/char/ser_a2232.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1268 # [PATCH] tty_driver refcounting # # drivers/char/sh-sci.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1269 # [PATCH] tty_driver refcounting # # drivers/char/cyclades.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1270 # [PATCH] tty_driver refcounting # # drivers/char/isicom.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1271 # [PATCH] tty_driver refcounting # # drivers/char/rocket.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1272 # [PATCH] tty_driver refcounting # # drivers/char/riscom8.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1273 # [PATCH] tty_driver refcounting # # drivers/char/pcxx.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1274 # [PATCH] tty_driver refcounting # # drivers/char/moxa.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1275 # [PATCH] tty_driver refcounting # # drivers/char/mxser.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1276 # [PATCH] tty_driver refcounting # # drivers/char/synclink.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1277 # [PATCH] tty_driver refcounting # # drivers/char/synclinkmp.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1278 # [PATCH] tty_driver refcounting # # drivers/char/pcmcia/synclink_cs.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1279 # [PATCH] tty_driver refcounting # # drivers/char/hvc_console.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1280 # [PATCH] tty_driver refcounting # # drivers/isdn/i4l/isdn_tty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1281 # [PATCH] tty_driver refcounting # # drivers/usb/class/bluetty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1282 # [PATCH] tty_driver refcounting # # drivers/char/esp.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1283 # [PATCH] tty_driver refcounting # # drivers/usb/class/cdc-acm.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1284 # [PATCH] tty_driver refcounting # # arch/ppc/4xx_io/serial_sicc.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1285 # [PATCH] tty_driver refcounting # # arch/ia64/hp/sim/simserial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1286 # [PATCH] tty_driver refcounting # # arch/mips/au1000/common/serial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1287 # [PATCH] tty_driver refcounting # # drivers/char/ip2main.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1288 # [PATCH] tty_driver refcounting # # drivers/usb/serial/usb-serial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1289 # [PATCH] tty_driver refcounting # # arch/ppc/8260_io/uart.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1290 # [PATCH] tty_driver refcounting # # arch/ppc/8xx_io/uart.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1291 # [PATCH] tty_driver refcounting # # arch/mips/baget/vacserial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1292 # [PATCH] tty_driver refcounting # # drivers/isdn/capi/capi.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1293 # [PATCH] tty_driver refcounting # # drivers/s390/net/ctctty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1294 # [PATCH] tty_driver refcounting # # drivers/s390/char/tubtty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1295 # [PATCH] tty_driver refcounting # # drivers/s390/char/sclp_tty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1296 # [PATCH] tty_driver refcounting # # drivers/s390/char/con3215.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1297 # [PATCH] tty_driver refcounting # # arch/alpha/kernel/srmcons.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1298 # [PATCH] tty_driver refcounting # # arch/cris/drivers/serial.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1299 # [PATCH] tty_driver refcounting # # arch/um/drivers/* converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1300 # [PATCH] tty_driver refcounting # # drivers/char/vt.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1301 # [PATCH] tty_driver refcounting # # arch/v850/kernel/{memcons,simcons}.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1302 # [PATCH] tty_driver refcounting # # drivers/char/epca.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1303 # [PATCH] tty_driver refcounting # # drivers/char/rio/rio_linux.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 viro@www.linux.org.uk 1.1304 # [PATCH] tty_driver refcounting # # drivers/char/pty.c converted to dynamic allocation # -------------------------------------------- # 03/06/11 torvalds@home.transmeta.com 1.1305 # Merge http://nfsclient.bkbits.net/linux-2.5 # into home.transmeta.com:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/06/12 torvalds@home.transmeta.com 1.1306 # Fix rcu list poisoning - since another CPU may be traversing the list # as we delete the entry, we can only poison the back pointer, not the # traversal pointer (rcu traversal only ever walks forward). # # Make __d_drop() take this into account. # -------------------------------------------- # 03/06/12 torvalds@home.transmeta.com 1.1307 # Make d_move() be able to gracefully handle the case of the dentry # already being unhashed on entry. # -------------------------------------------- # diff -Nru a/Documentation/00-INDEX b/Documentation/00-INDEX --- a/Documentation/00-INDEX Fri Jun 13 01:07:32 2003 +++ b/Documentation/00-INDEX Fri Jun 13 01:07:32 2003 @@ -182,6 +182,8 @@ - short guide on how to set up and use the RAM disk. riscom8.txt - notes on using the RISCom/8 multi-port serial driver. +rocket.txt + - info on installing/using the Comtrol RocketPort multiport serial driver rtc.txt - notes on how to use the Real Time Clock (aka CMOS clock) driver. s390/ diff -Nru a/Documentation/Changes b/Documentation/Changes --- a/Documentation/Changes Fri Jun 13 01:07:42 2003 +++ b/Documentation/Changes Fri Jun 13 01:07:42 2003 @@ -61,7 +61,7 @@ o PPP 2.4.0 # pppd --version o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version o procps 2.0.9 # ps --version -o oprofile 0.5 # oprofiled --version +o oprofile 0.5.3 # oprofiled --version o nfs-utils 1.0.3 # showmount --version Kernel compilation @@ -367,7 +367,7 @@ OProfile -------- -o +o Suggestions and corrections =========================== diff -Nru a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt --- a/Documentation/DMA-mapping.txt Fri Jun 13 01:07:38 2003 +++ b/Documentation/DMA-mapping.txt Fri Jun 13 01:07:38 2003 @@ -83,6 +83,15 @@ to be increased. And for a device with limitations, as discussed in the previous paragraph, it needs to be decreased. +pci_alloc_consistent() by default will return 32-bit DMA addresses. +PCI-X specification requires PCI-X devices to support 64-bit +addressing (DAC) for all transactions. And at least one platform (SGI +SN2) requires 64-bit consistent allocations to operate correctly when +the IO bus is in PCI-X mode. Therefore, like with pci_set_dma_mask(), +it's good practice to call pci_set_consistent_dma_mask() to set the +appropriate mask even if your device only supports 32-bit DMA +(default) and especially if it's a PCI-X device. + For correct operation, you must interrogate the PCI layer in your device probe routine to see if the PCI controller on the machine can properly support the DMA addressing limitation your device has. It is @@ -94,6 +103,11 @@ int pci_set_dma_mask(struct pci_dev *pdev, u64 device_mask); +The query for consistent allocations is performed via a a call to +pci_set_consistent_dma_mask(): + + int pci_set_consistent_dma_mask(struct pci_dev *pdev, u64 device_mask); + Here, pdev is a pointer to the PCI device struct of your device, and device_mask is a bit mask describing which bits of a PCI address your device supports. It returns zero if your card can perform DMA @@ -133,7 +147,7 @@ Sparc64 is one platform which behaves in this way. Here is how you would handle a 64-bit capable device which can drive -all 64-bits during a DAC cycle: +all 64-bits when accessing streaming DMA: int using_dac; @@ -147,6 +161,30 @@ goto ignore_this_device; } +If a card is capable of using 64-bit consistent allocations as well, +the case would look like this: + + int using_dac, consistent_using_dac; + + if (!pci_set_dma_mask(pdev, 0xffffffffffffffff)) { + using_dac = 1; + consistent_using_dac = 1; + pci_set_consistent_dma_mask(pdev, 0xffffffffffffffff) + } else if (!pci_set_dma_mask(pdev, 0xffffffff)) { + using_dac = 0; + consistent_using_dac = 0; + pci_set_consistent_dma_mask(pdev, 0xffffffff) + } else { + printk(KERN_WARNING + "mydev: No suitable DMA available.\n"); + goto ignore_this_device; + } + +pci_set_consistent_dma_mask() will always be able to set the same or a +smaller mask as pci_set_dma_mask(). However for the rare case that a +device driver only uses consistent allocations, one would have to +check the return value from pci_set_consistent(). + If your 64-bit device is going to be an enormous consumer of DMA mappings, this can be problematic since the DMA mappings are a finite resource on many platforms. Please see the "DAC Addressing @@ -215,9 +253,10 @@ Think of "consistent" as "synchronous" or "coherent". - Consistent DMA mappings are always SAC addressable. That is - to say, consistent DMA addresses given to the driver will always - be in the low 32-bits of the PCI bus space. + The current default is to return consistent memory in the low 32 + bits of the PCI bus space. However, for future compatibility you + should set the consistent mask even if this default is fine for your + driver. Good examples of what to use consistent mappings for are: @@ -287,15 +326,14 @@ driver needs regions sized smaller than a page, you may prefer using the pci_pool interface, described below. -The consistent DMA mapping interfaces, for non-NULL dev, will always -return a DMA address which is SAC (Single Address Cycle) addressable. -Even if the device indicates (via PCI dma mask) that it may address -the upper 32-bits and thus perform DAC cycles, consistent allocation -will still only return 32-bit PCI addresses for DMA. This is true -of the pci_pool interface as well. - -In fact, as mentioned above, all consistent memory provided by the -kernel DMA APIs are always SAC addressable. +The consistent DMA mapping interfaces, for non-NULL dev, will by +default return a DMA address which is SAC (Single Address Cycle) +addressable. Even if the device indicates (via PCI dma mask) that it +may address the upper 32-bits and thus perform DAC cycles, consistent +allocation will only return > 32-bit PCI addresses for DMA if the +consistent dma mask has been explicitly changed via +pci_set_consistent_dma_mask(). This is true of the pci_pool interface +as well. pci_alloc_consistent returns two values: the virtual address which you can use to access it from the CPU and dma_handle which you pass to the diff -Nru a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile --- a/Documentation/DocBook/Makefile Fri Jun 13 01:07:36 2003 +++ b/Documentation/DocBook/Makefile Fri Jun 13 01:07:36 2003 @@ -11,7 +11,8 @@ kernel-locking.sgml via-audio.sgml mousedrivers.sgml \ deviceiobook.sgml procfs-guide.sgml tulip-user.sgml \ writing_usb_driver.sgml scsidrivers.sgml sis900.sgml \ - kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml + kernel-api.sgml journal-api.sgml lsm.sgml usb.sgml \ + gadget.sgml ### # The build process is as follows (targets): @@ -38,8 +39,8 @@ ### #External programs used -KERNELDOC=$(objtree)/scripts/kernel-doc -DOCPROC=$(objtree)/scripts/docproc +KERNELDOC = scripts/kernel-doc +DOCPROC = scripts/docproc ### # DOCPROC is used for two purposes: @@ -49,14 +50,14 @@ # The following rules are used to generate the .sgml documentation # required to generate the final targets. (ps, pdf, html). quiet_cmd_docproc = DOCPROC $@ -cmd_docproc = $(DOCPROC) doc $< >$@ + cmd_docproc = $(DOCPROC) doc $< >$@ define rule_docproc - set -e - $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) - $(cmd_$(1)); \ - ( \ - echo 'cmd_$@ := $(cmd_$(1))'; \ - echo $@: `$(DOCPROC) depend $<`; \ + set -e; \ + $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ + $(cmd_$(1)); \ + ( \ + echo 'cmd_$@ := $(cmd_$(1))'; \ + echo $@: `$(DOCPROC) depend $<`; \ ) > $(dir $@).$(notdir $@).cmd endef @@ -95,41 +96,55 @@ ### # Rules to generate postscript, PDF and HTML # db2html creates a directory. Generate a html file used for timestamp + +quiet_cmd_db2ps = DB2PS $@ + cmd_db2ps = db2ps -o $(dir $@) $< %.ps : %.sgml @(which db2ps > /dev/null 2>&1) || \ (echo "*** You need to install DocBook stylesheets ***"; \ exit 1) - $(call do_cmd,DB2PS $@,db2ps -o $(dir $@) $<) + $(call cmd,db2ps) +quiet_cmd_db2pdf = DB2PDF $@ + cmd_db2pdf = db2pdf -o $(dir $@) $< %.pdf : %.sgml @(which db2pdf > /dev/null 2>&1) || \ (echo "*** You need to install DocBook stylesheets ***"; \ exit 1) - $(call do_cmd,DB2PDF $@,db2pdf -o $(dir $@) $<) + $(call cmd,db2pdf) + +quiet_cmd_db2html = DB2HTML $@ + cmd_db2html = db2html -o $(patsubst %.html,%,$@) $< && \ + echo ' \ + Goto $(patsubst %.html,%,$(notdir $@))

' > $@ %.html: %.sgml @(which db2html > /dev/null 2>&1) || \ (echo "*** You need to install DocBook stylesheets ***"; \ exit 1) @rm -rf $@ $(patsubst %.html,%,$@) - $(call do_cmd,DB2HTML $@,db2html -o $(patsubst %.html,%,$@) $< && \ - echo '\ - Goto $(patsubst %.html,%,$(notdir $@))

' > $@) + $(call cmd,db2html) @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \ cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi ### # Rules to generate postscripts and PNG imgages from .fig format files +quiet_cmd_fig2eps = FIG2EPS $@ + cmd_fig2eps = fig2dev -Leps $< $@ + %.eps: %.fig - $(call do_cmd,FIG2DEV -Leps $@,fig2dev -Leps $< $@) + $(call cmd,fig2eps) + +quiet_cmd_fig2png = FIG2PNG $@ + cmd_fig2png = fig2dev -Lpng $< $@ %.png: %.fig - $(call do_cmd,FIG2DEV -Lpng $@,fig2dev -Lpng $< $@) + $(call cmd,fig2png) ### # Rule to convert a .c file to inline SGML documentation %.sgml: %.c - @echo ' Generating $@' + @echo ' GEN $@' @( \ echo ""; \ expand --tabs=8 < $< | \ diff -Nru a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/DocBook/gadget.tmpl Fri Jun 13 01:07:45 2003 @@ -0,0 +1,966 @@ + + + + USB Gadget API for Linux + 02 June 2003 + 02 June 2003 + + + Permission is granted to copy, distribute, and/or modify + this document under the terms of the GNU Free Documentation + License, version 1.2, or any later version published by the + Free Software Foundation; with the Invariant Sections being + the "GNU Free Documentation License", + no Front-Cover Texts, + and + no Back-Cover Texts. + + + This documentation is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Free Documentation License for more details. + + + Note that certain sections of this document are merged + into Linux kernel source code. + That content is the bulk of + and + , + where the "GNU Free Documentation License" is identified + as an alternate licence for its documentation. + + + + + 2003 + David Brownell + + + + David + Brownell + +

dbrownell@users.sourceforge.net
+ + + + + + +Introduction + +This document presents a Linux-USB "Gadget" +kernel mode +API, for use within peripherals and other USB devices +that embed Linux. +It provides an overview of the API structure, +and shows how that fits into a system development project. +This is the first such API released on Linux to address +a number of important problems, including: + + + Supports USB 2.0, for high speed devices which + can stream data at several dozen megabytes per second. + + Handles devices with dozens of endpoints just as + well as ones with just two fixed-function ones. Gadget drivers + can be written so they're easy to port to new hardware. + + Flexible enough to expose more complex USB device + capabilities such as multiple configurations, multiple interfaces, + composite devices, + and alternate interface settings. + + Sharing data structures and API models with the + Linux-USB host side API. This looks forward to USB "On-The-Go" + (OTG) and similar more-symmetric frameworks. + + Minimalist, so it's easier to support new device + controller hardware. I/O processing doesn't imply large + demands for memory or CPU resources. + + + + +Most Linux developers will not be able to use this API, since they +have USB "host" hardware in a PC, workstation, or server. +Linux users with embedded systems are more likely to +have USB peripheral hardware. +To distinguish drivers running inside such hardware from the +more familiar Linux "USB device drivers", +which are host side proxies for the real USB devices, +a different term is used: +the drivers inside the peripherals are "USB gadget drivers". +In USB protocol interactions, the device driver is the master +(or "client driver") +and the gadget driver is the slave (or "function driver"). + + +The gadget API resembles the host side Linux-USB API in that both +use queues of request objects to package I/O buffers, and those requests +may be submitted or canceled. +They share common definitions for the standard USB +Chapter 9 messages, structures, and constants. +Also, both APIs bind and unbind drivers to devices. +The APIs differ in detail, since the host side's current +URB framework exposes a number of implementation details +and assumptions that are inappropriate for a gadget API. +While the model for control transfers and configuration +management is necessarily different (one side is a hardware-neutral master, +the other is a hardware-aware slave), the endpoint I/0 API used here +should also be usable for an overhead-reduced host side API. + + + + +Structure of Gadget Drivers + +A system running inside a USB peripheral +normally has at least three layers inside the kernel to handle +USB protocol processing, and may have additional layers in +user space code. +The "gadget" API is used by the middle layer to interact +with the lowest level (which directly handles hardware). + + +In Linux, from the bottom up, these layers are: + + + + + + USB Controller Driver + + + This is the lowest software level. + It is the only layer that talks to hardware, + through registers, fifos, dma, irqs, and the like. + The <linux/usb_gadget.h> API abstracts + the peripheral controller endpoint hardware. + That hardware is exposed through endpoint objects, which accept + streams of IN/OUT buffers, and through callbacks that interact + with gadget drivers. + Since normal USB devices only have one upstream + port, they only have one of these drivers. + The controller driver can support any number of different + gadget drivers, but only one of them can be used at a time. + + + Examples of such controller hardware include + the PCI-based NetChip 2280 USB 2.0 high speed controller, + the SA-11x0 or PXA-25x UDC (found within many PDAs), + and a variety of other products. + + + + + Gadget Driver + + + The lower boundary of this driver implements hardware-neutral + USB functions, using calls to the controller driver. + Because such hardware varies widely in capabilities and restrictions, + the gadget driver is normally configured at compile time + to work with endpoints supported by one particular controller. + Gadget drivers may be portable to several different controllers, + using conditional compilation. + Gadget driver responsibilities include: + + + handling setup requests (ep0 protocol responses) + possibly including class-specific functionality + + returning configuration and string descriptors + + (re)setting configurations and interface + altsettings, including enabling and configuring endpoints + + handling life cycle events, such as managing + bindings + to hardware, and disconnection from the USB host. + + managing IN and OUT transfers on all currently + enabled endpoints + + + + + Such drivers may be modules of proprietary code, although + that approach is discouraged in the Linux community. + + + + + Upper Level + + + Most gadget drivers have an upper boundary that connects + to some Linux driver or framework in Linux. + Through that boundary flows the data which the gadget driver + produces and/or consumes through protocol transfers over USB. + Examples include: + + + user mode code, using generic (gadgetfs) + or application specific files in + /dev + + networking subsystem (for network gadgets, + like the CDC Ethernet Model gadget driver) + + data capture drivers, perhaps video4Linux or + a scanner driver; or test and measurement hardware. + + input subsystem (for HID gadgets) + + sound subsystem (for audio gadgets) + + file system (for PTP gadgets) + + block i/o subsystem (for usb-storage gadgets) + + ... and more + + + + + Additional Layers + + + Other layers may exist. + These could include kernel layers, such as network protocol stacks, + as well as user mode applications building on standard POSIX + system call APIs such as + open(), close(), + read() and write(). + On newer systems, POSIX Async I/O calls may be an option. + Such user mode code will not necessarily be subject to + the GNU General Public License (GPL). + + + + + + +Over time, reusable utilities should evolve to help make some +gadget driver tasks simpler. An example of particular interest +is code implementing standard USB-IF protocols for +HID, networking, storage, or audio classes. +Some developers are interested in KDB or KGDB hooks, to let +target hardware be remotely debugged. +Most such USB protocol code doesn't need to be hardware-specific, +any more than network protocols like X11, HTTP, or NFS are. +Such interface drivers might be combined, to support composite devices. + + + + + +Kernel Mode Gadget API + +Gadget drivers declare themselves through a +struct usb_gadget_driver, which is responsible for +most parts of enumeration for a struct usb_gadget. +The response to a set_configuration usually involves +enabling one or more of the struct usb_ep objects +exposed by the gadget, and submitting one or more +struct usb_request buffers to transfer data. +Understand those four data types, and their operations, and +you will understand how this API works. + + +Incomplete Data Type Descriptions + +This documentation was prepared using the standard Linux +kernel docproc tool, which turns text +and in-code comments into SGML DocBook and then into usable +formats such as HTML or PDF. +Other than the "Chapter 9" data types, most of the significant +data types and functions are described here. + + +However, docproc does not understand all the C constructs +that are used, so some relevant information is likely omitted from +what you are reading. +One example of such information is several per-request flags. +You'll have to read the header file, and use example source +code (such as that for "Gadget Zero"), to fully understand the API. + + +The part of the API implementing some basic +driver capabilities is specific to the version of the +Linux kernel that's in use. +The 2.5 kernel includes a driver model +framework that has no analogue on earlier kernels; +so those parts of the gadget API are not fully portable. +(They are implemented on 2.4 kernels, but in a different way.) +The driver model state is another part of this API that is +ignored by the kerneldoc tools. + + + +The core API does not expose +every possible hardware feature, only the most widely available ones. +There are significant hardware features, such as device-to-device DMA +(without temporary storage in a memory buffer) +that would be added using hardware-specific APIs. + + +This API expects drivers to use conditional compilation to handle +endpoint capabilities of different hardware. +Those tend to have arbitrary restrictions, relating to +transfer types, addressing, packet sizes, buffering, and availability. +As a rule, such differences only matter for "endpoint zero" logic +that handles device configuration and management. +The API only supports limited run-time +detection of capabilities, through naming conventions for endpoints. +Although a gadget driver could scan the endpoints available to it and +choose to map those capabilities onto driver functionality in some way, +few drivers will want to reconfigure themselves at run-time. + + +Like the Linux-USB host side API, this API exposes +the "chunky" nature of USB messages: I/O requests are in terms +of one or more "packets", and packet boundaries are visible to drivers. +Compared to RS-232 serial protocols, USB resembles +synchronous protocols like HDLC +(N bytes per frame, multipoint addressing from the host) +more than asynchronous ones +(tty style, like 8 bytes, no parity, one stop bit). +So for example the controller drivers won't buffer +two single byte writes into a single two-byte USB IN packet, +although gadget drivers may do so when they implement +protocols where packet boundaries (and "short packets") +are not significant. + + +Driver Life Cycle + +Gadget drivers make endpoint I/O requests to hardware without +needing to know many details of the hardware, but driver +setup/configuration code needs to handle some differences. +Use the API like this: + + + + +Register a driver for the particular device side +usb controller hardware, +such as the net2280 on PCI (USB 2.0), +sa11x0 or pxa25x as found in Linux PDAs, +and so on. +At this point the device is logically in the USB ch9 initial state +("attached"), drawing no power and not usable +(since it does not yet support enumeration). + + +Register a gadget driver that implements some higher level +device function. That will then bind() to a usb_gadget. + + +The hardware driver can now start enumerating. +The steps it handles are to accept USB power and set_address requests. +Other steps are handled by the gadget driver. +If the gadget driver module is unloaded before the host starts to +enumerate, steps before step 7 are skipped. + + +The gadget driver's setup() call returns usb descriptors, +based both on what the bus interface hardware provides and on the +functionality being implemented. +That can involve alternate settings or configurations, +unless the hardware prevents such operation. + + +The gadget driver handles the last step of enumeration, +when the USB host issues a set_configuration call. +It enables all endpoints used in that configuration, +with all interfaces in their default settings. +That involves using a list of the hardware's endpoints, enabling each +endpoint according to its descriptor. + + +Do real work and perform data transfers, possibly involving +changes to interface settings or switching to new configurations, until the +device is disconnect()ed from the host. +Queue any number of transfer requests to each endpoint. +The drivers then go back to step 3 (above). + + +When the gadget driver module is being unloaded, +the driver unbind() callback is issued. That lets the controller +driver be unloaded. + + + + +Drivers will normally be arranged so that just loading the +gadget driver module (or statically linking it into a Linux kernel) +allows the peripheral device to be enumerated. +Note that at this lowest level there are no policies about how +ep0 configuration logic is implemented, +except that it should obey USB specifications. +Such issues are in the domain of gadget drivers, +including knowing about implementation constraints +imposed by some USB controllers +or understanding that composite devices might happen to +be built by integrating reusable components. + + + + +USB 2.0 Chapter 9 Types and Constants + +Gadget drivers +rely on common USB structures and constants +defined in the +<linux/usb_ch9.h> +header file, which is standard in Linux 2.5 kernels. +These are the same types and constants used by host +side drivers. + + +!Iinclude/linux/usb_ch9.h + + +Core Objects and Methods + +These are declared in +<linux/usb_gadget.h>, +and are used by gadget drivers to interact with +USB peripheral controller drivers. + + + + +!Iinclude/linux/usb_gadget.h + + +Optional Utilities + +The core API is sufficient for writing a USB Gadget Driver, +but some optional utilities are provided to simplify common tasks. + + +!Edrivers/usb/gadget/usbstring.c + + + + +Peripheral Controller Drivers + +The first hardware supporting this API is the NetChip 2280 +controller, which supports USB 2.0 high speed and is based on PCI. +This is the net2280 driver module. +The driver supports Linux kernel versions 2.4 and 2.5; +contact NetChip Technologies for development boards and product +information. + + + + +A partial USB simulator, +the dummy_hcd driver, is available. +It can act like a net2280, a pxa25x, or an sa11x0 in terms +of available endpoints and device speeds; and it simulates +control, bulk, and to some extent interrupt transfers. +That lets you develop some parts of a gadget driver on a normal PC, +without any special hardware, and perhaps with the assistance +of tools such as GDB running with User Mode Linux. +At least one person has expressed interest in adapting that +approach, hooking it up to a simulator for a microcontroller. +Such simulators can help debug subsystems where the runtime hardware +is unfriendly to software development, or is not yet available. + + +Support for other controllers is expected to be developed +and contributed +over time, as this driver framework evolves. + + + + +Gadget Drivers + +In addition to Gadget Zero +(used primarily for testing and development with drivers +for usb controller hardware), other gadget drivers exist. + + +There's an ethernet gadget +driver, which implements one of the most useful +Communications Device Class models. +One of the standards for cable modem interoperability even +specifies the use of this ethernet model as one of two +mandatory options. +Gadgets using this code look to a USB host as if they're +an Ethernet adapter. +It provides access to a network where the gadget's CPU is one host, +which could easily be bridging, routing, or firewalling +access to other networks. + + +There is also support for user mode gadget drivers, +using gadgetfs. +This provides a User Mode API that presents +each endpoint as a single file descriptor. I/O is done using +normal read() and read() calls. +Familiar tools like GDB and pthreads can be used to +develop and debug user mode drivers, so that once a robust +controller driver is available many applications for it +won't require new kernel mode software. + + +Support for other kinds of gadget is expected to +be developed and contributed +over time, as this driver framework evolves. + + + + + + +GNU Free Documentation License +Version 1.2, November 2002 + + + +PREAMBLE + +The purpose of this License is to make a manual, textbook, or +other functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, with +or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft license +designed for free software. + +We have designed this License in order to use it for manuals for +free software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; it +can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in +any medium, that contains a notice placed by the copyright holder saying +it can be distributed under the terms of this License. Such a notice +grants a world-wide, royalty-free license, unlimited in duration, to use +that work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission under +copyright law. + +A "Modified Version" of the Document means any +work containing the Document or a portion of it, either copied verbatim, +or with modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or +a front-matter section of the Document that deals exclusively with the +relationship of the publishers or authors of the Document to the +Document's overall subject (or to related matters) and contains nothing +that could fall directly within that overall subject. (Thus, if the +Document is in part a textbook of mathematics, a Secondary Section may +not explain any mathematics.) The relationship could be a matter of +historical connection with the subject or with related matters, or of +legal, commercial, philosophical, ethical or political position +regarding them. + +The "Invariant Sections" are certain Secondary +Sections whose titles are designated, as being those of Invariant +Sections, in the notice that says that the Document is released under +this License. If a section does not fit the above definition of +Secondary then it is not allowed to be designated as Invariant. The +Document may contain zero Invariant Sections. If the Document does not +identify any Invariant Sections then there are none. + +The "Cover Texts" are certain short passages of +text that are listed, as Front-Cover Texts or Back-Cover Texts, in the +notice that says that the Document is released under this License. A +Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at +most 25 words. + +A "Transparent" copy of the Document means a +machine-readable copy, represented in a format whose specification is +available to the general public, that is suitable for revising the +document straightforwardly with generic text editors or (for images +composed of pixels) generic paint programs or (for drawings) some widely +available drawing editor, and that is suitable for input to text +formatters or for automatic translation to a variety of formats suitable +for input to text formatters. A copy made in an otherwise Transparent +file format whose markup, or absence of markup, has been arranged to +thwart or discourage subsequent modification by readers is not +Transparent. An image format is not Transparent if used for any +substantial amount of text. A copy that is not "Transparent" is called +"Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML or +XML using a publicly available DTD, and standard-conforming simple HTML, +PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the machine-generated +HTML, PostScript or PDF produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, +the title page itself, plus such following pages as are needed to hold, +legibly, the material this License requires to appear in the title page. +For works in formats which do not have any title page as such, "Title +Page" means the text near the most prominent appearance of the work's +title, preceding the beginning of the body of the text. + +A section "Entitled XYZ" means a named subunit +of the Document whose title either is precisely XYZ or contains XYZ in +parentheses following text that translates XYZ in another language. +(Here XYZ stands for a specific section name mentioned below, such as +"Acknowledgements", "Dedications", "Endorsements", or "History".) To +"Preserve the Title" of such a section when you modify the Document +means that it remains a section "Entitled XYZ" according to this +definition. + +The Document may include Warranty Disclaimers next to the notice +which states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this License, +but only as regards disclaiming warranties: any other implication that +these Warranty Disclaimers may have is void and has no effect on the +meaning of this License. + + +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies to +the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further copying +of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + + +You may also lend copies, under the same conditions stated above, +and you may publicly display copies. + + +COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly +have printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover Texts: +Front-Cover Texts on the front cover, and Back-Cover Texts on the back +cover. Both covers must also clearly and legibly identify you as the +publisher of these copies. The front cover must present the full title +with all words of the title equally prominent and visible. You may add +other material on the covers in addition. Copying with changes limited +to the covers, as long as they preserve the title of the Document and +satisfy these conditions, can be treated as verbatim copying in other +respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document +numbering more than 100, you must either include a machine-readable +Transparent copy along with each Opaque copy, or state in or with each +Opaque copy a computer-network location from which the general +network-using public has access to download using public-standard +network protocols a complete Transparent copy of the Document, free of +added material. If you use the latter option, you must take reasonably +prudent steps, when you begin distribution of Opaque copies in quantity, +to ensure that this Transparent copy will remain thus accessible at the +stated location until at least one year after the last time you +distribute an Opaque copy (directly or through your agents or retailers) +of that edition to the public. + +It is requested, but not required, that you contact the authors of +the Document well before redistributing any large number of copies, to +give them a chance to provide you with an updated version of the +Document. + + +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document +under the conditions of sections 2 and 3 above, provided that you +release the Modified Version under precisely this License, with the +Modified Version filling the role of the Document, thus licensing +distribution and modification of the Modified Version to whoever +possesses a copy of it. In addition, you must do these things in the +Modified Version: + + +Use in the Title Page (and on the covers, if any) a + title distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the History + section of the Document). You may use the same title as a previous + version if the original publisher of that version gives permission. + +List on the Title Page, as authors, one or more + persons or entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the principal + authors of the Document (all of its principal authors, if it has fewer + than five), unless they release you from this requirement. + +State on the Title page the name of the publisher of + the Modified Version, as the publisher. +Preserve all the copyright notices of the Document. + +Add an appropriate copyright notice for your + modifications adjacent to the other copyright notices. + +Include, immediately after the copyright notices, a + license notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in the + Addendum below. + +Preserve in that license notice the full lists of + Invariant Sections and required Cover Texts given in the Document's + license notice. +Include an unaltered copy of this License. + +Preserve the section Entitled "History", Preserve its + Title, and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the Title + Page. If there is no section Entitled "History" in the Document, + create one stating the title, year, authors, and publisher of the + Document as given on its Title Page, then add an item describing the + Modified Version as stated in the previous sentence. + +Preserve the network location, if any, given in the + Document for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for previous + versions it was based on. These may be placed in the "History" + section. You may omit a network location for a work that was + published at least four years before the Document itself, or if the + original publisher of the version it refers to gives permission. + +For any section Entitled "Acknowledgements" or + "Dedications", Preserve the Title of the section, and preserve in the + section all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + +Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + +Delete any section Entitled "Endorsements". + Such a section may not be included in the Modified Version. + +Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant Section. + +Preserve any Warranty Disclaimers. + + + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it +contains nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, +and a passage of up to 25 words as a Back-Cover Text, to the end of the +list of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or through +arrangements made by) any one entity. If the Document already includes +a cover text for the same cover, previously added by you or by +arrangement made by the same entity you are acting on behalf of, you may +not add another; but you may replace the old one, on explicit permission +from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this +License give permission to use their names for publicity for or to +assert or imply endorsement of any Modified Version. + + +COMBINING DOCUMENTS + +You may combine the Document with other documents released under +this License, under the terms defined in section +4 above for modified versions, provided that you include in the +combination all of the Invariant Sections of all of the original +documents, unmodified, and list them all as Invariant Sections of your +combined work in its license notice, and that you preserve all their +Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by adding +at the end of it, in parentheses, the name of the original author or +publisher of that section if known, or else a unique number. Make the +same adjustment to the section titles in the list of Invariant Sections +in the license notice of the combined work. + +In the combination, you must combine any sections Entitled +"History" in the various original documents, forming one section +Entitled "History"; likewise combine any sections Entitled +"Acknowledgements", and any sections Entitled "Dedications". You must +delete all sections Entitled "Endorsements". + + +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other +documents released under this License, and replace the individual copies +of this License in the various documents with a single copy that is +included in the collection, provided that you follow the rules of this +License for verbatim copying of each of the documents in all other +respects. + +You may extract a single document from such a collection, and +distribute it individually under this License, provided you insert a +copy of this License into the extracted document, and follow this +License in all other respects regarding verbatim copying of that +document. + + +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other +separate and independent documents or works, in or on a volume of a +storage or distribution medium, is called an "aggregate" if the +copyright resulting from the compilation is not used to limit the legal +rights of the compilation's users beyond what the individual works +permit. When the Document is included an aggregate, this License does +not apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on covers +that bracket the Document within the aggregate, or the electronic +equivalent of covers if the Document is in electronic form. Otherwise +they must appear on printed covers that bracket the whole +aggregate. + + +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between the +translation and the original version of this License or a notice or +disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve its +Title (section 1) will typically require changing the actual +title. + + +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided for under this License. Any other attempt +to copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this License +will not have their licenses terminated so long as such parties remain +in full compliance. + + +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of +the GNU Free Documentation License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in +detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version +number. If the Document specifies that a particular numbered version of +this License "or any later version" applies to it, you have the option +of following the terms and conditions either of that specified version +or of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for + your documents + +To use this License in a document you have written, include a copy +of the License in the document and put the following copyright and +license notices just after the title page: + + + +If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + +
+ with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. +
+ +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. +
+
+ + + diff -Nru a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl --- a/Documentation/DocBook/kernel-api.tmpl Fri Jun 13 01:07:28 2003 +++ b/Documentation/DocBook/kernel-api.tmpl Fri Jun 13 01:07:28 2003 @@ -79,6 +79,7 @@ String Manipulation !Ilib/string.c +!Elib/string.c Bit Operations !Iinclude/asm-i386/bitops.h @@ -176,7 +177,7 @@ !Edrivers/pci/pci.c PCI Hotplug Support Library -!Edrivers/hotplug/pci_hotplug_core.c +!Edrivers/pci/hotplug/pci_hotplug_core.c MCA Architecture MCA Device Functions diff -Nru a/Documentation/filesystems/fat_cvf.txt b/Documentation/filesystems/fat_cvf.txt --- a/Documentation/filesystems/fat_cvf.txt Fri Jun 13 01:07:40 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,210 +0,0 @@ -This is the main documentation for the CVF-FAT filesystem extension. 18Nov1998 - - -Table of Contents: - -1. The idea of CVF-FAT -2. Restrictions -3. Mount options -4. Description of the CVF-FAT interface -5. CVF Modules - ------------------------------------------------------------------------------- - - -1. The idea of CVF-FAT ------------------------------------------------------------------------------- - -CVF-FAT is a FAT filesystem extension that provides a generic interface for -Compressed Volume Files in FAT partitions. Popular CVF software, for -example, are Microsoft's Doublespace/Drivespace and Stac's Stacker. -Using the CVF-FAT interface, it is possible to load a module that handles -all the low-level disk access that has to do with on-the-fly compression -and decompression. Any other part of FAT filesystem access is still handled -by the FAT, MSDOS or VFAT or even UMSDOS driver. - -CVF access works by redirecting certain low-level routines from the FAT -driver to a loadable, CVF-format specific module. This module must fake -a normal FAT filesystem to the FAT driver while doing all the extra stuff -like compression and decompression silently. - - -2. Restrictions ------------------------------------------------------------------------------- - -- BMAP problems - - CVF filesystems cannot do bmap. It's impossible in principle. Thus - all actions that require bmap do not work (swapping, writable mmapping). - Read-only mmapping works because the FAT driver has a hack for this - situation :) Well, writable mmapping should now work using the readpage - interface function which has been hacked into the FAT driver just for - CVF-FAT :) - -- attention, DOSEmu users - - You may have to unmount all CVF partitions before running DOSEmu depending - on your configuration. If DOSEmu is configured to use wholedisk or - partition access (this is often the case to let DOSEmu access - compressed partitions) there's a risk of destroying your compressed - partitions or crashing your system because of confused drivers. - - Note that it is always safe to redirect the compressed partitions with - lredir or emufs.sys. Refer to the DOSEmu documentation for details. - - -3. Mount options ------------------------------------------------------------------------------- - -The CVF-FAT extension currently adds the following options to the FAT -driver's standard options: - - cvf_format=xxx - Forces the driver to use the CVF module "xxx" instead of auto-detection. - Without this option, the CVF-FAT interface asks all currently loaded - CVF modules whether they recognize the CVF. Therefore, this option is - only necessary if the CVF format is not recognized correctly - because of bugs or incompatibilities in the CVF modules. (It skips - the detect_cvf call.) "xxx" may be the text "none" (without the quotes) - to inhibit using any of the loaded CVF modules, just in case a CVF - module insists on mounting plain FAT filesystems by misunderstanding. - "xxx" may also be the text "autoload", which has a special meaning for - a module loader, but does not skip auto-detection. - - If the kernel supports kmod, the cvf_format=xxx option also controls - on-demand CVF module loading. Without this option, nothing is loaded - on demand. With cvf_format=xxx, a module "xxx" is requested automatically - before mounting the compressed filesystem (unless "xxx" is "none"). In - case there is a difference between the CVF format name and the module - name, setup aliases in your modules configuration. If the string "xxx" - is "autoload", a non-existent module "cvf_autoload" is requested which - can be used together with a special modules configuration (alias and - pre-install statements) in order to load more than one CVF module, let - them detect automatically which kind of CVF is to be mounted, and only - keep the "right" module in memory. For examples please refer to the - dmsdos documentation (ftp and http addresses see below). - - cvf_options=yyy - Option string passed to the CVF module. I.e. only the "yyy" is passed - (without the quotes). The documentation for each CVF module should - explain it since it is interpreted only by the CVF module. Note that - the string must not contain a comma (",") - this would lead to - misinterpretation by the FAT driver, which would recognize the text - after a comma as a FAT driver option and might get confused or print - strange error messages. The documentation for the CVF module should - offer a different separation symbol, for example the dot "." or the - plus sign "+", which is only valid inside the string "yyy". - - -4. Description of the CVF-FAT interface ------------------------------------------------------------------------------- - -Assuming you want to write your own CVF module, you need to write a lot of -interface functions. Most of them are covered in the kernel documentation -you can find on the net, and thus won't be described here. They have been -marked with "[...]" :-) Take a look at include/linux/fat_cvf.h. - -struct cvf_format -{ int cvf_version; - char* cvf_version_text; - unsigned long int flags; - int (*detect_cvf) (struct super_block*sb); - int (*mount_cvf) (struct super_block*sb,char*options); - int (*unmount_cvf) (struct super_block*sb); - [...] - void (*zero_out_cluster) (struct inode*, int clusternr); -} - -This structure defines the capabilities of a CVF module. It must be filled -out completely by a CVF module. Consider it as a kind of form that is used -to introduce the module to the FAT/CVF-FAT driver. - -It contains... - - cvf_version: - A version id which must be unique. Choose one. - - cvf_version_text: - A human readable version string that should be one short word - describing the CVF format the module implements. This text is used - for the cvf_format option. This name must also be unique. - - flags: - Bit coded flags, currently only used for a readpage/mmap hack that - provides both mmap and readpage functionality. If CVF_USE_READPAGE - is set, mmap is set to generic_file_mmap and readpage is caught - and redirected to the cvf_readpage function. If it is not set, - readpage is set to generic_readpage and mmap is caught and redirected - to cvf_mmap. (If you want writable mmap use the readpage interface.) - - detect_cvf: - A function that is called to decide whether the filesystem is a CVF of - the type the module supports. The detect_cvf function must return 0 - for "NO, I DON'T KNOW THIS GARBAGE" or anything >0 for "YES, THIS IS - THE KIND OF CVF I SUPPORT". The function must maintain the module - usage counters for safety, i.e. do MOD_INC_USE_COUNT at the beginning - and MOD_DEC_USE_COUNT at the end. The function *must not* assume that - successful recognition would lead to a call of the mount_cvf function - later. - - mount_cvf: - A function that sets up some values or initializes something additional - to what has to be done when a CVF is mounted. This is called at the - end of fat_read_super and must return 0 on success. Definitely, this - function must increment the module usage counter by MOD_INC_USE_COUNT. - This mount_cvf function is also responsible for interpreting a CVF - module specific option string (the "yyy" from the FAT mount option - "cvf_options=yyy") which cannot contain a comma (use for example the - dot "." as option separator symbol). - - unmount_cvf: - A function that is called when the filesystem is unmounted. Most likely - it only frees up some memory and calls MOD_DEC_USE_COUNT. The return - value might be ignored (it currently is ignored). - - [...]: - All other interface functions are "caught" FAT driver functions, i.e. - are executed by the FAT driver *instead* of the original FAT driver - functions. NULL means use the original FAT driver functions instead. - If you really want "no action", write a function that does nothing and - hang it in instead. - - zero_out_cluster: - The zero_out_cluster function is called when the fat driver wants to - zero out a (new) cluster. This is important for directories (mkdir). - If it is NULL, the FAT driver defaults to overwriting the whole - cluster with zeros. Note that clusternr is absolute, not relative - to the provided inode. - -Notes: - 1. The cvf_bmap function should be ignored. It really should never - get called from somewhere. I recommend redirecting it to a panic - or fatal error message so bugs show up immediately. - 2. The cvf_writepage function is ignored. This is because the fat - driver doesn't support it. This might change in future. I recommend - setting it to NULL (i.e use default). - -int register_cvf_format(struct cvf_format*cvf_format); - If you have just set up a variable containing the above structure, - call this function to introduce your CVF format to the FAT/CVF-FAT - driver. This is usually done in init_module. Be sure to check the - return value. Zero means success, everything else causes a kernel - message printed in the syslog describing the error that occurred. - Typical errors are: - - a module with the same version id is already registered or - - too many CVF formats. Hack fs/fat/cvf.c if you need more. - -int unregister_cvf_format(struct cvf_format*cvf_format); - This is usually called in cleanup_module. Return value =0 means - success. An error only occurs if you try to unregister a CVF format - that has not been previously registered. The code uses the version id - to distinguish the modules, so be sure to keep it unique. - -5. CVF Modules ------------------------------------------------------------------------------- - -Refer to the dmsdos module (the successor of the dmsdos filesystem) for a -sample implementation. It can currently be found at - - ftp://fb9nt.uni-duisburg.de/pub/linux/dmsdos/dmsdos-x.y.z.tgz - ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/dosfs/dmsdos-x.y.z.tgz - ftp://ftp.uni-stuttgart.de/pub/systems/linux/local/system/dmsdos-x.y.z.tgz - -(where x.y.z is to be replaced with the actual version number). Full -documentation about dmsdos is included in the dmsdos package, but can also -be found at - - http://fb9nt.uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/index.html - http://www.yk.rim.or.jp/~takafumi/dmsdos/index.html (in Japanese). diff -Nru a/Documentation/filesystems/jfs.txt b/Documentation/filesystems/jfs.txt --- a/Documentation/filesystems/jfs.txt Fri Jun 13 01:07:39 2003 +++ b/Documentation/filesystems/jfs.txt Fri Jun 13 01:07:39 2003 @@ -4,10 +4,10 @@ Team members ------------ -Steve Best sbest@us.ibm.com Dave Kleikamp shaggy@austin.ibm.com +Dave Blaschke blaschke@us.ibm.com +Steve Best sbest@us.ibm.com Barry Arndt barndt@us.ibm.com -Christoph Hellwig hch@infradead.org The following mount options are supported: diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt --- a/Documentation/filesystems/proc.txt Fri Jun 13 01:07:32 2003 +++ b/Documentation/filesystems/proc.txt Fri Jun 13 01:07:32 2003 @@ -1068,6 +1068,8 @@ out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second. +Setting this to zero disables periodic writeback altogether. + dirty_expire_centisecs ---------------------- diff -Nru a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt --- a/Documentation/kbuild/kconfig-language.txt Fri Jun 13 01:07:33 2003 +++ b/Documentation/kbuild/kconfig-language.txt Fri Jun 13 01:07:33 2003 @@ -18,7 +18,7 @@ +- ... Every entry has its own dependencies. These dependencies are used -to determine the visible of an entry. Any child entry is only +to determine the visibility of an entry. Any child entry is only visible if its parent entry is also visible. Menu entries @@ -50,7 +50,7 @@ - type definition: "bool"/"tristate"/"string"/"hex"/"integer" Every config option must have a type. There are only two basic types: - tristate and string, the other types base on these two. The type + tristate and string, the other types are based on these two. The type definition optionally accepts an input prompt, so these two examples are equivalent: @@ -64,7 +64,7 @@ to the user. Optionally dependencies only for this prompt can be added with "if". -- default value: "default" ["if" ] +- default value: "default" ["if" ] A config option can have any number of default values. If multiple default values are visible, only the first defined one is active. Default values are not limited to the menu entry, where they are @@ -81,7 +81,7 @@ This defines a dependency for this menu entry. If multiple dependencies are defined they are connected with '&&'. Dependencies are applied to all other options within this menu entry (which also - accept "if" expression), so these two examples are equivalent: + accept an "if" expression), so these two examples are equivalent: bool "foo" if BAR default y if BAR @@ -90,9 +90,24 @@ bool "foo" default y +- reverse dependencies: "select" ["if" ] + While normal dependencies reduce the upper limit of a symbol (see + below), reverse dependencies can be used to force a lower limit of + another symbol. The value of the current menu symbol is used as the + minimal value can be set to. If is selected multiple + times, the limit is set to the largest selection. + Reverse dependencies can only be used with boolean or tristate + symbols. + +- numerical ranges: "range" ["if" ] + This allows to limit the range of possible input values for integer + and hex symbols. The user can only input a value which is larger than + or equal to the first symbol and smaller than or equal to the second + symbol. + - help text: "help" This defines a help text. The end of the help text is determined by - the level indentation, this means it ends at the first line which has + the indentation level, this means it ends at the first line which has a smaller indentation than the first line of the help text. @@ -123,14 +138,14 @@ otherwise 'y'. (4) Returns the value of the expression. Used to override precedence. (5) Returns the result of (2-/expr/). -(6) Returns the result of min(/expr/, /expr/). -(7) Returns the result of max(/expr/, /expr/). +(6) Returns the result of max(/expr/, /expr/). +(7) Returns the result of min(/expr/, /expr/). An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations). A menu entry becomes visible when it's expression evaluates to 'm' or 'y'. -There are two type of symbols: constant and nonconstant symbols. +There are two types of symbols: constant and nonconstant symbols. Nonconstant symbols are the most common ones and are defined with the 'config' statement. Nonconstant symbols consist entirely of alphanumeric characters or underscores. @@ -159,8 +174,8 @@ The other way to generate the menu structure is done by analyzing the dependencies. If a menu entry somehow depends on the previous entry, it -can be made a submenu of it. First the the previous (parent) symbol must -be part of the dependency list and then one of these two condititions +can be made a submenu of it. First, the previous (parent) symbol must +be part of the dependency list and then one of these two conditions must be true: - the child entry must become invisible, if the parent is set to 'n' - the child entry must only be visible, if the parent is visible @@ -177,7 +192,7 @@ MODVERSIONS directly depends on MODULES, this means it's only visible if MODULES is different from 'n'. The comment on the other hand is always -visible when MODULES it's visible (the (empty) dependency of MODULES is +visible when MODULES is visible (the (empty) dependency of MODULES is also part of the comment dependencies). @@ -188,12 +203,13 @@ line starts with a keyword (except help texts). The following keywords end a menu entry: - config +- menuconfig - choice/endchoice - comment - menu/endmenu - if/endif - source -The first four also start the definition of a menu entry. +The first five also start the definition of a menu entry. config: @@ -202,6 +218,14 @@ This defines a config symbol and accepts any of above attributes as options. + +menuconfig: + "menuconfig" + + +This is similiar to the simple config entry above, but it also gives a +hint to front ends, that all suboptions should be displayed as a +separate list of options. choices: diff -Nru a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt --- a/Documentation/kbuild/makefiles.txt Fri Jun 13 01:07:41 2003 +++ b/Documentation/kbuild/makefiles.txt Fri Jun 13 01:07:41 2003 @@ -11,7 +11,7 @@ --- 3.2 Built-in object goals - obj-y --- 3.3 Loadable module goals - obj-m --- 3.4 Objects which export symbols - --- 3.5 Library file goals - L_TARGET + --- 3.5 Library file goals - lib-y --- 3.6 Descending down in directories --- 3.7 Compilation flags --- 3.8 Command line dependency @@ -214,20 +214,33 @@ modules exporting symbols. See also Documentation/modules.txt. ---- 3.5 Library file goals - L_TARGET +--- 3.5 Library file goals - lib-y - Instead of building a built-in.o file, you may also - build an archive which again contains objects listed in $(obj-y). - This is normally not necessary and only used in lib/ and - arch/$(ARCH)/lib directories. - Only the name lib.a is allowed. + Objects listed with obj-* is used for modules or + are combined in a built-in.o for that specific directory. + There is also the possibility to list objects that will + be included in a library, lib.a. + All objects listed with lib-y are combined in a single + library for that directory. + Objects that are listed in obj-y and additional listed in + lib-y will not be included in the library, since they will anyway + be accessible. + For consistency objects listed in lib-m will be included in lib.a. + + Note that the same kbuild makefile may list files to be built-in + and to be part of a library. Therefore the same directory + may contain both a built-in.o and a lib.a file. Example: #arch/i386/lib/Makefile - L_TARGET := lib.a - obj-y := checksum.o delay.o + lib-y := checksum.o delay.o This will create a library lib.a based on checksum.o and delay.o. + For kbuild to actually recognize that there is a lib.a being build + the directory shall be listed in libs-y. + See also "6.3 List directories to visit when descending". + + Usage of lib-y is normally restricted to lib/ and arch/*/lib. --- 3.6 Descending down in directories @@ -727,7 +740,7 @@ head-y, init-y, core-y, libs-y, drivers-y, net-y $(head-y) list objects to be linked first in vmlinux. - $(libs-y) list directories where a libs.a archive can be located. + $(libs-y) list directories where a lib.a archive can be located. The rest list directories where a built-in.o object file can be located. $(init-y) objects will be located after $(head-y). diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt Fri Jun 13 01:07:45 2003 +++ b/Documentation/kernel-parameters.txt Fri Jun 13 01:07:45 2003 @@ -540,8 +540,6 @@ [KNL,ACPI] Mark specific memory as reserved. Region of memory to be used, from ss to ss+nn. - memfrac= [KNL] - meye= [HW] Set MotionEye Camera parameters See Documentation/video4linux/meye.txt. @@ -616,6 +614,9 @@ use it. noht [SMP,IA-32] Disables P4 Xeon(tm) HyperThreading. + + noirqdebug [IA-32] Disables the code which attempts to detect and + disable unhandled interrupt sources. noisapnp [ISAPNP] Disables ISA PnP code. diff -Nru a/Documentation/kobject.txt b/Documentation/kobject.txt --- a/Documentation/kobject.txt Fri Jun 13 01:07:32 2003 +++ b/Documentation/kobject.txt Fri Jun 13 01:07:32 2003 @@ -2,7 +2,18 @@ Patrick Mochel -7 January 2003 +Updated: 3 June 2003 + + +Copyright (c) Patrick Mochel +Copyright (c) Open Source Development Labs +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + 0. Introduction @@ -100,6 +111,28 @@ When a kobject's reference count reaches 0, the method struct kobj_type::release() (which the kobject's kset points to) is called. This allows any memory allocated for the object to be freed. + + +NOTE!!! + +It is _imperative_ that you supply a desctructor for dynamically +allocated kobjects to free them if you are using kobject reference +counts. The reference count controls the duration of the lifetime of +the object. If it goes to 0, then it is assumed that the object will +be freed and cannot be used. + +More importantly, you must free the object there, and not immediately +after an unregister call. If someone else is referencing the object +(e.g. through a sysfs file), they will obtain a reference to the +object, assume it's valid and operate on it. If the object is +unregistered and freed in the meantime, the operation will then +reference freed memory and go boom. + +This can be prevented, in the simplest case, by defining a release +method and freeing the object from there only. Note that this will not +secure reference count/object management models that use a dual +reference count or do other wacky things with the reference count +(like the networking layer). 1.4 sysfs diff -Nru a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt --- a/Documentation/networking/ip-sysctl.txt Fri Jun 13 01:07:35 2003 +++ b/Documentation/networking/ip-sysctl.txt Fri Jun 13 01:07:35 2003 @@ -31,6 +31,11 @@ ipfrag_time - INTEGER Time in seconds to keep an IP fragment in memory. +ipfrag_secret_interval - INTEGER + Regeneration interval (in seconds) of the hash secret (or lifetime + for the hash secret) for IP fragments. + Default: 600 + INET peer storage: inet_peer_threshold - INTEGER @@ -514,6 +519,25 @@ FALSE: enable IPv4-mapped address feature Default: FALSE (as specified in RFC2553bis) + +IPv6 Fragmentation: + +ip6frag_high_thresh - INTEGER + Maximum memory used to reassemble IPv6 fragments. When + ip6frag_high_thresh bytes of memory is allocated for this purpose, + the fragment handler will toss packets until ip6frag_low_thresh + is reached. + +ip6frag_low_thresh - INTEGER + See ip6frag_high_thresh + +ip6frag_time - INTEGER + Time in seconds to keep an IPv6 fragment in memory. + +ip6frag_secret_interval - INTEGER + Regeneration interval (in seconds) of the hash secret (or lifetime + for the hash secret) for IPv6 fragments. + Default: 600 conf/default/*: Change the interface-specific default settings. diff -Nru a/Documentation/rocket.txt b/Documentation/rocket.txt --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/rocket.txt Fri Jun 13 01:07:45 2003 @@ -0,0 +1,87 @@ +Comtrol(tm) RocketPort(R)/RocketModem(TM) Series +Device Driver for the Linux Operating System + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +PRODUCT OVERVIEW +---------------- + +This driver provides a loadable kernel driver for the Comtrol RocketPort +and RocketModem PCI boards. These boards provide, 2, 4, 8, 16, or 32 +high-speed serial ports or modems. This driver supports up to a combination +of four RocketPort or RocketModems boards in one machine simultaneously. +This file assumes that you are using the RocketPort driver which is +integrated into the kernel sources. + +The driver can also be installed as an external module using the usual +"make;make install" routine. This external module driver, obtainable +from the Comtrol website listed below, is useful for updating the driver +or installing it into kernels which do not have the driver configured +into them. Installations instructions for the external module +are in the included README and HW_INSTALL files. + +RocketPort ISA and RocketModem II PCI boards are also supported by this +driver, but must use the external module driver for configuration reasons. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +INSTALLATION PROCEDURES +----------------------- + +RocketPort/RocketModem PCI cards require no driver configuration, they are +automatically detected and configured. + +The RocketPort driver can be installed as a module (recommended) or built +into the kernel. This is selected, as for other drivers, through the `make config` +command from the root of the Linux source tree during the kernel build process. + +The RocketPort/RocketModem serial ports installed by this driver are assigned +device major number 46, and will be named /dev/ttyRx, where x is the port number +starting at zero (ex. /dev/ttyR0, /devttyR1, ...). If you have multiple cards +installed in the system, the mapping of port names to serial ports is displayed +in the system log at /var/log/messages. + +If installed as a module, the module must be loaded. This can be done +manually by entering "modprobe rocket". To have the module loaded automatically +upon system boot, edit the /etc/modules.conf file and add the line +"alias char-major-46 rocket". + +In order to use the ports, their device names (nodes) must be created with mknod. +This is only required once, the system will retain the names once created. To +create the RocketPort/RocketModem device names, use the command +"mknod /dev/ttyRx c 46 x" where x is the port number starting at zero. For example: + +>mknod /dev/ttyR0 c 46 0 +>mknod /dev/ttyR1 c 46 1 +>mknod /dev/ttyR2 c 46 2 + +The Linux script MAKEDEV will create the first 16 ttyRx device names (nodes) for you: + +>/dev/MAKEDEV ttyR + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +REPORTING BUGS +-------------- + +For technical support, please provide the following +information: Driver version, kernel release, distribution of +kernel, and type of board you are using. Error messages and log +printouts port configuration details are especially helpful. + +USA + Phone: (612) 494-4100 + FAX: (612) 494-4199 + email: support@comtrol.com + +Comtrol Europe + Phone: +44 (0) 1 869 323-220 + FAX: +44 (0) 1 869 323-211 + email: support@comtrol.co.uk + +Web: http://www.comtrol.com +FTP: ftp.comtrol.com + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + diff -Nru a/Documentation/scsi/aic7xxx.txt b/Documentation/scsi/aic7xxx.txt --- a/Documentation/scsi/aic7xxx.txt Fri Jun 13 01:07:32 2003 +++ b/Documentation/scsi/aic7xxx.txt Fri Jun 13 01:07:32 2003 @@ -132,6 +132,11 @@ 2. Version History + 6.2.34 - Fix locking regression instroduced in 6.2.29 that + could cuase a lock order reversal between the io_request_lock + and our per-softc lock. This was only possible on RH9, + SuSE, and kernel.org 2.4.X kernels. + 6.2.33 - Dynamically disable PCI parity error reporting after 10 errors are reported to the user. These errors are the result of some other device issuing PCI transactions diff -Nru a/Documentation/scsi/dc395x.txt b/Documentation/scsi/dc395x.txt --- a/Documentation/scsi/dc395x.txt Fri Jun 13 01:07:45 2003 +++ b/Documentation/scsi/dc395x.txt Fri Jun 13 01:07:45 2003 @@ -23,40 +23,70 @@ Both can be overriden by command line parameters (module or kernel parameters). -The syntax is as follows: - dc395x = AdapterID, SpeedIdx, DevMode, AdaptMode, Tags, DelayReset +The following parameters are available: -AdapterID : Host Adapter SCSI ID -SpeedIdx : 0,1,...7 = 20,13.3,10,8,6.7,5.8,5,4 MHz [ 7] -DevMode : Bitmap for Dev Cfg [63] -AdaptMode : Bitmap for Adapter Cfg [47] -Tags : The number of tags is 1<= 1. - -If you set AdapterID to -1, the adapter will use conservative -("safe") default settings instead; more precisely, dc395x=-1 is a -shortcut for dc395x=7,4,9,15,2,10 + - safe + Default: 0, Acceptable values: 0 or 1 + + If safe is set to 1 then the adapter will use conservative + ("safe") default settings. This sets: + + shortcut for dc395x=7,4,9,15,2,10 + + - adapter_id + Default: 7, Acceptable values: 0 to 15 + + Sets the host adapter SCSI ID. + + - max_speed + Default: 1, Acceptable value: 0 to 7 + 0 = 20 Mhz + 1 = 12.2 Mhz + 2 = 10 Mhz + 3 = 8 Mhz + 4 = 6.7 Mhz + 5 = 5.8 Hhz + 6 = 5 Mhz + 7 = 4 Mhz + + - dev_mode + Bitmap for device configuration + + DevMode bit definition: + Bit Val(hex) Val(dec) Meaning + *0 0x01 1 Parity check + *1 0x02 2 Synchronous Negotiation + *2 0x04 4 Disconnection + *3 0x08 8 Send Start command on startup. (Not used) + *4 0x10 16 Tagged Command Queueing + *5 0x20 32 Wide Negotiation + + - adapter_mode + Bitmap for adapter configuration + + AdaptMode bit definition + Bit Val(hex) Val(dec) Meaning + *0 0x01 1 Support more than two drives. (Not used) + *1 0x02 2 Use DOS compatible mapping for HDs greater than 1GB. + *2 0x04 4 Reset SCSI Bus on startup. + *3 0x08 8 Active Negation: Improves SCSI Bus noise immunity. + 4 0x10 16 Immediate return on BIOS seek command. (Not used) + (*)5 0x20 32 Check for LUNs >= 1. + + - tags + Default: 3, Acceptable values: 0-5 + + The number of tags is 1< scsi_adjust_queue_depth() | slave_alloc() - slave_configure() --> scsi_adjust_queue_depth() + slave_configure() | slave_alloc() ** slave_destroy() ** -The invocation of scsi_adjust_queue_depth() by the LLD is required -if slave_configure() is supplied. +If the LLD wants to adjust the default queue settings, it can invoke +scsi_adjust_queue_depth() in its slave_configure() routine. + ** For scsi devices that the mid level tries to scan but do not respond, a slave_alloc(), slave_destroy() pair is called. @@ -179,7 +183,7 @@ scsi_add_device() ------+ | slave_alloc() - slave_configure() --> scsi_adjust_queue_depth() + slave_configure() [--> scsi_adjust_queue_depth()] [DEVICE unplug] LLD mid level LLD @@ -228,13 +232,14 @@ slave_destroy() ** | slave_alloc() - slave_configure() --> scsi_adjust_queue_depth() + slave_configure() slave_alloc() ** slave_destroy() ** -If the LLD does not supply a slave_configure() then the mid level invokes -scsi_adjust_queue_depth() itself with tagged queuing off and "cmd_per_lun" -for that host as the queue length. +The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and +"cmd_per_lun" for that host as the queue length. These settings can be +overridden by a slave_configure() supplied by the LLD. + ** For scsi devices that the mid level tries to scan but do not respond, a slave_alloc(), slave_destroy() pair is called. @@ -1093,11 +1098,6 @@ * Notes: Allows the driver to inspect the response to the initial * INQUIRY done by the scanning code and take appropriate action. * For more details see the hosts.h file. - * If this function is not supplied, the mid level will call - * scsi_adjust_queue_depth() with the struct Scsi_Host::cmd_per_lun - * value on behalf of the given device. If this function is - * supplied then its implementation must call - * scsi_adjust_queue_depth(). * * Defined in: LLD **/ @@ -1277,8 +1277,9 @@ Patrick Mansfield Christoph Hellwig Doug Ledford + Andries Brouwer Douglas Gilbert dgilbert@interlog.com -19th April 2003 +29th April 2003 diff -Nru a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt --- a/Documentation/sound/alsa/ALSA-Configuration.txt Fri Jun 13 01:07:30 2003 +++ b/Documentation/sound/alsa/ALSA-Configuration.txt Fri Jun 13 01:07:30 2003 @@ -53,14 +53,9 @@ for soundcards which are not installed in your system device_mode - specifies permission mask for dynamic sound device filesystem + (available only when DEVFS is enabled) - default value = 0666 - for example 'device_mode=0660' - device_gid - - specifies GID number for dynamic sound device filesystem - - default value = 0 (root) - device_uid - - specifies UID number for dynamic sound device filesystem - - default value = 0 (root) Module snd-pcm-oss @@ -144,6 +139,7 @@ Module for ALi M5451 PCI chip. pcm_channels - Number of hardware channels assigned for PCM + spdif - Support SPDIF I/O (disabled by default) Module supports autoprobe and multiple chips (max 8). @@ -191,6 +187,13 @@ Module supports up to 8 cards, PnP and autoprobe. + Module snd-azt3328 + ------------------ + + Module for soundcards based on Aztech AZF3328 PCI chip. + + Module supports up to 8 cards. + Module snd-cmi8330 ------------------ @@ -846,6 +849,20 @@ Module supports up to 8 cards. + Module snd-sscape + ----------------- + + Module for ENSONIQ SoundScape PnP cards. + + port - Port # (PnP setup) + irq - IRQ # (PnP setup) + mpu_irq - MPU-401 IRQ # (PnP setup) + dma - DMA # (PnP setup) + + Module supports up to 8 cards. ISA PnP must be enabled. + You need sscape_ctl tool in alsa-tools package for loading + the microcode. + Module snd-sun-amd7930 (on sparc only) -------------------------------------- @@ -945,19 +962,34 @@ Module snd-via82xx ------------------ - Module for AC'97 motherboards based on VIA 82C686A/686B, 8233 - (south) bridge. + Module for AC'97 motherboards based on VIA 82C686A/686B, 8233, + 8233A, 8233C, 8235 (south) bridge. mpu_port - 0x300,0x310,0x320,0x330, otherwise obtain BIOS setup + [VIA686A/686B only] ac97_clock - AC'97 codec clock base (default 48000Hz) + dxs_support - support DXS channels, + 0 = auto (default), 1 = enable, 2 = disable, + 3 = 48k only + [VIA8233/C,8235 only] Module supports autoprobe and multiple bus-master chips (max 8). + Note: on some SMP motherboards like MSI 694D the interrupts might not be generated properly. In such a case, please try to set the SMP (or MPS) version on BIOS to 1.1 instead of default value 1.4. Then the interrupt number will be assigned under 15. You might also upgrade your BIOS. + Note: VIA8233/5 (not VIA8233A) can support DXS (direct sound) + channels as the first PCM. With this device, up to 4 + streams can be played at the same time. If the playback on + this PCM is noisy, try to specify dxs_channels option to 2 + or 3. + + Note: for the MPU401 on VIA823x, use snd-mpu401 driver + additonally. + Module snd-virmidi ------------------ @@ -968,6 +1000,53 @@ midi_devs - MIDI devices # (1-8, default=4) Module supports up to 8 cards. + + Module snd-vx222 + ---------------- + + Module for Digigram VX-Pocket VX222, V222 v2 and Mic cards. + + mic - Enable Microphone on V222 Mic (NYI) + + Module supports up to 8 cards. + + For loading the firmware, use vxloader utility in alsa-tools + package. You can load the firmware automatically by adding + the following to /etc/modules.conf + + post-install snd-vx222 "/usr/bin/vxload" + + Module snd-vxpocket + ------------------- + + Module for Digigram VX-Pocket VX2 PCMCIA card. + + irq_mask - IRQ bitmask, specifies the available IRQs as bits + + Module supports up to 8 cards. The module is compiled only when + PCMCIA is supported on kernel. + + To activate the driver via the card manager, you'll need to set + up /etc/pcmcia/vxpocket.conf. See the sound/pcmcia/vx/vxpocket.c. + + For loading the firmware, use vxloader utility in alsa-tools + package. + + Module snd-vxp440 + ----------------- + + Module for Digigram VX-Pocket 440 PCMCIA card. + + irq_mask - IRQ bitmask, specifies the available IRQs as bits + + Module supports up to 8 cards. The module is compiled only when + PCMCIA is supported on kernel. + + To activate the driver via the card manager, you'll need to set + up /etc/pcmcia/vxp440.conf. See the sound/pcmcia/vx/vxp440.c. + + For loading the firmware, use vxloader utility in alsa-tools + package. Module snd-ymfpci ----------------- diff -Nru a/Documentation/sound/alsa/CMIPCI.txt b/Documentation/sound/alsa/CMIPCI.txt --- a/Documentation/sound/alsa/CMIPCI.txt Fri Jun 13 01:07:29 2003 +++ b/Documentation/sound/alsa/CMIPCI.txt Fri Jun 13 01:07:29 2003 @@ -115,8 +115,7 @@ % aplay -Dspdif foo.wav -So far, only S16LE format is supported. Still no 24bit. Sorry, not -enough info for this. +24bit format is also supported experimentally. The playback and capture over SPDIF use normal DAC and ADC, respectively, so you cannot playback both analog and digital streams 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 Fri Jun 13 01:07:33 2003 +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl Fri Jun 13 01:07:33 2003 @@ -1538,11 +1538,12 @@ @@ -2905,7 +2906,8 @@ - This callback may be called multiple times, too. + This function is always called before the close callback is called. + Also, the callback may be called multiple times, too. Keep track whether the resource was already released. @@ -3006,14 +3008,16 @@ - When the pcm supports the suspend/resume operation, + When the pcm supports the suspend/resume operation + (i.e. SNDRV_PCM_INFO_RESUME flag is set), SUSPEND and RESUME - commands must be handled, too. Obviously it does suspend and - resume of the pcm substream. Usually, the - SUSPEND is identical with - STOP command and the - RESUME is identical with - START command. + commands must be handled, too. + These commands are issued when the power-management status is + changed. Obviously, the SUSPEND and + RESUME + do suspend and resume of the pcm substream, and usually, they + are identical with STOP and + START commands, respectively. @@ -3149,8 +3153,8 @@ Interrupt Handler Case #1 lock); @@ -3160,9 +3164,11 @@ spin_unlock(&chip->lock); snd_pcm_period_elapsed(chip->substream); spin_lock(&chip->lock); + // acknowledge the interrupt if necessary } .... spin_unlock(&chip->lock); + return IRQ_HANDLED; } ]]> @@ -3191,8 +3197,8 @@ Interrupt Handler Case #2 lock); @@ -3221,9 +3227,11 @@ snd_pcm_period_elapsed(substream); spin_lock(&chip->lock); } + // acknowledge the interrupt if necessary } .... spin_unlock(&chip->lock); + return IRQ_HANDLED; } ]]> @@ -3326,9 +3334,96 @@ - There are many different constraints. You can even define your - own constraint rules. I won't explain the details here, rather I - would like to say, Luke, use the source. + There are many different constraints. + Look in sound/asound.h for a complete list. + You can even define your own constraint rules. + For example, let's suppose my_chip can manage a substream of 1 channel + if and only if the format is S16_LE, otherwise it supports any format + specified in the snd_pcm_hardware_t stucture (or in any + other constraint_list). You can build a rule like this: + + + Example of Hardware Constraints for Channels + +min < 2) { + fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE; + return snd_mask_refine(f, &fmt); + } + return 0; + } +]]> + + + + + + Then you need to call this function to add your rule: + + + +runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, + hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT, + -1); +]]> + + + + + + The rule function is called when an application sets the number of + channels. But an application can set the format before the number of + channels. Thus you also need to define the inverse rule: + + + Example of Hardware Constraints for Channels + +bits[0] == SNDRV_PCM_FMTBIT_S16_LE) { + ch.min = ch.max = 1; + ch.integer = 1; + return snd_interval_refine(c, &ch); + } + return 0; + } +]]> + + + + + + ...and in the open callback: + + +runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT, + hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS, + -1); +]]> + + + + + + I won't explain more details here, rather I + would like to say, Luke, use the source. @@ -5750,6 +5845,10 @@ Kevin Conder reformatted the original plain-text to the DocBook format. + + + Giuliano Pochini corrected typos and contributed the example codes + in the hardware constraints section. diff -Nru a/Documentation/sound/alsa/OSS-Emulation.txt b/Documentation/sound/alsa/OSS-Emulation.txt --- a/Documentation/sound/alsa/OSS-Emulation.txt Fri Jun 13 01:07:39 2003 +++ b/Documentation/sound/alsa/OSS-Emulation.txt Fri Jun 13 01:07:39 2003 @@ -249,7 +249,7 @@ [Volume|Switch]" will be checked in addition. The current assignment of these mixer elements is listed in the proc -file, /proc/asound/cardX/mixer_oss, which will be like the following +file, /proc/asound/cardX/oss_mixer, which will be like the following VOLUME "Master" 0 BASS "" 0 @@ -267,7 +267,7 @@ proc file. For example, to map "Wave Playback" to the PCM volume, send the command like the following: - % echo 'VOLUME "Wave Playback" 0' > /proc/asound/card0/mixer_oss + % echo 'VOLUME "Wave Playback" 0' > /proc/asound/card0/oss_mixer The command is exactly as same as listed in the proc file. You can change one or more elements, one volume per line. In the last diff -Nru a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt --- a/Documentation/sysctl/vm.txt Fri Jun 13 01:07:41 2003 +++ b/Documentation/sysctl/vm.txt Fri Jun 13 01:07:41 2003 @@ -22,6 +22,7 @@ - dirty_background_ratio - dirty_expire_centisecs - dirty_writeback_centisecs +- min_free_kbytes ============================================================== @@ -74,3 +75,11 @@ 2 ^ page-cluster. Values above 2 ^ 5 don't make much sense for swap because we only cluster swap data in 32-page groups. +============================================================== + +min_free_kbytes: + +This is used to force the Linux VM to keep a minimum number +of kilobytes free. The VM uses this number to compute a pages_min +value for each lowmem zone in the system. Each lowmem zone gets +a number of reserved free pages based proportionally on its size. diff -Nru a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt --- a/Documentation/usb/proc_usb_info.txt Fri Jun 13 01:07:30 2003 +++ b/Documentation/usb/proc_usb_info.txt Fri Jun 13 01:07:30 2003 @@ -1,10 +1,11 @@ /proc/bus/usb filesystem output =============================== -(version 2002.03.19) +(version 2003.05.30) -The /proc filesystem for USB devices provides /proc/bus/usb/drivers -and /proc/bus/usb/devices, as well as /proc/bus/usb/BBB/DDD files. +The usbfs filesystem for USB devices is traditionally mounted at +/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as +the /proc/bus/usb/BBB/DDD files. **NOTE**: If /proc/bus/usb appears empty, and a host controller @@ -66,30 +67,6 @@ grant read/write permissions to other users by using "chmod". Also, usbfs mount options such as "devmode=0666" may be helpful. - - -THE /proc/bus/usb/drivers FILE: -------------------------------- -Each of the USB device drivers linked into your kernel (statically, -or dynamically using "modprobe") is listed in the "drivers" file. -Here's an example from one system: - - usbdevfs - hub - 0- 15: usblp - usbnet - serial - usb-storage - pegasus - -If you see this file, "usbdevfs" and "hub" will always be listed, -since those are part of the "usbcore" framework. - -Drivers that use the USB major number (180) to provide character devices -will include a range of minor numbers, as shown above for the "usblp" -(actually "printer.o") module. USB device drivers can of course use any -major number, but it's easy to use the USB range since there's explicit -support for subdividing it in the USB device driver framework. THE /proc/bus/usb/devices FILE: diff -Nru a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt --- a/Documentation/vm/hugetlbpage.txt Fri Jun 13 01:07:31 2003 +++ b/Documentation/vm/hugetlbpage.txt Fri Jun 13 01:07:31 2003 @@ -67,14 +67,21 @@ call, then it is required that system administrator mount a file system of type hugetlbfs: - mount none /mnt/huge -t hugetlbfs + mount none /mnt/huge -t hugetlbfs This command mounts a (pseudo) filesystem of type hugetlbfs on the directory -/mnt/huge. Any files created on /mnt/huge uses hugepages. An example is -given at the end of this document. +/mnt/huge. Any files created on /mnt/huge uses hugepages. The uid and gid +options sets the owner and group of the root of the file system. By default +the uid and gid of the current process are taken. The mode option sets the +mode of root of file system to value & 0777. This value is given in octal. +By default the value 0755 is picked. An example is given at the end of this +document. read and write system calls are not supported on files that reside on hugetlb file systems. + +A regular chown, chgrp and chmod commands (with right permissions) could be +used to change the file attributes on hugetlbfs. Also, it is important to note that no such mount command is required if the applications are going to use only shmat/shmget system calls. It is possible diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Fri Jun 13 01:07:39 2003 +++ b/MAINTAINERS Fri Jun 13 01:07:39 2003 @@ -207,6 +207,7 @@ AGPGART DRIVER P: Dave Jones M: davej@codemonkey.org.uk +W: http://www.codemonkey.org.uk/agp/ S: Maintained AHA152X SCSI DRIVER @@ -281,6 +282,13 @@ W: http://linux-atm.sourceforge.net S: Maintained +ATMEL WIRELESS DRIVER +P: Simon Kelley +M: simon@thekelleys.org.uk +W: http://www.thekelleys.org.uk/atmel +W: http://atmelwlandriver.sourceforge.net/ +S: Maintained + AX.25 NETWORK LAYER P: Ralf Baechle M: ralf@linux-mips.org @@ -388,27 +396,6 @@ L: pcihpd-discuss@lists.sourceforge.net S: Supported -COMPAQ FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA -P: Amy Vanzant-Hodge -M: Amy Vanzant-Hodge (fibrechannel@compaq.com) -L: compaqandlinux@cpqlin.van-dijk.net -W: ftp.compaq.com/pub/products/drivers/linux -S: Supported - -COMPAQ SMART2 RAID DRIVER -P: Charles White -M: Charles White -L: compaqandlinux@cpqlin.van-dijk.net -W: ftp.compaq.com/pub/products/drivers/linux -S: Supported - -COMPAQ SMART CISS RAID DRIVER -P: Charles White -M: Charles White -L: compaqandlinux@cpqlin.van-dijk.net -W: ftp.compaq.com/pub/products/drivers/linux -S: Supported - COMPUTONE INTELLIPORT MULTIPORT CARD P: Michael H. Warfield M: Michael H. Warfield @@ -785,6 +772,24 @@ L: linux-hippi@sunsite.dk S: Maintained +HEWLETT-PACKARD FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA +P: Chase Maupin +M: Chase Maupin (support@compaq.com) + L: compaqandlinux@cpqlin.van-dijk.net + S: Supported + +HEWLETT-PACKARD SMART2 RAID DRIVER +P: Francis Wiran +M: Francis Wiran + L: compaqandlinux@cpqlin.van-dijk.net + S: Supported + +HEWLETT-PACKARD SMART CISS RAID DRIVER +P: Mike Miller, Michael Ni +M: Mike Miller, Michael Ni + L: compaqandlinux@cpqlin.van-dijk.net + S: Supported + HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series P: Jaroslav Kysela M: perex@suse.cz @@ -1111,8 +1116,10 @@ S: Maintained LINUX FOR 64BIT POWERPC -P: David Engebretsen +P: David Engebretsen (stable kernel) M: engebret@us.ibm.com +P: Anton Blanchard (development kernel) +M: anton@au.ibm.com W: http://linuxppc64.org L: linuxppc64-dev@lists.linuxppc.org S: Supported @@ -1523,6 +1530,12 @@ L: reiserfs-list@namesys.com W: http://www.namesys.com S: Supported + +ROCKETPORT DRIVER +P: Comtrol Corp. +M: support@comtrol.com +W: http://www.comtrol.com +S: Maintained ROSE NETWORK LAYER P: Ralf Baechle diff -Nru a/Makefile b/Makefile --- a/Makefile Fri Jun 13 01:07:40 2003 +++ b/Makefile Fri Jun 13 01:07:40 2003 @@ -36,13 +36,36 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ ) -ARCH := $(SUBARCH) # Remove hyphens since they have special meaning in RPM filenames KERNELPATH=kernel-$(subst -,,$(KERNELRELEASE)) +# Cross compiling and selecting different set of gcc/bin-utils +# --------------------------------------------------------------------------- +# +# When performing cross compilation for other architectures ARCH shall be set +# to the target architecture. (See arch/* for the possibilities). +# ARCH can be set during invocation of make: +# make ARCH=ia64 +# Another way is to have ARCH set in the environment. +# The default ARCH is the host where make is executed. + +# CROSS_COMPILE specify the prefix used for all executables used +# during compilation. Only gcc and related bin-utils executables +# are prefixed with $(CROSS_COMPILE). +# CROSS_COMPILE can be set on the command line +# make CROSS_COMPILE=ia64-linux- +# Alternatively CROSS_COMPILE can be set in the environment. +# Default value for CROSS_COMPILE is not to prefix executables +# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile + +ARCH ?= $(SUBARCH) +CROSS_COMPILE ?= + +# Architecture as present in compile.h UTS_MACHINE := $(ARCH) +# SHELL used by kbuild CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi ; fi) @@ -53,7 +76,6 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer HOSTCXXFLAGS = -O2 -CROSS_COMPILE = # That's our default target when none is given on the command line # Note that 'modules' will be added as a prerequisite as well, @@ -182,7 +204,7 @@ DEPMOD = /sbin/depmod KALLSYMS = scripts/kallsyms PERL = perl -CHECK = /home/torvalds/parser/check +CHECK = sparse MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) AFLAGS_MODULE = $(MODFLAGS) @@ -266,7 +288,9 @@ core-y := $(patsubst %/, %/built-in.o, $(core-y)) drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) net-y := $(patsubst %/, %/built-in.o, $(net-y)) -libs-y := $(patsubst %/, %/lib.a, $(libs-y)) +libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) +libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) +libs-y := $(libs-y1) $(libs-y2) ifdef include_config @@ -783,25 +807,27 @@ help: @echo 'Cleaning targets:' - @echo ' clean - remove most generated files but keep the config' - @echo ' mrproper - remove all generated files + config + various backup files' + @echo ' clean - remove most generated files but keep the config' + @echo ' mrproper - remove all generated files + config + various backup files' @echo '' @echo 'Configuration targets:' - @echo ' oldconfig - Update current config utilising a line-oriented program' - @echo ' menuconfig - Update current config utilising a menu based program' - @echo ' xconfig - Update current config utilising a X-based program' - @echo ' defconfig - New config with default answer to all options' - @echo ' allmodconfig - New config selecting modules when possible' - @echo ' allyesconfig - New config where all options are accepted with yes' - @echo ' allnoconfig - New minimal config' + @echo ' oldconfig - Update current config utilising a line-oriented program' + @echo ' menuconfig - Update current config utilising a menu based program' + @echo ' xconfig - Update current config utilising a QT based front-end' + @echo ' gconfig - Update current config utilising a GTK based front-end' + @echo ' defconfig - New config with default answer to all options' + @echo ' allmodconfig - New config selecting modules when possible' + @echo ' allyesconfig - New config where all options are accepted with yes' + @echo ' allnoconfig - New minimal config' @echo '' @echo 'Other generic targets:' - @echo ' all - Build all targets marked with [*]' - @echo '* vmlinux - Build the bare kernel' - @echo '* modules - Build all modules' - @echo ' dir/file.[ois]- Build specified target only' - @echo ' rpm - Build a kernel as an RPM package' - @echo ' tags/TAGS - Generate tags file for editors' + @echo ' all - Build all targets marked with [*]' + @echo '* vmlinux - Build the bare kernel' + @echo '* modules - Build all modules' + @echo ' modules_install - Install all modules' + @echo ' dir/file.[ois] - Build specified target only' + @echo ' rpm - Build a kernel as an RPM package' + @echo ' tags/TAGS - Generate tags file for editors' @echo '' @echo 'Documentation targets:' @$(MAKE) --no-print-directory -f Documentation/DocBook/Makefile dochelp @@ -809,6 +835,9 @@ @echo 'Architecture specific targets ($(ARCH)):' @$(if $(archhelp),$(archhelp),\ echo ' No architecture specific help defined for $(ARCH)') + @echo '' + @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' + @echo ' make C=1 [targets] Check all c source with checker tool' @echo '' @echo 'Execute "make" or "make all" to build all targets marked with [*] ' @echo 'For further info browse Documentation/kbuild/*' diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig --- a/arch/alpha/Kconfig Fri Jun 13 01:07:41 2003 +++ b/arch/alpha/Kconfig Fri Jun 13 01:07:41 2003 @@ -295,6 +295,10 @@ information about which PCI hardware does work under Linux and which doesn't. +config PCI_DOMAINS + bool + default y + config ALPHA_CORE_AGP bool depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL diff -Nru a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offsets.c --- a/arch/alpha/kernel/asm-offsets.c Fri Jun 13 01:07:44 2003 +++ b/arch/alpha/kernel/asm-offsets.c Fri Jun 13 01:07:44 2003 @@ -31,6 +31,7 @@ DEFINE(TASK_TGID, offsetof(struct task_struct, tgid)); BLANK(); + DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); DEFINE(PT_PTRACED, PT_PTRACED); DEFINE(CLONE_VM, CLONE_VM); DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); diff -Nru a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c --- a/arch/alpha/kernel/core_marvel.c Fri Jun 13 01:07:30 2003 +++ b/arch/alpha/kernel/core_marvel.c Fri Jun 13 01:07:30 2003 @@ -980,7 +980,7 @@ } static int -marvel_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +marvel_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct marvel_agp_aperture *aper = agp->aperture.sysdata; return iommu_bind(aper->arena, aper->pg_start + pg_start, @@ -988,7 +988,7 @@ } static int -marvel_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +marvel_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct marvel_agp_aperture *aper = agp->aperture.sysdata; return iommu_unbind(aper->arena, aper->pg_start + pg_start, diff -Nru a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c --- a/arch/alpha/kernel/core_titan.c Fri Jun 13 01:07:32 2003 +++ b/arch/alpha/kernel/core_titan.c Fri Jun 13 01:07:32 2003 @@ -679,7 +679,7 @@ } static int -titan_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +titan_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct titan_agp_aperture *aper = agp->aperture.sysdata; return iommu_bind(aper->arena, aper->pg_start + pg_start, @@ -687,7 +687,7 @@ } static int -titan_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, agp_memory *mem) +titan_agp_unbind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *mem) { struct titan_agp_aperture *aper = agp->aperture.sysdata; return iommu_unbind(aper->arena, aper->pg_start + pg_start, diff -Nru a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S --- a/arch/alpha/kernel/head.S Fri Jun 13 01:07:28 2003 +++ b/arch/alpha/kernel/head.S Fri Jun 13 01:07:28 2003 @@ -9,6 +9,7 @@ #include #include +#include .globl swapper_pg_dir .globl _stext @@ -25,7 +26,7 @@ /* We need to get current_task_info loaded up... */ lda $8,init_thread_union /* ... and find our stack ... */ - lda $30,0x4000($8) + lda $30,0x4000 - SIZEOF_PT_REGS($8) /* ... and then we can start the kernel. */ jsr $26,start_kernel call_pal PAL_halt diff -Nru a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c --- a/arch/alpha/kernel/irq.c Fri Jun 13 01:07:41 2003 +++ b/arch/alpha/kernel/irq.c Fri Jun 13 01:07:41 2003 @@ -34,7 +34,10 @@ * Controller mappings for all interrupt sources: */ irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { - [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED} + [0 ... NR_IRQS-1] = { + .handler = &no_irq_type, + .lock = SPIN_LOCK_UNLOCKED + } }; static void register_irq_proc(unsigned int irq); diff -Nru a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c --- a/arch/alpha/kernel/pci.c Fri Jun 13 01:07:30 2003 +++ b/arch/alpha/kernel/pci.c Fri Jun 13 01:07:30 2003 @@ -102,7 +102,7 @@ { unsigned int class = dev->class >> 8; - if (class == PCI_CLASS_BRIDGE_ISA || class == PCI_CLASS_BRIDGE_ISA) { + if (class == PCI_CLASS_BRIDGE_ISA || class == PCI_CLASS_BRIDGE_EISA) { dev->dma_mask = MAX_ISA_DMA_ADDRESS - 1; isa_bridge = dev; } @@ -483,12 +483,4 @@ } return -EOPNOTSUPP; -} - -/* Return the index of the PCI controller for device PDEV. */ -int -pci_controller_num(struct pci_dev *pdev) -{ - struct pci_controller *hose = pdev->sysdata; - return (hose ? (int) hose->index : -ENXIO); } diff -Nru a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c --- a/arch/alpha/kernel/ptrace.c Fri Jun 13 01:07:42 2003 +++ b/arch/alpha/kernel/ptrace.c Fri Jun 13 01:07:42 2003 @@ -366,8 +366,8 @@ ret = -EIO; if ((unsigned long) data > _NSIG) break; - /* Set single stepping. */ - ptrace_set_bpt(child); + /* Mark single stepping. */ + child->thread_info->bpt_nsaved = -1; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); wake_up_process(child); child->exit_code = data; diff -Nru a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c --- a/arch/alpha/kernel/signal.c Fri Jun 13 01:07:36 2003 +++ b/arch/alpha/kernel/signal.c Fri Jun 13 01:07:36 2003 @@ -619,7 +619,10 @@ if (!oldset) oldset = ¤t->blocked; + /* This lets the debugger run, ... */ signr = get_signal_to_deliver(&info, regs, NULL); + /* ... so re-check the single stepping. */ + single_stepping |= ptrace_cancel_bpt(current); if (signr > 0) { /* Whee! Actually deliver the signal. */ diff -Nru a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c --- a/arch/alpha/kernel/smp.c Fri Jun 13 01:07:32 2003 +++ b/arch/alpha/kernel/smp.c Fri Jun 13 01:07:32 2003 @@ -417,12 +417,7 @@ /* Don't care about the contents of regs since we'll never reschedule the forked task. */ struct pt_regs regs; - int pid; - pid = do_fork(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); - if (pid < 0) - return NULL; - - return find_task_by_pid (pid); + return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); } /* @@ -441,8 +436,10 @@ wish. We can't use kernel_thread since we must avoid rescheduling the child. */ idle = fork_by_hand(); - if (!idle) + if (IS_ERR(idle)) panic("failed fork for CPU %d", cpuid); + + wake_up_forked_process(idle); init_idle(idle, cpuid); unhash_process(idle); diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c --- a/arch/alpha/kernel/srmcons.c Fri Jun 13 01:07:42 2003 +++ b/arch/alpha/kernel/srmcons.c Fri Jun 13 01:07:42 2003 @@ -30,11 +30,6 @@ */ #define MAX_SRM_CONSOLE_DEVICES 1 /* only support 1 console device */ -static int srmcons_refcount; -static struct tty_struct *srmcons_table[MAX_SRM_CONSOLE_DEVICES]; -static struct termios *srmcons_termios[MAX_SRM_CONSOLE_DEVICES]; -static struct termios *srmcons_termios_locked[MAX_SRM_CONSOLE_DEVICES]; - struct srmcons_private { struct tty_struct *tty; struct timer_list timer; @@ -269,21 +264,9 @@ } -static struct tty_driver srmcons_driver = { - .driver_name = "srm", - .name = "srm", - .magic = TTY_DRIVER_MAGIC, - .major = 0, /* dynamic */ - .minor_start = 0, - .num = MAX_SRM_CONSOLE_DEVICES, - .type = TTY_DRIVER_TYPE_SYSTEM, - .subtype = SYSTEM_TYPE_SYSCONS, - - .table = srmcons_table, - .termios = srmcons_termios, - .termios_locked = srmcons_termios_locked, - .refcount = &srmcons_refcount, +static struct tty_driver *srmcons_driver; +static struct tty_operations srmcons_ops = { .open = srmcons_open, .close = srmcons_close, .write = srmcons_write, @@ -295,8 +278,25 @@ srmcons_init(void) { if (srm_is_registered_console) { - srmcons_driver.init_termios = tty_std_termios; - return tty_register_driver(&srmcons_driver); + struct tty_driver *driver; + int err; + + driver = alloc_tty_driver(MAX_SRM_CONSOLE_DEVICES); + if (!driver) + return -ENOMEM; + driver->driver_name = "srm"; + driver->name = "srm"; + driver->major = 0; /* dynamic */ + driver->minor_start = 0; + driver->type = TTY_DRIVER_TYPE_SYSTEM; + driver->subtype = SYSTEM_TYPE_SYSCONS; + driver->init_termios = tty_std_termios; + err = tty_register_driver(driver); + if (err) { + put_tty_driver(driver); + return err; + } + srmcons_driver = driver; } return -ENODEV; @@ -322,7 +322,7 @@ srm_console_device(struct console *co, int *index) { *index = co->index; - return &srmcons_driver; + return srmcons_driver; } static int __init diff -Nru a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c --- a/arch/alpha/kernel/sys_sio.c Fri Jun 13 01:07:29 2003 +++ b/arch/alpha/kernel/sys_sio.c Fri Jun 13 01:07:29 2003 @@ -85,10 +85,10 @@ sio_collect_irq_levels(void) { unsigned int level_bits = 0; - struct pci_dev *dev; + struct pci_dev *dev = NULL; /* Iterate through the devices, collecting IRQ levels. */ - pci_for_each_dev(dev) { + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) && (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA)) continue; diff -Nru a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S --- a/arch/alpha/kernel/systbls.S Fri Jun 13 01:07:39 2003 +++ b/arch/alpha/kernel/systbls.S Fri Jun 13 01:07:39 2003 @@ -433,6 +433,16 @@ .quad sys_set_tid_address .quad sys_restart_syscall .quad sys_fadvise64 + .quad sys_timer_create + .quad sys_timer_settime /* 415 */ + .quad sys_timer_gettime + .quad sys_timer_getoverrun + .quad sys_timer_delete + .quad sys_clock_settime + .quad sys_clock_gettime /* 420 */ + .quad sys_clock_getres + .quad sys_clock_nanosleep + .quad sys_semtimedop .size sys_call_table, . - sys_call_table .type sys_call_table, @object diff -Nru a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c --- a/arch/alpha/kernel/traps.c Fri Jun 13 01:07:42 2003 +++ b/arch/alpha/kernel/traps.c Fri Jun 13 01:07:42 2003 @@ -485,9 +485,9 @@ " extwh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -505,9 +505,9 @@ " extlh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -525,9 +525,9 @@ " extqh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -554,13 +554,13 @@ "4: stq_u %1,0(%5)\n" "5:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %2,5b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %1,5b-2b(%0)\n" - " .gprel32 3b\n" + " .long 3b - .\n" " lda $31,5b-3b(%0)\n" - " .gprel32 4b\n" + " .long 4b - .\n" " lda $31,5b-4b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2), @@ -584,13 +584,13 @@ "4: stq_u %1,0(%5)\n" "5:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %2,5b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %1,5b-2b(%0)\n" - " .gprel32 3b\n" + " .long 3b - .\n" " lda $31,5b-3b(%0)\n" - " .gprel32 4b\n" + " .long 4b - .\n" " lda $31,5b-4b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2), @@ -614,13 +614,13 @@ "4: stq_u %1,0(%5)\n" "5:\n" ".section __ex_table,\"a\"\n\t" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %2,5b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %1,5b-2b(%0)\n" - " .gprel32 3b\n" + " .long 3b - .\n" " lda $31,5b-3b(%0)\n" - " .gprel32 4b\n" + " .long 4b - .\n" " lda $31,5b-4b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2), @@ -845,9 +845,9 @@ " extwh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -865,9 +865,9 @@ " extlh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -885,9 +885,9 @@ " extqh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -905,9 +905,9 @@ " extlh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -925,9 +925,9 @@ " extqh %2,%3,%2\n" "3:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %1,3b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %2,3b-2b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2) @@ -954,13 +954,13 @@ "4: stq_u %1,0(%5)\n" "5:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %2,5b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %1,5b-2b(%0)\n" - " .gprel32 3b\n" + " .long 3b - .\n" " lda $31,5b-3b(%0)\n" - " .gprel32 4b\n" + " .long 4b - .\n" " lda $31,5b-4b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2), @@ -988,13 +988,13 @@ "4: stq_u %1,0(%5)\n" "5:\n" ".section __ex_table,\"a\"\n" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %2,5b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %1,5b-2b(%0)\n" - " .gprel32 3b\n" + " .long 3b - .\n" " lda $31,5b-3b(%0)\n" - " .gprel32 4b\n" + " .long 4b - .\n" " lda $31,5b-4b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2), @@ -1022,13 +1022,13 @@ "4: stq_u %1,0(%5)\n" "5:\n" ".section __ex_table,\"a\"\n\t" - " .gprel32 1b\n" + " .long 1b - .\n" " lda %2,5b-1b(%0)\n" - " .gprel32 2b\n" + " .long 2b - .\n" " lda %1,5b-2b(%0)\n" - " .gprel32 3b\n" + " .long 3b - .\n" " lda $31,5b-3b(%0)\n" - " .gprel32 4b\n" + " .long 4b - .\n" " lda $31,5b-4b(%0)\n" ".previous" : "=r"(error), "=&r"(tmp1), "=&r"(tmp2), diff -Nru a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile --- a/arch/alpha/lib/Makefile Fri Jun 13 01:07:43 2003 +++ b/arch/alpha/lib/Makefile Fri Jun 13 01:07:43 2003 @@ -5,8 +5,6 @@ EXTRA_AFLAGS := $(CFLAGS) EXTRA_CFLAGS := -Werror -L_TARGET := lib.a - # Many of these routines have implementations tuned for ev6. # Choose them iff we're targeting ev6 specifically. ev6-$(CONFIG_ALPHA_EV6) := ev6- @@ -14,7 +12,7 @@ # Several make use of the cttz instruction introduced in ev67. ev67-$(CONFIG_ALPHA_EV67) := ev67- -obj-y = __divqu.o __remqu.o __divlu.o __remlu.o \ +lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \ udelay.o \ $(ev6-y)memset.o \ $(ev6-y)memcpy.o \ @@ -43,7 +41,7 @@ fpreg.o \ callback_srm.o srm_puts.o srm_printk.o -obj-$(CONFIG_SMP) += dec_and_lock.o +lib-$(CONFIG_SMP) += dec_and_lock.o # The division routines are built from single source, with different defines. AFLAGS___divqu.o = -DDIV diff -Nru a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c --- a/arch/alpha/lib/csum_partial_copy.c Fri Jun 13 01:07:36 2003 +++ b/arch/alpha/lib/csum_partial_copy.c Fri Jun 13 01:07:36 2003 @@ -46,7 +46,7 @@ "1: ldq_u %0,%2\n" \ "2:\n" \ ".section __ex_table,\"a\"\n" \ - " .gprel32 1b\n" \ + " .long 1b - .\n" \ " lda %0,2b-1b(%1)\n" \ ".previous" \ : "=r"(x), "=r"(__guu_err) \ @@ -61,7 +61,7 @@ "1: stq_u %2,%1\n" \ "2:\n" \ ".section __ex_table,\"a\"\n" \ - " .gprel32 1b" \ + " .long 1b - ." \ " lda $31,2b-1b(%0)\n" \ ".previous" \ : "=r"(__puu_err) \ diff -Nru a/arch/alpha/lib/memmove.S b/arch/alpha/lib/memmove.S --- a/arch/alpha/lib/memmove.S Fri Jun 13 01:07:37 2003 +++ b/arch/alpha/lib/memmove.S Fri Jun 13 01:07:37 2003 @@ -12,6 +12,15 @@ .text .align 4 + .globl bcopy + .ent bcopy +bcopy: + mov $16,$0 + mov $17,$16 + mov $0,$17 + .end bcopy + + .align 4 .globl memmove .ent memmove memmove: diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig Fri Jun 13 01:07:38 2003 +++ b/arch/arm/Kconfig Fri Jun 13 01:07:38 2003 @@ -377,6 +377,15 @@ If you don't know what this all is, saying Y is a safe choice. +config CPU_BIG_ENDIAN + bool "Build big-endian kernel" + depends on ARCH_SUPPORTS_BIG_ENDIAN + help + Say Y if you plan on running a kernel in big-endian mode. + Note that your board must be properly built and your board + port must properly enable and big-endian related features + of your chipset/board/processor. + config CPU_ICACHE_DISABLE bool "Disable I-Cache" depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020 diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile --- a/arch/arm/Makefile Fri Jun 13 01:07:33 2003 +++ b/arch/arm/Makefile Fri Jun 13 01:07:33 2003 @@ -24,6 +24,12 @@ CFLAGS +=-g endif +ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) +CFLAGS += -mbig-endian +AS += -EB +LD += -EB +endif + # Select CPU dependent flags. Note that order of declaration is important; # the options further down the list override previous items. # @@ -34,10 +40,7 @@ # Note that GCC does not numerically define an architecture version # macro, but instead defines a whole series of macros which makes # testing for a specific architecture or later rather impossible. -# -# Note - GCC does accept -march=armv5te, but someone messed up the assembler or the -# gcc specs file - this needs fixing properly - ie in gcc and/or binutils. -arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 -march=armv5t +arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 -march=armv5te arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 @@ -50,13 +53,13 @@ tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 -tune-$(CONFIG_CPU_XSCALE) :=-mtune=strongarm -Wa,-mxscale #-mtune=xscale +tune-$(CONFIG_CPU_XSCALE) :=-mtune=xscale # Force -mno-fpu to be passed to the assembler. Some versions of gcc don't # do this with -msoft-float CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -AFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mno-fpu -msoft-float -Wa,-mno-fpu +AFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu #Default value DATAADDR := . @@ -76,7 +79,11 @@ ifeq ($(CONFIG_CPU_32),y) PROCESSOR := armv head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o -LDFLAGS_BLOB += --oformat elf32-littlearm + ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) + LDFLAGS_BLOB += --oformat elf32-bigarm + else + LDFLAGS_BLOB += --oformat elf32-littlearm + endif textaddr-y := 0xC0008000 endif diff -Nru a/arch/arm/common/Makefile b/arch/arm/common/Makefile --- a/arch/arm/common/Makefile Fri Jun 13 01:07:35 2003 +++ b/arch/arm/common/Makefile Fri Jun 13 01:07:35 2003 @@ -2,7 +2,7 @@ # Makefile for the linux kernel. # -obj-$(CONFIG_SA1111) += sa1111.o sa1111-pcibuf.o sa1111-pcipool.o - +obj-y += platform.o +obj-$(CONFIG_SA1111) += sa1111.o sa1111-pcibuf.o sa1111-pcipool.o obj-$(CONFIG_PCI_HOST_PLX90X0) += plx90x0.o obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o diff -Nru a/arch/arm/common/platform.c b/arch/arm/common/platform.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/common/platform.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,35 @@ +#include +#include +#include + +int __init platform_add_device(struct platform_device *dev) +{ + int i; + + for (i = 0; i < dev->num_resources; i++) { + struct resource *r = &dev->resource[i]; + + r->name = dev->dev.name; + + if (r->flags & IORESOURCE_MEM && + request_resource(&iomem_resource, r)) { + printk(KERN_ERR + "%s%d: failed to claim resource %d\n", + dev->name, dev->id, i); + break; + } + } + if (i == dev->num_resources) + platform_device_register(dev); + return 0; +} + +int __init platform_add_devices(struct platform_device **devs, int num) +{ + int i; + + for (i = 0; i < num; i++) + platform_add_device(devs[i]); + + return 0; +} diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c Fri Jun 13 01:07:42 2003 +++ b/arch/arm/common/sa1111.c Fri Jun 13 01:07:42 2003 @@ -42,7 +42,7 @@ */ struct sa1111 { struct device *dev; - struct resource res; + unsigned long phys; int irq; spinlock_t lock; void *base; @@ -60,7 +60,6 @@ }, .skpcr_mask = SKPCR_UCLKEN, .devid = SA1111_DEVID_USB, - .dma_mask = 0xffffffffLL, .irq = { IRQ_USBPWR, IRQ_HCIM, @@ -470,6 +469,17 @@ #ifdef CONFIG_ARCH_SA1100 +static u32 sa1111_dma_mask[] = { + ~0, + ~(1 << 20), + ~(1 << 23), + ~(1 << 24), + ~(1 << 25), + ~(1 << 20), + ~(1 << 20), + 0, +}; + /* * Configure the SA1111 shared memory controller. */ @@ -483,26 +493,43 @@ smcr |= SMCR_CLAT; sa1111_writel(smcr, sachip->base + SA1111_SMCR); + + /* + * Now clear the bits in the DMA mask to work around the SA1111 + * DMA erratum (Intel StrongARM SA-1111 Microprocessor Companion + * Chip Specification Update, June 2000, Erratum #7). + */ + if (sachip->dev->dma_mask) + *sachip->dev->dma_mask &= sa1111_dma_mask[drac >> 2]; } #endif static void -sa1111_init_one_child(struct sa1111 *sachip, struct sa1111_dev *sadev, unsigned int offset) +sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, + struct sa1111_dev *sadev, unsigned int offset) { snprintf(sadev->dev.bus_id, sizeof(sadev->dev.bus_id), "%4.4x", offset); + /* + * If the parent device has a DMA mask associated with it, + * propagate it down to the children. + */ + if (sachip->dev->dma_mask) { + sadev->dma_mask = *sachip->dev->dma_mask; + sadev->dev.dma_mask = &sadev->dma_mask; + } + sadev->dev.parent = sachip->dev; sadev->dev.bus = &sa1111_bus_type; - sadev->dev.dma_mask = &sadev->dma_mask; - sadev->res.start = sachip->res.start + offset; + sadev->res.start = sachip->phys + offset; sadev->res.end = sadev->res.start + 511; sadev->res.name = sadev->dev.name; sadev->res.flags = IORESOURCE_MEM; sadev->mapbase = sachip->base + offset; - if (request_resource(&sachip->res, &sadev->res)) { + if (request_resource(parent, &sadev->res)) { printk("SA1111: failed to allocate resource for %s\n", sadev->res.name); return; @@ -524,7 +551,7 @@ * %0 successful. */ static int __init -__sa1111_probe(struct device *me, unsigned long phys_addr, int irq) +__sa1111_probe(struct device *me, struct resource *mem, int irq) { struct sa1111 *sachip; unsigned long id; @@ -542,24 +569,17 @@ sachip->dev = me; dev_set_drvdata(sachip->dev, sachip); - sachip->res.name = me->name; - sachip->res.start = phys_addr; - sachip->res.end = phys_addr + 0x2000; + sachip->phys = mem->start; sachip->irq = irq; - if (request_resource(&iomem_resource, &sachip->res)) { - ret = -EBUSY; - goto out; - } - /* * Map the whole region. This also maps the * registers for our children. */ - sachip->base = ioremap(phys_addr, PAGE_SIZE * 2); + sachip->base = ioremap(mem->start, PAGE_SIZE * 2); if (!sachip->base) { ret = -ENOMEM; - goto release; + goto out; } /* @@ -611,9 +631,11 @@ * The interrupt controller must be initialised before any * other device to ensure that the interrupts are available. */ - int_dev.irq[0] = irq; - sa1111_init_one_child(sachip, &int_dev, SA1111_INTC); - sa1111_init_irq(&int_dev); + if (irq != NO_IRQ) { + int_dev.irq[0] = irq; + sa1111_init_one_child(sachip, mem, &int_dev, SA1111_INTC); + sa1111_init_irq(&int_dev); + } g_sa1111 = sachip; @@ -626,14 +648,12 @@ for (i = 0; i < ARRAY_SIZE(devs); i++) if (has_devs & (1 << i)) - sa1111_init_one_child(sachip, devs[i], dev_offset[i]); + sa1111_init_one_child(sachip, mem, devs[i], dev_offset[i]); return 0; unmap: iounmap(sachip->base); - release: - release_resource(&sachip->res); out: kfree(sachip); return ret; @@ -649,7 +669,6 @@ } iounmap(sachip->base); - release_resource(&sachip->res); kfree(sachip); } @@ -874,7 +893,17 @@ static int sa1111_probe(struct device *dev) { - return -ENODEV; + struct platform_device *pdev = to_platform_device(dev); + struct resource *mem = NULL, *irq = NULL; + int i; + + for (i = 0; i < pdev->num_resources; i++) { + if (pdev->resource[i].flags & IORESOURCE_MEM) + mem = &pdev->resource[i]; + if (pdev->resource[i].flags & IORESOURCE_IRQ) + irq = &pdev->resource[i]; + } + return __sa1111_probe(dev, mem, irq ? irq->start : NO_IRQ); } static int sa1111_remove(struct device *dev) @@ -903,7 +932,7 @@ */ static struct device_driver sa1111_device_driver = { .name = "sa1111", - .bus = &system_bus_type, + .bus = &platform_bus_type, .probe = sa1111_probe, .remove = sa1111_remove, .suspend = sa1111_suspend, @@ -920,29 +949,6 @@ } arch_initcall(sa1111_driver_init); - -static struct sys_device sa1111_device = { - .name = "SA1111", - .id = 0, - .root = NULL, - .dev = { - .name = "Intel Corporation SA1111", - .driver = &sa1111_device_driver, - }, -}; - -int sa1111_init(unsigned long phys, unsigned int irq) -{ - int ret; - - snprintf(sa1111_device.dev.bus_id, sizeof(sa1111_device.dev.bus_id), "%8.8lx", phys); - - ret = sys_device_register(&sa1111_device); - if (ret) - printk("sa1111 device_register failed: %d\n", ret); - - return __sa1111_probe(&sa1111_device.dev, phys, irq); -} /* * Get the parent device driver (us) structure diff -Nru a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c --- a/arch/arm/kernel/bios32.c Fri Jun 13 01:07:34 2003 +++ b/arch/arm/kernel/bios32.c Fri Jun 13 01:07:34 2003 @@ -22,9 +22,9 @@ void pcibios_report_status(u_int status_mask, int warn) { - struct pci_dev *dev; + struct pci_dev *dev = NULL; - pci_for_each_dev(dev) { + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { u16 status; /* diff -Nru a/arch/arm/kernel/pm.c b/arch/arm/kernel/pm.c --- a/arch/arm/kernel/pm.c Fri Jun 13 01:07:44 2003 +++ b/arch/arm/kernel/pm.c Fri Jun 13 01:07:44 2003 @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -65,13 +64,6 @@ * Tell devices that they now have power. */ device_resume(RESUME_POWER_ON); - - /* - * Restore the CPU frequency settings. - */ -#ifdef CONFIG_CPU_FREQ - cpufreq_restore(); -#endif /* * Resume LDM devices. diff -Nru a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c --- a/arch/arm/kernel/process.c Fri Jun 13 01:07:42 2003 +++ b/arch/arm/kernel/process.c Fri Jun 13 01:07:42 2003 @@ -239,7 +239,7 @@ #define ll_alloc_task_struct() ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) #define ll_free_task_struct(p) free_pages((unsigned long)(p),1) -struct thread_info *alloc_thread_info(void) +struct thread_info *alloc_thread_info(struct task_struct *task) { struct thread_info *thread = NULL; diff -Nru a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile --- a/arch/arm/lib/Makefile Fri Jun 13 01:07:40 2003 +++ b/arch/arm/lib/Makefile Fri Jun 13 01:07:40 2003 @@ -4,9 +4,7 @@ # Copyright (C) 1995-2000 Russell King # -L_TARGET := lib.a - -obj-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ +lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ csumpartialcopy.o csumpartialcopyuser.o clearbit.o \ copy_page.o delay.o findbit.o memchr.o memcpy.o \ memset.o memzero.o setbit.o strncpy_from_user.o \ @@ -14,17 +12,15 @@ testclearbit.o testsetbit.o uaccess.o getuser.o \ putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ ucmpdi2.o udivdi3.o lib1funcs.o div64.o -obj-m := -obj-n := -obj-arc := ecard.o io-acorn.o floppydma.o -obj-rpc := ecard.o io-acorn.o floppydma.o -obj-clps7500 := io-acorn.o -obj-l7200 := io-acorn.o -obj-shark := io-shark.o -obj-edb7211 := io-acorn.o +lib-arc := ecard.o io-acorn.o floppydma.o +lib-rpc := ecard.o io-acorn.o floppydma.o +lib-clps7500 := io-acorn.o +lib-l7200 := io-acorn.o +lib-shark := io-shark.o +lib-edb7211 := io-acorn.o -obj-y += $(obj-$(MACHINE)) +lib-y += $(lib-$(MACHINE)) ifeq ($(CONFIG_CPU_32v3),y) v3 := y @@ -34,10 +30,10 @@ v4 := y endif -obj-y += io-readsb.o io-writesb.o -obj-$(v3) += io-readsw-armv3.o io-writesw-armv3.o io-readsl-armv3.o -obj-$(v4) += io-readsw-armv4.o io-writesw-armv4.o io-readsl-armv4.o -obj-y += io-writesl.o +lib-y += io-readsb.o io-writesb.o +lib-$(v3) += io-readsw-armv3.o io-writesw-armv3.o io-readsl-armv3.o +lib-$(v4) += io-readsw-armv4.o io-writesw-armv4.o io-readsl-armv4.o +lib-y += io-writesl.o $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S diff -Nru a/arch/arm/lib/div64.S b/arch/arm/lib/div64.S --- a/arch/arm/lib/div64.S Fri Jun 13 01:07:43 2003 +++ b/arch/arm/lib/div64.S Fri Jun 13 01:07:43 2003 @@ -1,27 +1,42 @@ #include +#ifndef __ARMEB__ ql .req r0 @ quotient low qh .req r1 @ quotient high -dl .req r3 @ divisor low -dh .req r2 @ divisor high +onl .req r0 @ original dividend low +onh .req r1 @ original dividend high nl .req r4 @ dividend low nh .req r5 @ dividend high +res .req r4 @ result +#else +ql .req r1 +qh .req r0 +onl .req r1 +onh .req r0 +nl .req r5 +nh .req r4 +res .req r5 +#endif + +dl .req r3 @ divisor low +dh .req r2 @ divsor high + ENTRY(do_div64) stmfd sp!, {r4, r5, lr} - mov nl, r0 - movs nh, r1 @ if high bits are zero + mov nl, onl + movs nh, onh @ if high bits are zero movne lr, #33 moveq lr, #1 @ only divide low bits - moveq nh, r0 + moveq nh, onl 1: cmp nh, dh bls 2f add lr, lr, #1 - movs dh, dh, lsl #1 @ left justify divisor + movs dh, dh, lsl #1 @ left justify disor bpl 1b -2: movs nh, r1 +2: movs nh, onh moveq dl, dh moveq dh, #0 movne dl, #0 @@ -38,5 +53,5 @@ subs lr, lr, #1 bne 3b - mov r2, nl + mov r2, res ldmfd sp!, {r4, r5, pc} diff -Nru a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S --- a/arch/arm/lib/putuser.S Fri Jun 13 01:07:42 2003 +++ b/arch/arm/lib/putuser.S Fri Jun 13 01:07:42 2003 @@ -31,11 +31,11 @@ .global __put_user_1 __put_user_1: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #1 - cmp r0, r2 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #1 + cmp r0, ip 1: strlsbt r1, [r0] movls r0, #0 movls pc, lr @@ -43,17 +43,17 @@ .global __put_user_2 __put_user_2: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #2 - cmp r0, r2 - movls r2, r1, lsr #8 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #2 + cmp r0, ip + movls ip, r1, lsr #8 #ifndef __ARMEB__ 2: strlsbt r1, [r0], #1 -3: strlsbt r2, [r0] +3: strlsbt ip, [r0] #else -2: strlsbt r2, [r0], #1 +2: strlsbt ip, [r0], #1 3: strlsbt r1, [r0] #endif movls r0, #0 @@ -62,11 +62,11 @@ .global __put_user_4 __put_user_4: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #4 - cmp r0, r2 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #4 + cmp r0, ip 4: strlst r1, [r0] movls r0, #0 movls pc, lr diff -Nru a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c --- a/arch/arm/mach-footbridge/isa-irq.c Fri Jun 13 01:07:41 2003 +++ b/arch/arm/mach-footbridge/isa-irq.c Fri Jun 13 01:07:41 2003 @@ -84,10 +84,6 @@ .unmask = isa_unmask_pic_hi_irq, }; -static void no_action(int irq, void *dev_id, struct pt_regs *regs) -{ -} - static void isa_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { diff -Nru a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile --- a/arch/arm/mach-integrator/Makefile Fri Jun 13 01:07:42 2003 +++ b/arch/arm/mach-integrator/Makefile Fri Jun 13 01:07:42 2003 @@ -4,10 +4,7 @@ # Object file lists. -obj-y := arch.o irq.o mm.o time.o -obj-m := -obj-n := -obj- := +obj-y := core.o time.o obj-$(CONFIG_LEDS) += leds.o obj-$(CONFIG_PCI) += pci_v3.o pci.o diff -Nru a/arch/arm/mach-integrator/arch.c b/arch/arm/mach-integrator/arch.c --- a/arch/arm/mach-integrator/arch.c Fri Jun 13 01:07:40 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,40 +0,0 @@ -/* - * linux/arch/arm/mach-integrator/arch.c - * - * Copyright (C) 2000 Deep Blue Solutions Ltd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include - -#include -#include -#include -#include - -#include - -extern void integrator_map_io(void); -extern void integrator_init_irq(void); - -MACHINE_START(INTEGRATOR, "ARM-Integrator") - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") - BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) - BOOT_PARAMS(0x00000100) - MAPIO(integrator_map_io) - INITIRQ(integrator_init_irq) -MACHINE_END diff -Nru a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/mach-integrator/core.c Fri Jun 13 01:07:40 2003 @@ -0,0 +1,135 @@ +/* + * linux/arch/arm/mach-integrator/arch.c + * + * Copyright (C) 2000 Deep Blue Solutions Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/* + * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx + * is the (PA >> 12). + * + * Setup a VA for the Integrator interrupt controller (for header #0, + * just for now). + */ +#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE) +#define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET + +/* + * Logical Physical + * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M) + * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M) + * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k) + * ee000000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M) + * ef000000 Cache flush + * f1000000 10000000 Core module registers + * f1100000 11000000 System controller registers + * f1200000 12000000 EBI registers + * f1300000 13000000 Counter/Timer + * f1400000 14000000 Interrupt controller + * f1500000 15000000 RTC + * f1600000 16000000 UART 0 + * f1700000 17000000 UART 1 + * f1a00000 1a000000 Debug LEDs + * f1b00000 1b000000 GPIO + */ + +static struct map_desc integrator_io_desc[] __initdata = { + { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_RTC_BASE), INTEGRATOR_RTC_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, + { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M, MT_DEVICE }, + { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M, MT_DEVICE }, + { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_64K, MT_DEVICE }, + { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K, MT_DEVICE } +}; + +static void __init integrator_map_io(void) +{ + iotable_init(integrator_io_desc, ARRAY_SIZE(integrator_io_desc)); +} + +#define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) ) + +static void sc_mask_irq(unsigned int irq) +{ + writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_CLEAR); +} + +static void sc_unmask_irq(unsigned int irq) +{ + writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET); +} + +static struct irqchip sc_chip = { + .ack = sc_mask_irq, + .mask = sc_mask_irq, + .unmask = sc_unmask_irq, +}; + +static void __init integrator_init_irq(void) +{ + unsigned int i; + + /* Disable all interrupts initially. */ + /* Do the core module ones */ + writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR); + + /* do the header card stuff next */ + writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); + writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); + + for (i = 0; i < NR_IRQS; i++) { + if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) { + set_irq_chip(i, &sc_chip); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); + } + } +} + +MACHINE_START(INTEGRATOR, "ARM-Integrator") + MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") + BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) + BOOT_PARAMS(0x00000100) + MAPIO(integrator_map_io) + INITIRQ(integrator_init_irq) +MACHINE_END diff -Nru a/arch/arm/mach-integrator/irq.c b/arch/arm/mach-integrator/irq.c --- a/arch/arm/mach-integrator/irq.c Fri Jun 13 01:07:44 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,76 +0,0 @@ -/* - * linux/arch/arm/mach-integrator/irq.c - * - * Copyright (C) 1999 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include - -#include -#include -#include - -#include - -/* - * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx - * is the (PA >> 12). - * - * Setup a VA for the Integrator interrupt controller (for header #0, - * just for now). - */ -#define VA_IC_BASE IO_ADDRESS(INTEGRATOR_IC_BASE) -#define VA_CMIC_BASE IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_IC_OFFSET - -#define ALLPCI ( (1 << IRQ_PCIINT0) | (1 << IRQ_PCIINT1) | (1 << IRQ_PCIINT2) | (1 << IRQ_PCIINT3) ) - -static void sc_mask_irq(unsigned int irq) -{ - __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_CLEAR); -} - -static void sc_unmask_irq(unsigned int irq) -{ - __raw_writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET); -} - -static struct irqchip sc_chip = { - .ack = sc_mask_irq, - .mask = sc_mask_irq, - .unmask = sc_unmask_irq, -}; - -void __init integrator_init_irq(void) -{ - unsigned int i; - - /* Disable all interrupts initially. */ - /* Do the core module ones */ - __raw_writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR); - - /* do the header card stuff next */ - __raw_writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); - __raw_writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); - - for (i = 0; i < NR_IRQS; i++) { - if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) { - set_irq_chip(i, &sc_chip); - set_irq_handler(i, do_level_IRQ); - set_irq_flags(i, IRQF_VALID | IRQF_PROBE); - } - } -} diff -Nru a/arch/arm/mach-integrator/mm.c b/arch/arm/mach-integrator/mm.c --- a/arch/arm/mach-integrator/mm.c Fri Jun 13 01:07:45 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,70 +0,0 @@ -/* - * linux/arch/arm/mach-integrator/mm.c - * - * Extra MM routines for the ARM Integrator board - * - * Copyright (C) 1999,2000 Arm Limited - * Copyright (C) 2000 Deep Blue Solutions Ltd - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include - -#include -#include - -#include - -/* - * Logical Physical - * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M) - * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M) - * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k) - * ee000000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M) - * ef000000 Cache flush - * f1000000 10000000 Core module registers - * f1100000 11000000 System controller registers - * f1200000 12000000 EBI registers - * f1300000 13000000 Counter/Timer - * f1400000 14000000 Interrupt controller - * f1500000 15000000 RTC - * f1600000 16000000 UART 0 - * f1700000 17000000 UART 1 - * f1a00000 1a000000 Debug LEDs - * f1b00000 1b000000 GPIO - */ - -static struct map_desc integrator_io_desc[] __initdata = { - { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_RTC_BASE), INTEGRATOR_RTC_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, - { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, - { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M, MT_DEVICE }, - { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M, MT_DEVICE }, - { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_64K, MT_DEVICE }, - { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K, MT_DEVICE } -}; - -void __init integrator_map_io(void) -{ - iotable_init(integrator_io_desc, ARRAY_SIZE(integrator_io_desc)); -} diff -Nru a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c --- a/arch/arm/mach-integrator/pci_v3.c Fri Jun 13 01:07:40 2003 +++ b/arch/arm/mach-integrator/pci_v3.c Fri Jun 13 01:07:40 2003 @@ -441,7 +441,7 @@ return 1; } -static void v3_irq(int irq, void *devid, struct pt_regs *regs) +static irqreturn_t v3_irq(int irq, void *devid, struct pt_regs *regs) { #ifdef CONFIG_DEBUG_LL unsigned long pc = instruction_pointer(regs); @@ -469,6 +469,7 @@ printascii(buf); } #endif + return IRQ_HANDLED; } int __init pci_v3_setup(int nr, struct pci_sys_data *sys) diff -Nru a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c --- a/arch/arm/mach-pxa/lubbock.c Fri Jun 13 01:07:33 2003 +++ b/arch/arm/mach-pxa/lubbock.c Fri Jun 13 01:07:33 2003 @@ -88,9 +88,36 @@ set_irq_type(IRQ_GPIO(0), IRQT_FALLING); } +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x10000000, + .end = 0x10001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = LUBBOCK_SA1111_IRQ, + .end = LUBBOCK_SA1111_IRQ, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init lubbock_init(void) { - return sa1111_init(0x10000000, LUBBOCK_SA1111_IRQ); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } subsys_initcall(lubbock_init); diff -Nru a/arch/arm/mach-sa1100/adsbitsy.c b/arch/arm/mach-sa1100/adsbitsy.c --- a/arch/arm/mach-sa1100/adsbitsy.c Fri Jun 13 01:07:29 2003 +++ b/arch/arm/mach-sa1100/adsbitsy.c Fri Jun 13 01:07:29 2003 @@ -27,6 +27,36 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x18000000, + .end = 0x18001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO0, + .end = IRQ_GPIO0, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init adsbitsy_init(void) { int ret; @@ -50,7 +80,7 @@ /* * Probe for SA1111. */ - ret = sa1111_init(0x18000000, IRQ_GPIO0); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret < 0) return ret; diff -Nru a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c --- a/arch/arm/mach-sa1100/badge4.c Fri Jun 13 01:07:30 2003 +++ b/arch/arm/mach-sa1100/badge4.c Fri Jun 13 01:07:30 2003 @@ -35,6 +35,36 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = BADGE4_SA1111_BASE, + .end = BADGE4_SA1111_BASE + 0x00001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = BADGE4_IRQ_GPIO_SA1111, + .end = BADGE4_IRQ_GPIO_SA1111, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask; + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init badge4_sa1111_init(void) { /* @@ -46,7 +76,7 @@ /* * Probe for SA1111. */ - return sa1111_init(BADGE4_SA1111_BASE, BADGE4_IRQ_GPIO_SA1111); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } diff -Nru a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c --- a/arch/arm/mach-sa1100/dma.c Fri Jun 13 01:07:30 2003 +++ b/arch/arm/mach-sa1100/dma.c Fri Jun 13 01:07:30 2003 @@ -42,7 +42,7 @@ static spinlock_t dma_list_lock; -static void dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) { dma_regs_t *dma_regs = dev_id; sa1100_dma_t *dma = dma_chan + (((u_int)dma_regs >> 5) & 7); @@ -60,6 +60,7 @@ if (status & DCSR_DONEB) dma->callback(dma->data); } + return IRQ_HANDLED; } diff -Nru a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c --- a/arch/arm/mach-sa1100/generic.c Fri Jun 13 01:07:32 2003 +++ b/arch/arm/mach-sa1100/generic.c Fri Jun 13 01:07:32 2003 @@ -16,11 +16,13 @@ #include #include #include +#include #include #include #include #include +#include #include "generic.h" @@ -128,13 +130,88 @@ PMCR = PMCR_SF; } +static struct resource sa11x0udc_resources[] = { + [0] = { + .start = 0x80000000, + .end = 0x8000ffff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device sa11x0udc_device = { + .name = "sa11x0-udc", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [UDC]", + }, + .num_resources = ARRAY_SIZE(sa11x0udc_resources), + .resource = sa11x0udc_resources, +}; + +static struct resource sa11x0mcp_resources[] = { + [0] = { + .start = 0x80060000, + .end = 0x8006ffff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device sa11x0mcp_device = { + .name = "sa11x0-mcp", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [MCP]", + }, + .num_resources = ARRAY_SIZE(sa11x0mcp_resources), + .resource = sa11x0mcp_resources, +}; + +static struct resource sa11x0fb_resources[] = { + [0] = { + .start = 0xb0100000, + .end = 0xb010ffff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_LCD, + .end = IRQ_LCD, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device sa11x0fb_device = { + .name = "sa11x0-fb", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [LCD]", + }, + .num_resources = ARRAY_SIZE(sa11x0fb_resources), + .resource = sa11x0fb_resources, +}; + +static struct platform_device sa11x0pcmcia_device = { + .name = "sa11x0-pcmcia", + .id = 0, + .dev = { + .name = "Intel Corporation SA11x0 [PCMCIA]", + }, +}; + +static struct platform_device *sa11x0_devices[] __initdata = { + &sa11x0udc_device, + &sa11x0mcp_device, + &sa11x0pcmcia_device, + &sa11x0fb_device, +}; + static int __init sa1100_init(void) { pm_power_off = sa1100_power_off; - return 0; + + return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices)); } -core_initcall(sa1100_init); +arch_initcall(sa1100_init); void (*sa1100fb_backlight_power)(int on); void (*sa1100fb_lcd_power)(int on); diff -Nru a/arch/arm/mach-sa1100/graphicsmaster.c b/arch/arm/mach-sa1100/graphicsmaster.c --- a/arch/arm/mach-sa1100/graphicsmaster.c Fri Jun 13 01:07:35 2003 +++ b/arch/arm/mach-sa1100/graphicsmaster.c Fri Jun 13 01:07:35 2003 @@ -24,6 +24,36 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x18000000, + .end = 0x18001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = ADS_EXT_IRQ(0), + .end = ADS_EXT_IRQ(0), + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init graphicsmaster_init(void) { int ret; @@ -40,7 +70,7 @@ /* * Probe for SA1111. */ - ret = sa1111_init(0x18000000, ADS_EXT_IRQ(0)); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret < 0) return ret; diff -Nru a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c --- a/arch/arm/mach-sa1100/irq.c Fri Jun 13 01:07:43 2003 +++ b/arch/arm/mach-sa1100/irq.c Fri Jun 13 01:07:43 2003 @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -211,94 +211,73 @@ .end = 0x9005ffff, }; -struct sa1100irq_state { +static struct { unsigned int saved; unsigned int icmr; unsigned int iclr; unsigned int iccr; -}; +} sa1100irq_state; static int sa1100irq_suspend(struct device *dev, u32 state, u32 level) { - struct sa1100irq_state *st; - - if (!dev->saved_state && level == SUSPEND_NOTIFY) - dev->saved_state = kmalloc(sizeof(struct sa1100irq_state), - GFP_KERNEL); - if (!dev->saved_state) - return -ENOMEM; - - if (level == SUSPEND_POWER_DOWN) { - st = (struct sa1100irq_state *)dev->saved_state; - - st->saved = 1; - st->icmr = ICMR; - st->iclr = ICLR; - st->iccr = ICCR; - - /* - * Disable all GPIO-based interrupts. - */ - ICMR &= ~(IC_GPIO11_27|IC_GPIO10|IC_GPIO9|IC_GPIO8|IC_GPIO7| - IC_GPIO6|IC_GPIO5|IC_GPIO4|IC_GPIO3|IC_GPIO2| - IC_GPIO1|IC_GPIO0); + struct sa1100irq_state *st = &sa1100irq_state; - /* - * Set the appropriate edges for wakeup. - */ - GRER = PWER & GPIO_IRQ_rising_edge; - GFER = PWER & GPIO_IRQ_falling_edge; + st->saved = 1; + st->icmr = ICMR; + st->iclr = ICLR; + st->iccr = ICCR; + + /* + * Disable all GPIO-based interrupts. + */ + ICMR &= ~(IC_GPIO11_27|IC_GPIO10|IC_GPIO9|IC_GPIO8|IC_GPIO7| + IC_GPIO6|IC_GPIO5|IC_GPIO4|IC_GPIO3|IC_GPIO2| + IC_GPIO1|IC_GPIO0); + + /* + * Set the appropriate edges for wakeup. + */ + GRER = PWER & GPIO_IRQ_rising_edge; + GFER = PWER & GPIO_IRQ_falling_edge; + + /* + * Clear any pending GPIO interrupts. + */ + GEDR = GEDR; - /* - * Clear any pending GPIO interrupts. - */ - GEDR = GEDR; - } return 0; } -static int sa1100irq_resume(struct device *dev, u32 level) +static int sa1100irq_resume(struct sys_device *dev) { - struct sa1100irq_state *st; - - if (level == RESUME_POWER_ON) { - st = (struct sa1100irq_state *)dev->saved_state; - dev->saved_state = NULL; - - if (st->saved) { - ICCR = st->iccr; - ICLR = st->iclr; + struct sa1100irq_state *st = &sa1100irq_state; - GRER = GPIO_IRQ_rising_edge & GPIO_IRQ_mask; - GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask; + if (st->saved) { + ICCR = st->iccr; + ICLR = st->iclr; - ICMR = st->icmr; - } + GRER = GPIO_IRQ_rising_edge & GPIO_IRQ_mask; + GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask; - kfree(st); + ICMR = st->icmr; } return 0; } -static struct device_driver sa1100irq_driver = { - .name = "sa11x0-irq", - .bus = &system_bus_type, +static struct sysdev_class sa1100irq_sysclass = { + set_kset_name("sa11x0-irq"), .suspend = sa1100irq_suspend, .resume = sa1100irq_resume, }; static struct sys_device sa1100irq_device = { - .name = "irq", .id = 0, - .dev = { - .name = "Intel SA11x0 [Interrupt Controller]", - .driver = &sa1100irq_driver, - }, + .cls = &sa1100irq_sysclass, }; static int __init sa1100irq_init_devicefs(void) { - driver_register(&sa1100irq_driver); + sysdev_class_register(&sa1100irq_sysclass); return sys_device_register(&sa1100irq_device); } diff -Nru a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c --- a/arch/arm/mach-sa1100/jornada720.c Fri Jun 13 01:07:45 2003 +++ b/arch/arm/mach-sa1100/jornada720.c Fri Jun 13 01:07:45 2003 @@ -24,6 +24,36 @@ #define JORTUCR_VAL 0x20000400 +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO1, + .end = IRQ_GPIO1, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init jornada720_init(void) { int ret = -ENODEV; @@ -43,7 +73,7 @@ PPSR &= ~(PPC_LDD3 | PPC_LDD4); PPDR |= PPC_LDD3 | PPC_LDD4; - ret = sa1111_init(0x40000000, IRQ_GPIO1); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); } return ret; } diff -Nru a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c --- a/arch/arm/mach-sa1100/neponset.c Fri Jun 13 01:07:36 2003 +++ b/arch/arm/mach-sa1100/neponset.c Fri Jun 13 01:07:36 2003 @@ -79,33 +79,6 @@ } } -static inline void __init neponset_init_irq(void) -{ - /* - * Install handler for GPIO25. - */ - set_irq_type(IRQ_GPIO25, IRQT_RISING); - set_irq_chained_handler(IRQ_GPIO25, neponset_irq_handler); - - /* - * We would set IRQ_GPIO25 to be a wake-up IRQ, but - * unfortunately something on the Neponset activates - * this IRQ on sleep (ethernet?) - */ -#if 0 - enable_irq_wake(IRQ_GPIO25); -#endif - - /* - * Setup other Neponset IRQs. SA1111 will be done by the - * generic SA1111 code. - */ - set_irq_handler(IRQ_NEPONSET_SMC9196, do_simple_IRQ); - set_irq_flags(IRQ_NEPONSET_SMC9196, IRQF_VALID | IRQF_PROBE); - set_irq_handler(IRQ_NEPONSET_USAR, do_simple_IRQ); - set_irq_flags(IRQ_NEPONSET_USAR, IRQF_VALID | IRQF_PROBE); -} - static void neponset_set_mctrl(struct uart_port *port, u_int mctrl) { u_int mdm_ctl0 = MDM_CTL_0; @@ -164,6 +137,42 @@ .get_mctrl = neponset_get_mctrl, }; +static int neponset_probe(struct device *dev) +{ + sa1100_register_uart_fns(&neponset_port_fns); + + /* + * Install handler for GPIO25. + */ + set_irq_type(IRQ_GPIO25, IRQT_RISING); + set_irq_chained_handler(IRQ_GPIO25, neponset_irq_handler); + + /* + * We would set IRQ_GPIO25 to be a wake-up IRQ, but + * unfortunately something on the Neponset activates + * this IRQ on sleep (ethernet?) + */ +#if 0 + enable_irq_wake(IRQ_GPIO25); +#endif + + /* + * Setup other Neponset IRQs. SA1111 will be done by the + * generic SA1111 code. + */ + set_irq_handler(IRQ_NEPONSET_SMC9196, do_simple_IRQ); + set_irq_flags(IRQ_NEPONSET_SMC9196, IRQF_VALID | IRQF_PROBE); + set_irq_handler(IRQ_NEPONSET_USAR, do_simple_IRQ); + set_irq_flags(IRQ_NEPONSET_USAR, IRQF_VALID | IRQF_PROBE); + + /* + * Disable GPIO 0/1 drivers so the buttons work on the module. + */ + NCR_0 = NCR_GP01_OFF; + + return 0; +} + /* * LDM power management. */ @@ -201,27 +210,63 @@ static struct device_driver neponset_device_driver = { .name = "neponset", - .bus = &system_bus_type, + .bus = &platform_bus_type, + .probe = neponset_probe, .suspend = neponset_suspend, .resume = neponset_resume, }; -static struct sys_device neponset_device = { - .name = "NEPONSET", +static struct resource neponset_resources[] = { + [0] = { + .start = 0x10000000, + .end = 0x17ffffff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device neponset_device = { + .name = "neponset", .id = 0, - .root = NULL, .dev = { .name = "Neponset", - .bus_id = "neponset", - .bus = &system_bus_type, - .driver = &neponset_device_driver, + }, + .num_resources = ARRAY_SIZE(neponset_resources), + .resource = neponset_resources, +}; + +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_NEPONSET_SA1111, + .end = IRQ_NEPONSET_SA1111, + .flags = IORESOURCE_IRQ, }, }; +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &neponset_device, + &sa1111_device, +}; + static int __init neponset_init(void) { - int ret; - driver_register(&neponset_device_driver); /* @@ -248,29 +293,7 @@ return -ENODEV; } - ret = sys_device_register(&neponset_device); - if (ret) - return ret; - - sa1100_register_uart_fns(&neponset_port_fns); - - neponset_init_irq(); - - /* - * Disable GPIO 0/1 drivers so the buttons work on the module. - */ - NCR_0 = NCR_GP01_OFF; - - /* - * Neponset has SA1111 connected to CS4. We know that after - * reset the chip will be configured for variable latency IO. - */ - /* FIXME: setup MSC2 */ - - /* - * Probe and initialise the SA1111. - */ - return sa1111_init(0x40000000, IRQ_NEPONSET_SA1111); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } subsys_initcall(neponset_init); diff -Nru a/arch/arm/mach-sa1100/pfs168.c b/arch/arm/mach-sa1100/pfs168.c --- a/arch/arm/mach-sa1100/pfs168.c Fri Jun 13 01:07:28 2003 +++ b/arch/arm/mach-sa1100/pfs168.c Fri Jun 13 01:07:28 2003 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -18,6 +19,35 @@ #include "generic.h" +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO25, + .end = IRQ_GPIO25, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; static int __init pfs168_init(void) { @@ -32,10 +62,7 @@ */ sa1110_mb_disable(); - /* - * Probe for SA1111. - */ - return sa1111_init(0x40000000, IRQ_GPIO25); + return platform_add_devices(devices, ARRAY_SIZE(devices)); } arch_initcall(pfs168_init); diff -Nru a/arch/arm/mach-sa1100/system3.c b/arch/arm/mach-sa1100/system3.c --- a/arch/arm/mach-sa1100/system3.c Fri Jun 13 01:07:42 2003 +++ b/arch/arm/mach-sa1100/system3.c Fri Jun 13 01:07:42 2003 @@ -373,6 +373,36 @@ } } +static struct resource sa1111_resources[] = { + [0] = { + .start = PT_SA1111_BASE, + .end = PT_SA1111_BASE + 0x00001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_SYSTEM3_SA1111, + .end = IRQ_SYSTEM3_SA1111, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + static int __init system3_init(void) { int ret = 0; @@ -405,7 +435,7 @@ /* * Probe for a SA1111. */ - ret = sa1111_init(PT_SA1111_BASE, IRQ_SYSTEM3_SA1111); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); if (ret < 0) { printk( KERN_WARNING"PT Digital Board: no SA1111 found!\n" ); goto DONE; diff -Nru a/arch/arm/mach-sa1100/xp860.c b/arch/arm/mach-sa1100/xp860.c --- a/arch/arm/mach-sa1100/xp860.c Fri Jun 13 01:07:36 2003 +++ b/arch/arm/mach-sa1100/xp860.c Fri Jun 13 01:07:36 2003 @@ -30,6 +30,31 @@ while(1); } +static struct resource sa1111_resources[] = { + [0] = { + .start = 0x40000000, + .end = 0x40001fff, + .flags = IORESOURCE_MEM, + }, +}; + +static u64 sa1111_dmamask = 0xffffffffUL; + +static struct platform_device sa1111_device = { + .name = "sa1111", + .id = 0, + .dev = { + .name = "Intel Corporation SA1111", + .dma_mask = &sa1111_dmamask, + }, + .num_resources = ARRAY_SIZE(sa1111_resources), + .resource = sa1111_resources, +}; + +static struct platform_device *devices[] __initdata = { + &sa1111_device, +}; + /* * Note: I replaced the sa1111_init() without the full SA1111 initialisation * because this machine doesn't appear to use the DMA features. If this is @@ -39,19 +64,7 @@ { pm_power_off = xp860_power_off; - /* - * Probe for SA1111. - */ - ret = sa1111_probe(0x40000000); - if (ret < 0) - return ret; - - /* - * We found it. Wake the chip up. - */ - sa1111_wake(); - - return 0; + return platform_add_devices(devices, ARRAY_SIZE(devices)); } arch_initcall(xp860_init); diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c --- a/arch/arm/mm/consistent.c Fri Jun 13 01:07:41 2003 +++ b/arch/arm/mm/consistent.c Fri Jun 13 01:07:41 2003 @@ -10,7 +10,7 @@ * DMA uncached mapping support. */ #include -#include +#include #include #include #include @@ -145,6 +145,7 @@ struct vm_region *c; unsigned long order, flags; void *ret = NULL; + int res; if (!consistent_pte) { printk(KERN_ERR "consistent_alloc: not initialised\n"); @@ -177,14 +178,19 @@ if (!c) goto no_remap; - spin_lock_irqsave(&consistent_lock, flags); - vm_region_dump(&consistent_head, "before alloc"); - /* * Attempt to allocate a virtual address in the * consistent mapping region. */ - if (!vm_region_alloc(&consistent_head, c, size)) { + spin_lock_irqsave(&consistent_lock, flags); + vm_region_dump(&consistent_head, "before alloc"); + + res = vm_region_alloc(&consistent_head, c, size); + + vm_region_dump(&consistent_head, "after alloc"); + spin_unlock_irqrestore(&consistent_lock, flags); + + if (!res) { pte_t *pte = consistent_pte + CONSISTENT_OFFSET(c->vm_start); struct page *end = page + (1 << order); pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | @@ -218,9 +224,6 @@ ret = (void *)c->vm_start; } - vm_region_dump(&consistent_head, "after alloc"); - spin_unlock_irqrestore(&consistent_lock, flags); - no_remap: if (ret == NULL) { kfree(c); @@ -229,6 +232,22 @@ no_page: return ret; } + +/* + * Since we have the DMA mask available to us here, we could try to do + * a normal allocation, and only fall back to a "DMA" allocation if the + * resulting bus address does not satisfy the dma_mask requirements. + */ +void * +dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, int gfp) +{ + if (dev == NULL || *dev->dma_mask != 0xffffffff) + gfp |= GFP_DMA; + + return consistent_alloc(gfp, size, handle, 0); +} + +EXPORT_SYMBOL(dma_alloc_coherent); /* * free a page as defined by the above mapping. diff -Nru a/arch/arm/mm/init.c b/arch/arm/mm/init.c --- a/arch/arm/mm/init.c Fri Jun 13 01:07:30 2003 +++ b/arch/arm/mm/init.c Fri Jun 13 01:07:30 2003 @@ -47,7 +47,7 @@ #define TABLE_SIZE ((TABLE_OFFSET + PTRS_PER_PTE) * sizeof(pte_t)) -struct mmu_gather mmu_gathers[NR_CPUS]; +DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; extern char _stext, _text, _etext, _end, __init_begin, __init_end; diff -Nru a/arch/arm26/ACKNOWLEDGEMENTS b/arch/arm26/ACKNOWLEDGEMENTS --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/ACKNOWLEDGEMENTS Fri Jun 13 01:07:45 2003 @@ -0,0 +1,27 @@ +The work in this architecture (ARM26) is that of a great many people. + +This is what has happened: + +I [Ian Molton] have been trying to repair the ARM26 architecture support, but it has become an impossible task whilst it is still merged with the ARM32 (arch/arm) code. The ARM26 code is too different to be sensible to keep with the ARM32 code now, and Russell King really doesnt have the time to maintain the ARM26 code. Add to that that most ARM32 developers dont know about or care about ARM26 when writing patches, and you have a reall mess. + +As a result, I've split it off into a new architecture of its own. I've named it arm26 since these CPUs have only a 26 bit address space, unlike the other ARMs. + +The upheaval in moving around so many source files and chopping out vasty ammounts of cruft was enormous, and the copyright of many files is sometimes unclear. Because of this, I am writing this, in order that no-one is left out / misaccredited / blamed for any of the code. + +People I KNOW have made major contributions to the code: + +David Alan Gilbert (former maintainer of ARM26 bits) +Philip Blundell +Russell King +Keith Owens + +Currently maintaing the code are + +Ian Molton (Maintainer / Archimedes) +John Appleby (kernel / A5K) + +If anyone has a problem with attributions in header files / source files, please do contact me to straighten things out. + +Ian Molton (aka spyro) - ARM26 maintainer +spyro@f2s.com + diff -Nru a/arch/arm26/Config.help b/arch/arm26/Config.help --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/Config.help Fri Jun 13 01:07:45 2003 @@ -0,0 +1,387 @@ +CONFIG_ARM + The ARM series is a line of low-power-consumption RISC chip designs + licensed by ARM ltd and targeted at embedded applications. + +CONFIG_IDE + If you say Y here, your kernel will be able to manage low cost mass + storage units such as ATA/(E)IDE and ATAPI units. The most common + cases are IDE hard drives and ATAPI CD-ROM drives. + + If your system is pure SCSI and doesn't use these interfaces, you + can say N here. + + Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard + for mass storage units such as hard disks. It was designed by + Western Digital and Compaq Computer in 1984. It was then named + ST506. Quite a number of disks use the IDE interface. + + AT Attachment (ATA) is the superset of the IDE specifications. + ST506 was also called ATA-1. + + Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is + ATA-3. It provides support for larger disks (up to 8.4GB by means of + the LBA standard), more disks (4 instead of 2) and for other mass + storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is + ATA-4 and provides faster (and more CPU friendly) transfer modes + than previous PIO (Programmed processor Input/Output) from previous + ATA/IDE standards by means of fast DMA controllers. + + ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and + CD-ROM drives, similar in many respects to the SCSI protocol. + + SMART IDE (Self Monitoring, Analysis and Reporting Technology) was + designed in order to prevent data corruption and disk crash by + detecting pre hardware failure conditions (heat, access time, and + the like...). Disks built since June 1995 may follow this standard. + The kernel itself don't manage this; however there are quite a + number of user programs such as smart that can query the status of + SMART parameters disk. + + If you want to compile this driver as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read . The module + will be called ide.o. + + For further information, please read . + + If unsure, say Y. + +CONFIG_ISA + 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. + +CONFIG_PREEMPT + This option reduces the latency of the kernel when reacting to + real-time or interactive events by allowing a low priority process to + be preempted even if it is in kernel mode executing a system call. + This allows applications to run more reliably even when the system is + under load. + + Say Y here if you are building a kernel for a desktop, embedded + or real-time system. Say N if you are unsure. + +CONFIG_MCA + 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. + +CONFIG_EISA + 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. + +CONFIG_HOTPLUG + Say Y here if you want to plug devices into your computer while + the system is running, and be able to use them quickly. In many + cases, the devices can likewise be unplugged at any time too. + + One well known example of this is PCMCIA- or PC-cards, credit-card + size devices such as network cards, modems or hard drives which are + plugged into slots found on all modern laptop computers. Another + example, used on modern desktops as well as laptops, is USB. + + Enable HOTPLUG and KMOD, and build a modular kernel. Get agent + software (at ) and install it. + Then your kernel will automatically call out to a user mode "policy + agent" (/sbin/hotplug) to load modules and set up software needed + to use devices as you hotplug them. + +CONFIG_KCORE_ELF + If you enabled support for /proc file system then the file + /proc/kcore will contain the kernel core image. This can be used + in gdb: + + $ cd /usr/src/linux ; gdb vmlinux /proc/kcore + + You have two choices here: ELF and A.OUT. Selecting ELF will make + /proc/kcore appear in ELF core format as defined by the Executable + and Linking Format specification. Selecting A.OUT will choose the + old "a.out" format which may be necessary for some old versions + of binutils or on some architectures. + + This is especially useful if you have compiled the kernel with the + "-g" option to preserve debugging information. It is mainly used + for examining kernel data structures on the live kernel so if you + don't understand what this means or are not a kernel hacker, just + leave it at its default value ELF. + +CONFIG_KCORE_AOUT + Not necessary unless you're using a very out-of-date binutils + version. You probably want KCORE_ELF. + +CONFIG_BINFMT_ELF + ELF (Executable and Linkable Format) is a format for libraries and + executables used across different architectures and operating + systems. Saying Y here will enable your kernel to run ELF binaries + and enlarge it by about 13 KB. ELF support under Linux has now all + but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC) + because it is portable (this does *not* mean that you will be able + to run executables from different architectures or operating systems + however) and makes building run-time libraries very easy. Many new + executables are distributed solely in ELF format. You definitely + want to say Y here. + + Information about ELF is contained in the ELF HOWTO available from + . + + If you find that after upgrading from Linux kernel 1.2 and saying Y + here, you still can't run any ELF binaries (they just crash), then + you'll have to install the newest ELF runtime libraries, including + ld.so (check the file for location and + latest version). + + If you want to compile this as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read . The module + will be called binfmt_elf.o. Saying M or N here is dangerous because + some crucial programs on your system might be in ELF format. + +CONFIG_BINFMT_AOUT + A.out (Assembler.OUTput) is a set of formats for libraries and + executables used in the earliest versions of UNIX. Linux used the + a.out formats QMAGIC and ZMAGIC until they were replaced with the + ELF format. + + As more and more programs are converted to ELF, the use for a.out + will gradually diminish. If you disable this option it will reduce + your kernel by one page. This is not much and by itself does not + warrant removing support. However its removal is a good idea if you + wish to ensure that absolutely none of your programs will use this + older executable format. If you don't know what to answer at this + point then answer Y. If someone told you "You need a kernel with + QMAGIC support" then you'll have to say Y here. You may answer M to + compile a.out support as a module and later load the module when you + want to use a program or library in a.out format. The module will be + called binfmt_aout.o. Saying M or N here is dangerous though, + because some crucial programs on your system might still be in A.OUT + format. + +CONFIG_BINFMT_MISC + If you say Y here, it will be possible to plug wrapper-driven binary + formats into the kernel. You will like this especially when you use + programs that need an interpreter to run like Java, Python or + Emacs-Lisp. It's also useful if you often run DOS executables under + the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from + ). Once you have + registered such a binary class with the kernel, you can start one of + those programs simply by typing in its name at a shell prompt; Linux + will automatically feed it to the correct interpreter. + + You can do other nice things, too. Read the file + to learn how to use this + feature, and for information about how + to include Java support. + + You must say Y to "/proc file system support" (CONFIG_PROC_FS) to + use this part of the kernel. + + You may say M here for module support and later load the module when + you have use for it; the module is called binfmt_misc.o. If you + don't know what to answer at this point, say Y. + +CONFIG_SCSI + If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or + any other SCSI device under Linux, say Y and make sure that you know + the name of your SCSI host adapter (the card inside your computer + that "speaks" the SCSI protocol, also called SCSI controller), + because you will be asked for it. + + You also need to say Y here if you want support for the parallel + port version of the 100 MB IOMEGA ZIP drive. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called scsi_mod.o. If you want to compile it as + a module, say M here and read and + . However, do not compile this as a + module if your root file system (the one containing the directory /) + is located on a SCSI device. + +CONFIG_NETDEVICES + You can say N here if you don't intend to connect your Linux box to + any other computer at all or if all your connections will be over a + telephone line with a modem either via UUCP (UUCP is a protocol to + forward mail and news between unix hosts over telephone lines; read + the UUCP-HOWTO, available from + ) or dialing up a shell + account or a BBS, even using term (term is a program which gives you + almost full Internet connectivity if you have a regular dial up + shell account on some Internet connected Unix computer. Read + ). + + You'll have to say Y if your computer contains a network card that + you want to use under Linux (make sure you know its name because you + will be asked for it and read the Ethernet-HOWTO (especially if you + plan to use more than one network card under Linux)) or if you want + to use SLIP (Serial Line Internet Protocol is the protocol used to + send Internet traffic over telephone lines or null modem cables) or + CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better + and newer replacement for SLIP) or PLIP (Parallel Line Internet + Protocol is mainly used to create a mini network by connecting the + parallel ports of two local machines) or AX.25/KISS (protocol for + sending Internet traffic over amateur radio links). + + Make sure to read the NET-3-HOWTO. Eventually, you will have to read + Olaf Kirch's excellent and free book "Network Administrator's + Guide", to be found in . If + unsure, say Y. + +CONFIG_MAGIC_SYSRQ + If you say Y here, you will have some control over the system even + if the system crashes for example during kernel debugging (e.g., you + will be able to flush the buffer cache to disk, reboot the system + immediately or dump some status information). This is accomplished + by pressing various keys while holding SysRq (Alt+PrintScreen). It + also works on a serial console (on PC hardware at least), if you + send a BREAK and then within 5 seconds a command keypress. The + keys are documented in . Don't say Y + unless you really know what this hack does. + +CONFIG_ARCH_ARCA5K + This selects support for 'ARM26' CPUs (ARM 2 and 3) + +CONFIG_ARCH_A5K + Say Y here to to support the Acorn A5000. Linux can support the + internal IDE disk and CD-ROM interface, serial and parallel port, + and the floppy drive. Note that on some A5000s the floppy is + plugged into the wrong socket on the motherboard. + +CONFIG_ARCH_ARC + The Acorn Archimedes was an personal computer based on an 8MHz ARM2 + processor, released in 1987. It supported 512K of RAM and 2 800K + floppy disks. Picture and more detailed specifications at + . + +CONFIG_PAGESIZE_16 + Say Y here if your Archimedes or A5000 system has only 2MB of + memory, otherwise say N. The resulting kernel will not run on a + machine with 4MB of memory. + +CONFIG_FPE_NWFPE + Say Y to include the NWFPE floating point emulator in the kernel. + This is necessary to run most binaries. Linux does not currently + support floating point hardware so you need to say Y here even if + your machine has an FPA or floating point co-processor podule. + + It is also possible to say M to build the emulator as a module + (nwfpe.o) or indeed to leave it out altogether. However, unless you + know what you are doing this can easily render your machine + unbootable. Saying Y is the safe option. + + You may say N here if you are going to load the Acorn FPEmulator + early in the bootup. + +CONFIG_FPE_FASTFPE + Say Y here to include the FAST floating point emulator in the kernel. + This is an experimental much faster emulator which now also has full + precision for the mantissa. It does not support any exceptions. + It is very simple, and approximately 3-6 times faster than NWFPE. + + It should be sufficient for most programs. It may be not suitable + for scientific calculations, but you have to check this for yourself. + If you do not feel you need a faster FP emulation you should better + choose NWFPE. + + It is also possible to say M to build the emulator as a module + (fastfpe.o). But keep in mind that you should only load the FP + emulator early in the bootup. You should never change from NWFPE to + FASTFPE or vice versa in an active system! + +CONFIG_DEBUG_ERRORS + This option controls verbose debugging information which can be + printed when the kernel detects an internal error. This debugging + information is useful to kernel hackers when tracking down problems, + but mostly meaningless to other people. It's safe to say Y unless + you are concerned with the code size or don't want to see these + messages. + +CONFIG_NO_FRAME_POINTER + If you say Y here, the resulting kernel will be slightly smaller and + faster. However, when a problem occurs with the kernel, the + information that is reported is severely limited. Most people + should say N here. + +CONFIG_DEBUG_USER + When a user program crashes due to an exception, the kernel can + print a brief message explaining what the problem was. This is + sometimes helpful for debugging but serves no purpose on a + production system. Most people should say N here. + +CONFIG_DEBUG_INFO + Say Y here to include source-level debugging information in the + `vmlinux' binary image. This is handy if you want to use gdb or + addr2line to debug the kernel. It has no impact on the in-memory + footprint of the running kernel but it can increase the amount of + time and disk space needed for compilation of the kernel. If in + doubt say N. + +CONFIG_DEBUG_LL + Say Y here to include definitions of printascii, printchar, printhex + in the kernel. This is helpful if you are debugging code that + executes before the console is initialized. + +CONFIG_NO_PGT_CACHE + Normally the kernel maintains a `quicklist' of preallocated + pagetable structures in order to increase performance. On machines + with very few pages this may however be a loss. Say Y here to + disable the pgtable cache. + +CONFIG_ARTHUR + Say Y here to include the kernel code necessary if you want to run + Acorn RISC OS/Arthur binaries under Linux. This code is still very + experimental; if this sounds frightening, say N and sleep in peace. + You can also say M here to compile this support as a module (which + will be called arthur.o). + +CONFIG_CMDLINE + On some architectures (EBSA110 and CATS), there is currently no way + for the boot loader to pass arguments to the kernel. For these + architectures, you should supply some command-line options at build + time by entering them here. As a minimum, you should specify the + memory size and the root device (e.g., mem=64M root=/dev/nfs). + +CONFIG_DEBUG_KERNEL + Say Y here if you are developing drivers or trying to debug and + identify kernel problems. + +CONFIG_DEBUG_SLAB + Say Y here to have the kernel do limited verification on memory + allocation as well as poisoning memory on free to catch use of freed + memory. + +CONFIG_DEBUG_SPINLOCK + Say Y here and build SMP to catch missing spinlock initialization + and certain other kinds of spinlock errors commonly made. This is + best used in conjunction with the NMI watchdog so that spinlock + deadlocks are also debuggable. + +CONFIG_DEBUG_BUGVERBOSE + Say Y here to make BUG() panics output the file name and line number + of the BUG call as well as the EIP and oops trace. This aids + debugging but costs about 70-100K of memory. + +CONFIG_ZBOOT_ROM + Say Y here if you intend to execute your compressed kernel image (zImage) + directly from ROM or flash. If unsure, say N. + +CONFIG_ZBOOT_ROM_TEXT + The base address for zImage. Unless you have special requirements, you + should not change this value. + +CONFIG_ZBOOT_ROM_BSS + The base address of 64KiB of read/write memory, which must be available + while the decompressor is running. Unless you have special requirements, + you should not change this value. + diff -Nru a/arch/arm26/Kconfig b/arch/arm26/Kconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/Kconfig Fri Jun 13 01:07:45 2003 @@ -0,0 +1,572 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/kconfig-language.txt. +# + +mainmenu "Linux Kernel Configuration" + +config ARM + bool + default y + help + The ARM series is a line of low-power-consumption RISC chip designs + licensed by ARM ltd and targeted at embedded applications and + handhelds such as the Compaq IPAQ. ARM-based PCs are no longer + manufactured, but legacy ARM-based PC hardware remains popular in + Europe. There is an ARM Linux project with a web page at + . + +config ARCH_ARCA5K + bool + default y + +config MMU + bool + default y + +config ARCH_ACORN + bool + default y + +config CPU_26 + bool + default y + +config FIQ + bool + default y + +# 9 = 512 pages 8 = 256 pages 7 = 128 pages +config FORCE_MAX_ZONEORDER + int + default 9 + +config UID16 + bool + default y + +config RWSEM_GENERIC_SPINLOCK + bool + default y + +config RWSEM_XCHGADD_ALGORITHM + bool + +config GENERIC_BUST_SPINLOCK + bool + +config GENERIC_ISA_DMA + bool + +source "init/Kconfig" + + +menu "System Type" + +comment "Archimedes/A5000 Implementations (select only ONE)" + +config ARCH_ARC + bool "Archimedes" + depends on ARCH_ARCA5K + help + The Acorn Archimedes was an personal computer based on an 8K ARM2 + processor, released in 1987. It supported 512K of RAM and 2 800K + floppy disks. Picture and more detailed specifications at + . + +config ARCH_A5K + bool "A5000" + depends on ARCH_ARCA5K + help + Say Y here to to support the Acorn A5000. Linux can support the + internal IDE disk and CD-ROM interface, serial and parallel port, + and the floppy drive. Note that on some A5000s the floppy is + plugged into the wrong socket on the motherboard. + +config PAGESIZE_16 + bool "2MB physical memory" + depends on ARCH_ARCA5K + help + Say Y here if your Archimedes or A5000 system has only 2MB of + memory, otherwise say N. The resulting kernel will not run on a + machine with 4MB of memory. +endmenu + +menu "General setup" + +# Compressed boot loader in ROM. Yes, we really want to ask about +# TEXT and BSS so we preserve their values in the config files. +config ZBOOT_ROM + bool "Compressed boot loader in ROM/flash" + help + Say Y here if you intend to execute your compressed kernel image (zImage) + directly from ROM or flash. If unsure, say N. + +config ZBOOT_ROM_TEXT + hex "Compressed ROM boot loader base address" + default "0" + help + The base address for zImage. Unless you have special requirements, you + should not change this value. + +config ZBOOT_ROM_BSS + hex "Compressed ROM boot loader BSS address" + default "0" + help + The base address of 64KiB of read/write memory, which must be available + while the decompressor is running. Unless you have special requirements, + you should not change this value. + +config HOTPLUG + bool "Support for hot-pluggable devices" + ---help--- + Say Y here if you want to plug devices into your computer while + the system is running, and be able to use them quickly. In many + cases, the devices can likewise be unplugged at any time too. + + One well known example of this is PCMCIA- or PC-cards, credit-card + size devices such as network cards, modems or hard drives which are + plugged into slots found on all modern laptop computers. Another + example, used on modern desktops as well as laptops, is USB. + + Enable HOTPLUG and KMOD, and build a modular kernel. Get agent + software (at ) and install it. + Then your kernel will automatically call out to a user mode "policy + agent" (/sbin/hotplug) to load modules and set up software needed + to use devices as you hotplug them. + +comment "At least one math emulation must be selected" + +config FPE_NWFPE + tristate "NWFPE math emulation" + ---help--- + Say Y to include the NWFPE floating point emulator in the kernel. + This is necessary to run most binaries. Linux does not currently + support floating point hardware so you need to say Y here even if + your machine has an FPA or floating point co-processor podule. + + It is also possible to say M to build the emulator as a module + (nwfpe) or indeed to leave it out altogether. However, unless you + know what you are doing this can easily render your machine + unbootable. Saying Y is the safe option. + + You may say N here if you are going to load the Acorn FPEmulator + early in the bootup. + +choice + prompt "Kernel core (/proc/kcore) format" + default KCORE_ELF + +config KCORE_ELF + bool "ELF" + ---help--- + If you enabled support for /proc file system then the file + /proc/kcore will contain the kernel core image. This can be used + in gdb: + + $ cd /usr/src/linux ; gdb vmlinux /proc/kcore + + You have two choices here: ELF and A.OUT. Selecting ELF will make + /proc/kcore appear in ELF core format as defined by the Executable + and Linking Format specification. Selecting A.OUT will choose the + old "a.out" format which may be necessary for some old versions + of binutils or on some architectures. + + This is especially useful if you have compiled the kernel with the + "-g" option to preserve debugging information. It is mainly used + for examining kernel data structures on the live kernel so if you + don't understand what this means or are not a kernel hacker, just + leave it at its default value ELF. + +config KCORE_AOUT + bool "A.OUT" + help + Not necessary unless you're using a very out-of-date binutils + version. You probably want KCORE_ELF. + +endchoice + +config BINFMT_AOUT + tristate "Kernel support for a.out binaries" + ---help--- + A.out (Assembler.OUTput) is a set of formats for libraries and + executables used in the earliest versions of UNIX. Linux used the + a.out formats QMAGIC and ZMAGIC until they were replaced with the + ELF format. + + As more and more programs are converted to ELF, the use for a.out + will gradually diminish. If you disable this option it will reduce + your kernel by one page. This is not much and by itself does not + warrant removing support. However its removal is a good idea if you + wish to ensure that absolutely none of your programs will use this + older executable format. If you don't know what to answer at this + point then answer Y. If someone told you "You need a kernel with + QMAGIC support" then you'll have to say Y here. You may answer M to + compile a.out support as a module and later load the module when you + want to use a program or library in a.out format. The module will be + called binfmt_aout. Saying M or N here is dangerous though, + because some crucial programs on your system might still be in A.OUT + format. + +config BINFMT_ELF + tristate "Kernel support for ELF binaries" + ---help--- + ELF (Executable and Linkable Format) is a format for libraries and + executables used across different architectures and operating + systems. Saying Y here will enable your kernel to run ELF binaries + and enlarge it by about 13 KB. ELF support under Linux has now all + but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC) + because it is portable (this does *not* mean that you will be able + to run executables from different architectures or operating systems + however) and makes building run-time libraries very easy. Many new + executables are distributed solely in ELF format. You definitely + want to say Y here. + + Information about ELF is contained in the ELF HOWTO available from + . + + If you find that after upgrading from Linux kernel 1.2 and saying Y + here, you still can't run any ELF binaries (they just crash), then + you'll have to install the newest ELF runtime libraries, including + ld.so (check the file for location and + latest version). + + If you want to compile this as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read . The module + will be called binfmt_elf. Saying M or N here is dangerous because + some crucial programs on your system might be in ELF format. + +config BINFMT_MISC + tristate "Kernel support for MISC binaries" + ---help--- + If you say Y here, it will be possible to plug wrapper-driven binary + formats into the kernel. You will like this especially when you use + programs that need an interpreter to run like Java, Python or + Emacs-Lisp. It's also useful if you often run DOS executables under + the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from + ). Once you have + registered such a binary class with the kernel, you can start one of + those programs simply by typing in its name at a shell prompt; Linux + will automatically feed it to the correct interpreter. + + You can do other nice things, too. Read the file + to learn how to use this + feature, and for information about how + to include Java support. + + You must say Y to "/proc file system support" (CONFIG_PROC_FS) to + use this part of the kernel. + + You may say M here for module support and later load the module when + you have use for it; the module is called binfmt_misc. If you + don't know what to answer at this point, say Y. + +config PREEMPT + bool "Preemptible Kernel (EXPERIMENTAL)" + depends on CPU_32 && EXPERIMENTAL + help + This option reduces the latency of the kernel when reacting to + real-time or interactive events by allowing a low priority process to + be preempted even if it is in kernel mode executing a system call. + This allows applications to run more reliably even when the system is + under load. + + Say Y here if you are building a kernel for a desktop, embedded + or real-time system. Say N if you are unsure. + +config ARTHUR + tristate "RISC OS personality" + depends on CPU_32 + help + Say Y here to include the kernel code necessary if you want to run + Acorn RISC OS/Arthur binaries under Linux. This code is still very + experimental; if this sounds frightening, say N and sleep in peace. + You can also say M here to compile this support as a module (which + will be called arthur). + +config CMDLINE + string "Default kernel command string" + default "" + help + On some architectures (EBSA110 and CATS), there is currently no way + for the boot loader to pass arguments to the kernel. For these + architectures, you should supply some command-line options at build + time by entering them here. As a minimum, you should specify the + memory size and the root device (e.g., mem=64M root=/dev/nfs). + +endmenu + +source "drivers/parport/Kconfig" + +source "drivers/pnp/Kconfig" + +source "drivers/block/Kconfig" + +source "drivers/md/Kconfig" + +source "net/Kconfig" + +source "net/irda/Kconfig" + +menu "ATA/ATAPI/MFM/RLL support" + +config IDE + tristate "ATA/ATAPI/MFM/RLL support" + ---help--- + If you say Y here, your kernel will be able to manage low cost mass + storage units such as ATA/(E)IDE and ATAPI units. The most common + cases are IDE hard drives and ATAPI CD-ROM drives. + + If your system is pure SCSI and doesn't use these interfaces, you + can say N here. + + Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard + for mass storage units such as hard disks. It was designed by + Western Digital and Compaq Computer in 1984. It was then named + ST506. Quite a number of disks use the IDE interface. + + AT Attachment (ATA) is the superset of the IDE specifications. + ST506 was also called ATA-1. + + Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is + ATA-3. It provides support for larger disks (up to 8.4GB by means of + the LBA standard), more disks (4 instead of 2) and for other mass + storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is + ATA-4 and provides faster (and more CPU friendly) transfer modes + than previous PIO (Programmed processor Input/Output) from previous + ATA/IDE standards by means of fast DMA controllers. + + ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and + CD-ROM drives, similar in many respects to the SCSI protocol. + + SMART IDE (Self Monitoring, Analysis and Reporting Technology) was + designed in order to prevent data corruption and disk crash by + detecting pre hardware failure conditions (heat, access time, and + the like...). Disks built since June 1995 may follow this standard. + The kernel itself don't manage this; however there are quite a + number of user programs such as smart that can query the status of + SMART parameters disk. + + If you want to compile this driver as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read . The module + will be called ide. + + For further information, please read . + + If unsure, say Y. + +source "drivers/ide/Kconfig" + +endmenu + + +menu "SCSI support" + +config SCSI + tristate "SCSI support" + ---help--- + If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or + any other SCSI device under Linux, say Y and make sure that you know + the name of your SCSI host adapter (the card inside your computer + that "speaks" the SCSI protocol, also called SCSI controller), + because you will be asked for it. + + You also need to say Y here if you want support for the parallel + port version of the 100 MB IOMEGA ZIP drive. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called scsi_mod. If you want to compile it as + a module, say M here and read and + . However, do not compile this as a + module if your root file system (the one containing the directory /) + is located on a SCSI device. + +source "drivers/scsi/Kconfig" + +endmenu + +source "drivers/isdn/Kconfig" + +# +# input before char - char/joystick depends on it. As does USB. +# +source "drivers/input/Kconfig" + +source "drivers/char/Kconfig" + +config KBDMOUSE + bool + depends on ARCH_ACORN && BUSMOUSE=y + default y + +source "drivers/media/Kconfig" + +source "fs/Kconfig" + +source "drivers/video/Kconfig" + +menu "Sound" + depends on ARCH_ACORN + +config SOUND + tristate "Sound card support" + ---help--- + If you have a sound card in your computer, i.e. if it can say more + than an occasional beep, say Y. Be sure to have all the information + about your sound card and its configuration down (I/O port, + interrupt and DMA channel), because you will be asked for it. + + You want to read the Sound-HOWTO, available from + . General information about + the modular sound system is contained in the files + . The file + contains some slightly + outdated but still useful information as well. + + If you have a PnP sound card and you want to configure it at boot + time using the ISA PnP tools (read + ), then you need to + compile the sound card support as a module ( = code which can be + inserted in and removed from the running kernel whenever you want) + and load that module after the PnP configuration is finished. To do + this, say M here and read as well + as ; the module will be + called soundcore. + + I'm told that even without a sound card, you can make your computer + say more than an occasional beep, by programming the PC speaker. + Kernel patches and supporting utilities to do that are in the pcsp + package, available at . + +source "sound/Kconfig" + +endmenu + +source "drivers/misc/Kconfig" + +source "drivers/usb/Kconfig" + +source "net/bluetooth/Kconfig" + + +menu "Kernel hacking" + +# RMK wants arm kernels compiled with frame pointers so hardwire this to y. +# If you know what you are doing and are willing to live without stack +# traces, you can get a slightly smaller kernel by setting this option to +# n, but then RMK will have to kill you ;). +config FRAME_POINTER + bool + default y + help + If you say N here, the resulting kernel will be slightly smaller and + faster. However, when a problem occurs with the kernel, the + information that is reported is severely limited. Most people + should say Y here. + +config DEBUG_USER + bool "Verbose user fault messages" + help + When a user program crashes due to an exception, the kernel can + print a brief message explaining what the problem was. This is + sometimes helpful for debugging but serves no purpose on a + production system. Most people should say N here. + +config DEBUG_INFO + bool "Include GDB debugging information in kernel binary" + help + Say Y here to include source-level debugging information in the + `vmlinux' binary image. This is handy if you want to use gdb or + addr2line to debug the kernel. It has no impact on the in-memory + footprint of the running kernel but it can increase the amount of + time and disk space needed for compilation of the kernel. If in + doubt say N. + +config DEBUG_KERNEL + bool "Kernel debugging" + help + Say Y here if you are developing drivers or trying to debug and + identify kernel problems. + +config DEBUG_SLAB + bool "Debug memory allocations" + depends on DEBUG_KERNEL + help + Say Y here to have the kernel do limited verification on memory + allocation as well as poisoning memory on free to catch use of freed + memory. + +config MAGIC_SYSRQ + bool "Magic SysRq key" + depends on DEBUG_KERNEL + help + If you say Y here, you will have some control over the system even + if the system crashes for example during kernel debugging (e.g., you + will be able to flush the buffer cache to disk, reboot the system + immediately or dump some status information). This is accomplished + by pressing various keys while holding SysRq (Alt+PrintScreen). It + also works on a serial console (on PC hardware at least), if you + send a BREAK and then within 5 seconds a command keypress. The + keys are documented in . Don't say Y + unless you really know what this hack does. + +config DEBUG_SPINLOCK + bool "Spinlock debugging" + depends on DEBUG_KERNEL + help + Say Y here and build SMP to catch missing spinlock initialization + and certain other kinds of spinlock errors commonly made. This is + best used in conjunction with the NMI watchdog so that spinlock + deadlocks are also debuggable. + +config DEBUG_WAITQ + bool "Wait queue debugging" + depends on DEBUG_KERNEL + +config DEBUG_BUGVERBOSE + bool "Verbose BUG() reporting (adds 70K)" + depends on DEBUG_KERNEL + help + Say Y here to make BUG() panics output the file name and line number + of the BUG call as well as the EIP and oops trace. This aids + debugging but costs about 70-100K of memory. + +config DEBUG_ERRORS + bool "Verbose kernel error messages" + depends on DEBUG_KERNEL + help + This option controls verbose debugging information which can be + printed when the kernel detects an internal error. This debugging + information is useful to kernel hackers when tracking down problems, + but mostly meaningless to other people. It's safe to say Y unless + you are concerned with the code size or don't want to see these + messages. + +config KALLSYMS + bool "Load all symbols for debugging/kksymoops" + depends on DEBUG_KERNEL + help + Say Y here to let the kernel print out symbolic crash information and + symbolic stack backtraces. This increases the size of the kernel + somewhat, as all symbols have to be loaded into the kernel image. + +# These options are only for real kernel hackers who want to get their hands dirty. +config DEBUG_LL + bool "Kernel low-level debugging functions" + depends on DEBUG_KERNEL + help + Say Y here to include definitions of printascii, printchar, printhex + in the kernel. This is helpful if you are debugging code that + executes before the console is initialized. + +endmenu + +source "security/Kconfig" + +source "crypto/Kconfig" + +source "lib/Kconfig" + diff -Nru a/arch/arm26/Makefile b/arch/arm26/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,126 @@ +# +# arch/arm26/Makefile +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 1995-2001 by Russell King + +LDFLAGS_vmlinux :=-p -X +LDFLAGS_BLOB :=--format binary +AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) +OBJCOPYFLAGS :=-O binary -R .note -R .comment -S +GZFLAGS :=-9 +#CFLAGS +=-pipe +CFLAGS :=$(CFLAGS:-O2=-Os) + +ifeq ($(CONFIG_FRAME_POINTER),y) +CFLAGS +=-fno-omit-frame-pointer -mno-sched-prolog +endif + +ifeq ($(CONFIG_DEBUG_INFO),y) +CFLAGS +=-g +endif + +# Force -mno-fpu to be passed to the assembler. Some versions of gcc don't +# do this with -msoft-float +CFLAGS_BOOT :=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm +CFLAGS +=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm +AFLAGS +=-mapcs-26 -mcpu=arm3 -mno-fpu -msoft-float -Wa,-mno-fpu + +#Default value +DATAADDR := . + +ifeq ($(CONFIG_CPU_26),y) +head-y := arch/arm26/machine/head.o arch/arm26/kernel/init_task.o +LDFLAGS_BLOB += --oformat elf32-littlearm + ifeq ($(CONFIG_ROM_KERNEL),y) + DATAADDR := 0x02080000 + textaddr-y := 0x03800000 + else + textaddr-y := 0x02080000 + endif +endif + +TEXTADDR := $(textaddr-y) +ifeq ($(incdir-y),) +incdir-y := +endif +INCDIR := + +export MACHINE TEXTADDR GZFLAGS CFLAGS_BOOT + +# If we have a machine-specific directory, then include it in the build. +core-y += arch/arm26/kernel/ arch/arm26/mm/ arch/arm26/machine/ +core-$(CONFIG_FPE_NWFPE) += arch/arm26/nwfpe/ + +libs-y += arch/arm26/lib/ + +# Default target when executing plain make +all: zImage + +boot := arch/arm26/boot + +prepare: include/asm-$(ARCH)/asm_offsets.h +CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h + + +.PHONY: maketools FORCE +maketools: FORCE + + +# Convert bzImage to zImage +bzImage: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage + +zImage Image bootpImage: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + +zinstall install: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $@ + +# We use MRPROPER_FILES and CLEAN_FILES now +archclean: + $(Q)$(MAKE) $(clean)=$(boot) + +# My testing targets (that short circuit a few dependencies) +zImg:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage +Img:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image +bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage +i:; $(Q)$(MAKE) $(build)=$(boot) install +zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall + +# +# Configuration targets. Use these to select a +# configuration for your architecture +%_config: + @( \ + CFG=$(@:_config=); \ + if [ -f arch/arm26/def-configs/$$CFG ]; then \ + [ -f .config ] && mv -f .config .config.old; \ + cp arch/arm26/def-configs/$$CFG .config; \ + echo "*** Default configuration for $$CFG installed"; \ + echo "*** Next, you may run 'make oldconfig'"; \ + else \ + echo "$$CFG does not exist"; \ + fi; \ + ) + +arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ + include/config/MARKER + +include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s + $(call filechk,gen-asm-offsets) + +define archhelp + echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' + echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' + echo ' bootpImage - Combined zImage and initial RAM disk' + echo ' initrd - Create an initial image' + echo ' install - Install uncompressed kernel' + echo ' zinstall - Install compressed kernel' + echo ' Install using (your) ~/bin/installkernel or' + echo ' (distribution) /sbin/installkernel or' + echo ' install to $$(INSTALL_PATH) and run lilo' +endef diff -Nru a/arch/arm26/boot/Makefile b/arch/arm26/boot/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,69 @@ +# +# arch/arm/boot/Makefile +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 1995-2002 Russell King +# + +# Note: the following conditions must always be true: +# ZRELADDR == virt_to_phys(TEXTADDR) +# PARAMS_PHYS must be with 4MB of ZRELADDR +# INITRD_PHYS must be in RAM + + zreladdr-y := 0x02080000 +params_phys-y := 0x0207c000 +initrd_phys-y := 0x02180000 + +ZRELADDR := 0x02080000 +ZTEXTADDR := 0x0207c000 +PARAMS_PHYS := $(params_phys-y) +INITRD_PHYS := 0x02180000 + +# We now have a PIC decompressor implementation. Decompressors running +# from RAM should not define ZTEXTADDR. Decompressors running directly +# from ROM or Flash must define ZTEXTADDR (preferably via the config) +# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK +ifeq ($(CONFIG_ZBOOT_ROM),y) +ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT) +ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS) +else +ZTEXTADDR := 0 +ZBSSADDR := ALIGN(4) +endif + +export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS + +targets := Image zImage bootpImage + +$(obj)/Image: vmlinux FORCE + $(call if_changed,objcopy) + @echo ' Kernel: $@ is ready' + +$(obj)/zImage: $(obj)/compressed/vmlinux FORCE + $(call if_changed,objcopy) + @echo ' Kernel: $@ is ready' + +$(obj)/compressed/vmlinux: vmlinux FORCE + $(Q)$(MAKE) $(build)=$(obj)/compressed $@ + +.PHONY: initrd +initrd: + @test "$(INITRD_PHYS)" != "" || \ + (echo This machine does not support INITRD; exit -1) + @test "$(INITRD)" != "" || \ + (echo You must specify INITRD; exit -1) + +install: $(obj)/Image + $(CONFIG_SHELL) $(obj)/install.sh \ + $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \ + $(obj)/Image System.map "$(INSTALL_PATH)" + +zinstall: $(obj)/zImage + $(CONFIG_SHELL) $(obj)/install.sh \ + $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \ + $(obj)/zImage System.map "$(INSTALL_PATH)" + +subdir- := compressed diff -Nru a/arch/arm26/boot/compressed/Makefile b/arch/arm26/boot/compressed/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,50 @@ +# +# linux/arch/arm26/boot/compressed/Makefile +# +# create a compressed vmlinuz image from the original vmlinux +# +# Note! ZTEXTADDR, ZBSSADDR and ZRELADDR are now exported +# from arch/arm26/boot/Makefile +# + +HEAD = head.o +OBJS = misc.o +FONTC = drivers/video/console/font_acorn_8x8.c + +OBJS += ll_char_wr.o font.o +CFLAGS_misc.o := -DPARAMS_PHYS=$(PARAMS_PHYS) + +targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o font.o head.o $(OBJS) + +SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/ + +EXTRA_CFLAGS := $(CFLAGS_BOOT) -fpic +EXTRA_AFLAGS := -traditional + +LDFLAGS_vmlinux := -p -X \ + $(shell $(CC) $(CFLAGS)) -T + +$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ + $(addprefix $(obj)/, $(OBJS)) FORCE + $(call if_changed,ld) + @: + + +$(obj)/piggy: vmlinux FORCE + $(call if_changed,objcopy) + +$(obj)/piggy.gz: $(obj)/piggy FORCE + $(call if_changed,gzip) + +LDFLAGS_piggy.o := -r -b binary +$(obj)/piggy.o: $(obj)/piggy.gz FORCE + $(call if_changed,ld) + +$(obj)/font.o: $(FONTC) + $(CC) $(CFLAGS) -Dstatic= -c $(FONTC) -o $(obj)/font.o + +$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in Makefile arch/arm26/boot/Makefile .config + @sed "$(SEDFLAGS)" < $< > $@ + +$(obj)/misc.o: $(obj)/misc.c $(obj)/uncompress.h lib/inflate.c + diff -Nru a/arch/arm26/boot/compressed/head.S b/arch/arm26/boot/compressed/head.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/head.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,517 @@ +/* + * linux/arch/arm/boot/compressed/head.S + * + * Copyright (C) 1996-2002 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + +/* + * Debugging stuff + * + * Note that these macros must not contain any code which is not + * 100% relocatable. Any attempt to do so will result in a crash. + * Please select one of the following when turning on debugging. + */ + + .macro kputc,val + mov r0, \val + bl putc + .endm + + .macro kphex,val,len + mov r0, \val + mov r1, #\len + bl phex + .endm + + .macro debug_reloc_start + .endm + + .macro debug_reloc_end + .endm + + .section ".start", #alloc, #execinstr +/* + * sort out different calling conventions + */ + .align +start: + .type start,#function + .rept 8 + mov r0, r0 + .endr + + b 1f + .word 0x016f2818 @ Magic numbers to help the loader + .word start @ absolute load/run zImage address + .word _edata @ zImage end address +1: mov r7, r1 @ save architecture ID + mov r8, #0 @ save r0 + teqp pc, #0x0c000003 @ turn off interrupts + + .text + adr r0, LC0 + ldmia r0, {r1, r2, r3, r4, r5, r6, ip, sp} + subs r0, r0, r1 @ calculate the delta offset + + teq r0, #0 @ if delta is zero, we're + beq not_relocated @ running at the address we + @ were linked at. + + add r2, r2, r0 @ different address, so we + add r3, r3, r0 @ need to fix up various + add r5, r5, r0 @ pointers. + add r6, r6, r0 + add ip, ip, r0 + add sp, sp, r0 + +1: ldr r1, [r6, #0] @ relocate entries in the GOT + add r1, r1, r0 @ table. This fixes up the + str r1, [r6], #4 @ C references. + cmp r6, ip + blo 1b + +not_relocated: mov r0, #0 +1: str r0, [r2], #4 @ clear bss + str r0, [r2], #4 + str r0, [r2], #4 + str r0, [r2], #4 + cmp r2, r3 + blo 1b + + bl cache_on + + mov r1, sp @ malloc space above stack + add r2, sp, #0x10000 @ 64k max + +/* + * Check to see if we will overwrite ourselves. + * r4 = final kernel address + * r5 = start of this image + * r2 = end of malloc space (and therefore this image) + * We basically want: + * r4 >= r2 -> OK + * r4 + image length <= r5 -> OK + */ + cmp r4, r2 + bhs wont_overwrite + add r0, r4, #4096*1024 @ 4MB largest kernel size + cmp r0, r5 + bls wont_overwrite + + mov r5, r2 @ decompress after malloc space + mov r0, r5 + mov r3, r7 + bl decompress_kernel + + add r0, r0, #127 + bic r0, r0, #127 @ align the kernel length +/* + * r0 = decompressed kernel length + * r1-r3 = unused + * r4 = kernel execution address + * r5 = decompressed kernel start + * r6 = processor ID + * r7 = architecture ID + * r8-r14 = unused + */ + add r1, r5, r0 @ end of decompressed kernel + adr r2, reloc_start + ldr r3, LC1 + add r3, r2, r3 +1: ldmia r2!, {r8 - r13} @ copy relocation code + stmia r1!, {r8 - r13} + ldmia r2!, {r8 - r13} + stmia r1!, {r8 - r13} + cmp r2, r3 + blo 1b + + bl cache_clean_flush + add pc, r5, r0 @ call relocation code + +/* + * We're not in danger of overwriting ourselves. Do this the simple way. + * + * r4 = kernel execution address + * r7 = architecture ID + */ +wont_overwrite: mov r0, r4 + mov r3, r7 + bl decompress_kernel + b call_kernel + + .type LC0, #object +LC0: .word LC0 @ r1 + .word __bss_start @ r2 + .word _end @ r3 + .word _load_addr @ r4 + .word _start @ r5 + .word _got_start @ r6 + .word _got_end @ ip + .word user_stack+4096 @ sp +LC1: .word reloc_end - reloc_start + .size LC0, . - LC0 + +/* + * Turn on the cache. We need to setup some page tables so that we + * can have both the I and D caches on. + * + * We place the page tables 16k down from the kernel execution address, + * and we hope that nothing else is using it. If we're using it, we + * will go pop! + * + * On entry, + * r4 = kernel execution address + * r6 = processor ID + * r7 = architecture number + * r8 = run-time address of "start" + * On exit, + * r1, r2, r3, r8, r9, r12 corrupted + * This routine must preserve: + * r4, r5, r6, r7 + */ + .align 5 +cache_on: mov r3, #8 @ cache_on function + b call_cache_fn + +__setup_mmu: sub r3, r4, #16384 @ Page directory size + bic r3, r3, #0xff @ Align the pointer + bic r3, r3, #0x3f00 +/* + * Initialise the page tables, turning on the cacheable and bufferable + * bits for the RAM area only. + */ + mov r0, r3 + mov r8, r0, lsr #18 + mov r8, r8, lsl #18 @ start of RAM + add r9, r8, #0x10000000 @ a reasonable RAM size + mov r1, #0x12 + orr r1, r1, #3 << 10 + add r2, r3, #16384 +1: cmp r1, r8 @ if virt > start of RAM + orrhs r1, r1, #0x0c @ set cacheable, bufferable + cmp r1, r9 @ if virt > end of RAM + bichs r1, r1, #0x0c @ clear cacheable, bufferable + str r1, [r0], #4 @ 1:1 mapping + add r1, r1, #1048576 + teq r0, r2 + bne 1b +/* + * If ever we are running from Flash, then we surely want the cache + * to be enabled also for our execution instance... We map 2MB of it + * so there is no map overlap problem for up to 1 MB compressed kernel. + * If the execution is in RAM then we would only be duplicating the above. + */ + mov r1, #0x1e + orr r1, r1, #3 << 10 + mov r2, pc, lsr #20 + orr r1, r1, r2, lsl #20 + add r0, r3, r2, lsl #2 + str r1, [r0], #4 + add r1, r1, #1048576 + str r1, [r0] + mov pc, lr + +__armv4_cache_on: + mov r12, lr + bl __setup_mmu + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 @ drain write buffer + mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs + mrc p15, 0, r0, c1, c0, 0 @ read control reg + orr r0, r0, #0x1000 @ I-cache enable + orr r0, r0, #0x0030 + b __common_cache_on + +__arm6_cache_on: + mov r12, lr + bl __setup_mmu + mov r0, #0 + mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 + mov r0, #0x30 +__common_cache_on: +#ifndef DEBUG + orr r0, r0, #0x000d @ Write buffer, mmu +#endif + mov r1, #-1 + mcr p15, 0, r3, c2, c0, 0 @ load page table pointer + mcr p15, 0, r1, c3, c0, 0 @ load domain access control + mcr p15, 0, r0, c1, c0, 0 @ load control register + mov pc, r12 + +/* + * All code following this line is relocatable. It is relocated by + * the above code to the end of the decompressed kernel image and + * executed there. During this time, we have no stacks. + * + * r0 = decompressed kernel length + * r1-r3 = unused + * r4 = kernel execution address + * r5 = decompressed kernel start + * r6 = processor ID + * r7 = architecture ID + * r8-r14 = unused + */ + .align 5 +reloc_start: add r8, r5, r0 + debug_reloc_start + mov r1, r4 +1: + .rept 4 + ldmia r5!, {r0, r2, r3, r9 - r13} @ relocate kernel + stmia r1!, {r0, r2, r3, r9 - r13} + .endr + + cmp r5, r8 + blo 1b + debug_reloc_end + +call_kernel: bl cache_clean_flush + bl cache_off + mov r0, #0 + mov r1, r7 @ restore architecture number + mov pc, r4 @ call kernel + +/* + * Here follow the relocatable cache support functions for the + * various processors. This is a generic hook for locating an + * entry and jumping to an instruction at the specified offset + * from the start of the block. Please note this is all position + * independent code. + * + * r1 = corrupted + * r2 = corrupted + * r3 = block offset + * r6 = corrupted + * r12 = corrupted + */ + +call_cache_fn: adr r12, proc_types + mrc p15, 0, r6, c0, c0 @ get processor ID +1: ldr r1, [r12, #0] @ get value + ldr r2, [r12, #4] @ get mask + eor r1, r1, r6 @ (real ^ match) + tst r1, r2 @ & mask + addeq pc, r12, r3 @ call cache function + add r12, r12, #4*5 + b 1b + +/* + * Table for cache operations. This is basically: + * - CPU ID match + * - CPU ID mask + * - 'cache on' method instruction + * - 'cache off' method instruction + * - 'cache flush' method instruction + * + * We match an entry using: ((real_id ^ match) & mask) == 0 + * + * Writethrough caches generally only need 'on' and 'off' + * methods. Writeback caches _must_ have the flush method + * defined. + */ + .type proc_types,#object +proc_types: + .word 0x41560600 @ ARM6/610 + .word 0xffffffe0 + b __arm6_cache_off @ works, but slow + b __arm6_cache_off + mov pc, lr +@ b __arm6_cache_on @ untested +@ b __arm6_cache_off +@ b __armv3_cache_flush + + .word 0x41007000 @ ARM7/710 + .word 0xfff8fe00 + b __arm7_cache_off + b __arm7_cache_off + mov pc, lr + + .word 0x41807200 @ ARM720T (writethrough) + .word 0xffffff00 + b __armv4_cache_on + b __armv4_cache_off + mov pc, lr + + .word 0x41129200 @ ARM920T + .word 0xff00fff0 + b __armv4_cache_on + b __armv4_cache_off + b __armv4_cache_flush + + .word 0x4401a100 @ sa110 / sa1100 + .word 0xffffffe0 + b __armv4_cache_on + b __armv4_cache_off + b __armv4_cache_flush + + .word 0x6901b110 @ sa1110 + .word 0xfffffff0 + b __armv4_cache_on + b __armv4_cache_off + b __armv4_cache_flush + + .word 0x69050000 @ xscale + .word 0xffff0000 + b __armv4_cache_on + b __armv4_cache_off + b __armv4_cache_flush + + .word 0 @ unrecognised type + .word 0 + mov pc, lr + mov pc, lr + mov pc, lr + + .size proc_types, . - proc_types + +/* + * Turn off the Cache and MMU. ARMv3 does not support + * reading the control register, but ARMv4 does. + * + * On entry, r6 = processor ID + * On exit, r0, r1, r2, r3, r12 corrupted + * This routine must preserve: r4, r6, r7 + */ + .align 5 +cache_off: mov r3, #12 @ cache_off function + b call_cache_fn + +__armv4_cache_off: + mrc p15, 0, r0, c1, c0 + bic r0, r0, #0x000d + mcr p15, 0, r0, c1, c0 @ turn MMU and cache off + mov r0, #0 + mcr p15, 0, r0, c7, c7 @ invalidate whole cache v4 + mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4 + mov pc, lr + +__arm6_cache_off: + mov r0, #0x00000030 @ ARM6 control reg. + b __armv3_cache_off + +__arm7_cache_off: + mov r0, #0x00000070 @ ARM7 control reg. + b __armv3_cache_off + +__armv3_cache_off: + mcr p15, 0, r0, c1, c0, 0 @ turn MMU and cache off + mov r0, #0 + mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 + mov pc, lr + +/* + * Clean and flush the cache to maintain consistency. + * + * On entry, + * r6 = processor ID + * On exit, + * r1, r2, r3, r12 corrupted + * This routine must preserve: + * r0, r4, r5, r6, r7 + */ + .align 5 +cache_clean_flush: + mov r3, #16 + b call_cache_fn + +__armv4_cache_flush: + bic r1, pc, #31 + add r2, r1, #65536 @ 2x the largest dcache size +1: ldr r12, [r1], #32 @ s/w flush D cache + teq r1, r2 + bne 1b + + mcr p15, 0, r1, c7, c7, 0 @ flush I cache + mcr p15, 0, r1, c7, c10, 4 @ drain WB + mov pc, lr + +__armv3_cache_flush: + mov r1, #0 + mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 + mov pc, lr + +/* + * Various debugging routines for printing hex characters and + * memory, which again must be relocatable. + */ +#ifdef DEBUG + .type phexbuf,#object +phexbuf: .space 12 + .size phexbuf, . - phexbuf + +phex: adr r3, phexbuf + mov r2, #0 + strb r2, [r3, r1] +1: subs r1, r1, #1 + movmi r0, r3 + bmi puts + and r2, r0, #15 + mov r0, r0, lsr #4 + cmp r2, #10 + addge r2, r2, #7 + add r2, r2, #'0' + strb r2, [r3, r1] + b 1b + +puts: loadsp r3 +1: ldrb r2, [r0], #1 + teq r2, #0 + moveq pc, lr +2: writeb r2 + mov r1, #0x00020000 +3: subs r1, r1, #1 + bne 3b + teq r2, #'\n' + moveq r2, #'\r' + beq 2b + teq r0, #0 + bne 1b + mov pc, lr +putc: + mov r2, r0 + mov r0, #0 + loadsp r3 + b 2b + +memdump: mov r12, r0 + mov r10, lr + mov r11, #0 +2: mov r0, r11, lsl #2 + add r0, r0, r12 + mov r1, #8 + bl phex + mov r0, #':' + bl putc +1: mov r0, #' ' + bl putc + ldr r0, [r12, r11, lsl #2] + mov r1, #8 + bl phex + and r0, r11, #7 + teq r0, #3 + moveq r0, #' ' + bleq putc + and r0, r11, #7 + add r11, r11, #1 + teq r0, #7 + bne 1b + mov r0, #'\n' + bl putc + cmp r11, #64 + blt 2b + mov pc, r10 +#endif + +reloc_end: + + .align + .section ".stack", "aw" +user_stack: .space 4096 diff -Nru a/arch/arm26/boot/compressed/hw-bse.c b/arch/arm26/boot/compressed/hw-bse.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/hw-bse.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,74 @@ +/* + * Bright Star Engineering Inc. + * + * code for readng parameters from the + * parameter blocks of the boot block + * flash memory + * + */ + +static int strcmp(const char *s1, const char *s2) +{ + while (*s1 != '\0' && *s1 == *s2) + { + s1++; + s2++; + } + + return (*(unsigned char *) s1) - (*(unsigned char *) s2); +} + +struct pblk_t { + char type; + unsigned short size; +}; + +static char *bse_getflashparam(char *name) { + unsigned int esize; + char *q,*r; + unsigned char *p,*e; + struct pblk_t *thepb = (struct pblk_t *) 0x00004000; + struct pblk_t *altpb = (struct pblk_t *) 0x00006000; + if (thepb->type&1) { + if (altpb->type&1) { + /* no valid param block */ + return (char*)0; + } else { + /* altpb is valid */ + struct pblk_t *tmp; + tmp = thepb; + thepb = altpb; + altpb = tmp; + } + } + p = (char*)thepb + sizeof(struct pblk_t); + e = p + thepb->size; + while (p < e) { + q = p; + esize = *p; + if (esize == 0xFF) break; + if (esize == 0) break; + if (esize > 127) { + esize = (esize&0x7F)<<8 | p[1]; + q++; + } + q++; + r=q; + if (*r && ((name == 0) || (!strcmp(name,r)))) { + while (*q++) ; + return q; + } + p+=esize; + } + return (char*)0; +} + +void bse_setup(void) { + /* extract the linux cmdline from flash */ + char *name=bse_getflashparam("linuxboot"); + char *x = (char *)0xc0000100; + if (name) { + while (*name) *x++=*name++; + } + *x=0; +} diff -Nru a/arch/arm26/boot/compressed/ll_char_wr.S b/arch/arm26/boot/compressed/ll_char_wr.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/ll_char_wr.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,162 @@ +/* + * linux/arch/arm/lib/ll_char_wr.S + * + * Copyright (C) 1995, 1996 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Speedups & 1bpp code (C) 1996 Philip Blundell & Russell King. + * + * 10-04-96 RMK Various cleanups & reduced register usage. + * 08-04-98 RMK Shifts re-ordered + */ + +@ Regs: [] = corruptible +@ {} = used +@ () = do not use + +#include +#include + .text + +#define BOLD 0x01 +#define ITALIC 0x02 +#define UNDERLINE 0x04 +#define FLASH 0x08 +#define INVERSE 0x10 + +LC0: .word bytes_per_char_h + .word video_size_row + .word acorndata_8x8 + .word con_charconvtable + +ENTRY(ll_write_char) + stmfd sp!, {r4 - r7, lr} +@ +@ Smashable regs: {r0 - r3}, [r4 - r7], (r8 - fp), [ip], (sp), [lr], (pc) +@ + eor ip, r1, #UNDERLINE << 9 +/* + * calculate colours + */ + tst r1, #INVERSE << 9 + moveq r2, r1, lsr #16 + moveq r3, r1, lsr #24 + movne r2, r1, lsr #24 + movne r3, r1, lsr #16 + and r3, r3, #255 + and r2, r2, #255 +/* + * calculate offset into character table + */ + mov r1, r1, lsl #23 + mov r1, r1, lsr #20 +/* + * calculate offset required for each row [maybe I should make this an argument to this fn. + * Have to see what the register usage is like in the calling routines. + */ + adr r4, LC0 + ldmia r4, {r4, r5, r6, lr} + ldr r4, [r4] + ldr r5, [r5] +/* + * Go to resolution-dependent routine... + */ + cmp r4, #4 + blt Lrow1bpp + eor r2, r3, r2 @ Create eor mask to change colour from bg + orr r3, r3, r3, lsl #8 @ to fg. + orr r3, r3, r3, lsl #16 + add r0, r0, r5, lsl #3 @ Move to bottom of character + add r1, r1, #7 + ldrb r7, [r6, r1] + tst ip, #UNDERLINE << 9 + eoreq r7, r7, #255 + teq r4, #8 + beq Lrow8bpplp +@ +@ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc) +@ + orr r3, r3, r3, lsl #4 +Lrow4bpplp: ldr r7, [lr, r7, lsl #2] + mul r7, r2, r7 + tst r1, #7 @ avoid using r7 directly after + eor ip, r3, r7 + str ip, [r0, -r5]! + LOADREGS(eqfd, sp!, {r4 - r7, pc}) + sub r1, r1, #1 + ldrb r7, [r6, r1] + ldr r7, [lr, r7, lsl #2] + mul r7, r2, r7 + tst r1, #7 @ avoid using r7 directly after + eor ip, r3, r7 + str ip, [r0, -r5]! + subne r1, r1, #1 + ldrneb r7, [r6, r1] + bne Lrow4bpplp + LOADREGS(fd, sp!, {r4 - r7, pc}) + +@ +@ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc) +@ +Lrow8bpplp: mov ip, r7, lsr #4 + ldr ip, [lr, ip, lsl #2] + mul r4, r2, ip + and ip, r7, #15 @ avoid r4 + ldr ip, [lr, ip, lsl #2] @ avoid r4 + mul ip, r2, ip @ avoid r4 + eor r4, r3, r4 @ avoid ip + tst r1, #7 @ avoid ip + sub r0, r0, r5 @ avoid ip + eor ip, r3, ip + stmia r0, {r4, ip} + LOADREGS(eqfd, sp!, {r4 - r7, pc}) + sub r1, r1, #1 + ldrb r7, [r6, r1] + mov ip, r7, lsr #4 + ldr ip, [lr, ip, lsl #2] + mul r4, r2, ip + and ip, r7, #15 @ avoid r4 + ldr ip, [lr, ip, lsl #2] @ avoid r4 + mul ip, r2, ip @ avoid r4 + eor r4, r3, r4 @ avoid ip + tst r1, #7 @ avoid ip + sub r0, r0, r5 @ avoid ip + eor ip, r3, ip + stmia r0, {r4, ip} + subne r1, r1, #1 + ldrneb r7, [r6, r1] + bne Lrow8bpplp + LOADREGS(fd, sp!, {r4 - r7, pc}) + +@ +@ Smashable regs: {r0 - r3}, [r4], {r5, r6}, [r7], (r8 - fp), [ip], (sp), [lr], (pc) +@ +Lrow1bpp: add r6, r6, r1 + ldmia r6, {r4, r7} + tst ip, #INVERSE << 9 + mvnne r4, r4 + mvnne r7, r7 + strb r4, [r0], r5 + mov r4, r4, lsr #8 + strb r4, [r0], r5 + mov r4, r4, lsr #8 + strb r4, [r0], r5 + mov r4, r4, lsr #8 + strb r4, [r0], r5 + strb r7, [r0], r5 + mov r7, r7, lsr #8 + strb r7, [r0], r5 + mov r7, r7, lsr #8 + strb r7, [r0], r5 + mov r7, r7, lsr #8 + tst ip, #UNDERLINE << 9 + mvneq r7, r7 + strb r7, [r0], r5 + LOADREGS(fd, sp!, {r4 - r7, pc}) + + .bss +ENTRY(con_charconvtable) + .space 1024 diff -Nru a/arch/arm26/boot/compressed/misc.c b/arch/arm26/boot/compressed/misc.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/misc.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,316 @@ +/* + * misc.c + * + * This is a collection of several routines from gzip-1.0.3 + * adapted for Linux. + * + * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 + * + * Modified for ARM Linux by Russell King + * + * Nicolas Pitre 1999/04/14 : + * For this code to run directly from Flash, all constant variables must + * be marked with 'const' and all other variables initialized at run-time + * only. This way all non constant variables will end up in the bss segment, + * which should point to addresses in RAM and cleared to 0 on start. + * This allows for a much quicker boot time. + */ + +unsigned int __machine_arch_type; + +#include + +#include +#include "uncompress.h" + +#ifdef STANDALONE_DEBUG +#define puts printf +#endif + +#define __ptr_t void * + +/* + * Optimised C version of memzero for the ARM. + */ +void __memzero (__ptr_t s, size_t n) +{ + union { void *vp; unsigned long *ulp; unsigned char *ucp; } u; + int i; + + u.vp = s; + + for (i = n >> 5; i > 0; i--) { + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + } + + if (n & 1 << 4) { + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + *u.ulp++ = 0; + } + + if (n & 1 << 3) { + *u.ulp++ = 0; + *u.ulp++ = 0; + } + + if (n & 1 << 2) + *u.ulp++ = 0; + + if (n & 1 << 1) { + *u.ucp++ = 0; + *u.ucp++ = 0; + } + + if (n & 1) + *u.ucp++ = 0; +} + +static inline __ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src, + size_t __n) +{ + int i = 0; + unsigned char *d = (unsigned char *)__dest, *s = (unsigned char *)__src; + + for (i = __n >> 3; i > 0; i--) { + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + } + + if (__n & 1 << 2) { + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + *d++ = *s++; + } + + if (__n & 1 << 1) { + *d++ = *s++; + *d++ = *s++; + } + + if (__n & 1) + *d++ = *s++; + + return __dest; +} + +/* + * gzip delarations + */ +#define OF(args) args +#define STATIC static + +typedef unsigned char uch; +typedef unsigned short ush; +typedef unsigned long ulg; + +#define WSIZE 0x8000 /* Window size must be at least 32k, */ + /* and a power of two */ + +static uch *inbuf; /* input buffer */ +static uch window[WSIZE]; /* Sliding window buffer */ + +static unsigned insize; /* valid bytes in inbuf */ +static unsigned inptr; /* index of next byte to be processed in inbuf */ +static unsigned outcnt; /* bytes in output buffer */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ +#define RESERVED 0xC0 /* bit 6,7: reserved */ + +#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf()) + +/* Diagnostic functions */ +#ifdef DEBUG +# define Assert(cond,msg) {if(!(cond)) error(msg);} +# define Trace(x) fprintf x +# define Tracev(x) {if (verbose) fprintf x ;} +# define Tracevv(x) {if (verbose>1) fprintf x ;} +# define Tracec(c,x) {if (verbose && (c)) fprintf x ;} +# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + +static int fill_inbuf(void); +static void flush_window(void); +static void error(char *m); +static void gzip_mark(void **); +static void gzip_release(void **); + +extern char input_data[]; +extern char input_data_end[]; + +static uch *output_data; +static ulg output_ptr; +static ulg bytes_out; + +static void *malloc(int size); +static void free(void *where); +static void error(char *m); +static void gzip_mark(void **); +static void gzip_release(void **); + +static void puts(const char *); + +extern int end; +static ulg free_mem_ptr; +static ulg free_mem_ptr_end; + +#define HEAP_SIZE 0x2000 + +#include "../../../../lib/inflate.c" + +#ifndef STANDALONE_DEBUG +static void *malloc(int size) +{ + void *p; + + if (size <0) error("Malloc error\n"); + if (free_mem_ptr <= 0) error("Memory error\n"); + + free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ + + p = (void *)free_mem_ptr; + free_mem_ptr += size; + + if (free_mem_ptr >= free_mem_ptr_end) + error("Out of memory"); + return p; +} + +static void free(void *where) +{ /* gzip_mark & gzip_release do the free */ +} + +static void gzip_mark(void **ptr) +{ + arch_decomp_wdog(); + *ptr = (void *) free_mem_ptr; +} + +static void gzip_release(void **ptr) +{ + arch_decomp_wdog(); + free_mem_ptr = (long) *ptr; +} +#else +static void gzip_mark(void **ptr) +{ +} + +static void gzip_release(void **ptr) +{ +} +#endif + +/* =========================================================================== + * Fill the input buffer. This is called only when the buffer is empty + * and at least one byte is really needed. + */ +int fill_inbuf(void) +{ + if (insize != 0) + error("ran out of input data\n"); + + inbuf = input_data; + insize = &input_data_end[0] - &input_data[0]; + + inptr = 1; + return inbuf[0]; +} + +/* =========================================================================== + * Write the output window window[0..outcnt-1] and update crc and bytes_out. + * (Used for the decompressed data only.) + */ +void flush_window(void) +{ + ulg c = crc; + unsigned n; + uch *in, *out, ch; + + in = window; + out = &output_data[output_ptr]; + for (n = 0; n < outcnt; n++) { + ch = *out++ = *in++; + c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); + } + crc = c; + bytes_out += (ulg)outcnt; + output_ptr += (ulg)outcnt; + outcnt = 0; + puts("."); +} + +static void error(char *x) +{ + int ptr; + + puts("\n\n"); + puts(x); + puts("\n\n -- System halted"); + + while(1); /* Halt */ +} + +#ifndef STANDALONE_DEBUG + +ulg +decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, + int arch_id) +{ + output_data = (uch *)output_start; /* Points to kernel start */ + free_mem_ptr = free_mem_ptr_p; + free_mem_ptr_end = free_mem_ptr_end_p; + __machine_arch_type = arch_id; + + arch_decomp_setup(); + + makecrc(); + puts("Uncompressing Linux..."); + gunzip(); + puts(" done, booting the kernel.\n"); + return output_ptr; +} +#else + +char output_buffer[1500*1024]; + +int main() +{ + output_data = output_buffer; + + makecrc(); + puts("Uncompressing Linux..."); + gunzip(); + puts("done.\n"); + return 0; +} +#endif + diff -Nru a/arch/arm26/boot/compressed/ofw-shark.c b/arch/arm26/boot/compressed/ofw-shark.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/ofw-shark.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,258 @@ +/* + * linux/arch/arm/boot/compressed/ofw-shark.c + * + * by Alexander Schulz + * + * This file is used to get some basic information + * about the memory layout of the shark we are running + * on. Memory is usually divided in blocks a 8 MB. + * And bootargs are copied from OpenFirmware. + */ + + +#include +#include +#include +#include + + +asmlinkage void +create_params (unsigned long *buffer) +{ + /* Is there a better address? Also change in mach-shark/core.c */ + struct tag *tag = (struct tag *) 0x08003000; + int j,i,m,k,nr_banks,size; + unsigned char *c; + + /* Head of the taglist */ + tag->hdr.tag = ATAG_CORE; + tag->hdr.size = tag_size(tag_core); + tag->u.core.flags = FLAG_READONLY; + tag->u.core.pagesize = PAGE_SIZE; + tag->u.core.rootdev = 0; + + /* Build up one tagged block for each memory region */ + size=0; + nr_banks=(unsigned int) buffer[0]; + for (j=0;jhdr.tag = ATAG_MEM; + tag->hdr.size = tag_size(tag_mem32); + tag->u.mem.size = buffer[2*k+2]; + tag->u.mem.start = buffer[2*k+1]; + + size += buffer[2*k+2]; + + buffer[2*k+1]=0xffffffff; /* mark as copied */ + } + + /* The command line */ + tag = tag_next(tag); + tag->hdr.tag = ATAG_CMDLINE; + + c=(unsigned char *)(&buffer[34]); + j=0; + while (*c) tag->u.cmdline.cmdline[j++]=*c++; + + tag->u.cmdline.cmdline[j]=0; + tag->hdr.size = (j + 7 + sizeof(struct tag_header)) >> 2; + + /* Hardware revision */ + tag = tag_next(tag); + tag->hdr.tag = ATAG_REVISION; + tag->hdr.size = tag_size(tag_revision); + tag->u.revision.rev = ((unsigned char) buffer[33])-'0'; + + /* End of the taglist */ + tag = tag_next(tag); + tag->hdr.tag = 0; + tag->hdr.size = 0; +} + + +typedef int (*ofw_handle_t)(void *); + +/* Everything below is called with a wrong MMU setting. + * This means: no string constants, no initialization of + * arrays, no global variables! This is ugly but I didn't + * want to write this in assembler :-) + */ + +int +of_decode_int(const unsigned char *p) +{ + unsigned int i = *p++ << 8; + i = (i + *p++) << 8; + i = (i + *p++) << 8; + return (i + *p); +} + +int +OF_finddevice(ofw_handle_t openfirmware, char *name) +{ + unsigned int args[8]; + char service[12]; + + service[0]='f'; + service[1]='i'; + service[2]='n'; + service[3]='d'; + service[4]='d'; + service[5]='e'; + service[6]='v'; + service[7]='i'; + service[8]='c'; + service[9]='e'; + service[10]='\0'; + + args[0]=(unsigned int)service; + args[1]=1; + args[2]=1; + args[3]=(unsigned int)name; + + if (openfirmware(args) == -1) + return -1; + return args[4]; +} + +int +OF_getproplen(ofw_handle_t openfirmware, int handle, char *prop) +{ + unsigned int args[8]; + char service[12]; + + service[0]='g'; + service[1]='e'; + service[2]='t'; + service[3]='p'; + service[4]='r'; + service[5]='o'; + service[6]='p'; + service[7]='l'; + service[8]='e'; + service[9]='n'; + service[10]='\0'; + + args[0] = (unsigned int)service; + args[1] = 2; + args[2] = 1; + args[3] = (unsigned int)handle; + args[4] = (unsigned int)prop; + + if (openfirmware(args) == -1) + return -1; + return args[5]; +} + +int +OF_getprop(ofw_handle_t openfirmware, int handle, char *prop, void *buf, unsigned int buflen) +{ + unsigned int args[8]; + char service[8]; + + service[0]='g'; + service[1]='e'; + service[2]='t'; + service[3]='p'; + service[4]='r'; + service[5]='o'; + service[6]='p'; + service[7]='\0'; + + args[0] = (unsigned int)service; + args[1] = 4; + args[2] = 1; + args[3] = (unsigned int)handle; + args[4] = (unsigned int)prop; + args[5] = (unsigned int)buf; + args[6] = buflen; + + if (openfirmware(args) == -1) + return -1; + return args[7]; +} + +asmlinkage void ofw_init(ofw_handle_t o, int *nomr, int *pointer) +{ + int phandle,i,mem_len,buffer[32]; + char temp[15]; + + temp[0]='/'; + temp[1]='m'; + temp[2]='e'; + temp[3]='m'; + temp[4]='o'; + temp[5]='r'; + temp[6]='y'; + temp[7]='\0'; + + phandle=OF_finddevice(o,temp); + + temp[0]='r'; + temp[1]='e'; + temp[2]='g'; + temp[3]='\0'; + + mem_len = OF_getproplen(o,phandle, temp); + OF_getprop(o,phandle, temp, buffer, mem_len); + *nomr=mem_len >> 3; + + for (i=0; i<=mem_len/4; i++) pointer[i]=of_decode_int((const unsigned char *)&buffer[i]); + + temp[0]='/'; + temp[1]='c'; + temp[2]='h'; + temp[3]='o'; + temp[4]='s'; + temp[5]='e'; + temp[6]='n'; + temp[7]='\0'; + + phandle=OF_finddevice(o,temp); + + temp[0]='b'; + temp[1]='o'; + temp[2]='o'; + temp[3]='t'; + temp[4]='a'; + temp[5]='r'; + temp[6]='g'; + temp[7]='s'; + temp[8]='\0'; + + mem_len = OF_getproplen(o,phandle, temp); + OF_getprop(o,phandle, temp, buffer, mem_len); + if (mem_len > 128) mem_len=128; + for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i]; + pointer[i+33]=0; + + temp[0]='/'; + temp[1]='\0'; + phandle=OF_finddevice(o,temp); + temp[0]='b'; + temp[1]='a'; + temp[2]='n'; + temp[3]='n'; + temp[4]='e'; + temp[5]='r'; + temp[6]='-'; + temp[7]='n'; + temp[8]='a'; + temp[9]='m'; + temp[10]='e'; + temp[11]='\0'; + mem_len = OF_getproplen(o,phandle, temp); + OF_getprop(o,phandle, temp, buffer, mem_len); + (unsigned char) pointer[32] = ((unsigned char *) buffer)[mem_len-2]; +} diff -Nru a/arch/arm26/boot/compressed/uncompress.h b/arch/arm26/boot/compressed/uncompress.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/uncompress.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,111 @@ +/* + * linux/include/asm-arm/arch-arc/uncompress.h + * + * Copyright (C) 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#define VIDMEM ((char *)0x02000000) + +int video_num_columns, video_num_lines, video_size_row; +int white, bytes_per_char_h; +extern unsigned long con_charconvtable[256]; + +struct param_struct { + unsigned long page_size; + unsigned long nr_pages; + unsigned long ramdisk_size; + unsigned long mountrootrdonly; + unsigned long rootdev; + unsigned long video_num_cols; + unsigned long video_num_rows; + unsigned long video_x; + unsigned long video_y; + unsigned long memc_control_reg; + unsigned char sounddefault; + unsigned char adfsdrives; + unsigned char bytes_per_char_h; + unsigned char bytes_per_char_v; + unsigned long unused[256/4-11]; +}; + +static struct param_struct *params = (struct param_struct *)0x0207c000; + +/* + * This does not append a newline + */ +static void puts(const char *s) +{ + extern void ll_write_char(char *, unsigned long); + int x,y; + unsigned char c; + char *ptr; + + x = params->video_x; + y = params->video_y; + + while ( ( c = *(unsigned char *)s++ ) != '\0' ) { + if ( c == '\n' ) { + x = 0; + if ( ++y >= video_num_lines ) { + y--; + } + } else { + ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); + ll_write_char(ptr, c|(white<<16)); + if ( ++x >= video_num_columns ) { + x = 0; + if ( ++y >= video_num_lines ) { + y--; + } + } + } + } + + params->video_x = x; + params->video_y = y; +} + +static void error(char *x); + +/* + * Setup for decompression + */ +static void arch_decomp_setup(void) +{ + int i; + + video_num_lines = params->video_num_rows; + video_num_columns = params->video_num_cols; + bytes_per_char_h = params->bytes_per_char_h; + video_size_row = video_num_columns * bytes_per_char_h; + if (bytes_per_char_h == 4) + for (i = 0; i < 256; i++) + con_charconvtable[i] = + (i & 128 ? 1 << 0 : 0) | + (i & 64 ? 1 << 4 : 0) | + (i & 32 ? 1 << 8 : 0) | + (i & 16 ? 1 << 12 : 0) | + (i & 8 ? 1 << 16 : 0) | + (i & 4 ? 1 << 20 : 0) | + (i & 2 ? 1 << 24 : 0) | + (i & 1 ? 1 << 28 : 0); + else + for (i = 0; i < 16; i++) + con_charconvtable[i] = + (i & 8 ? 1 << 0 : 0) | + (i & 4 ? 1 << 8 : 0) | + (i & 2 ? 1 << 16 : 0) | + (i & 1 ? 1 << 24 : 0); + + white = bytes_per_char_h == 8 ? 0xfc : 7; + + if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); +} + +/* + * nothing to do + */ +#define arch_decomp_wdog() diff -Nru a/arch/arm26/boot/compressed/vmlinux.lds.in b/arch/arm26/boot/compressed/vmlinux.lds.in --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/compressed/vmlinux.lds.in Fri Jun 13 01:07:45 2003 @@ -0,0 +1,60 @@ +/* + * linux/arch/arm/boot/compressed/vmlinux.lds.in + * + * Copyright (C) 2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + . = LOAD_ADDR; + _load_addr = .; + + . = TEXT_START; + _text = .; + + .text : { + _start = .; + *(.start) + *(.text) + *(.fixup) + *(.gnu.warning) + *(.rodata) + *(.rodata.*) + *(.glue_7) + *(.glue_7t) + input_data = .; + arch/arm26/boot/compressed/piggy.o + input_data_end = .; + . = ALIGN(4); + } + + _etext = .; + + _got_start = .; + .got : { *(.got) } + _got_end = .; + .got.plt : { *(.got.plt) } + .data : { *(.data) } + _edata = .; + + . = BSS_START; + __bss_start = .; + .bss : { *(.bss) } + _end = .; + + .stack (NOLOAD) : { *(.stack) } + + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } +} + diff -Nru a/arch/arm26/boot/install.sh b/arch/arm26/boot/install.sh --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/boot/install.sh Fri Jun 13 01:07:45 2003 @@ -0,0 +1,62 @@ +#!/bin/sh +# +# arch/arm/boot/install.sh +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 1995 by Linus Torvalds +# +# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin +# Adapted from code in arch/i386/boot/install.sh by Russell King +# Stolen from arch/arm/boot/install.sh by Ian Molton +# +# "make install" script for arm architecture +# +# Arguments: +# $1 - kernel version +# $2 - kernel image file +# $3 - kernel map file +# $4 - default install path (blank if root directory) +# + +# User may have a custom install script + +if [ -x /sbin/installkernel ]; then + exec /sbin/installkernel "$@" +fi + +if [ "$2" = "zImage" ]; then +# Compressed install + echo "Installing compressed kernel" + if [ -f $4/vmlinuz-$1 ]; then + mv $4/vmlinuz-$1 $4/vmlinuz.old + fi + + if [ -f $4/System.map-$1 ]; then + mv $4/System.map-$1 $4/System.old + fi + + cat $2 > $4/vmlinuz-$1 + cp $3 $4/System.map-$1 +else +# Normal install + echo "Installing normal kernel" + if [ -f $4/vmlinux-$1 ]; then + mv $4/vmlinux-$1 $4/vmlinux.old + fi + + if [ -f $4/System.map ]; then + mv $4/System.map $4/System.old + fi + + cat $2 > $4/vmlinux-$1 + cp $3 $4/System.map +fi + +if [ -x /sbin/loadmap ]; then + /sbin/loadmap --rdev /dev/ima +else + echo "You have to install it yourself" +fi diff -Nru a/arch/arm26/config.in b/arch/arm26/config.in --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/config.in Fri Jun 13 01:07:45 2003 @@ -0,0 +1,151 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/config-language.txt. +# +mainmenu_name "Linux Kernel Configuration" + +define_bool CONFIG_ARM y +define_bool CONFIG_EISA n +define_bool CONFIG_SBUS n +define_bool CONFIG_MCA n +define_bool CONFIG_UID16 y +define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y +define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n +define_bool CONFIG_GENERIC_BUST_SPINLOCK n +define_bool CONFIG_GENERIC_ISA_DMA n + +source init/Config.in + +mainmenu_option next_comment +comment 'System Type' + +define_bool CONFIG_ARCH_ARCA5K +bool ' Archimedes' CONFIG_ARCH_ARC +bool ' A5000' CONFIG_ARCH_A5K + +# Definitions to make life easier +define_bool CONFIG_ARCH_ACORN y +define_bool CONFIG_CPU_32 n +define_bool CONFIG_CPU_26 y +bool '2MB physical memory' CONFIG_PAGESIZE_16 + +endmenu + +mainmenu_option next_comment +comment 'General setup' + +define_bool CONFIG_FIQ y + +# Compressed boot loader in ROM. Yes, we really want to ask about +# TEXT and BSS so we preserve their values in the config files. +bool 'Compressed boot loader in ROM/flash' CONFIG_ZBOOT_ROM +hex 'Compressed ROM boot loader base address' CONFIG_ZBOOT_ROM_TEXT 0 +hex 'Compressed ROM boot loader BSS address' CONFIG_ZBOOT_ROM_BSS 0 + +comment 'At least one math emulation must be selected' +define_bool CONFIG_FPE_NWFPE y +choice 'Kernel core (/proc/kcore) format' \ + "ELF CONFIG_KCORE_ELF \ + A.OUT CONFIG_KCORE_AOUT" ELF +tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT +tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +string 'Default kernel command string' CONFIG_CMDLINE "" + +define_bool CONFIG_ALIGNMENT_TRAP n +endmenu + +source drivers/parport/Config.in +source drivers/pnp/Config.in +source drivers/block/Config.in +source drivers/md/Config.in +source drivers/acorn/block/Config.in + +if [ "$CONFIG_NET" = "y" ]; then + source net/Config.in + + mainmenu_option next_comment + comment 'Network device support' + + bool 'Network device support' CONFIG_NETDEVICES + if [ "$CONFIG_NETDEVICES" = "y" ]; then + source drivers/net/Config.in + fi + endmenu +fi + +mainmenu_option next_comment +comment 'ATA/ATAPI/MFM/RLL support' + +tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE + +if [ "$CONFIG_IDE" != "n" ]; then + source drivers/ide/Config.in +else + define_bool CONFIG_BLK_DEV_HD n +fi +endmenu + +mainmenu_option next_comment +comment 'SCSI support' + +tristate 'SCSI support' CONFIG_SCSI +endmenu + +source drivers/isdn/Config.in + +# +# input before char - char/joystick depends on it. As does USB. +# +source drivers/input/Config.in + +source drivers/char/Config.in +if [ "$CONFIG_BUSMOUSE" = "y" ]; then + define_bool CONFIG_KBDMOUSE y +fi + +source drivers/media/Config.in + +source fs/Config.in + +if [ "$CONFIG_VT" = "y" ]; then + mainmenu_option next_comment + comment 'Console drivers' + source drivers/video/Config.in + endmenu +fi + +mainmenu_option next_comment +comment 'Sound' + +tristate 'Sound card support' CONFIG_SOUND +if [ "$CONFIG_SOUND" != "n" ]; then + source sound/Config.in +fi +endmenu + +source drivers/misc/Config.in +source drivers/usb/Config.in + +mainmenu_option next_comment +comment 'Kernel hacking' + +# Always compile kernel with framepointer (until 2.4 real comes out) +# Bug reports aren't much use without this. +bool 'Compile kernel without frame pointer' CONFIG_NO_FRAME_POINTER +bool 'Verbose user fault messages' CONFIG_DEBUG_USER +bool 'Include debugging information in kernel binary' CONFIG_DEBUG_INFO + +bool 'Kernel debugging' CONFIG_DEBUG_KERNEL +dep_bool ' Debug memory allocations' CONFIG_DEBUG_SLAB $CONFIG_DEBUG_KERNEL +dep_bool ' Magic SysRq key' CONFIG_MAGIC_SYSRQ $CONFIG_DEBUG_KERNEL +dep_bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK $CONFIG_DEBUG_KERNEL +dep_bool ' Wait queue debugging' CONFIG_DEBUG_WAITQ $CONFIG_DEBUG_KERNEL +dep_bool ' Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE $CONFIG_DEBUG_KERNEL +dep_bool ' Verbose kernel error messages' CONFIG_DEBUG_ERRORS $CONFIG_DEBUG_KERNEL +# These options are only for real kernel hackers who want to get their hands dirty. +dep_bool ' Kernel low-level debugging functions' CONFIG_DEBUG_LL $CONFIG_DEBUG_KERNEL +endmenu + +source security/Config.in +source lib/Config.in diff -Nru a/arch/arm26/defconfig b/arch/arm26/defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/defconfig Fri Jun 13 01:07:45 2003 @@ -0,0 +1,367 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +# CONFIG_GENERIC_BUST_SPINLOCK is not set +# CONFIG_GENERIC_ISA_DMA is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# General setup +# +# CONFIG_NET is not set +# CONFIG_SYSVIPC is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_SYSCTL is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# System Type +# +CONFIG_ARCH_ARC=y +# CONFIG_ARCH_A5K is not set +CONFIG_ARCH_ACORN=y +# CONFIG_CPU_32 is not set +CONFIG_CPU_26=y +# CONFIG_PAGESIZE_16 is not set + +# +# General setup +# +CONFIG_FIQ=y +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_FPE_NWFPE=y +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_ELF is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_CMDLINE="" +# CONFIG_ALIGNMENT_TRAP is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set +# CONFIG_PNPBIOS is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Acorn-specific block devices +# +# CONFIG_BLK_DEV_FD1772 is not set +# CONFIG_BLK_DEV_MFM is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# ISDN subsystem +# + +# +# Input device support +# +# CONFIG_INPUT is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_TSLIBDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set +# CONFIG_INPUT_UINPUT is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_GAMEPORT_NS558 is not set +# CONFIG_GAMEPORT_L4 is not set +# CONFIG_GAMEPORT_EMU10K1 is not set +# CONFIG_GAMEPORT_VORTEX is not set +# CONFIG_GAMEPORT_FM801 is not set +# CONFIG_GAMEPORT_CS461x is not set +# CONFIG_SERIO is not set +# CONFIG_SERIO_I8042 is not set +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_ACORN is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set +# CONFIG_SERIAL_8250_CONSOLE is not set +# CONFIG_SERIAL_8250_CS is not set +# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250_MANY_PORTS is not set +# CONFIG_SERIAL_8250_SHARE_IRQ is not set +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_MULTIPORT is not set +# CONFIG_SERIAL_8250_RSA is not set +# CONFIG_ATOMWIDE_SERIAL is not set +# CONFIG_DUALSP_SERIAL is not set +# CONFIG_SERIAL_ANAKIN is not set +# CONFIG_SERIAL_ANAKIN_CONSOLE is not set +# CONFIG_SERIAL_AMBA is not set +# CONFIG_SERIAL_AMBA_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X is not set +# CONFIG_SERIAL_CLPS711X_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X_OLD_NAME is not set +# CONFIG_SERIAL_21285 is not set +# CONFIG_SERIAL_21285_OLD is not set +# CONFIG_SERIAL_21285_CONSOLE is not set +# CONFIG_SERIAL_UART00 is not set +# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_SA1100 is not set +# CONFIG_SERIAL_SA1100_CONSOLE is not set +# CONFIG_UNIX98_PTYS is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_PHILIPSPAR is not set +# CONFIG_I2C_ELV is not set +# CONFIG_I2C_VELLEMAN is not set +CONFIG_I2C_ALGOPCF=y +# CONFIG_I2C_ELEKTOR is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_PROC is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set +# CONFIG_L3_ALGOBIT is not set +# CONFIG_L3_BIT_SA1100_GPIO is not set +# CONFIG_L3_SA1111 is not set +# CONFIG_BIT_SA1100_GPIO is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_PSMOUSE is not set +# CONFIG_QIC02_TAPE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_DEBUG is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_SMB_FS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +CONFIG_ACORN_PARTITION=y +# CONFIG_ACORN_PARTITION_EESOX is not set +# CONFIG_ACORN_PARTITION_ICS is not set +CONFIG_ACORN_PARTITION_ADFS=y +# CONFIG_ACORN_PARTITION_POWERTEC is not set +CONFIG_ACORN_PARTITION_RISCIX=y +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +# CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set +# CONFIG_MCP_SA1100 is not set +# CONFIG_MCP_UCB1200 is not set +# CONFIG_MCP_UCB1200_AUDIO is not set +# CONFIG_MCP_UCB1200_TS is not set + +# +# Console Switches +# +# CONFIG_SWITCHES is not set +# CONFIG_SWITCHES_SA1100 is not set +# CONFIG_SWITCHES_UCB1X00 is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# Kernel hacking +# +# CONFIG_NO_FRAME_POINTER is not set +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_SLAB=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_WAITQ=y +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y + +# +# Security options +# +CONFIG_SECURITY_CAPABILITIES=y + +# +# Library routines +# +CONFIG_CRC32=y +# CONFIG_ZLIB_INFLATE is not set +# CONFIG_ZLIB_DEFLATE is not set diff -Nru a/arch/arm26/kernel/Makefile b/arch/arm26/kernel/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,18 @@ +# +# Makefile for the linux kernel. +# + +ENTRY_OBJ = entry.o + +# Object file lists. + +obj-y := arch.o compat.o dma.o entry.o irq.o \ + process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \ + time.o traps.o ecard.o time-acorn.o dma.o \ + ecard.o fiq.o time.o + +obj-$(CONFIG_FIQ) += fiq.o +obj-$(CONFIG_MODULES) += armksyms.o + +extra-y := init_task.o + diff -Nru a/arch/arm26/kernel/arch.c b/arch/arm26/kernel/arch.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/arch.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,30 @@ +/* + * linux/arch/arm/kernel/arch.c + * + * Architecture specific fixups. + */ +#include +#include +#include + +#include +#include +#include +#include +#include + +unsigned int vram_size; + + +unsigned int memc_ctrl_reg; +unsigned int number_mfm_drives; + +static int __init parse_tag_acorn(const struct tag *tag) +{ + memc_ctrl_reg = tag->u.acorn.memc_control_reg; + number_mfm_drives = tag->u.acorn.adfsdrives; + return 0; +} + +__tagtable(ATAG_ACORN, parse_tag_acorn); + diff -Nru a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/armksyms.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,233 @@ +/* + * linux/arch/arm26/kernel/armksyms.c + * + * Copyright (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include + +extern void dump_thread(struct pt_regs *, struct user *); +extern int dump_fpu(struct pt_regs *, struct user_fp_struct *); +extern void inswb(unsigned int port, void *to, int len); +extern void outswb(unsigned int port, const void *to, int len); + +extern void __bad_xchg(volatile void *ptr, int size); + +/* + * syscalls + */ +extern int sys_write(int, const char *, int); +extern int sys_read(int, char *, int); +extern int sys_lseek(int, off_t, int); +extern int sys_exit(int); + +/* + * libgcc functions - functions that are used internally by the + * compiler... (prototypes are not correct though, but that + * doesn't really matter since they're not versioned). + */ +extern void __ashldi3(void); +extern void __ashrdi3(void); +extern void __divsi3(void); +extern void __lshrdi3(void); +extern void __modsi3(void); +extern void __muldi3(void); +extern void __ucmpdi2(void); +extern void __udivdi3(void); +extern void __umoddi3(void); +extern void __udivmoddi4(void); +extern void __udivsi3(void); +extern void __umodsi3(void); +extern void abort(void); + +extern void ret_from_exception(void); +extern void fpundefinstr(void); +extern void fp_enter(void); + +/* + * This has a special calling convention; it doesn't + * modify any of the usual registers, except for LR. + */ +extern void __do_softirq(void); + +#define EXPORT_SYMBOL_ALIAS(sym,orig) \ + const char __kstrtab_##sym[] \ + __attribute__((section(".kstrtab"))) = \ + __MODULE_STRING(sym); \ + const struct module_symbol __ksymtab_##sym \ + __attribute__((section("__ksymtab"))) = \ + { (unsigned long)&orig, __kstrtab_##sym }; + +/* + * floating point math emulator support. + * These symbols will never change their calling convention... + */ +EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter); +EXPORT_SYMBOL_ALIAS(fp_printk,printk); +EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig); + +EXPORT_SYMBOL(fpundefinstr); +EXPORT_SYMBOL(ret_from_exception); + +#ifdef CONFIG_VT +EXPORT_SYMBOL(kd_mksound); +#endif + +EXPORT_SYMBOL_NOVERS(__do_softirq); + + /* platform dependent support */ +EXPORT_SYMBOL(dump_thread); +EXPORT_SYMBOL(dump_fpu); +EXPORT_SYMBOL(udelay); +EXPORT_SYMBOL(kernel_thread); +EXPORT_SYMBOL(system_rev); +EXPORT_SYMBOL(system_serial_low); +EXPORT_SYMBOL(system_serial_high); +#ifdef CONFIG_DEBUG_BUGVERBOSE +EXPORT_SYMBOL(__bug); +#endif +EXPORT_SYMBOL(__bad_xchg); +EXPORT_SYMBOL(__readwrite_bug); +EXPORT_SYMBOL(enable_irq); +EXPORT_SYMBOL(disable_irq); +EXPORT_SYMBOL(set_irq_type); +EXPORT_SYMBOL(pm_idle); +EXPORT_SYMBOL(pm_power_off); + + /* processor dependencies */ +EXPORT_SYMBOL(__machine_arch_type); + + /* networking */ +EXPORT_SYMBOL(csum_partial_copy_nocheck); +EXPORT_SYMBOL(__csum_ipv6_magic); + + /* io */ +#ifndef __raw_readsb +EXPORT_SYMBOL_NOVERS(__raw_readsb); +#endif +#ifndef __raw_readsw +EXPORT_SYMBOL_NOVERS(__raw_readsw); +#endif +#ifndef __raw_readsl +EXPORT_SYMBOL_NOVERS(__raw_readsl); +#endif +#ifndef __raw_writesb +EXPORT_SYMBOL_NOVERS(__raw_writesb); +#endif +#ifndef __raw_writesw +EXPORT_SYMBOL_NOVERS(__raw_writesw); +#endif +#ifndef __raw_writesl +EXPORT_SYMBOL_NOVERS(__raw_writesl); +#endif + + /* string / mem functions */ +EXPORT_SYMBOL_NOVERS(strcpy); +EXPORT_SYMBOL_NOVERS(strncpy); +EXPORT_SYMBOL_NOVERS(strcat); +EXPORT_SYMBOL_NOVERS(strncat); +EXPORT_SYMBOL_NOVERS(strcmp); +EXPORT_SYMBOL_NOVERS(strncmp); +EXPORT_SYMBOL_NOVERS(strchr); +EXPORT_SYMBOL_NOVERS(strlen); +EXPORT_SYMBOL_NOVERS(strnlen); +EXPORT_SYMBOL_NOVERS(strpbrk); +EXPORT_SYMBOL_NOVERS(strrchr); +EXPORT_SYMBOL_NOVERS(strstr); +EXPORT_SYMBOL_NOVERS(memset); +EXPORT_SYMBOL_NOVERS(memcpy); +EXPORT_SYMBOL_NOVERS(memmove); +EXPORT_SYMBOL_NOVERS(memcmp); +EXPORT_SYMBOL_NOVERS(memscan); +EXPORT_SYMBOL_NOVERS(__memzero); + + /* user mem (segment) */ +EXPORT_SYMBOL(uaccess_kernel); +EXPORT_SYMBOL(uaccess_user); + +EXPORT_SYMBOL_NOVERS(__get_user_1); +EXPORT_SYMBOL_NOVERS(__get_user_2); +EXPORT_SYMBOL_NOVERS(__get_user_4); +EXPORT_SYMBOL_NOVERS(__get_user_8); + +EXPORT_SYMBOL_NOVERS(__put_user_1); +EXPORT_SYMBOL_NOVERS(__put_user_2); +EXPORT_SYMBOL_NOVERS(__put_user_4); +EXPORT_SYMBOL_NOVERS(__put_user_8); + + /* gcc lib functions */ +EXPORT_SYMBOL_NOVERS(__ashldi3); +EXPORT_SYMBOL_NOVERS(__ashrdi3); +EXPORT_SYMBOL_NOVERS(__divsi3); +EXPORT_SYMBOL_NOVERS(__lshrdi3); +EXPORT_SYMBOL_NOVERS(__modsi3); +EXPORT_SYMBOL_NOVERS(__muldi3); +EXPORT_SYMBOL_NOVERS(__ucmpdi2); +EXPORT_SYMBOL_NOVERS(__udivdi3); +EXPORT_SYMBOL_NOVERS(__umoddi3); +EXPORT_SYMBOL_NOVERS(__udivmoddi4); +EXPORT_SYMBOL_NOVERS(__udivsi3); +EXPORT_SYMBOL_NOVERS(__umodsi3); + + /* bitops */ +EXPORT_SYMBOL(_set_bit_le); +EXPORT_SYMBOL(_test_and_set_bit_le); +EXPORT_SYMBOL(_clear_bit_le); +EXPORT_SYMBOL(_test_and_clear_bit_le); +EXPORT_SYMBOL(_change_bit_le); +EXPORT_SYMBOL(_test_and_change_bit_le); +EXPORT_SYMBOL(_find_first_zero_bit_le); +EXPORT_SYMBOL(_find_next_zero_bit_le); + + /* elf */ +EXPORT_SYMBOL(elf_platform); +EXPORT_SYMBOL(elf_hwcap); + + /* syscalls */ +EXPORT_SYMBOL(sys_write); +EXPORT_SYMBOL(sys_read); +EXPORT_SYMBOL(sys_lseek); +EXPORT_SYMBOL(sys_open); +EXPORT_SYMBOL(sys_exit); +EXPORT_SYMBOL(sys_wait4); + + /* semaphores */ +EXPORT_SYMBOL_NOVERS(__down_failed); +EXPORT_SYMBOL_NOVERS(__down_interruptible_failed); +EXPORT_SYMBOL_NOVERS(__down_trylock_failed); +EXPORT_SYMBOL_NOVERS(__up_wakeup); + +EXPORT_SYMBOL(get_wchan); + +#ifdef CONFIG_PREEMPT +EXPORT_SYMBOL(kernel_flag); +#endif diff -Nru a/arch/arm26/kernel/asm-offsets.c b/arch/arm26/kernel/asm-offsets.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/asm-offsets.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,64 @@ +/* + * Copyright (C) 1995-2001 Russell King + * 2001-2002 Keith Owens + * 2003-? Ian Molton + * + * Generate definitions needed by assembly language modules. + * This code generates raw asm output which is post-processed to extract + * and format the required data. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include + +/* + * Make sure that the compiler and target are compatible. + */ +#if defined(__APCS_32__) && defined(CONFIG_CPU_26) +#error Sorry, your compiler targets APCS-32 but this kernel requires APCS-26 +#endif +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 95) +#error Sorry, your compiler is known to miscompile kernels. Only use gcc 2.95.3 and later. +#endif +#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 +/* shame we can't detect the .1 or .2 releases */ +#warning GCC 2.95.2 and earlier miscompiles kernels. +#endif + +/* Use marker if you need to separate the values later */ + +#define DEFINE(sym, val) \ + asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + +#define BLANK() asm volatile("\n->" : : ) + +int main(void) +{ + DEFINE(TSK_USED_MATH, offsetof(struct task_struct, used_math)); + DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); + BLANK(); + DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm)); + DEFINE(VMA_VM_FLAGS, offsetof(struct vm_area_struct, vm_flags)); + BLANK(); + DEFINE(VM_EXEC, VM_EXEC); + BLANK(); + BLANK(); + DEFINE(PAGE_PRESENT, _PAGE_PRESENT); + DEFINE(PAGE_READONLY, _PAGE_READONLY); + DEFINE(PAGE_NOT_USER, _PAGE_NOT_USER); + DEFINE(PAGE_OLD, _PAGE_OLD); + DEFINE(PAGE_CLEAN, _PAGE_CLEAN); + BLANK(); + DEFINE(PAGE_SZ, PAGE_SIZE); + BLANK(); + DEFINE(SYS_ERROR0, 0x9f0000); + return 0; +} diff -Nru a/arch/arm26/kernel/compat.c b/arch/arm26/kernel/compat.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/compat.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,174 @@ +/* + * linux/arch/arm/kernel/compat.c + * + * Copyright (C) 2001 Russell King + * 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * We keep the old params compatibility cruft in one place (here) + * so we don't end up with lots of mess around other places. + * + * NOTE: + * The old struct param_struct is deprecated, but it will be kept in + * the kernel for 5 years from now (2001). This will allow boot loaders + * to convert to the new struct tag way. + */ +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +//#include + +/* + * Usage: + * - do not go blindly adding fields, add them at the end + * - when adding fields, don't rely on the address until + * a patch from me has been released + * - unused fields should be zero (for future expansion) + * - this structure is relatively short-lived - only + * guaranteed to contain useful data in setup_arch() + * + * This is the old deprecated way to pass parameters to the kernel + */ +struct param_struct { + union { + struct { + unsigned long page_size; /* 0 */ + unsigned long nr_pages; /* 4 */ + unsigned long ramdisk_size; /* 8 */ + unsigned long flags; /* 12 */ +#define FLAG_READONLY 1 +#define FLAG_RDLOAD 4 +#define FLAG_RDPROMPT 8 + unsigned long rootdev; /* 16 */ + unsigned long video_num_cols; /* 20 */ + unsigned long video_num_rows; /* 24 */ + unsigned long video_x; /* 28 */ + unsigned long video_y; /* 32 */ + unsigned long memc_control_reg; /* 36 */ + unsigned char sounddefault; /* 40 */ + unsigned char adfsdrives; /* 41 */ + unsigned char bytes_per_char_h; /* 42 */ + unsigned char bytes_per_char_v; /* 43 */ + unsigned long pages_in_bank[4]; /* 44 */ + unsigned long pages_in_vram; /* 60 */ + unsigned long initrd_start; /* 64 */ + unsigned long initrd_size; /* 68 */ + unsigned long rd_start; /* 72 */ + unsigned long system_rev; /* 76 */ + unsigned long system_serial_low; /* 80 */ + unsigned long system_serial_high; /* 84 */ + unsigned long mem_fclk_21285; /* 88 */ + } s; + char unused[256]; + } u1; + union { + char paths[8][128]; + struct { + unsigned long magic; + char n[1024 - sizeof(unsigned long)]; + } s; + } u2; + char commandline[COMMAND_LINE_SIZE]; +}; + +static struct tag * __init memtag(struct tag *tag, unsigned long start, unsigned long size) +{ + tag = tag_next(tag); + tag->hdr.tag = ATAG_MEM; + tag->hdr.size = tag_size(tag_mem32); + tag->u.mem.size = size; + tag->u.mem.start = start; + + return tag; +} + +static void __init build_tag_list(struct param_struct *params, void *taglist) +{ + struct tag *tag = taglist; + + if (params->u1.s.page_size != PAGE_SIZE) { + printk(KERN_WARNING "Warning: bad configuration page, " + "trying to continue\n"); + return; + } + + printk(KERN_DEBUG "Converting old-style param struct to taglist\n"); + + tag->hdr.tag = ATAG_CORE; + tag->hdr.size = tag_size(tag_core); + tag->u.core.flags = params->u1.s.flags & FLAG_READONLY; + tag->u.core.pagesize = params->u1.s.page_size; + tag->u.core.rootdev = params->u1.s.rootdev; + + tag = tag_next(tag); + tag->hdr.tag = ATAG_RAMDISK; + tag->hdr.size = tag_size(tag_ramdisk); + tag->u.ramdisk.flags = (params->u1.s.flags & FLAG_RDLOAD ? 1 : 0) | + (params->u1.s.flags & FLAG_RDPROMPT ? 2 : 0); + tag->u.ramdisk.size = params->u1.s.ramdisk_size; + tag->u.ramdisk.start = params->u1.s.rd_start; + + tag = tag_next(tag); + tag->hdr.tag = ATAG_INITRD; + tag->hdr.size = tag_size(tag_initrd); + tag->u.initrd.start = params->u1.s.initrd_start; + tag->u.initrd.size = params->u1.s.initrd_size; + + tag = tag_next(tag); + tag->hdr.tag = ATAG_SERIAL; + tag->hdr.size = tag_size(tag_serialnr); + tag->u.serialnr.low = params->u1.s.system_serial_low; + tag->u.serialnr.high = params->u1.s.system_serial_high; + + tag = tag_next(tag); + tag->hdr.tag = ATAG_REVISION; + tag->hdr.size = tag_size(tag_revision); + tag->u.revision.rev = params->u1.s.system_rev; + + tag = memtag(tag, PHYS_OFFSET, params->u1.s.nr_pages * PAGE_SIZE); + + tag = tag_next(tag); + tag->hdr.tag = ATAG_ACORN; + tag->hdr.size = tag_size(tag_acorn); + tag->u.acorn.memc_control_reg = params->u1.s.memc_control_reg; + tag->u.acorn.vram_pages = params->u1.s.pages_in_vram; + tag->u.acorn.sounddefault = params->u1.s.sounddefault; + tag->u.acorn.adfsdrives = params->u1.s.adfsdrives; + + tag = tag_next(tag); + tag->hdr.tag = ATAG_CMDLINE; + tag->hdr.size = (strlen(params->commandline) + 3 + + sizeof(struct tag_header)) >> 2; + strcpy(tag->u.cmdline.cmdline, params->commandline); + + tag = tag_next(tag); + tag->hdr.tag = ATAG_NONE; + tag->hdr.size = 0; + + memmove(params, taglist, ((int)tag) - ((int)taglist) + + sizeof(struct tag_header)); +} + +void __init convert_to_tag_list(struct tag *tags) +{ + struct param_struct *params = (struct param_struct *)tags; + build_tag_list(params, ¶ms->u2); +} + +void __init squash_mem_tags(struct tag *tag) +{ + for (; tag->hdr.size; tag = tag_next(tag)) + if (tag->hdr.tag == ATAG_MEM) + tag->hdr.tag = ATAG_NONE; +} diff -Nru a/arch/arm26/kernel/dma.c b/arch/arm26/kernel/dma.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/dma.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,302 @@ +/* + * linux/arch/arm/kernel/dma.c + * + * Copyright (C) 1995-2000 Russell King + * 2003-? Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Front-end to the DMA handling. This handles the allocation/freeing + * of DMA channels, and provides a unified interface to the machines + * DMA facilities. + */ +#include +#include +#include +#include +#include +#include +#include + +#include + +spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED; + +#if MAX_DMA_CHANNELS > 0 + +static dma_t dma_chan[MAX_DMA_CHANNELS]; + +/* + * Get dma list for /proc/dma + */ +int get_dma_list(char *buf) +{ + dma_t *dma; + char *p = buf; + int i; + + for (i = 0, dma = dma_chan; i < MAX_DMA_CHANNELS; i++, dma++) + if (dma->lock) + p += sprintf(p, "%2d: %14s %s\n", i, + dma->d_ops->type, dma->device_id); + + return p - buf; +} + +/* + * Request DMA channel + * + * On certain platforms, we have to allocate an interrupt as well... + */ +int request_dma(dmach_t channel, const char *device_id) +{ + dma_t *dma = dma_chan + channel; + int ret; + + if (channel >= MAX_DMA_CHANNELS || !dma->d_ops) + goto bad_dma; + + if (xchg(&dma->lock, 1) != 0) + goto busy; + + dma->device_id = device_id; + dma->active = 0; + dma->invalid = 1; + + ret = 0; + if (dma->d_ops->request) + ret = dma->d_ops->request(channel, dma); + + if (ret) + xchg(&dma->lock, 0); + + return ret; + +bad_dma: + printk(KERN_ERR "dma: trying to allocate DMA%d\n", channel); + return -EINVAL; + +busy: + return -EBUSY; +} + +/* + * Free DMA channel + * + * On certain platforms, we have to free interrupt as well... + */ +void free_dma(dmach_t channel) +{ + dma_t *dma = dma_chan + channel; + + if (channel >= MAX_DMA_CHANNELS || !dma->d_ops) + goto bad_dma; + + if (dma->active) { + printk(KERN_ERR "dma%d: freeing active DMA\n", channel); + dma->d_ops->disable(channel, dma); + dma->active = 0; + } + + if (xchg(&dma->lock, 0) != 0) { + if (dma->d_ops->free) + dma->d_ops->free(channel, dma); + return; + } + + printk(KERN_ERR "dma%d: trying to free free DMA\n", channel); + return; + +bad_dma: + printk(KERN_ERR "dma: trying to free DMA%d\n", channel); +} + +/* Set DMA Scatter-Gather list + */ +void set_dma_sg (dmach_t channel, struct scatterlist *sg, int nr_sg) +{ + dma_t *dma = dma_chan + channel; + + if (dma->active) + printk(KERN_ERR "dma%d: altering DMA SG while " + "DMA active\n", channel); + + dma->sg = sg; + dma->sgcount = nr_sg; + dma->using_sg = 1; + dma->invalid = 1; +} + +/* Set DMA address + * + * Copy address to the structure, and set the invalid bit + */ +void set_dma_addr (dmach_t channel, unsigned long physaddr) +{ + dma_t *dma = dma_chan + channel; + + if (dma->active) + printk(KERN_ERR "dma%d: altering DMA address while " + "DMA active\n", channel); + + dma->sg = &dma->buf; + dma->sgcount = 1; + dma->buf.__address = (char *)physaddr;//FIXME - not pretty + dma->using_sg = 0; + dma->invalid = 1; +} + +/* Set DMA byte count + * + * Copy address to the structure, and set the invalid bit + */ +void set_dma_count (dmach_t channel, unsigned long count) +{ + dma_t *dma = dma_chan + channel; + + if (dma->active) + printk(KERN_ERR "dma%d: altering DMA count while " + "DMA active\n", channel); + + dma->sg = &dma->buf; + dma->sgcount = 1; + dma->buf.length = count; + dma->using_sg = 0; + dma->invalid = 1; +} + +/* Set DMA direction mode + */ +void set_dma_mode (dmach_t channel, dmamode_t mode) +{ + dma_t *dma = dma_chan + channel; + + if (dma->active) + printk(KERN_ERR "dma%d: altering DMA mode while " + "DMA active\n", channel); + + dma->dma_mode = mode; + dma->invalid = 1; +} + +/* Enable DMA channel + */ +void enable_dma (dmach_t channel) +{ + dma_t *dma = dma_chan + channel; + + if (!dma->lock) + goto free_dma; + + if (dma->active == 0) { + dma->active = 1; + dma->d_ops->enable(channel, dma); + } + return; + +free_dma: + printk(KERN_ERR "dma%d: trying to enable free DMA\n", channel); + BUG(); +} + +/* Disable DMA channel + */ +void disable_dma (dmach_t channel) +{ + dma_t *dma = dma_chan + channel; + + if (!dma->lock) + goto free_dma; + + if (dma->active == 1) { + dma->active = 0; + dma->d_ops->disable(channel, dma); + } + return; + +free_dma: + printk(KERN_ERR "dma%d: trying to disable free DMA\n", channel); + BUG(); +} + +/* + * Is the specified DMA channel active? + */ +int dma_channel_active(dmach_t channel) +{ + return dma_chan[channel].active; +} + +void set_dma_page(dmach_t channel, char pagenr) +{ + printk(KERN_ERR "dma%d: trying to set_dma_page\n", channel); +} + +void set_dma_speed(dmach_t channel, int cycle_ns) +{ + dma_t *dma = dma_chan + channel; + int ret = 0; + + if (dma->d_ops->setspeed) + ret = dma->d_ops->setspeed(channel, dma, cycle_ns); + dma->speed = ret; +} + +int get_dma_residue(dmach_t channel) +{ + dma_t *dma = dma_chan + channel; + int ret = 0; + + if (dma->d_ops->residue) + ret = dma->d_ops->residue(channel, dma); + + return ret; +} + +void __init init_dma(void) +{ + arch_dma_init(dma_chan); +} + +#else + +int request_dma(dmach_t channel, const char *device_id) +{ + return -EINVAL; +} + +int get_dma_residue(dmach_t channel) +{ + return 0; +} + +#define GLOBAL_ALIAS(_a,_b) asm (".set " #_a "," #_b "; .globl " #_a) +GLOBAL_ALIAS(disable_dma, get_dma_residue); +GLOBAL_ALIAS(enable_dma, get_dma_residue); +GLOBAL_ALIAS(free_dma, get_dma_residue); +GLOBAL_ALIAS(get_dma_list, get_dma_residue); +GLOBAL_ALIAS(set_dma_mode, get_dma_residue); +GLOBAL_ALIAS(set_dma_page, get_dma_residue); +GLOBAL_ALIAS(set_dma_count, get_dma_residue); +GLOBAL_ALIAS(set_dma_addr, get_dma_residue); +GLOBAL_ALIAS(set_dma_sg, get_dma_residue); +GLOBAL_ALIAS(set_dma_speed, get_dma_residue); +GLOBAL_ALIAS(init_dma, get_dma_residue); + +#endif + +EXPORT_SYMBOL(request_dma); +EXPORT_SYMBOL(free_dma); +EXPORT_SYMBOL(enable_dma); +EXPORT_SYMBOL(disable_dma); +EXPORT_SYMBOL(set_dma_addr); +EXPORT_SYMBOL(set_dma_count); +EXPORT_SYMBOL(set_dma_mode); +EXPORT_SYMBOL(set_dma_page); +EXPORT_SYMBOL(get_dma_residue); +EXPORT_SYMBOL(set_dma_sg); +EXPORT_SYMBOL(set_dma_speed); + +EXPORT_SYMBOL(dma_spin_lock); diff -Nru a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/ecard.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,899 @@ +/* + * linux/arch/arm26/kernel/ecard.c + * + * Copyright 1995-2001 Russell King + * Copyright 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Find all installed expansion cards, and handle interrupts from them. + * + * Created from information from Acorns RiscOS3 PRMs + * + * 08-Dec-1996 RMK Added code for the 9'th expansion card - the ether + * podule slot. + * 06-May-1997 RMK Added blacklist for cards whose loader doesn't work. + * 12-Sep-1997 RMK Created new handling of interrupt enables/disables + * - cards can now register their own routine to control + * interrupts (recommended). + * 29-Sep-1997 RMK Expansion card interrupt hardware not being re-enabled + * on reset from Linux. (Caused cards not to respond + * under RiscOS without hard reset). + * 15-Feb-1998 RMK Added DMA support + * 12-Sep-1998 RMK Added EASI support + * 10-Jan-1999 RMK Run loaders in a simulated RISC OS environment. + * 17-Apr-1999 RMK Support for EASI Type C cycles. + */ +#define ECARD_C + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum req { + req_readbytes, + req_reset +}; + +struct ecard_request { + enum req req; + ecard_t *ec; + unsigned int address; + unsigned int length; + unsigned int use_loader; + void *buffer; +}; + +struct expcard_blacklist { + unsigned short manufacturer; + unsigned short product; + const char *type; +}; + +static ecard_t *cards; +static ecard_t *slot_to_expcard[MAX_ECARDS]; +static unsigned int ectcr; + +/* List of descriptions of cards which don't have an extended + * identification, or chunk directories containing a description. + */ +static struct expcard_blacklist __initdata blacklist[] = { + { MANU_ACORN, PROD_ACORN_ETHER1, "Acorn Ether1" } +}; + +asmlinkage extern int +ecard_loader_reset(volatile unsigned char *pa, loader_t loader); +asmlinkage extern int +ecard_loader_read(int off, volatile unsigned char *pa, loader_t loader); + +static const struct ecard_id * +ecard_match_device(const struct ecard_id *ids, struct expansion_card *ec); + +static inline unsigned short +ecard_getu16(unsigned char *v) +{ + return v[0] | v[1] << 8; +} + +static inline signed long +ecard_gets24(unsigned char *v) +{ + return v[0] | v[1] << 8 | v[2] << 16 | ((v[2] & 0x80) ? 0xff000000 : 0); +} + +static inline ecard_t * +slot_to_ecard(unsigned int slot) +{ + return slot < MAX_ECARDS ? slot_to_expcard[slot] : NULL; +} + +/* ===================== Expansion card daemon ======================== */ +/* + * Since the loader programs on the expansion cards need to be run + * in a specific environment, create a separate task with this + * environment up, and pass requests to this task as and when we + * need to. + * + * This should allow 99% of loaders to be called from Linux. + * + * From a security standpoint, we trust the card vendors. This + * may be a misplaced trust. + */ +#define BUS_ADDR(x) ((((unsigned long)(x)) << 2) + IO_BASE) +#define POD_INT_ADDR(x) ((volatile unsigned char *)\ + ((BUS_ADDR((x)) - IO_BASE) + IO_START)) + +static inline void ecard_task_reset(struct ecard_request *req) +{ + struct expansion_card *ec = req->ec; + if (ec->loader) + ecard_loader_reset(POD_INT_ADDR(ec->podaddr), ec->loader); +} + +static void +ecard_task_readbytes(struct ecard_request *req) +{ + unsigned char *buf = (unsigned char *)req->buffer; + volatile unsigned char *base_addr = + (volatile unsigned char *)POD_INT_ADDR(req->ec->podaddr); + unsigned int len = req->length; + unsigned int off = req->address; + + if (req->ec->slot_no == 8) { + /* + * The card maintains an index which increments the address + * into a 4096-byte page on each access. We need to keep + * track of the counter. + */ + static unsigned int index; + unsigned int page; + + page = (off >> 12) * 4; + if (page > 256 * 4) + return; + + off &= 4095; + + /* + * If we are reading offset 0, or our current index is + * greater than the offset, reset the hardware index counter. + */ + if (off == 0 || index > off) { + *base_addr = 0; + index = 0; + } + + /* + * Increment the hardware index counter until we get to the + * required offset. The read bytes are discarded. + */ + while (index < off) { + unsigned char byte; + byte = base_addr[page]; + index += 1; + } + + while (len--) { + *buf++ = base_addr[page]; + index += 1; + } + } else { + + if (!req->use_loader || !req->ec->loader) { + off *= 4; + while (len--) { + *buf++ = base_addr[off]; + off += 4; + } + } else { + while(len--) { + /* + * The following is required by some + * expansion card loader programs. + */ + *(unsigned long *)0x108 = 0; + *buf++ = ecard_loader_read(off++, base_addr, + req->ec->loader); + } + } + } + +} + +static void ecard_do_request(struct ecard_request *req) +{ + switch (req->req) { + case req_readbytes: + ecard_task_readbytes(req); + break; + + case req_reset: + ecard_task_reset(req); + break; + } +} + +/* + * On 26-bit processors, we don't need the kcardd thread to access the + * expansion card loaders. We do it directly. + */ +#define ecard_call(req) ecard_do_request(req) + +/* ======================= Mid-level card control ===================== */ + +static void +ecard_readbytes(void *addr, ecard_t *ec, int off, int len, int useld) +{ + struct ecard_request req; + + req.req = req_readbytes; + req.ec = ec; + req.address = off; + req.length = len; + req.use_loader = useld; + req.buffer = addr; + + ecard_call(&req); +} + +int ecard_readchunk(struct in_chunk_dir *cd, ecard_t *ec, int id, int num) +{ + struct ex_chunk_dir excd; + int index = 16; + int useld = 0; + + if (!ec->cid.cd) + return 0; + + while(1) { + ecard_readbytes(&excd, ec, index, 8, useld); + index += 8; + if (c_id(&excd) == 0) { + if (!useld && ec->loader) { + useld = 1; + index = 0; + continue; + } + return 0; + } + if (c_id(&excd) == 0xf0) { /* link */ + index = c_start(&excd); + continue; + } + if (c_id(&excd) == 0x80) { /* loader */ + if (!ec->loader) { + ec->loader = (loader_t)kmalloc(c_len(&excd), + GFP_KERNEL); + if (ec->loader) + ecard_readbytes(ec->loader, ec, + (int)c_start(&excd), + c_len(&excd), useld); + else + return 0; + } + continue; + } + if (c_id(&excd) == id && num-- == 0) + break; + } + + if (c_id(&excd) & 0x80) { + switch (c_id(&excd) & 0x70) { + case 0x70: + ecard_readbytes((unsigned char *)excd.d.string, ec, + (int)c_start(&excd), c_len(&excd), + useld); + break; + case 0x00: + break; + } + } + cd->start_offset = c_start(&excd); + memcpy(cd->d.string, excd.d.string, 256); + return 1; +} + +/* ======================= Interrupt control ============================ */ + +static void ecard_def_irq_enable(ecard_t *ec, int irqnr) +{ +} + +static void ecard_def_irq_disable(ecard_t *ec, int irqnr) +{ +} + +static int ecard_def_irq_pending(ecard_t *ec) +{ + return !ec->irqmask || ec->irqaddr[0] & ec->irqmask; +} + +static void ecard_def_fiq_enable(ecard_t *ec, int fiqnr) +{ + panic("ecard_def_fiq_enable called - impossible"); +} + +static void ecard_def_fiq_disable(ecard_t *ec, int fiqnr) +{ + panic("ecard_def_fiq_disable called - impossible"); +} + +static int ecard_def_fiq_pending(ecard_t *ec) +{ + return !ec->fiqmask || ec->fiqaddr[0] & ec->fiqmask; +} + +static expansioncard_ops_t ecard_default_ops = { + ecard_def_irq_enable, + ecard_def_irq_disable, + ecard_def_irq_pending, + ecard_def_fiq_enable, + ecard_def_fiq_disable, + ecard_def_fiq_pending +}; + +/* + * Enable and disable interrupts from expansion cards. + * (interrupts are disabled for these functions). + * + * They are not meant to be called directly, but via enable/disable_irq. + */ +static void ecard_irq_unmask(unsigned int irqnr) +{ + ecard_t *ec = slot_to_ecard(irqnr - 32); + + if (ec) { + if (!ec->ops) + ec->ops = &ecard_default_ops; + + if (ec->claimed && ec->ops->irqenable) + ec->ops->irqenable(ec, irqnr); + else + printk(KERN_ERR "ecard: rejecting request to " + "enable IRQs for %d\n", irqnr); + } +} + +static void ecard_irq_mask(unsigned int irqnr) +{ + ecard_t *ec = slot_to_ecard(irqnr - 32); + + if (ec) { + if (!ec->ops) + ec->ops = &ecard_default_ops; + + if (ec->ops && ec->ops->irqdisable) + ec->ops->irqdisable(ec, irqnr); + } +} + +static struct irqchip ecard_chip = { + .ack = ecard_irq_mask, + .mask = ecard_irq_mask, + .unmask = ecard_irq_unmask, +}; + +void ecard_enablefiq(unsigned int fiqnr) +{ + ecard_t *ec = slot_to_ecard(fiqnr); + + if (ec) { + if (!ec->ops) + ec->ops = &ecard_default_ops; + + if (ec->claimed && ec->ops->fiqenable) + ec->ops->fiqenable(ec, fiqnr); + else + printk(KERN_ERR "ecard: rejecting request to " + "enable FIQs for %d\n", fiqnr); + } +} + +void ecard_disablefiq(unsigned int fiqnr) +{ + ecard_t *ec = slot_to_ecard(fiqnr); + + if (ec) { + if (!ec->ops) + ec->ops = &ecard_default_ops; + + if (ec->ops->fiqdisable) + ec->ops->fiqdisable(ec, fiqnr); + } +} + +static void +ecard_dump_irq_state(ecard_t *ec) +{ + printk(" %d: %sclaimed, ", + ec->slot_no, + ec->claimed ? "" : "not "); + + if (ec->ops && ec->ops->irqpending && + ec->ops != &ecard_default_ops) + printk("irq %spending\n", + ec->ops->irqpending(ec) ? "" : "not "); + else + printk("irqaddr %p, mask = %02X, status = %02X\n", + ec->irqaddr, ec->irqmask, *ec->irqaddr); +} + +static void ecard_check_lockup(struct irqdesc *desc) +{ + static int last, lockup; + ecard_t *ec; + + /* + * If the timer interrupt has not run since the last million + * unrecognised expansion card interrupts, then there is + * something seriously wrong. Disable the expansion card + * interrupts so at least we can continue. + * + * Maybe we ought to start a timer to re-enable them some time + * later? + */ + if (last == jiffies) { + lockup += 1; + if (lockup > 1000000) { + printk(KERN_ERR "\nInterrupt lockup detected - " + "disabling all expansion card interrupts\n"); + + desc->chip->mask(IRQ_EXPANSIONCARD); + + printk("Expansion card IRQ state:\n"); + + for (ec = cards; ec; ec = ec->next) + ecard_dump_irq_state(ec); + } + } else + lockup = 0; + + /* + * If we did not recognise the source of this interrupt, + * warn the user, but don't flood the user with these messages. + */ + if (!last || time_after(jiffies, (unsigned long)(last + 5*HZ))) { + last = jiffies; + printk(KERN_WARNING "Unrecognised interrupt from backplane\n"); + } +} + +static void +ecard_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + ecard_t *ec; + int called = 0; + + desc->chip->mask(irq); + for (ec = cards; ec; ec = ec->next) { + int pending; + + if (!ec->claimed || ec->irq == NO_IRQ || ec->slot_no == 8) + continue; + + if (ec->ops && ec->ops->irqpending) + pending = ec->ops->irqpending(ec); + else + pending = ecard_default_ops.irqpending(ec); + + if (pending) { + struct irqdesc *d = irq_desc + ec->irq; + d->handle(ec->irq, d, regs); + called ++; + } + } + desc->chip->unmask(irq); + + if (called == 0) + ecard_check_lockup(desc); +} + +#define ecard_irqexp_handler NULL +#define ecard_probeirqhw() (0) + +unsigned int ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) +{ + unsigned long address = 0; + int slot = ec->slot_no; + + if (ec->slot_no == 8) + return 0; + + ectcr &= ~(1 << slot); + + switch (type) { + case ECARD_MEMC: + if (slot < 4) + address = IO_EC_MEMC_BASE + (slot << 12); + break; + + case ECARD_IOC: + if (slot < 4) + address = IO_EC_IOC_BASE + (slot << 12); + if (address) + address += speed << 17; + break; + + default: + break; + } + + return address; +} + +static int ecard_prints(char *buffer, ecard_t *ec) +{ + char *start = buffer; + + buffer += sprintf(buffer, " %d: %s ", ec->slot_no, + ec->type == ECARD_EASI ? "EASI" : " "); + + if (ec->cid.id == 0) { + struct in_chunk_dir incd; + + buffer += sprintf(buffer, "[%04X:%04X] ", + ec->cid.manufacturer, ec->cid.product); + + if (!ec->card_desc && ec->cid.cd && + ecard_readchunk(&incd, ec, 0xf5, 0)) { + ec->card_desc = kmalloc(strlen(incd.d.string)+1, GFP_KERNEL); + + if (ec->card_desc) + strcpy((char *)ec->card_desc, incd.d.string); + } + + buffer += sprintf(buffer, "%s\n", ec->card_desc ? ec->card_desc : "*unknown*"); + } else + buffer += sprintf(buffer, "Simple card %d\n", ec->cid.id); + + return buffer - start; +} + +static int get_ecard_dev_info(char *buf, char **start, off_t pos, int count) +{ + ecard_t *ec = cards; + off_t at = 0; + int len, cnt; + + cnt = 0; + while (ec && count > cnt) { + len = ecard_prints(buf, ec); + at += len; + if (at >= pos) { + if (!*start) { + *start = buf + (pos - (at - len)); + cnt = at - pos; + } else + cnt += len; + buf += len; + } + ec = ec->next; + } + return (count > cnt) ? cnt : count; +} + +static struct proc_dir_entry *proc_bus_ecard_dir = NULL; + +static void ecard_proc_init(void) +{ + proc_bus_ecard_dir = proc_mkdir("ecard", proc_bus); + create_proc_info_entry("devices", 0, proc_bus_ecard_dir, + get_ecard_dev_info); +} + +#define ec_set_resource(ec,nr,st,sz,flg) \ + do { \ + (ec)->resource[nr].name = ec->dev.name; \ + (ec)->resource[nr].start = st; \ + (ec)->resource[nr].end = (st) + (sz) - 1; \ + (ec)->resource[nr].flags = flg; \ + } while (0) + +static void __init ecard_init_resources(struct expansion_card *ec) +{ + unsigned long base = PODSLOT_IOC0_BASE; + unsigned int slot = ec->slot_no; + int i; + + if (slot < 4) { + ec_set_resource(ec, ECARD_RES_MEMC, + PODSLOT_MEMC_BASE + (slot << 14), + PODSLOT_MEMC_SIZE, IORESOURCE_MEM); + } + + for (i = 0; i < ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) { + ec_set_resource(ec, i + ECARD_RES_IOCSLOW, + base + (slot << 14) + (i << 19), + PODSLOT_IOC_SIZE, IORESOURCE_MEM); + } + + for (i = 0; i < ECARD_NUM_RESOURCES; i++) { + if (ec->resource[i].start && + request_resource(&iomem_resource, &ec->resource[i])) { + printk(KERN_ERR "%s: resource(s) not available\n", + ec->dev.bus_id); + ec->resource[i].end -= ec->resource[i].start; + ec->resource[i].start = 0; + } + } +} + +static ssize_t ecard_show_irq(struct device *dev, char *buf) +{ + struct expansion_card *ec = ECARD_DEV(dev); + return sprintf(buf, "%u\n", ec->irq); +} + +static DEVICE_ATTR(irq, S_IRUGO, ecard_show_irq, NULL); + +static ssize_t ecard_show_dma(struct device *dev, char *buf) +{ + struct expansion_card *ec = ECARD_DEV(dev); + return sprintf(buf, "%u\n", ec->dma); +} + +static DEVICE_ATTR(dma, S_IRUGO, ecard_show_dma, NULL); + +static ssize_t ecard_show_resources(struct device *dev, char *buf) +{ + struct expansion_card *ec = ECARD_DEV(dev); + char *str = buf; + int i; + + for (i = 0; i < ECARD_NUM_RESOURCES; i++) + str += sprintf(str, "%08lx %08lx %08lx\n", + ec->resource[i].start, + ec->resource[i].end, + ec->resource[i].flags); + + return str - buf; +} + +static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL); + +/* + * Probe for an expansion card. + * + * If bit 1 of the first byte of the card is set, then the + * card does not exist. + */ +static int __init +ecard_probe(int slot, card_type_t type) +{ + ecard_t **ecp; + ecard_t *ec; + struct ex_ecid cid; + int i, rc = -ENOMEM; + + ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); + if (!ec) + goto nomem; + + memset(ec, 0, sizeof(ecard_t)); + + ec->slot_no = slot; + ec->type = type; + ec->irq = NO_IRQ; + ec->fiq = NO_IRQ; + ec->dma = NO_DMA; + ec->card_desc = NULL; + ec->ops = &ecard_default_ops; + + rc = -ENODEV; + if ((ec->podaddr = ecard_address(ec, type, ECARD_SYNC)) == 0) + goto nodev; + + cid.r_zero = 1; + ecard_readbytes(&cid, ec, 0, 16, 0); + if (cid.r_zero) + goto nodev; + + ec->cid.id = cid.r_id; + ec->cid.cd = cid.r_cd; + ec->cid.is = cid.r_is; + ec->cid.w = cid.r_w; + ec->cid.manufacturer = ecard_getu16(cid.r_manu); + ec->cid.product = ecard_getu16(cid.r_prod); + ec->cid.country = cid.r_country; + ec->cid.irqmask = cid.r_irqmask; + ec->cid.irqoff = ecard_gets24(cid.r_irqoff); + ec->cid.fiqmask = cid.r_fiqmask; + ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); + ec->fiqaddr = + ec->irqaddr = (unsigned char *)ioaddr(ec->podaddr); + + if (ec->cid.is) { + ec->irqmask = ec->cid.irqmask; + ec->irqaddr += ec->cid.irqoff; + ec->fiqmask = ec->cid.fiqmask; + ec->fiqaddr += ec->cid.fiqoff; + } else { + ec->irqmask = 1; + ec->fiqmask = 4; + } + + for (i = 0; i < sizeof(blacklist) / sizeof(*blacklist); i++) + if (blacklist[i].manufacturer == ec->cid.manufacturer && + blacklist[i].product == ec->cid.product) { + ec->card_desc = blacklist[i].type; + break; + } + + snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); + snprintf(ec->dev.name, sizeof(ec->dev.name), "ecard %04x:%04x", + ec->cid.manufacturer, ec->cid.product); + ec->dev.parent = NULL; + ec->dev.bus = &ecard_bus_type; + ec->dev.dma_mask = &ec->dma_mask; + ec->dma_mask = (u64)0xffffffff; + + ecard_init_resources(ec); + + /* + * hook the interrupt handlers + */ + if (slot < 8) { + ec->irq = 32 + slot; + set_irq_chip(ec->irq, &ecard_chip); + set_irq_handler(ec->irq, do_level_IRQ); + set_irq_flags(ec->irq, IRQF_VALID); + } + + for (ecp = &cards; *ecp; ecp = &(*ecp)->next); + + *ecp = ec; + slot_to_expcard[slot] = ec; + + device_register(&ec->dev); + device_create_file(&ec->dev, &dev_attr_dma); + device_create_file(&ec->dev, &dev_attr_irq); + device_create_file(&ec->dev, &dev_attr_resource); + + return 0; + +nodev: + kfree(ec); +nomem: + return rc; +} + +/* + * Initialise the expansion card system. + * Locate all hardware - interrupt management and + * actual cards. + */ +static int __init ecard_init(void) +{ + int slot, irqhw; + + printk("Probing expansion cards\n"); + + for (slot = 0; slot < 8; slot ++) { + if (ecard_probe(slot, ECARD_EASI) == -ENODEV) + ecard_probe(slot, ECARD_IOC); + } + + irqhw = ecard_probeirqhw(); + + set_irq_chained_handler(IRQ_EXPANSIONCARD, + irqhw ? ecard_irqexp_handler : ecard_irq_handler); + + ecard_proc_init(); + + return 0; +} + +subsys_initcall(ecard_init); + +/* + * ECARD "bus" + */ +static const struct ecard_id * +ecard_match_device(const struct ecard_id *ids, struct expansion_card *ec) +{ + int i; + + for (i = 0; ids[i].manufacturer != 65535; i++) + if (ec->cid.manufacturer == ids[i].manufacturer && + ec->cid.product == ids[i].product) + return ids + i; + + return NULL; +} + +static int ecard_drv_probe(struct device *dev) +{ + struct expansion_card *ec = ECARD_DEV(dev); + struct ecard_driver *drv = ECARD_DRV(dev->driver); + const struct ecard_id *id; + int ret; + + id = ecard_match_device(drv->id_table, ec); + + ecard_claim(ec); + ret = drv->probe(ec, id); + if (ret) + ecard_release(ec); + return ret; +} + +static int ecard_drv_remove(struct device *dev) +{ + struct expansion_card *ec = ECARD_DEV(dev); + struct ecard_driver *drv = ECARD_DRV(dev->driver); + + drv->remove(ec); + ecard_release(ec); + + return 0; +} + +/* + * Before rebooting, we must make sure that the expansion card is in a + * sensible state, so it can be re-detected. This means that the first + * page of the ROM must be visible. We call the expansion cards reset + * handler, if any. + */ +static void ecard_drv_shutdown(struct device *dev) +{ + struct expansion_card *ec = ECARD_DEV(dev); + struct ecard_driver *drv = ECARD_DRV(dev->driver); + struct ecard_request req; + + if (drv->shutdown) + drv->shutdown(ec); + ecard_release(ec); + req.req = req_reset; + req.ec = ec; + ecard_call(&req); +} + +int ecard_register_driver(struct ecard_driver *drv) +{ + drv->drv.bus = &ecard_bus_type; + drv->drv.probe = ecard_drv_probe; + drv->drv.remove = ecard_drv_remove; + drv->drv.shutdown = ecard_drv_shutdown; + + return driver_register(&drv->drv); +} + +void ecard_remove_driver(struct ecard_driver *drv) +{ + driver_unregister(&drv->drv); +} + +static int ecard_match(struct device *_dev, struct device_driver *_drv) +{ + struct expansion_card *ec = ECARD_DEV(_dev); + struct ecard_driver *drv = ECARD_DRV(_drv); + int ret; + + if (drv->id_table) { + ret = ecard_match_device(drv->id_table, ec) != NULL; + } else { + ret = ec->cid.id == drv->id; + } + + return ret; +} + +struct bus_type ecard_bus_type = { + .name = "ecard", + .match = ecard_match, +}; + +static int ecard_bus_init(void) +{ + return bus_register(&ecard_bus_type); +} + +postcore_initcall(ecard_bus_init); + +EXPORT_SYMBOL(ecard_readchunk); +EXPORT_SYMBOL(ecard_address); +EXPORT_SYMBOL(ecard_register_driver); +EXPORT_SYMBOL(ecard_remove_driver); +EXPORT_SYMBOL(ecard_bus_type); diff -Nru a/arch/arm26/kernel/entry.S b/arch/arm26/kernel/entry.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/entry.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,982 @@ +/* arch/arm26/kernel/entry.S + * + * Assembled from chunks of code in arch/arm + * + * Copyright (C) 2003 Ian Molton + * + */ + +#include /* for CONFIG_ARCH_xxxx */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + .macro zero_fp +#ifndef CONFIG_NO_FRAME_POINTER + mov fp, #0 +#endif + .endm + + .text + +@ Bad Abort numbers +@ ----------------- +@ +#define BAD_PREFETCH 0 +#define BAD_DATA 1 +#define BAD_ADDREXCPTN 2 +#define BAD_IRQ 3 +#define BAD_UNDEFINSTR 4 + +#define PT_TRACESYS 0x00000002 + +@ OS version number used in SWIs +@ RISC OS is 0 +@ RISC iX is 8 +@ +#define OS_NUMBER 9 +#define ARMSWI_OFFSET 0x000f0000 + +@ +@ Stack format (ensured by USER_* and SVC_*) +@ +#define S_FRAME_SIZE 72 +#define S_OLD_R0 64 +#define S_PSR 60 +#define S_PC 60 +#define S_LR 56 +#define S_SP 52 +#define S_IP 48 +#define S_FP 44 +#define S_R10 40 +#define S_R9 36 +#define S_R8 32 +#define S_R7 28 +#define S_R6 24 +#define S_R5 20 +#define S_R4 16 +#define S_R3 12 +#define S_R2 8 +#define S_R1 4 +#define S_R0 0 +#define S_OFF 8 + + .macro save_user_regs + str r0, [sp, #-4]! + str lr, [sp, #-4]! + sub sp, sp, #15*4 + stmia sp, {r0 - lr}^ + mov r0, r0 + .endm + + .macro slow_restore_user_regs + ldmia sp, {r0 - lr}^ + mov r0, r0 + ldr lr, [sp, #15*4] + add sp, sp, #15*4+8 + movs pc, lr + .endm + + .macro fast_restore_user_regs + add sp, sp, #S_OFF + ldmib sp, {r1 - lr}^ + mov r0, r0 + ldr lr, [sp, #15*4] + add sp, sp, #15*4+8 + movs pc, lr + .endm + + .macro mask_pc, rd, rm + bic \rd, \rm, #PCMASK + .endm + + .macro disable_irqs, temp + mov \temp, pc + orr \temp, \temp, #PSR_I_BIT + teqp \temp, #0 + .endm + + .macro enable_irqs, temp + mov \temp, pc + and \temp, \temp, #~PSR_I_BIT + teqp \temp, #0 + .endm + + .macro initialise_traps_extra + .endm + + .macro get_thread_info, rd + mov \rd, sp, lsr #13 + mov \rd, \rd, lsl #13 + .endm + + /* + * Like adr, but force SVC mode (if required) + */ + .macro adrsvc, cond, reg, label + adr\cond \reg, \label + orr\cond \reg, \reg, #PSR_I_BIT | MODE_SVC26 + .endm + + +/* + * These are the registers used in the syscall handler, and allow us to + * have in theory up to 7 arguments to a function - r0 to r6. + * + * r7 is reserved for the system call number for thumb mode. + * + * Note that tbl == why is intentional. + * + * We must set at least "tsk" and "why" when calling ret_with_reschedule. + */ +scno .req r7 @ syscall number +tbl .req r8 @ syscall table pointer +why .req r8 @ Linux syscall (!= 0) +tsk .req r9 @ current thread_info + +/* + * Get the system call number. + */ + .macro get_scno + mask_pc lr, lr + ldr scno, [lr, #-4] @ get SWI instruction + .endm +/* + * ----------------------------------------------------------------------- + */ + +/* + * We rely on the fact that R0 is at the bottom of the stack (due to + * slow/fast restore user regs). + */ +#if S_R0 != 0 +#error "Please fix" +#endif + +/* + * Our do_softirq out of line code. See include/asm-arm/softirq.h for + * the calling assembly. + */ +ENTRY(__do_softirq) + stmfd sp!, {r0 - r3, ip, lr} + bl do_softirq + ldmfd sp!, {r0 - r3, ip, pc} + + .align 5 + +/* + * This is the fast syscall return path. We do as little as + * possible here, and this includes saving r0 back into the SVC + * stack. + */ +ret_fast_syscall: + disable_irqs r1 @ disable interrupts + ldr r1, [tsk, #TI_FLAGS] + tst r1, #_TIF_WORK_MASK + bne fast_work_pending + fast_restore_user_regs + +/* + * Ok, we need to do extra processing, enter the slow path. + */ +fast_work_pending: + str r0, [sp, #S_R0+S_OFF]! @ returned r0 +work_pending: + tst r1, #_TIF_NEED_RESCHED + bne work_resched + tst r1, #_TIF_NOTIFY_RESUME | _TIF_SIGPENDING + beq no_work_pending + mov r0, sp @ 'regs' + mov r2, why @ 'syscall' + bl do_notify_resume + disable_irqs r1 @ disable interrupts + b no_work_pending + +work_resched: + bl schedule +/* + * "slow" syscall return path. "why" tells us if this was a real syscall. + */ +ENTRY(ret_to_user) +ret_slow_syscall: + disable_irqs r1 @ disable interrupts + ldr r1, [tsk, #TI_FLAGS] + tst r1, #_TIF_WORK_MASK + bne work_pending +no_work_pending: + slow_restore_user_regs + +/* + * This is how we return from a fork. + */ +ENTRY(ret_from_fork) + bl schedule_tail + get_thread_info tsk + ldr r1, [tsk, #TI_FLAGS] @ check for syscall tracing + mov why, #1 + tst r1, #_TIF_SYSCALL_TRACE @ are we tracing syscalls? + beq ret_slow_syscall + mov r1, sp + mov r0, #1 @ trace exit [IP = 1] + bl syscall_trace + b ret_slow_syscall + +#include + +/*============================================================================= + * SWI handler + *----------------------------------------------------------------------------- + */ + + .align 5 +ENTRY(vector_swi) + save_user_regs + zero_fp + get_scno + +#ifdef CONFIG_ALIGNMENT_TRAP + ldr ip, __cr_alignment + ldr ip, [ip] + mcr p15, 0, ip, c1, c0 @ update control register +#endif + enable_irqs ip + + str r4, [sp, #-S_OFF]! @ push fifth arg + + get_thread_info tsk + ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing + bic scno, scno, #0xff000000 @ mask off SWI op-code + eor scno, scno, #OS_NUMBER << 20 @ check OS number + adr tbl, sys_call_table @ load syscall table pointer + tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls? + bne __sys_trace + + adrsvc al, lr, ret_fast_syscall @ return address + cmp scno, #NR_syscalls @ check upper syscall limit + ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine + + add r1, sp, #S_OFF +2: mov why, #0 @ no longer a real syscall + cmp scno, #ARMSWI_OFFSET + eor r0, scno, #OS_NUMBER << 20 @ put OS number back + bcs arm_syscall + b sys_ni_syscall @ not private func + + /* + * This is the really slow path. We're going to be doing + * context switches, and waiting for our parent to respond. + */ +__sys_trace: + add r1, sp, #S_OFF + mov r0, #0 @ trace entry [IP = 0] + bl syscall_trace + + adrsvc al, lr, __sys_trace_return @ return address + add r1, sp, #S_R0 + S_OFF @ pointer to regs + cmp scno, #NR_syscalls @ check upper syscall limit + ldmccia r1, {r0 - r3} @ have to reload r0 - r3 + ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine + b 2b + +__sys_trace_return: + str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 + mov r1, sp + mov r0, #1 @ trace exit [IP = 1] + bl syscall_trace + b ret_slow_syscall + + .align 5 +#ifdef CONFIG_ALIGNMENT_TRAP + .type __cr_alignment, #object +__cr_alignment: + .word cr_alignment +#endif + + .type sys_call_table, #object +ENTRY(sys_call_table) +#include + +/*============================================================================ + * Special system call wrappers + */ +@ r0 = syscall number +@ r5 = syscall table + .type sys_syscall, #function +sys_syscall: + eor scno, r0, #OS_NUMBER << 20 + cmp scno, #NR_syscalls @ check range + stmleia sp, {r5, r6} @ shuffle args + movle r0, r1 + movle r1, r2 + movle r2, r3 + movle r3, r4 + ldrle pc, [tbl, scno, lsl #2] + b sys_ni_syscall + +sys_fork_wrapper: + add r0, sp, #S_OFF + b sys_fork + +sys_vfork_wrapper: + add r0, sp, #S_OFF + b sys_vfork + +sys_execve_wrapper: + add r3, sp, #S_OFF + b sys_execve + +sys_clone_wapper: + add r2, sp, #S_OFF + b sys_clone + +sys_sigsuspend_wrapper: + add r3, sp, #S_OFF + b sys_sigsuspend + +sys_rt_sigsuspend_wrapper: + add r2, sp, #S_OFF + b sys_rt_sigsuspend + +sys_sigreturn_wrapper: + add r0, sp, #S_OFF + b sys_sigreturn + +sys_rt_sigreturn_wrapper: + add r0, sp, #S_OFF + b sys_rt_sigreturn + +sys_sigaltstack_wrapper: + ldr r2, [sp, #S_OFF + S_SP] + b do_sigaltstack + +/* + * Note: off_4k (r5) is always units of 4K. If we can't do the requested + * offset, we return EINVAL. FIXME - this lost some stuff from arm32 to + * ifdefs. check it out. + */ +sys_mmap2: + tst r5, #((1 << (PAGE_SHIFT - 12)) - 1) + moveq r5, r5, lsr #PAGE_SHIFT - 12 + streq r5, [sp, #4] + beq do_mmap2 + mov r0, #-EINVAL + RETINSTR(mov,pc, lr) + +/* + * Design issues: + * - We have several modes that each vector can be called from, + * each with its own set of registers. On entry to any vector, + * we *must* save the registers used in *that* mode. + * + * - This code must be as fast as possible. + * + * There are a few restrictions on the vectors: + * - the SWI vector cannot be called from *any* non-user mode + * + * - the FP emulator is *never* called from *any* non-user mode undefined + * instruction. + * + */ + + .text + + .equ ioc_base_high, IOC_BASE & 0xff000000 + .equ ioc_base_low, IOC_BASE & 0x00ff0000 + .macro disable_fiq + mov r12, #ioc_base_high + .if ioc_base_low + orr r12, r12, #ioc_base_low + .endif + strb r12, [r12, #0x38] @ Disable FIQ register + .endm + + .macro get_irqnr_and_base, irqnr, base + mov r4, #ioc_base_high @ point at IOC + .if ioc_base_low + orr r4, r4, #ioc_base_low + .endif + ldrb \irqnr, [r4, #0x24] @ get high priority first + adr \base, irq_prio_h + teq \irqnr, #0 + ldreqb \irqnr, [r4, #0x14] @ get low priority + adreq \base, irq_prio_l + .endm + +/* + * Interrupt table (incorporates priority) + */ + .macro irq_prio_table +irq_prio_l: .byte 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 +irq_prio_h: .byte 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .endm + +#if 1 +/* FIXME (well, ok, dont - but its easy to grep for :) */ +/* + * Uncomment these if you wish to get more debugging into about data aborts. + */ +#define FAULT_CODE_LDRSTRPOST 0x80 +#define FAULT_CODE_LDRSTRPRE 0x40 +#define FAULT_CODE_LDRSTRREG 0x20 +#define FAULT_CODE_LDMSTM 0x10 +#define FAULT_CODE_LDCSTC 0x08 +#endif +#define FAULT_CODE_PREFETCH 0x04 +#define FAULT_CODE_WRITE 0x02 +#define FAULT_CODE_FORCECOW 0x01 + +#define SVC_SAVE_ALL \ + str sp, [sp, #-16]! ;\ + str lr, [sp, #8] ;\ + str lr, [sp, #4] ;\ + stmfd sp!, {r0 - r12} ;\ + mov r0, #-1 ;\ + str r0, [sp, #S_OLD_R0] ;\ + zero_fp + +#define SVC_IRQ_SAVE_ALL \ + str sp, [sp, #-16]! ;\ + str lr, [sp, #4] ;\ + ldr lr, .LCirq ;\ + ldr lr, [lr] ;\ + str lr, [sp, #8] ;\ + stmfd sp!, {r0 - r12} ;\ + mov r0, #-1 ;\ + str r0, [sp, #S_OLD_R0] ;\ + zero_fp + +#define SVC_RESTORE_ALL \ + ldmfd sp, {r0 - pc}^ + +/*============================================================================= + * Undefined FIQs + *----------------------------------------------------------------------------- + */ +_unexp_fiq: ldr sp, .LCfiq + mov r12, #IOC_BASE + strb r12, [r12, #0x38] @ Disable FIQ register + teqp pc, #PSR_I_BIT | PSR_F_BIT | MODE_SVC26 + mov r0, r0 + stmfd sp!, {r0 - r3, ip, lr} + adr r0, Lfiqmsg + bl printk + ldmfd sp!, {r0 - r3, ip, lr} + teqp pc, #PSR_I_BIT | PSR_F_BIT | MODE_FIQ26 + mov r0, r0 + movs pc, lr + +Lfiqmsg: .ascii "*** Unexpected FIQ\n\0" + .align + +.LCfiq: .word __temp_fiq +.LCirq: .word __temp_irq + +/*============================================================================= + * Undefined instruction handler + *----------------------------------------------------------------------------- + * Handles floating point instructions + */ +vector_undefinstr: + tst lr,#3 + bne __und_svc + save_user_regs + zero_fp + teqp pc, #PSR_I_BIT | MODE_SVC26 +.Lbug_undef: + ldr r4, .LC2 + ldr pc, [r4] @ Call FP module USR entry point + + .globl fpundefinstr +fpundefinstr: @ Called by FP module on undefined instr + mov r0, lr + mov r1, sp + teqp pc, #MODE_SVC26 + bl do_undefinstr + b ret_from_exception @ Normal FP exit + +__und_svc: SVC_SAVE_ALL @ Non-user mode + mask_pc r0, lr + and r2, lr, #3 + sub r0, r0, #4 + mov r1, sp + bl do_undefinstr + SVC_RESTORE_ALL + +#if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE + /* The FPE is always present */ + .equ fpe_not_present, 0 +#else +/* We get here if an undefined instruction happens and the floating + * point emulator is not present. If the offending instruction was + * a WFS, we just perform a normal return as if we had emulated the + * operation. This is a hack to allow some basic userland binaries + * to run so that the emulator module proper can be loaded. --philb + */ +fpe_not_present: + adr r10, wfs_mask_data + ldmia r10, {r4, r5, r6, r7, r8} + ldr r10, [sp, #S_PC] @ Load PC + sub r10, r10, #4 + mask_pc r10, r10 + ldrt r10, [r10] @ get instruction + and r5, r10, r5 + teq r5, r4 @ Is it WFS? + beq ret_from_exception + and r5, r10, r8 + teq r5, r6 @ Is it LDF/STF on sp or fp? + teqne r5, r7 + bne fpundefinstr + tst r10, #0x00200000 @ Does it have WB + beq ret_from_exception + and r4, r10, #255 @ get offset + and r6, r10, #0x000f0000 + tst r10, #0x00800000 @ +/- + ldr r5, [sp, r6, lsr #14] @ Load reg + rsbeq r4, r4, #0 + add r5, r5, r4, lsl #2 + str r5, [sp, r6, lsr #14] @ Save reg + b ret_from_exception + +wfs_mask_data: .word 0x0e200110 @ WFS/RFS + .word 0x0fef0fff + .word 0x0d0d0100 @ LDF [sp]/STF [sp] + .word 0x0d0b0100 @ LDF [fp]/STF [fp] + .word 0x0f0f0f00 +#endif + +.LC2: .word fp_enter + +/*============================================================================= + * Prefetch abort handler + *----------------------------------------------------------------------------- + */ + +/* remember: lr = USR pc */ +vector_prefetch: + sub lr, lr, #4 + tst lr, #3 + bne __pabt_invalid + save_user_regs + teqp pc, #MODE_SVC26 + mask_pc r0, lr @ Address of abort + mov r1, sp @ Tasks registers + bl do_PrefetchAbort + teq r0, #0 @ If non-zero, we believe this abort.. + bne ret_from_exception +#ifdef DEBUG_UNDEF + adr r0, t + bl printk +#endif + ldr lr, [sp,#S_PC] @ program to test this on. I think its + b .Lbug_undef @ broken at the moment though!) + +__pabt_invalid: SVC_SAVE_ALL + mov r0, sp @ Prefetch aborts are definitely *not* + mov r1, #BAD_PREFETCH @ allowed in non-user modes. We cant + and r2, lr, #3 @ recover from this problem. + b bad_mode + +#ifdef DEBUG_UNDEF +t: .ascii "*** undef ***\r\n\0" + .align +#endif + +/*============================================================================= + * Address exception handler + *----------------------------------------------------------------------------- + * These aren't too critical. + * (they're not supposed to happen). + * In order to debug the reason for address exceptions in non-user modes, + * we have to obtain all the registers so that we can see what's going on. + */ + +vector_addrexcptn: + sub lr, lr, #8 + tst lr, #3 + bne Laddrexcptn_not_user + save_user_regs + teq pc, #MODE_SVC26 + mask_pc r0, lr @ Point to instruction + mov r1, sp @ Point to registers + mov r2, #0x400 + mov lr, pc + bl do_excpt + b ret_from_exception + +Laddrexcptn_not_user: + SVC_SAVE_ALL + and r2, lr, #3 + teq r2, #3 + bne Laddrexcptn_illegal_mode + teqp pc, #MODE_SVC26 + mask_pc r0, lr + mov r1, sp + orr r2, r2, #0x400 + bl do_excpt + ldmia sp, {r0 - lr} @ I cant remember the reason I changed this... + add sp, sp, #15*4 + movs pc, lr + +Laddrexcptn_illegal_mode: + mov r0, sp + str lr, [sp, #-4]! + orr r1, r2, #PSR_I_BIT | PSR_F_BIT + teqp r1, #0 @ change into mode (wont be user mode) + mov r0, r0 + mov r1, r8 @ Any register from r8 - r14 can be banked + mov r2, r9 + mov r3, r10 + mov r4, r11 + mov r5, r12 + mov r6, r13 + mov r7, r14 + teqp pc, #PSR_F_BIT | MODE_SVC26 @ back to svc + mov r0, r0 + stmfd sp!, {r1-r7} + ldmia r0, {r0-r7} + stmfd sp!, {r0-r7} + mov r0, sp + mov r1, #BAD_ADDREXCPTN + b bad_mode + +/*============================================================================= + * Interrupt (IRQ) handler + *----------------------------------------------------------------------------- + * Note: if in user mode, then *no* kernel routine is running, so do not have + * to save svc lr + * (r13 points to irq temp save area) + */ + +vector_IRQ: ldr r13, .LCirq @ I will leave this one in just in case... + sub lr, lr, #4 + str lr, [r13] + tst lr, #3 + bne __irq_svc + teqp pc, #PSR_I_BIT | MODE_SVC26 + mov r0, r0 + ldr lr, .LCirq + ldr lr, [lr] + save_user_regs + +1: get_irqnr_and_base r6, r5 + teq r6, #0 + ldrneb r0, [r5, r6] @ get IRQ number + movne r1, sp + @ + @ routine called with r0 = irq number, r1 = struct pt_regs * + @ + adr lr, 1b + orr lr, lr, #PSR_I_BIT | MODE_SVC26 @ Force SVC + bne asm_do_IRQ + + mov why, #0 + get_thread_info r5 + b ret_to_user + + irq_prio_table + +__irq_svc: teqp pc, #PSR_I_BIT | MODE_SVC26 + mov r0, r0 + SVC_IRQ_SAVE_ALL + and r2, lr, #3 + teq r2, #3 + bne __irq_invalid +1: get_irqnr_and_base r6, r5 + teq r6, #0 + ldrneb r0, [r5, r6] @ get IRQ number + movne r1, sp + @ + @ routine called with r0 = irq number, r1 = struct pt_regs * + @ + adr lr, 1b + orr lr, lr, #PSR_I_BIT | MODE_SVC26 @ Force SVC + bne asm_do_IRQ @ Returns to 1b + SVC_RESTORE_ALL + +__irq_invalid: mov r0, sp + mov r1, #BAD_IRQ + b bad_mode + +/*============================================================================= + * Data abort handler code + *----------------------------------------------------------------------------- + * + * This handles both exceptions from user and SVC modes, computes the address + * range of the problem, and does any correction that is required. It then + * calls the kernel data abort routine. + * + * This is where I wish that the ARM would tell you which address aborted. + */ + +vector_data: sub lr, lr, #8 @ Correct lr + tst lr, #3 + bne Ldata_not_user + save_user_regs + teqp pc, #MODE_SVC26 + mask_pc r0, lr + bl Ldata_do + b ret_from_exception + +Ldata_not_user: + SVC_SAVE_ALL + and r2, lr, #3 + teq r2, #3 + bne Ldata_illegal_mode + tst lr, #PSR_I_BIT + teqeqp pc, #MODE_SVC26 + mask_pc r0, lr + bl Ldata_do + SVC_RESTORE_ALL + +Ldata_illegal_mode: + mov r0, sp + mov r1, #BAD_DATA + b bad_mode + +Ldata_do: mov r3, sp + ldr r4, [r0] @ Get instruction + mov r2, #0 + tst r4, #1 << 20 @ Check to see if it is a write instruction + orreq r2, r2, #FAULT_CODE_WRITE @ Indicate write instruction + mov r1, r4, lsr #22 @ Now branch to the relevent processing routine + and r1, r1, #15 << 2 + add pc, pc, r1 + movs pc, lr + b Ldata_unknown + b Ldata_unknown + b Ldata_unknown + b Ldata_unknown + b Ldata_ldrstr_post @ ldr rd, [rn], #m + b Ldata_ldrstr_numindex @ ldr rd, [rn, #m] @ RegVal + b Ldata_ldrstr_post @ ldr rd, [rn], rm + b Ldata_ldrstr_regindex @ ldr rd, [rn, rm] + b Ldata_ldmstm @ ldm*a rn, + b Ldata_ldmstm @ ldm*b rn, + b Ldata_unknown + b Ldata_unknown + b Ldata_ldrstr_post @ ldc rd, [rn], #m @ Same as ldr rd, [rn], #m + b Ldata_ldcstc_pre @ ldc rd, [rn, #m] + b Ldata_unknown +Ldata_unknown: @ Part of jumptable + mov r0, r1 + mov r1, r4 + mov r2, r3 + b baddataabort + +Ldata_ldrstr_post: + mov r0, r4, lsr #14 @ Get Rn + and r0, r0, #15 << 2 @ Mask out reg. + teq r0, #15 << 2 + ldr r0, [r3, r0] @ Get register + biceq r0, r0, #PCMASK + mov r1, r0 +#ifdef FAULT_CODE_LDRSTRPOST + orr r2, r2, #FAULT_CODE_LDRSTRPOST +#endif + b do_DataAbort + +Ldata_ldrstr_numindex: + mov r0, r4, lsr #14 @ Get Rn + and r0, r0, #15 << 2 @ Mask out reg. + teq r0, #15 << 2 + ldr r0, [r3, r0] @ Get register + mov r1, r4, lsl #20 + biceq r0, r0, #PCMASK + tst r4, #1 << 23 + addne r0, r0, r1, lsr #20 + subeq r0, r0, r1, lsr #20 + mov r1, r0 +#ifdef FAULT_CODE_LDRSTRPRE + orr r2, r2, #FAULT_CODE_LDRSTRPRE +#endif + b do_DataAbort + +Ldata_ldrstr_regindex: + mov r0, r4, lsr #14 @ Get Rn + and r0, r0, #15 << 2 @ Mask out reg. + teq r0, #15 << 2 + ldr r0, [r3, r0] @ Get register + and r7, r4, #15 + biceq r0, r0, #PCMASK + teq r7, #15 @ Check for PC + ldr r7, [r3, r7, lsl #2] @ Get Rm + and r8, r4, #0x60 @ Get shift types + biceq r7, r7, #PCMASK + mov r9, r4, lsr #7 @ Get shift amount + and r9, r9, #31 + teq r8, #0 + moveq r7, r7, lsl r9 + teq r8, #0x20 @ LSR shift + moveq r7, r7, lsr r9 + teq r8, #0x40 @ ASR shift + moveq r7, r7, asr r9 + teq r8, #0x60 @ ROR shift + moveq r7, r7, ror r9 + tst r4, #1 << 23 + addne r0, r0, r7 + subeq r0, r0, r7 @ Apply correction + mov r1, r0 +#ifdef FAULT_CODE_LDRSTRREG + orr r2, r2, #FAULT_CODE_LDRSTRREG +#endif + b do_DataAbort + +Ldata_ldmstm: + mov r7, #0x11 + orr r7, r7, r7, lsl #8 + and r0, r4, r7 + and r1, r4, r7, lsl #1 + add r0, r0, r1, lsr #1 + and r1, r4, r7, lsl #2 + add r0, r0, r1, lsr #2 + and r1, r4, r7, lsl #3 + add r0, r0, r1, lsr #3 + add r0, r0, r0, lsr #8 + add r0, r0, r0, lsr #4 + and r7, r0, #15 @ r7 = no. of registers to transfer. + mov r5, r4, lsr #14 @ Get Rn + and r5, r5, #15 << 2 + ldr r0, [r3, r5] @ Get reg + eor r6, r4, r4, lsl #2 + tst r6, #1 << 23 @ Check inc/dec ^ writeback + rsbeq r7, r7, #0 + add r7, r0, r7, lsl #2 @ Do correction (signed) + subne r1, r7, #1 + subeq r1, r0, #1 + moveq r0, r7 + tst r4, #1 << 21 @ Check writeback + strne r7, [r3, r5] + eor r6, r4, r4, lsl #1 + tst r6, #1 << 24 @ Check Pre/Post ^ inc/dec + addeq r0, r0, #4 + addeq r1, r1, #4 + teq r5, #15*4 @ CHECK FOR PC + biceq r1, r1, #PCMASK + biceq r0, r0, #PCMASK +#ifdef FAULT_CODE_LDMSTM + orr r2, r2, #FAULT_CODE_LDMSTM +#endif + b do_DataAbort + +Ldata_ldcstc_pre: + mov r0, r4, lsr #14 @ Get Rn + and r0, r0, #15 << 2 @ Mask out reg. + teq r0, #15 << 2 + ldr r0, [r3, r0] @ Get register + mov r1, r4, lsl #24 @ Get offset + biceq r0, r0, #PCMASK + tst r4, #1 << 23 + addne r0, r0, r1, lsr #24 + subeq r0, r0, r1, lsr #24 + mov r1, r0 +#ifdef FAULT_CODE_LDCSTC + orr r2, r2, #FAULT_CODE_LDCSTC +#endif + b do_DataAbort + + +/* + * This is the return code to user mode for abort handlers + */ +ENTRY(ret_from_exception) + get_thread_info tsk + mov why, #0 + b ret_to_user + + .data +ENTRY(fp_enter) + .word fpe_not_present + .text +/* + * Register switch for older 26-bit only ARMs + */ +ENTRY(__switch_to) + add r0, r0, #TI_CPU_SAVE + stmia r0, {r4 - sl, fp, sp, lr} + add r1, r1, #TI_CPU_SAVE + ldmia r1, {r4 - sl, fp, sp, pc}^ + +/* + *============================================================================= + * Low-level interface code + *----------------------------------------------------------------------------- + * Trap initialisation + *----------------------------------------------------------------------------- + * + * Note - FIQ code has changed. The default is a couple of words in 0x1c, 0x20 + * that call _unexp_fiq. Nowever, we now copy the FIQ routine to 0x1c (removes + * some excess cycles). + * + * What we need to put into 0-0x1c are branches to branch to the kernel. + */ + + .section ".init.text",#alloc,#execinstr + +.Ljump_addresses: + swi SYS_ERROR0 + .word vector_undefinstr - 12 + .word vector_swi - 16 + .word vector_prefetch - 20 + .word vector_data - 24 + .word vector_addrexcptn - 28 + .word vector_IRQ - 32 + .word _unexp_fiq - 36 + b . + 8 +/* + * initialise the trap system + */ +ENTRY(__trap_init) + stmfd sp!, {r4 - r7, lr} + adr r1, .Ljump_addresses + ldmia r1, {r1 - r7, ip, lr} + orr r2, lr, r2, lsr #2 + orr r3, lr, r3, lsr #2 + orr r4, lr, r4, lsr #2 + orr r5, lr, r5, lsr #2 + orr r6, lr, r6, lsr #2 + orr r7, lr, r7, lsr #2 + orr ip, lr, ip, lsr #2 + mov r0, #0 + stmia r0, {r1 - r7, ip} + ldmfd sp!, {r4 - r7, pc}^ + + .bss +__temp_irq: .space 4 @ saved lr_irq +__temp_fiq: .space 128 diff -Nru a/arch/arm26/kernel/fiq.c b/arch/arm26/kernel/fiq.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/fiq.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,202 @@ +/* + * linux/arch/arm26/kernel/fiq.c + * + * Copyright (C) 1998 Russell King + * Copyright (C) 1998, 1999 Phil Blundell + * Copyright (C) 2003 Ian Molton + * + * FIQ support written by Philip Blundell , 1998. + * + * FIQ support re-written by Russell King to be more generic + * + * We now properly support a method by which the FIQ handlers can + * be stacked onto the vector. We still do not support sharing + * the FIQ vector itself. + * + * Operation is as follows: + * 1. Owner A claims FIQ: + * - default_fiq relinquishes control. + * 2. Owner A: + * - inserts code. + * - sets any registers, + * - enables FIQ. + * 3. Owner B claims FIQ: + * - if owner A has a relinquish function. + * - disable FIQs. + * - saves any registers. + * - returns zero. + * 4. Owner B: + * - inserts code. + * - sets any registers, + * - enables FIQ. + * 5. Owner B releases FIQ: + * - Owner A is asked to reacquire FIQ: + * - inserts code. + * - restores saved registers. + * - enables FIQ. + * 6. Goto 3 + */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define FIQ_VECTOR (vectors_base() + 0x1c) + +static unsigned long no_fiq_insn; + +#define unprotect_page_0() +#define protect_page_0() + +/* Default reacquire function + * - we always relinquish FIQ control + * - we always reacquire FIQ control + */ +static int fiq_def_op(void *ref, int relinquish) +{ + if (!relinquish) { + unprotect_page_0(); + *(unsigned long *)FIQ_VECTOR = no_fiq_insn; + protect_page_0(); + } + + return 0; +} + +static struct fiq_handler default_owner = { + .name = "default", + .fiq_op = fiq_def_op, +}; + +static struct fiq_handler *current_fiq = &default_owner; + +int show_fiq_list(struct seq_file *p, void *v) +{ + if (current_fiq != &default_owner) + seq_printf(p, "FIQ: %s\n", current_fiq->name); + + return 0; +} + +void set_fiq_handler(void *start, unsigned int length) +{ + unprotect_page_0(); + + memcpy((void *)FIQ_VECTOR, start, length); + + protect_page_0(); +} + +/* + * Taking an interrupt in FIQ mode is death, so both these functions + * disable irqs for the duration. + */ +void set_fiq_regs(struct pt_regs *regs) +{ + register unsigned long tmp, tmp2; + __asm__ volatile ( + "mov %0, pc + bic %1, %0, #0x3 + orr %1, %1, %3 + teqp %1, #0 @ select FIQ mode + mov r0, r0 + ldmia %2, {r8 - r14} + teqp %0, #0 @ return to SVC mode + mov r0, r0" + : "=&r" (tmp), "=&r" (tmp2) + : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | MODE_FIQ26) + /* These registers aren't modified by the above code in a way + visible to the compiler, but we mark them as clobbers anyway + so that GCC won't put any of the input or output operands in + them. */ + : "r8", "r9", "r10", "r11", "r12", "r13", "r14"); +} + +void get_fiq_regs(struct pt_regs *regs) +{ + register unsigned long tmp, tmp2; + __asm__ volatile ( + "mov %0, pc + bic %1, %0, #0x3 + orr %1, %1, %3 + teqp %1, #0 @ select FIQ mode + mov r0, r0 + stmia %2, {r8 - r14} + teqp %0, #0 @ return to SVC mode + mov r0, r0" + : "=&r" (tmp), "=&r" (tmp2) + : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | MODE_FIQ26) + /* These registers aren't modified by the above code in a way + visible to the compiler, but we mark them as clobbers anyway + so that GCC won't put any of the input or output operands in + them. */ + : "r8", "r9", "r10", "r11", "r12", "r13", "r14"); +} + +int claim_fiq(struct fiq_handler *f) +{ + int ret = 0; + + if (current_fiq) { + ret = -EBUSY; + + if (current_fiq->fiq_op != NULL) + ret = current_fiq->fiq_op(current_fiq->dev_id, 1); + } + + if (!ret) { + f->next = current_fiq; + current_fiq = f; + } + + return ret; +} + +void release_fiq(struct fiq_handler *f) +{ + if (current_fiq != f) { + printk(KERN_ERR "%s FIQ trying to release %s FIQ\n", + f->name, current_fiq->name); +#ifdef CONFIG_DEBUG_ERRORS + __backtrace(); +#endif + return; + } + + do + current_fiq = current_fiq->next; + while (current_fiq->fiq_op(current_fiq->dev_id, 0)); +} + +void enable_fiq(int fiq) +{ + enable_irq(fiq + FIQ_START); +} + +void disable_fiq(int fiq) +{ + disable_irq(fiq + FIQ_START); +} + +EXPORT_SYMBOL(set_fiq_handler); +EXPORT_SYMBOL(set_fiq_regs); +EXPORT_SYMBOL(get_fiq_regs); +EXPORT_SYMBOL(claim_fiq); +EXPORT_SYMBOL(release_fiq); +EXPORT_SYMBOL(enable_fiq); +EXPORT_SYMBOL(disable_fiq); + +void __init init_FIQ(void) +{ + no_fiq_insn = *(unsigned long *)FIQ_VECTOR; + set_fs(get_fs()); +} diff -Nru a/arch/arm26/kernel/init_task.c b/arch/arm26/kernel/init_task.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/init_task.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,41 @@ +/* + * linux/arch/arm/kernel/init_task.c + * + * Copyright (C) 2003 Ian Molton + * + */ +#include +#include +#include +#include +#include + +#include +#include + +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); + +/* + * Initial thread structure. + * + * We need to make sure that this is 8192-byte aligned due to the + * way process stacks are handled. This is done by making sure + * the linker maps this in the .text segment right after head.S, + * and making head.S ensure the proper alignment. + * + * The things we do for performance... + */ +union thread_union init_thread_union + __attribute__((__section__(".init.task"))) = + { INIT_THREAD_INFO(init_task) }; + +/* + * Initial task structure. + * + * All other task structs will be allocated on slabs in fork.c + */ +struct task_struct init_task = INIT_TASK(init_task); diff -Nru a/arch/arm26/kernel/irq.c b/arch/arm26/kernel/irq.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/irq.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,705 @@ +/* + * linux/arch/arm/kernel/irq.c + * + * Copyright (C) 1992 Linus Torvalds + * Modifications for ARM processor Copyright (C) 1995-2000 Russell King. + * 'Borrowed' for ARM26 and (C) 2003 Ian Molton. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This file contains the code used by various IRQ handling routines: + * asking for different IRQ's should be done through these routines + * instead of just grabbing them. Thus setups with different IRQ numbers + * shouldn't result in any weird surprises, and installing new handlers + * should be easier. + * + * IRQ's are in fact implemented a bit like signal handlers for the kernel. + * Naturally it's not a 1:1 relation, but there are similarities. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/* + * Maximum IRQ count. Currently, this is arbitary. However, it should + * not be set too low to prevent false triggering. Conversely, if it + * is set too high, then you could miss a stuck IRQ. + * + * Maybe we ought to set a timer and re-enable the IRQ at a later time? + */ +#define MAX_IRQ_CNT 100000 + +static volatile unsigned long irq_err_count; +static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED; + +struct irqdesc irq_desc[NR_IRQS]; +void (*init_arch_irq)(void) __initdata = NULL; + +/* + * Dummy mask/unmask handler + */ +void dummy_mask_unmask_irq(unsigned int irq) +{ +} + +void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + irq_err_count += 1; + printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq); +} + +static struct irqchip bad_chip = { + .ack = dummy_mask_unmask_irq, + .mask = dummy_mask_unmask_irq, + .unmask = dummy_mask_unmask_irq, +}; + +static struct irqdesc bad_irq_desc = { + .chip = &bad_chip, + .handle = do_bad_IRQ, + .depth = 1, +}; + +/** + * disable_irq - disable an irq and wait for completion + * @irq: Interrupt to disable + * + * Disable the selected interrupt line. We do this lazily. + * + * This function may be called from IRQ context. + */ +void disable_irq(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + unsigned long flags; + + spin_lock_irqsave(&irq_controller_lock, flags); + if (!desc->depth++) + desc->enabled = 0; + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +/** + * enable_irq - enable interrupt handling on an irq + * @irq: Interrupt to enable + * + * Re-enables the processing of interrupts on this IRQ line. + * Note that this may call the interrupt handler, so you may + * get unexpected results if you hold IRQs disabled. + * + * This function may be called from IRQ context. + */ +void enable_irq(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + unsigned long flags; + int pending = 0; + + spin_lock_irqsave(&irq_controller_lock, flags); + if (unlikely(!desc->depth)) { + printk("enable_irq(%u) unbalanced from %p\n", irq, + __builtin_return_address(0)); + } else if (!--desc->depth) { + desc->probing = 0; + desc->enabled = 1; + desc->chip->unmask(irq); + pending = desc->pending; + desc->pending = 0; + /* + * If the interrupt was waiting to be processed, + * retrigger it. + */ + if (pending) + desc->chip->rerun(irq); + } + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +int show_interrupts(struct seq_file *p, void *v) +{ + int i; + struct irqaction * action; + + for (i = 0 ; i < NR_IRQS ; i++) { + action = irq_desc[i].action; + if (!action) + continue; + seq_printf(p, "%3d: %10u ", i, kstat_irqs(i)); + seq_printf(p, " %s", action->name); + for (action = action->next; action; action = action->next) { + seq_printf(p, ", %s", action->name); + } + seq_putc(p, '\n'); + } + + show_fiq_list(p, v); + seq_printf(p, "Err: %10lu\n", irq_err_count); + return 0; +} + +/* + * IRQ lock detection. + * + * Hopefully, this should get us out of a few locked situations. + * However, it may take a while for this to happen, since we need + * a large number if IRQs to appear in the same jiffie with the + * same instruction pointer (or within 2 instructions). + */ +static int check_irq_lock(struct irqdesc *desc, int irq, struct pt_regs *regs) +{ + unsigned long instr_ptr = instruction_pointer(regs); + + if (desc->lck_jif == jiffies && + desc->lck_pc >= instr_ptr && desc->lck_pc < instr_ptr + 8) { + desc->lck_cnt += 1; + + if (desc->lck_cnt > MAX_IRQ_CNT) { + printk(KERN_ERR "IRQ LOCK: IRQ%d is locking the system, disabled\n", irq); + return 1; + } + } else { + desc->lck_cnt = 0; + desc->lck_pc = instruction_pointer(regs); + desc->lck_jif = jiffies; + } + return 0; +} + +static void +__do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs) +{ + unsigned int status; + + spin_unlock(&irq_controller_lock); + + if (!(action->flags & SA_INTERRUPT)) + local_irq_enable(); + + status = 0; + do { + status |= action->flags; + action->handler(irq, action->dev_id, regs); + action = action->next; + } while (action); + + if (status & SA_SAMPLE_RANDOM) + add_interrupt_randomness(irq); + + spin_lock_irq(&irq_controller_lock); +} + +/* + * This is for software-decoded IRQs. The caller is expected to + * handle the ack, clear, mask and unmask issues. + */ +void +do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + struct irqaction *action; + const int cpu = smp_processor_id(); + + desc->triggered = 1; + + kstat_cpu(cpu).irqs[irq]++; + + action = desc->action; + if (action) + __do_irq(irq, desc->action, regs); +} + +/* + * Most edge-triggered IRQ implementations seem to take a broken + * approach to this. Hence the complexity. + */ +void +do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + const int cpu = smp_processor_id(); + + desc->triggered = 1; + + /* + * If we're currently running this IRQ, or its disabled, + * we shouldn't process the IRQ. Instead, turn on the + * hardware masks. + */ + if (unlikely(desc->running || !desc->enabled)) + goto running; + + /* + * Acknowledge and clear the IRQ, but don't mask it. + */ + desc->chip->ack(irq); + + /* + * Mark the IRQ currently in progress. + */ + desc->running = 1; + + kstat_cpu(cpu).irqs[irq]++; + + do { + struct irqaction *action; + + action = desc->action; + if (!action) + break; + + if (desc->pending && desc->enabled) { + desc->pending = 0; + desc->chip->unmask(irq); + } + + __do_irq(irq, action, regs); + } while (desc->pending); + + desc->running = 0; + + /* + * If we were disabled or freed, shut down the handler. + */ + if (likely(desc->action && !check_irq_lock(desc, irq, regs))) + return; + + running: + /* + * We got another IRQ while this one was masked or + * currently running. Delay it. + */ + desc->pending = 1; + desc->chip->mask(irq); + desc->chip->ack(irq); +} + +/* + * Level-based IRQ handler. Nice and simple. + */ +void +do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + struct irqaction *action; + const int cpu = smp_processor_id(); + + desc->triggered = 1; + + /* + * Acknowledge, clear _AND_ disable the interrupt. + */ + desc->chip->ack(irq); + + if (likely(desc->enabled)) { + kstat_cpu(cpu).irqs[irq]++; + + /* + * Return with this interrupt masked if no action + */ + action = desc->action; + if (action) { + __do_irq(irq, desc->action, regs); + + if (likely(desc->enabled && + !check_irq_lock(desc, irq, regs))) + desc->chip->unmask(irq); + } + } +} + +/* + * do_IRQ handles all hardware IRQ's. Decoded IRQs should not + * come via this function. Instead, they should provide their + * own 'handler' + */ +asmlinkage void asm_do_IRQ(int irq, struct pt_regs *regs) +{ + struct irqdesc *desc = irq_desc + irq; + + /* + * Some hardware gives randomly wrong interrupts. Rather + * than crashing, do something sensible. + */ + if (irq >= NR_IRQS) + desc = &bad_irq_desc; + + irq_enter(); + spin_lock(&irq_controller_lock); + desc->handle(irq, desc, regs); + spin_unlock(&irq_controller_lock); + irq_exit(); +} + +void __set_irq_handler(unsigned int irq, irq_handler_t handle, int is_chained) +{ + struct irqdesc *desc; + unsigned long flags; + + if (irq >= NR_IRQS) { + printk(KERN_ERR "Trying to install handler for IRQ%d\n", irq); + return; + } + + if (handle == NULL) + handle = do_bad_IRQ; + + desc = irq_desc + irq; + + if (is_chained && desc->chip == &bad_chip) + printk(KERN_WARNING "Trying to install chained handler for IRQ%d\n", irq); + + spin_lock_irqsave(&irq_controller_lock, flags); + if (handle == do_bad_IRQ) { + desc->chip->mask(irq); + desc->chip->ack(irq); + desc->depth = 1; + desc->enabled = 0; + } + desc->handle = handle; + if (handle != do_bad_IRQ && is_chained) { + desc->valid = 0; + desc->probe_ok = 0; + desc->depth = 0; + desc->chip->unmask(irq); + } + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +void set_irq_chip(unsigned int irq, struct irqchip *chip) +{ + struct irqdesc *desc; + unsigned long flags; + + if (irq >= NR_IRQS) { + printk(KERN_ERR "Trying to install chip for IRQ%d\n", irq); + return; + } + + if (chip == NULL) + chip = &bad_chip; + + desc = irq_desc + irq; + spin_lock_irqsave(&irq_controller_lock, flags); + desc->chip = chip; + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +int set_irq_type(unsigned int irq, unsigned int type) +{ + struct irqdesc *desc; + unsigned long flags; + int ret = -ENXIO; + + if (irq >= NR_IRQS) { + printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq); + return -ENODEV; + } + + desc = irq_desc + irq; + if (desc->chip->type) { + spin_lock_irqsave(&irq_controller_lock, flags); + ret = desc->chip->type(irq, type); + spin_unlock_irqrestore(&irq_controller_lock, flags); + } + + return ret; +} + +void set_irq_flags(unsigned int irq, unsigned int iflags) +{ + struct irqdesc *desc; + unsigned long flags; + + if (irq >= NR_IRQS) { + printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq); + return; + } + + desc = irq_desc + irq; + spin_lock_irqsave(&irq_controller_lock, flags); + desc->valid = (iflags & IRQF_VALID) != 0; + desc->probe_ok = (iflags & IRQF_PROBE) != 0; + desc->noautoenable = (iflags & IRQF_NOAUTOEN) != 0; + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +int setup_irq(unsigned int irq, struct irqaction *new) +{ + int shared = 0; + struct irqaction *old, **p; + unsigned long flags; + struct irqdesc *desc; + + /* + * Some drivers like serial.c use request_irq() heavily, + * so we have to be careful not to interfere with a + * running system. + */ + if (new->flags & SA_SAMPLE_RANDOM) { + /* + * This function might sleep, we want to call it first, + * outside of the atomic block. + * Yes, this might clear the entropy pool if the wrong + * driver is attempted to be loaded, without actually + * installing a new handler, but is this really a problem, + * only the sysadmin is able to do this. + */ + rand_initialize_irq(irq); + } + + /* + * The following block of code has to be executed atomically + */ + desc = irq_desc + irq; + spin_lock_irqsave(&irq_controller_lock, flags); + p = &desc->action; + if ((old = *p) != NULL) { + /* Can't share interrupts unless both agree to */ + if (!(old->flags & new->flags & SA_SHIRQ)) { + spin_unlock_irqrestore(&irq_controller_lock, flags); + return -EBUSY; + } + + /* add new interrupt at end of irq queue */ + do { + p = &old->next; + old = *p; + } while (old); + shared = 1; + } + + *p = new; + + if (!shared) { + desc->probing = 0; + desc->running = 0; + desc->pending = 0; + desc->depth = 1; + if (!desc->noautoenable) { + desc->depth = 0; + desc->enabled = 1; + desc->chip->unmask(irq); + } + } + + spin_unlock_irqrestore(&irq_controller_lock, flags); + return 0; +} + +/** + * request_irq - allocate an interrupt line + * @irq: Interrupt line to allocate + * @handler: Function to be called when the IRQ occurs + * @irqflags: Interrupt type flags + * @devname: An ascii name for the claiming device + * @dev_id: A cookie passed back to the handler function + * + * This call allocates interrupt resources and enables the + * interrupt line and IRQ handling. From the point this + * call is made your handler function may be invoked. Since + * your handler function must clear any interrupt the board + * raises, you must take care both to initialise your hardware + * and to set up the interrupt handler in the right order. + * + * Dev_id must be globally unique. Normally the address of the + * device data structure is used as the cookie. Since the handler + * receives this value it makes sense to use it. + * + * If your interrupt is shared you must pass a non NULL dev_id + * as this is required when freeing the interrupt. + * + * Flags: + * + * SA_SHIRQ Interrupt is shared + * + * SA_INTERRUPT Disable local interrupts while processing + * + * SA_SAMPLE_RANDOM The interrupt can be used for entropy + * + */ + +//FIXME - handler used to return void - whats the significance of the change? +int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long irq_flags, const char * devname, void *dev_id) +{ + unsigned long retval; + struct irqaction *action; + + if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler || + (irq_flags & SA_SHIRQ && !dev_id)) + return -EINVAL; + + action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL); + if (!action) + return -ENOMEM; + + action->handler = handler; + action->flags = irq_flags; + action->mask = 0; + action->name = devname; + action->next = NULL; + action->dev_id = dev_id; + + retval = setup_irq(irq, action); + + if (retval) + kfree(action); + return retval; +} + +/** + * free_irq - free an interrupt + * @irq: Interrupt line to free + * @dev_id: Device identity to free + * + * Remove an interrupt handler. The handler is removed and if the + * interrupt line is no longer in use by any driver it is disabled. + * On a shared IRQ the caller must ensure the interrupt is disabled + * on the card it drives before calling this function. + * + * This function may be called from interrupt context. + */ +void free_irq(unsigned int irq, void *dev_id) +{ + struct irqaction * action, **p; + unsigned long flags; + + if (irq >= NR_IRQS || !irq_desc[irq].valid) { + printk(KERN_ERR "Trying to free IRQ%d\n",irq); +#ifdef CONFIG_DEBUG_ERRORS + __backtrace(); +#endif + return; + } + + spin_lock_irqsave(&irq_controller_lock, flags); + for (p = &irq_desc[irq].action; (action = *p) != NULL; p = &action->next) { + if (action->dev_id != dev_id) + continue; + + /* Found it - now free it */ + *p = action->next; + kfree(action); + goto out; + } + printk(KERN_ERR "Trying to free free IRQ%d\n",irq); +#ifdef CONFIG_DEBUG_ERRORS + __backtrace(); +#endif +out: + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +/* Start the interrupt probing. Unlike other architectures, + * we don't return a mask of interrupts from probe_irq_on, + * but return the number of interrupts enabled for the probe. + * The interrupts which have been enabled for probing is + * instead recorded in the irq_desc structure. + */ +unsigned long probe_irq_on(void) +{ + unsigned int i, irqs = 0; + unsigned long delay; + + /* + * first snaffle up any unassigned but + * probe-able interrupts + */ + spin_lock_irq(&irq_controller_lock); + for (i = 0; i < NR_IRQS; i++) { + if (!irq_desc[i].probe_ok || irq_desc[i].action) + continue; + + irq_desc[i].probing = 1; + irq_desc[i].triggered = 0; + if (irq_desc[i].chip->type) + irq_desc[i].chip->type(i, IRQT_PROBE); + irq_desc[i].chip->unmask(i); + irqs += 1; + } + spin_unlock_irq(&irq_controller_lock); + + /* + * wait for spurious interrupts to mask themselves out again + */ + for (delay = jiffies + HZ/10; time_before(jiffies, delay); ) + /* min 100ms delay */; + + /* + * now filter out any obviously spurious interrupts + */ + spin_lock_irq(&irq_controller_lock); + for (i = 0; i < NR_IRQS; i++) { + if (irq_desc[i].probing && irq_desc[i].triggered) { + irq_desc[i].probing = 0; + irqs -= 1; + } + } + spin_unlock_irq(&irq_controller_lock); + + return irqs; +} + +/* + * Possible return values: + * >= 0 - interrupt number + * -1 - no interrupt/many interrupts + */ +int probe_irq_off(unsigned long irqs) +{ + unsigned int i; + int irq_found = NO_IRQ; + + /* + * look at the interrupts, and find exactly one + * that we were probing has been triggered + */ + spin_lock_irq(&irq_controller_lock); + for (i = 0; i < NR_IRQS; i++) { + if (irq_desc[i].probing && + irq_desc[i].triggered) { + if (irq_found != NO_IRQ) { + irq_found = NO_IRQ; + goto out; + } + irq_found = i; + } + } + + if (irq_found == -1) + irq_found = NO_IRQ; +out: + spin_unlock_irq(&irq_controller_lock); + + return irq_found; +} + +void __init init_irq_proc(void) +{ +} + +void __init init_IRQ(void) +{ + struct irqdesc *desc; + extern void init_dma(void); + int irq; + + for (irq = 0, desc = irq_desc; irq < NR_IRQS; irq++, desc++) + *desc = bad_irq_desc; + + init_arch_irq(); + init_dma(); +} diff -Nru a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/process.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,414 @@ +/* + * linux/arch/arm26/kernel/process.c + * + * Copyright (C) 2003 Ian Molton - adapted for ARM26 + * Copyright (C) 1996-2000 Russell King - Converted to ARM. + * Origional Copyright (C) 1995 Linus Torvalds + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +extern const char *processor_modes[]; +extern void setup_mm_for_reboot(char mode); + +static volatile int hlt_counter; + +void disable_hlt(void) +{ + hlt_counter++; +} + +void enable_hlt(void) +{ + hlt_counter--; +} + +static int __init nohlt_setup(char *__unused) +{ + hlt_counter = 1; + return 1; +} + +static int __init hlt_setup(char *__unused) +{ + hlt_counter = 0; + return 1; +} + +__setup("nohlt", nohlt_setup); +__setup("hlt", hlt_setup); + +/* + * The following aren't currently used. + */ +void (*pm_idle)(void); +void (*pm_power_off)(void); + +/* + * This is our default idle handler. We need to disable + * interrupts here to ensure we don't miss a wakeup call. + */ +void default_idle(void) +{ + local_irq_disable(); + if (!need_resched() && !hlt_counter) + local_irq_enable(); +} + +/* + * The idle thread. We try to conserve power, while trying to keep + * overall latency low. The architecture specific idle is passed + * a value to indicate the level of "idleness" of the system. + */ +void cpu_idle(void) +{ + /* endless idle loop with no priority at all */ + preempt_disable(); + while (1) { + void (*idle)(void) = pm_idle; + if (!idle) + idle = default_idle; + leds_event(led_idle_start); + while (!need_resched()) + idle(); + leds_event(led_idle_end); + schedule(); + } +} + +static char reboot_mode = 'h'; + +int __init reboot_setup(char *str) +{ + reboot_mode = str[0]; + return 1; +} + +__setup("reboot=", reboot_setup); + +void machine_halt(void) +{ + leds_event(led_halted); +} + +void machine_power_off(void) +{ + leds_event(led_halted); + if (pm_power_off) + pm_power_off(); +} + +void machine_restart(char * __unused) +{ + /* + * Clean and disable cache, and turn off interrupts + */ + cpu_proc_fin(); + + /* + * Tell the mm system that we are going to reboot - + * we may need it to insert some 1:1 mappings so that + * soft boot works. + */ + setup_mm_for_reboot(reboot_mode); + + /* + * copy branch instruction to reset location and call it + */ + + *(unsigned long *)0 = *(unsigned long *)0x03800000; + ((void(*)(void))0)(); + + /* + * Whoops - the architecture was unable to reboot. + * Tell the user! Should never happen... + */ + mdelay(1000); + printk("Reboot failed -- System halted\n"); + while (1); +} + +void show_regs(struct pt_regs * regs) +{ + unsigned long flags; + + flags = condition_codes(regs); + + printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" + "sp : %08lx ip : %08lx fp : %08lx\n", + instruction_pointer(regs), + regs->ARM_lr, print_tainted(), regs->ARM_sp, + regs->ARM_ip, regs->ARM_fp); + printk("r10: %08lx r9 : %08lx r8 : %08lx\n", + regs->ARM_r10, regs->ARM_r9, + regs->ARM_r8); + printk("r7 : %08lx r6 : %08lx r5 : %08lx r4 : %08lx\n", + regs->ARM_r7, regs->ARM_r6, + regs->ARM_r5, regs->ARM_r4); + printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", + regs->ARM_r3, regs->ARM_r2, + regs->ARM_r1, regs->ARM_r0); + printk("Flags: %c%c%c%c", + flags & PSR_N_BIT ? 'N' : 'n', + flags & PSR_Z_BIT ? 'Z' : 'z', + flags & PSR_C_BIT ? 'C' : 'c', + flags & PSR_V_BIT ? 'V' : 'v'); + printk(" IRQs o%s FIQs o%s Mode %s Segment %s\n", + interrupts_enabled(regs) ? "n" : "ff", + fast_interrupts_enabled(regs) ? "n" : "ff", + processor_modes[processor_mode(regs)], + get_fs() == get_ds() ? "kernel" : "user"); +} + +void show_fpregs(struct user_fp *regs) +{ + int i; + + for (i = 0; i < 8; i++) { + unsigned long *p; + char type; + + p = (unsigned long *)(regs->fpregs + i); + + switch (regs->ftype[i]) { + case 1: type = 'f'; break; + case 2: type = 'd'; break; + case 3: type = 'e'; break; + default: type = '?'; break; + } + if (regs->init_flag) + type = '?'; + + printk(" f%d(%c): %08lx %08lx %08lx%c", + i, type, p[0], p[1], p[2], i & 1 ? '\n' : ' '); + } + + + printk("FPSR: %08lx FPCR: %08lx\n", + (unsigned long)regs->fpsr, + (unsigned long)regs->fpcr); +} + +/* + * Task structure and kernel stack allocation. + */ +static unsigned long *thread_info_head; +static unsigned int nr_thread_info; + +extern unsigned long get_page_8k(int priority); +extern void free_page_8k(unsigned long page); + +// FIXME - is this valid? +#define EXTRA_TASK_STRUCT 0 +#define ll_alloc_task_struct() ((struct thread_info *)get_page_8k(GFP_KERNEL)) +#define ll_free_task_struct(p) free_page_8k((unsigned long)(p)) + +struct thread_info *alloc_thread_info(void) +{ + struct thread_info *thread = NULL; + + if (EXTRA_TASK_STRUCT) { + unsigned long *p = thread_info_head; + + if (p) { + thread_info_head = (unsigned long *)p[0]; + nr_thread_info -= 1; + } + thread = (struct thread_info *)p; + } + + if (!thread) + thread = ll_alloc_task_struct(); + +#ifdef CONFIG_SYSRQ + /* + * The stack must be cleared if you want SYSRQ-T to + * give sensible stack usage information + */ + if (thread) { + char *p = (char *)thread; + memzero(p+KERNEL_STACK_SIZE, KERNEL_STACK_SIZE); + } +#endif + return thread; +} + +void free_thread_info(struct thread_info *thread) +{ + if (EXTRA_TASK_STRUCT && nr_thread_info < EXTRA_TASK_STRUCT) { + unsigned long *p = (unsigned long *)thread; + p[0] = (unsigned long)thread_info_head; + thread_info_head = p; + nr_thread_info += 1; + } else + ll_free_task_struct(thread); +} + +/* + * Free current thread data structures etc.. + */ +void exit_thread(void) +{ +} + +void flush_thread(void) +{ + struct thread_info *thread = current_thread_info(); + struct task_struct *tsk = current; + + memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); + memset(&thread->fpstate, 0, sizeof(union fp_state)); + + current->used_math = 0; +} + +void release_thread(struct task_struct *dead_task) +{ +} + +asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); + +int +copy_thread(int nr, unsigned long clone_flags, unsigned long esp, + unsigned long unused, struct task_struct *p, struct pt_regs *regs) +{ + struct thread_info *thread = p->thread_info; + struct pt_regs *childregs; + + childregs = __get_user_regs(thread); + *childregs = *regs; + childregs->ARM_r0 = 0; + childregs->ARM_sp = esp; + + memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save)); + thread->cpu_context.sp = (unsigned long)childregs; + thread->cpu_context.pc = (unsigned long)ret_from_fork | MODE_SVC26 | PSR_I_BIT; + + return 0; +} + +/* + * fill in the fpe structure for a core dump... + */ +int dump_fpu (struct pt_regs *regs, struct user_fp *fp) +{ + struct thread_info *thread = current_thread_info(); + int used_math = current->used_math; + + if (used_math) + memcpy(fp, &thread->fpstate.soft, sizeof (*fp)); + + return used_math; +} + +/* + * fill in the user structure for a core dump.. + */ +void dump_thread(struct pt_regs * regs, struct user * dump) +{ + struct task_struct *tsk = current; + + dump->magic = CMAGIC; + dump->start_code = tsk->mm->start_code; + dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1); + + dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT; + dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT; + dump->u_ssize = 0; + + dump->u_debugreg[0] = tsk->thread.debug.bp[0].address; + dump->u_debugreg[1] = tsk->thread.debug.bp[1].address; + dump->u_debugreg[2] = tsk->thread.debug.bp[0].insn; + dump->u_debugreg[3] = tsk->thread.debug.bp[1].insn; + dump->u_debugreg[4] = tsk->thread.debug.nsaved; + + if (dump->start_stack < 0x04000000) + dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT; + + dump->regs = *regs; + dump->u_fpvalid = dump_fpu (regs, &dump->u_fp); +} + +/* + * This is the mechanism for creating a new kernel thread. + * + * NOTE! Only a kernel-only process(ie the swapper or direct descendants + * who haven't done an "execve()") should use this: it will work within + * a system call from a "real" process, but the process memory space will + * not be free'd until both the parent and the child have exited. + * FIXME - taken from arm32 + */ +pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) +{ + register unsigned int r0 asm("r0") = flags | CLONE_VM | CLONE_UNTRACED; + register unsigned int r1 asm("r1") = 0; + register pid_t __ret asm("r0"); + + __asm__ __volatile__( + __syscall(clone)" @ kernel_thread sys_clone \n\ + movs %0, r0 @ if we are the child \n\ + bne 1f \n\ + mov fp, #0 @ ensure that fp is zero \n\ + mov r0, %4 \n\ + mov lr, pc \n\ + mov pc, %3 \n\ + b sys_exit \n\ +1: " + : "=r" (__ret) + : "0" (r0), "r" (r1), "r" (fn), "r" (arg) + : "lr"); + return __ret; +} + +/* + * These bracket the sleeping functions.. + */ +extern void scheduling_functions_start_here(void); +extern void scheduling_functions_end_here(void); +#define first_sched ((unsigned long) scheduling_functions_start_here) +#define last_sched ((unsigned long) scheduling_functions_end_here) + +unsigned long get_wchan(struct task_struct *p) +{ + unsigned long fp, lr; + unsigned long stack_page; + int count = 0; + if (!p || p == current || p->state == TASK_RUNNING) + return 0; + + stack_page = 4096 + (unsigned long)p; + fp = thread_saved_fp(p); + do { + if (fp < stack_page || fp > 4092+stack_page) + return 0; + lr = pc_pointer (((unsigned long *)fp)[-1]); + if (lr < first_sched || lr > last_sched) + return lr; + fp = *(unsigned long *) (fp - 12); + } while (count ++ < 16); + return 0; +} diff -Nru a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/ptrace.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,747 @@ +/* + * linux/arch/arm26/kernel/ptrace.c + * + * By Ross Biro 1/23/92 + * edited by Linus Torvalds + * ARM modifications Copyright (C) 2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +//#include + +#include "ptrace.h" + +#define REG_PC 15 +#define REG_PSR 15 +/* + * does not yet catch signals sent when the child dies. + * in exit.c or in signal.c. + */ + +/* + * Breakpoint SWI instruction: SWI &9F0001 + */ +#define BREAKINST_ARM 0xef9f0001 + +/* + * Get the address of the live pt_regs for the specified task. + * These are saved onto the top kernel stack when the process + * is not running. + * + * Note: if a user thread is execve'd from kernel space, the + * kernel stack will not be empty on entry to the kernel, so + * ptracing these tasks will fail. + */ +static inline struct pt_regs * +get_user_regs(struct task_struct *task) +{ + return __get_user_regs(task->thread_info); +} + +/* + * this routine will get a word off of the processes privileged stack. + * the offset is how far from the base addr as stored in the THREAD. + * this routine assumes that all the privileged stacks are in our + * data space. + */ +static inline long get_user_reg(struct task_struct *task, int offset) +{ + return get_user_regs(task)->uregs[offset]; +} + +/* + * this routine will put a word on the processes privileged stack. + * the offset is how far from the base addr as stored in the THREAD. + * this routine assumes that all the privileged stacks are in our + * data space. + */ +static inline int +put_user_reg(struct task_struct *task, int offset, long data) +{ + struct pt_regs newregs, *regs = get_user_regs(task); + int ret = -EINVAL; + + newregs = *regs; + newregs.uregs[offset] = data; + + if (valid_user_regs(&newregs)) { + regs->uregs[offset] = data; + ret = 0; + } + + return ret; +} + +static inline int +read_u32(struct task_struct *task, unsigned long addr, u32 *res) +{ + int ret; + + ret = access_process_vm(task, addr, res, sizeof(*res), 0); + + return ret == sizeof(*res) ? 0 : -EIO; +} + +static inline int +read_instr(struct task_struct *task, unsigned long addr, u32 *res) +{ + int ret; + u32 val; + ret = access_process_vm(task, addr & ~3, &val, sizeof(val), 0); + ret = ret == sizeof(val) ? 0 : -EIO; + *res = val; + return ret; +} + +/* + * Get value of register `rn' (in the instruction) + */ +static unsigned long +ptrace_getrn(struct task_struct *child, unsigned long insn) +{ + unsigned int reg = (insn >> 16) & 15; + unsigned long val; + + val = get_user_reg(child, reg); + if (reg == 15) + val = pc_pointer(val + 8); //FIXME - correct for arm26? + + return val; +} + +/* + * Get value of operand 2 (in an ALU instruction) + */ +static unsigned long +ptrace_getaluop2(struct task_struct *child, unsigned long insn) +{ + unsigned long val; + int shift; + int type; + + if (insn & 1 << 25) { + val = insn & 255; + shift = (insn >> 8) & 15; + type = 3; + } else { + val = get_user_reg (child, insn & 15); + + if (insn & (1 << 4)) + shift = (int)get_user_reg (child, (insn >> 8) & 15); + else + shift = (insn >> 7) & 31; + + type = (insn >> 5) & 3; + } + + switch (type) { + case 0: val <<= shift; break; + case 1: val >>= shift; break; + case 2: + val = (((signed long)val) >> shift); + break; + case 3: + val = (val >> shift) | (val << (32 - shift)); + break; + } + return val; +} + +/* + * Get value of operand 2 (in a LDR instruction) + */ +static unsigned long +ptrace_getldrop2(struct task_struct *child, unsigned long insn) +{ + unsigned long val; + int shift; + int type; + + val = get_user_reg(child, insn & 15); + shift = (insn >> 7) & 31; + type = (insn >> 5) & 3; + + switch (type) { + case 0: val <<= shift; break; + case 1: val >>= shift; break; + case 2: + val = (((signed long)val) >> shift); + break; + case 3: + val = (val >> shift) | (val << (32 - shift)); + break; + } + return val; +} + +#define OP_MASK 0x01e00000 +#define OP_AND 0x00000000 +#define OP_EOR 0x00200000 +#define OP_SUB 0x00400000 +#define OP_RSB 0x00600000 +#define OP_ADD 0x00800000 +#define OP_ADC 0x00a00000 +#define OP_SBC 0x00c00000 +#define OP_RSC 0x00e00000 +#define OP_ORR 0x01800000 +#define OP_MOV 0x01a00000 +#define OP_BIC 0x01c00000 +#define OP_MVN 0x01e00000 + +static unsigned long +get_branch_address(struct task_struct *child, unsigned long pc, unsigned long insn) +{ + u32 alt = 0; + + switch (insn & 0x0e000000) { + case 0x00000000: + case 0x02000000: { + /* + * data processing + */ + long aluop1, aluop2, ccbit; + + if ((insn & 0xf000) != 0xf000) + break; + + aluop1 = ptrace_getrn(child, insn); + aluop2 = ptrace_getaluop2(child, insn); + ccbit = get_user_reg(child, REG_PSR) & PSR_C_BIT ? 1 : 0; + + switch (insn & OP_MASK) { + case OP_AND: alt = aluop1 & aluop2; break; + case OP_EOR: alt = aluop1 ^ aluop2; break; + case OP_SUB: alt = aluop1 - aluop2; break; + case OP_RSB: alt = aluop2 - aluop1; break; + case OP_ADD: alt = aluop1 + aluop2; break; + case OP_ADC: alt = aluop1 + aluop2 + ccbit; break; + case OP_SBC: alt = aluop1 - aluop2 + ccbit; break; + case OP_RSC: alt = aluop2 - aluop1 + ccbit; break; + case OP_ORR: alt = aluop1 | aluop2; break; + case OP_MOV: alt = aluop2; break; + case OP_BIC: alt = aluop1 & ~aluop2; break; + case OP_MVN: alt = ~aluop2; break; + } + break; + } + + case 0x04000000: + case 0x06000000: + /* + * ldr + */ + if ((insn & 0x0010f000) == 0x0010f000) { + unsigned long base; + + base = ptrace_getrn(child, insn); + if (insn & 1 << 24) { + long aluop2; + + if (insn & 0x02000000) + aluop2 = ptrace_getldrop2(child, insn); + else + aluop2 = insn & 0xfff; + + if (insn & 1 << 23) + base += aluop2; + else + base -= aluop2; + } + if (read_u32(child, base, &alt) == 0) + alt = pc_pointer(alt); + } + break; + + case 0x08000000: + /* + * ldm + */ + if ((insn & 0x00108000) == 0x00108000) { + unsigned long base; + unsigned int nr_regs; + + if (insn & (1 << 23)) { + nr_regs = hweight16(insn & 65535) << 2; + + if (!(insn & (1 << 24))) + nr_regs -= 4; + } else { + if (insn & (1 << 24)) + nr_regs = -4; + else + nr_regs = 0; + } + + base = ptrace_getrn(child, insn); + + if (read_u32(child, base + nr_regs, &alt) == 0) + alt = pc_pointer(alt); + break; + } + break; + + case 0x0a000000: { + /* + * bl or b + */ + signed long displ; + /* It's a branch/branch link: instead of trying to + * figure out whether the branch will be taken or not, + * we'll put a breakpoint at both locations. This is + * simpler, more reliable, and probably not a whole lot + * slower than the alternative approach of emulating the + * branch. + */ + displ = (insn & 0x00ffffff) << 8; + displ = (displ >> 6) + 8; + if (displ != 0 && displ != 4) + alt = pc + displ; + } + break; + } + + return alt; +} + +static int +swap_insn(struct task_struct *task, unsigned long addr, + void *old_insn, void *new_insn, int size) +{ + int ret; + + ret = access_process_vm(task, addr, old_insn, size, 0); + if (ret == size) + ret = access_process_vm(task, addr, new_insn, size, 1); + return ret; +} + +static void +add_breakpoint(struct task_struct *task, struct debug_info *dbg, unsigned long addr) +{ + int nr = dbg->nsaved; + + if (nr < 2) { + u32 new_insn = BREAKINST_ARM; + int res; + + res = swap_insn(task, addr, &dbg->bp[nr].insn, &new_insn, 4); + + if (res == 4) { + dbg->bp[nr].address = addr; + dbg->nsaved += 1; + } + } else + printk(KERN_ERR "ptrace: too many breakpoints\n"); +} + +/* + * Clear one breakpoint in the user program. We copy what the hardware + * does and use bit 0 of the address to indicate whether this is a Thumb + * breakpoint or an ARM breakpoint. + */ +static void clear_breakpoint(struct task_struct *task, struct debug_entry *bp) +{ + unsigned long addr = bp->address; + u32 old_insn; + int ret; + + ret = swap_insn(task, addr & ~3, &old_insn, + &bp->insn, 4); + + if (ret != 4 || old_insn != BREAKINST_ARM) + printk(KERN_ERR "%s:%d: corrupted ARM breakpoint at " + "0x%08lx (0x%08x)\n", task->comm, task->pid, + addr, old_insn); +} + +void ptrace_set_bpt(struct task_struct *child) +{ + struct pt_regs *regs; + unsigned long pc; + u32 insn; + int res; + + regs = get_user_regs(child); + pc = instruction_pointer(regs); + + res = read_instr(child, pc, &insn); + if (!res) { + struct debug_info *dbg = &child->thread.debug; + unsigned long alt; + + dbg->nsaved = 0; + + alt = get_branch_address(child, pc, insn); + if (alt) + add_breakpoint(child, dbg, alt); + + /* + * Note that we ignore the result of setting the above + * breakpoint since it may fail. When it does, this is + * not so much an error, but a forewarning that we may + * be receiving a prefetch abort shortly. + * + * If we don't set this breakpoint here, then we can + * lose control of the thread during single stepping. + */ + if (!alt || predicate(insn) != PREDICATE_ALWAYS) + add_breakpoint(child, dbg, pc + 4); + } +} + +/* + * Ensure no single-step breakpoint is pending. Returns non-zero + * value if child was being single-stepped. + */ +void ptrace_cancel_bpt(struct task_struct *child) +{ + int i, nsaved = child->thread.debug.nsaved; + + child->thread.debug.nsaved = 0; + + if (nsaved > 2) { + printk("ptrace_cancel_bpt: bogus nsaved: %d!\n", nsaved); + nsaved = 2; + } + + for (i = 0; i < nsaved; i++) + clear_breakpoint(child, &child->thread.debug.bp[i]); +} + +/* + * Called by kernel/ptrace.c when detaching.. + * + * Make sure the single step bit is not set. + */ +void ptrace_disable(struct task_struct *child) +{ + child->ptrace &= ~PT_SINGLESTEP; + ptrace_cancel_bpt(child); +} + +/* + * Handle hitting a breakpoint. + */ +void ptrace_break(struct task_struct *tsk, struct pt_regs *regs) +{ + siginfo_t info; + + /* + * The PC is always left pointing at the next instruction. Fix this. + */ + regs->ARM_pc -= 4; + + if (tsk->thread.debug.nsaved == 0) + printk(KERN_ERR "ptrace: bogus breakpoint trap\n"); + + ptrace_cancel_bpt(tsk); + + info.si_signo = SIGTRAP; + info.si_errno = 0; + info.si_code = TRAP_BRKPT; + info.si_addr = (void *)instruction_pointer(regs) - 4; + + force_sig_info(SIGTRAP, &info, tsk); +} + +/* + * Read the word at offset "off" into the "struct user". We + * actually access the pt_regs stored on the kernel stack. + */ +static int ptrace_read_user(struct task_struct *tsk, unsigned long off, + unsigned long *ret) +{ + unsigned long tmp; + + if (off & 3 || off >= sizeof(struct user)) + return -EIO; + + tmp = 0; + if (off < sizeof(struct pt_regs)) + tmp = get_user_reg(tsk, off >> 2); + + return put_user(tmp, ret); +} + +/* + * Write the word at offset "off" into "struct user". We + * actually access the pt_regs stored on the kernel stack. + */ +static int ptrace_write_user(struct task_struct *tsk, unsigned long off, + unsigned long val) +{ + if (off & 3 || off >= sizeof(struct user)) + return -EIO; + + if (off >= sizeof(struct pt_regs)) + return 0; + + return put_user_reg(tsk, off >> 2, val); +} + +/* + * Get all user integer registers. + */ +static int ptrace_getregs(struct task_struct *tsk, void *uregs) +{ + struct pt_regs *regs = get_user_regs(tsk); + + return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0; +} + +/* + * Set all user integer registers. + */ +static int ptrace_setregs(struct task_struct *tsk, void *uregs) +{ + struct pt_regs newregs; + int ret; + + ret = -EFAULT; + if (copy_from_user(&newregs, uregs, sizeof(struct pt_regs)) == 0) { + struct pt_regs *regs = get_user_regs(tsk); + + ret = -EINVAL; + if (valid_user_regs(&newregs)) { + *regs = newregs; + ret = 0; + } + } + + return ret; +} + +/* + * Get the child FPU state. + */ +static int ptrace_getfpregs(struct task_struct *tsk, void *ufp) +{ + return copy_to_user(ufp, &tsk->thread_info->fpstate, + sizeof(struct user_fp)) ? -EFAULT : 0; +} + +/* + * Set the child FPU state. + */ +static int ptrace_setfpregs(struct task_struct *tsk, void *ufp) +{ + tsk->used_math = 1; + return copy_from_user(&tsk->thread_info->fpstate, ufp, + sizeof(struct user_fp)) ? -EFAULT : 0; +} + +static int do_ptrace(int request, struct task_struct *child, long addr, long data) +{ + unsigned long tmp; + int ret; + + switch (request) { + /* + * read word at location "addr" in the child process. + */ + case PTRACE_PEEKTEXT: + case PTRACE_PEEKDATA: + ret = access_process_vm(child, addr, &tmp, + sizeof(unsigned long), 0); + if (ret == sizeof(unsigned long)) + ret = put_user(tmp, (unsigned long *) data); + else + ret = -EIO; + break; + + case PTRACE_PEEKUSR: + ret = ptrace_read_user(child, addr, (unsigned long *)data); + break; + + /* + * write the word at location addr. + */ + case PTRACE_POKETEXT: + case PTRACE_POKEDATA: + ret = access_process_vm(child, addr, &data, + sizeof(unsigned long), 1); + if (ret == sizeof(unsigned long)) + ret = 0; + else + ret = -EIO; + break; + + case PTRACE_POKEUSR: + ret = ptrace_write_user(child, addr, data); + break; + + /* + * continue/restart and stop at next (return from) syscall + */ + case PTRACE_SYSCALL: + case PTRACE_CONT: + ret = -EIO; + if ((unsigned long) data > _NSIG) + 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; + /* make sure single-step breakpoint is gone. */ + child->ptrace &= ~PT_SINGLESTEP; + ptrace_cancel_bpt(child); + wake_up_process(child); + ret = 0; + break; + + /* + * make the child exit. Best I can do is send it a sigkill. + * perhaps it should be put in the status that it wants to + * exit. + */ + case PTRACE_KILL: + /* make sure single-step breakpoint is gone. */ + child->ptrace &= ~PT_SINGLESTEP; + ptrace_cancel_bpt(child); + if (child->state != TASK_ZOMBIE) { + child->exit_code = SIGKILL; + wake_up_process(child); + } + ret = 0; + break; + + /* + * execute single instruction. + */ + case PTRACE_SINGLESTEP: + ret = -EIO; + if ((unsigned long) data > _NSIG) + break; + child->ptrace |= PT_SINGLESTEP; + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + child->exit_code = data; + /* give it a chance to run. */ + wake_up_process(child); + ret = 0; + break; + + case PTRACE_DETACH: + ret = ptrace_detach(child, data); + break; + + case PTRACE_GETREGS: + ret = ptrace_getregs(child, (void *)data); + break; + + case PTRACE_SETREGS: + ret = ptrace_setregs(child, (void *)data); + break; + + case PTRACE_GETFPREGS: + ret = ptrace_getfpregs(child, (void *)data); + break; + + case PTRACE_SETFPREGS: + ret = ptrace_setfpregs(child, (void *)data); + break; + + default: + ret = ptrace_request(child, request, addr, data); + break; + } + + return ret; +} + +asmlinkage int sys_ptrace(long request, long pid, long addr, long data) +{ + struct task_struct *child; + int ret; + + lock_kernel(); + ret = -EPERM; + if (request == PTRACE_TRACEME) { + /* are we already being traced? */ + if (current->ptrace & PT_PTRACED) + goto out; + ret = security_ptrace(current->parent, current); + if (ret) + goto out; + /* set the ptrace bit in the process flags. */ + current->ptrace |= PT_PTRACED; + ret = 0; + goto out; + } + ret = -ESRCH; + read_lock(&tasklist_lock); + child = find_task_by_pid(pid); + if (child) + get_task_struct(child); + read_unlock(&tasklist_lock); + if (!child) + goto out; + + ret = -EPERM; + if (pid == 1) /* you may not mess with init */ + goto out_tsk; + + if (request == PTRACE_ATTACH) { + ret = ptrace_attach(child); + goto out_tsk; + } + ret = ptrace_check_attach(child, request == PTRACE_KILL); + if (ret == 0) + ret = do_ptrace(request, child, addr, data); + +out_tsk: + put_task_struct(child); +out: + unlock_kernel(); + return ret; +} + +asmlinkage void syscall_trace(int why, struct pt_regs *regs) +{ + unsigned long ip; + + if (!test_thread_flag(TIF_SYSCALL_TRACE)) + return; + if (!(current->ptrace & PT_PTRACED)) + return; + + /* + * Save IP. IP is used to denote syscall entry/exit: + * IP = 0 -> entry, = 1 -> exit + */ + ip = regs->ARM_ip; + regs->ARM_ip = why; + + /* the 0x80 provides a way for the tracing parent to distinguish + between a syscall stop and SIGTRAP delivery */ + current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) + ? 0x80 : 0); + current->state = TASK_STOPPED; + notify_parent(current, SIGCHLD); + schedule(); + /* + * this isn't the same as continuing with a signal, but it will do + * for normal use. strace only continues with a signal if the + * stopping signal is not SIGTRAP. -brl + */ + if (current->exit_code) { + send_sig(current->exit_code, current, 1); + current->exit_code = 0; + } + regs->ARM_ip = ip; +} diff -Nru a/arch/arm26/kernel/ptrace.h b/arch/arm26/kernel/ptrace.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/ptrace.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,13 @@ +/* + * linux/arch/arm26/kernel/ptrace.h + * + * Copyright (C) 2000-2003 Russell King + * Copyright (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +extern void ptrace_cancel_bpt(struct task_struct *); +extern void ptrace_set_bpt(struct task_struct *); +extern void ptrace_break(struct task_struct *, struct pt_regs *); diff -Nru a/arch/arm26/kernel/semaphore.c b/arch/arm26/kernel/semaphore.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/semaphore.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,215 @@ +/* + * ARM semaphore implementation, taken from + * + * i386 semaphore implementation. + * + * (C) Copyright 1999 Linus Torvalds + * (C) Copyright 2003 Ian Molton (ARM26 mods) + * + * Modified for ARM by Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +#include + +/* + * Semaphores are implemented using a two-way counter: + * The "count" variable is decremented for each process + * that tries to acquire the semaphore, while the "sleeping" + * variable is a count of such acquires. + * + * Notably, the inline "up()" and "down()" functions can + * efficiently test if they need to do any extra work (up + * needs to do something only if count was negative before + * the increment operation. + * + * "sleeping" and the contention routine ordering is + * protected by the semaphore spinlock. + * + * Note that these functions are only called when there is + * contention on the lock, and as such all this is the + * "non-critical" part of the whole semaphore business. The + * critical part is the inline stuff in + * where we want to avoid any extra jumps and calls. + */ + +/* + * Logic: + * - only on a boundary condition do we need to care. When we go + * from a negative count to a non-negative, we wake people up. + * - when we go from a non-negative count to a negative do we + * (a) synchronize with the "sleeper" count and (b) make sure + * that we're on the wakeup list before we synchronize so that + * we cannot lose wakeup events. + */ + +void __up(struct semaphore *sem) +{ + wake_up(&sem->wait); +} + +static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED; + +void __down(struct semaphore * sem) +{ + struct task_struct *tsk = current; + DECLARE_WAITQUEUE(wait, tsk); + tsk->state = TASK_UNINTERRUPTIBLE; + add_wait_queue_exclusive(&sem->wait, &wait); + + spin_lock_irq(&semaphore_lock); + sem->sleepers++; + for (;;) { + int sleepers = sem->sleepers; + + /* + * Add "everybody else" into it. They aren't + * playing, because we own the spinlock. + */ + if (!atomic_add_negative(sleepers - 1, &sem->count)) { + sem->sleepers = 0; + break; + } + sem->sleepers = 1; /* us - see -1 above */ + spin_unlock_irq(&semaphore_lock); + + schedule(); + tsk->state = TASK_UNINTERRUPTIBLE; + spin_lock_irq(&semaphore_lock); + } + spin_unlock_irq(&semaphore_lock); + remove_wait_queue(&sem->wait, &wait); + tsk->state = TASK_RUNNING; + wake_up(&sem->wait); +} + +int __down_interruptible(struct semaphore * sem) +{ + int retval = 0; + struct task_struct *tsk = current; + DECLARE_WAITQUEUE(wait, tsk); + tsk->state = TASK_INTERRUPTIBLE; + add_wait_queue_exclusive(&sem->wait, &wait); + + spin_lock_irq(&semaphore_lock); + sem->sleepers ++; + for (;;) { + int sleepers = sem->sleepers; + + /* + * With signals pending, this turns into + * the trylock failure case - we won't be + * sleeping, and we* can't get the lock as + * it has contention. Just correct the count + * and exit. + */ + if (signal_pending(current)) { + retval = -EINTR; + sem->sleepers = 0; + atomic_add(sleepers, &sem->count); + break; + } + + /* + * Add "everybody else" into it. They aren't + * playing, because we own the spinlock. The + * "-1" is because we're still hoping to get + * the lock. + */ + if (!atomic_add_negative(sleepers - 1, &sem->count)) { + sem->sleepers = 0; + break; + } + sem->sleepers = 1; /* us - see -1 above */ + spin_unlock_irq(&semaphore_lock); + + schedule(); + tsk->state = TASK_INTERRUPTIBLE; + spin_lock_irq(&semaphore_lock); + } + spin_unlock_irq(&semaphore_lock); + tsk->state = TASK_RUNNING; + remove_wait_queue(&sem->wait, &wait); + wake_up(&sem->wait); + return retval; +} + +/* + * Trylock failed - make sure we correct for + * having decremented the count. + * + * We could have done the trylock with a + * single "cmpxchg" without failure cases, + * but then it wouldn't work on a 386. + */ +int __down_trylock(struct semaphore * sem) +{ + int sleepers; + unsigned long flags; + + spin_lock_irqsave(&semaphore_lock, flags); + sleepers = sem->sleepers + 1; + sem->sleepers = 0; + + /* + * Add "everybody else" and us into it. They aren't + * playing, because we own the spinlock. + */ + if (!atomic_add_negative(sleepers, &sem->count)) + wake_up(&sem->wait); + + spin_unlock_irqrestore(&semaphore_lock, flags); + return 1; +} + +/* + * The semaphore operations have a special calling sequence that + * allow us to do a simpler in-line version of them. These routines + * need to convert that sequence back into the C sequence when + * there is contention on the semaphore. + * + * ip contains the semaphore pointer on entry. Save the C-clobbered + * registers (r0 to r3 and lr), but not ip, as we use it as a return + * value in some cases.. + */ +asm(" .align 5 \n\ + .globl __down_failed \n\ +__down_failed: \n\ + stmfd sp!, {r0 - r3, lr} \n\ + mov r0, ip \n\ + bl __down \n\ + ldmfd sp!, {r0 - r3, pc}^ \n\ + \n\ + .align 5 \n\ + .globl __down_interruptible_failed \n\ +__down_interruptible_failed: \n\ + stmfd sp!, {r0 - r3, lr} \n\ + mov r0, ip \n\ + bl __down_interruptible \n\ + mov ip, r0 \n\ + ldmfd sp!, {r0 - r3, pc}^ \n\ + \n\ + .align 5 \n\ + .globl __down_trylock_failed \n\ +__down_trylock_failed: \n\ + stmfd sp!, {r0 - r3, lr} \n\ + mov r0, ip \n\ + bl __down_trylock \n\ + mov ip, r0 \n\ + ldmfd sp!, {r0 - r3, pc}^ \n\ + \n\ + .align 5 \n\ + .globl __up_wakeup \n\ +__up_wakeup: \n\ + stmfd sp!, {r0 - r3, lr} \n\ + mov r0, ip \n\ + bl __up \n\ + ldmfd sp!, {r0 - r3, pc}^ \n\ + "); + diff -Nru a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/setup.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,581 @@ +/* + * linux/arch/arm/kernel/setup.c + * + * Copyright (C) 1995-2001 Russell King + * Copyright (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifndef MEM_SIZE +#define MEM_SIZE (16*1024*1024) +#endif + +#ifdef CONFIG_PREEMPT +spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED; +#endif + +#if defined(CONFIG_FPE_NWFPE) +char fpe_type[8]; + +static int __init fpe_setup(char *line) +{ + memcpy(fpe_type, line, 8); + return 1; +} + +__setup("fpe=", fpe_setup); +#endif + +extern void paging_init(struct meminfo *); +extern void convert_to_tag_list(struct tag *tags); +extern void squash_mem_tags(struct tag *tag); +extern void bootmem_init(struct meminfo *); +extern int root_mountflags; +extern int _stext, _text, _etext, _edata, _end; + +unsigned int processor_id; +unsigned int __machine_arch_type; +unsigned int system_rev; +unsigned int system_serial_low; +unsigned int system_serial_high; +unsigned int elf_hwcap; + +struct processor processor; + +unsigned char aux_device_present; +char elf_platform[ELF_PLATFORM_SIZE]; +char saved_command_line[COMMAND_LINE_SIZE]; + +unsigned long phys_initrd_start __initdata = 0; +unsigned long phys_initrd_size __initdata = 0; +static struct meminfo meminfo __initdata = { 0, }; +static struct proc_info_item proc_info; +static const char *machine_name; +static char command_line[COMMAND_LINE_SIZE]; + +static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; + +/* + * Standard memory resources + */ +static struct resource mem_res[] = { + { "Video RAM", 0, 0, IORESOURCE_MEM }, + { "Kernel code", 0, 0, IORESOURCE_MEM }, + { "Kernel data", 0, 0, IORESOURCE_MEM } +}; + +#define video_ram mem_res[0] +#define kernel_code mem_res[1] +#define kernel_data mem_res[2] + +static struct resource io_res[] = { + { "reserved", 0x3bc, 0x3be, IORESOURCE_IO | IORESOURCE_BUSY }, + { "reserved", 0x378, 0x37f, IORESOURCE_IO | IORESOURCE_BUSY }, + { "reserved", 0x278, 0x27f, IORESOURCE_IO | IORESOURCE_BUSY } +}; + +#define lp0 io_res[0] +#define lp1 io_res[1] +#define lp2 io_res[2] + +#define dump_cpu_info() do { } while (0) + +static void __init setup_processor(void) +{ + extern struct proc_info_list __proc_info_begin, __proc_info_end; + struct proc_info_list *list; + + /* + * locate processor in the list of supported processor + * types. The linker builds this table for us from the + * entries in arch/arm/mm/proc-*.S + */ + for (list = &__proc_info_begin; list < &__proc_info_end ; list++) + if ((processor_id & list->cpu_mask) == list->cpu_val) + break; + /* + * If processor type is unrecognised, then we + * can do nothing... + */ + if (list >= &__proc_info_end) { + printk("CPU configuration botched (ID %08x), unable " + "to continue.\n", processor_id); + while (1); + } + + proc_info = *list->info; + processor = *list->proc; + + + printk("CPU: %s %s revision %d\n", + proc_info.manufacturer, proc_info.cpu_name, + (int)processor_id & 15); + + dump_cpu_info(); + + sprintf(system_utsname.machine, "%s", list->arch_name); + sprintf(elf_platform, "%s", list->elf_name); + elf_hwcap = list->elf_hwcap; + + cpu_proc_init(); +} + +static struct machine_desc * __init setup_machine(unsigned int nr) +{ + extern struct machine_desc __arch_info_begin, __arch_info_end; + struct machine_desc *list; + + /* + * locate architecture in the list of supported architectures. + */ + for (list = &__arch_info_begin; list < &__arch_info_end; list++) + if (list->nr == nr) + break; + + /* + * If the architecture type is not recognised, then we + * can co nothing... + */ + if (list >= &__arch_info_end) { + printk("Architecture configuration botched (nr %d), unable " + "to continue.\n", nr); + while (1); + } + + printk("Machine: %s\n", list->name); + + return list; +} + +/* + * Initial parsing of the command line. We need to pick out the + * memory size. We look for mem=size@start, where start and size + * are "size[KkMm]" + */ +static void __init +parse_cmdline(struct meminfo *mi, char **cmdline_p, char *from) +{ + char c = ' ', *to = command_line; + int usermem = 0, len = 0; + + for (;;) { + if (c == ' ' && !memcmp(from, "mem=", 4)) { + unsigned long size, start; + + if (to != command_line) + to -= 1; + + /* + * If the user specifies memory size, we + * blow away any automatically generated + * size. + */ + if (usermem == 0) { + usermem = 1; + mi->nr_banks = 0; + } + + start = PHYS_OFFSET; + size = memparse(from + 4, &from); + if (*from == '@') + start = memparse(from + 1, &from); + + mi->bank[mi->nr_banks].start = start; + mi->bank[mi->nr_banks].size = size; + mi->bank[mi->nr_banks].node = PHYS_TO_NID(start); + mi->nr_banks += 1; + } + c = *from++; + if (!c) + break; + if (COMMAND_LINE_SIZE <= ++len) + break; + *to++ = c; + } + *to = '\0'; + *cmdline_p = command_line; +} + +static void __init +setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz) +{ +#ifdef CONFIG_BLK_DEV_RAM + extern int rd_size, rd_image_start, rd_prompt, rd_doload; + + rd_image_start = image_start; + rd_prompt = prompt; + rd_doload = doload; + + if (rd_sz) + rd_size = rd_sz; +#endif +} + +static void __init +request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) +{ + struct resource *res; + int i; + + kernel_code.start = init_mm.start_code; + kernel_code.end = init_mm.end_code - 1; + kernel_data.start = init_mm.end_code; + kernel_data.end = init_mm.brk - 1; + + for (i = 0; i < mi->nr_banks; i++) { + unsigned long virt_start, virt_end; + + if (mi->bank[i].size == 0) + continue; + + virt_start = mi->bank[i].start; + virt_end = virt_start + mi->bank[i].size - 1; + + res = alloc_bootmem_low(sizeof(*res)); + res->name = "System RAM"; + res->start = virt_start; + res->end = virt_end; + res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; + + request_resource(&iomem_resource, res); + + if (kernel_code.start >= res->start && + kernel_code.end <= res->end) + request_resource(res, &kernel_code); + if (kernel_data.start >= res->start && + kernel_data.end <= res->end) + request_resource(res, &kernel_data); + } + + if (mdesc->video_start) { + video_ram.start = mdesc->video_start; + video_ram.end = mdesc->video_end; + request_resource(&iomem_resource, &video_ram); + } + + /* + * Some machines don't have the possibility of ever + * possessing lp0, lp1 or lp2 + */ + if (mdesc->reserve_lp0) + request_resource(&ioport_resource, &lp0); + if (mdesc->reserve_lp1) + request_resource(&ioport_resource, &lp1); + if (mdesc->reserve_lp2) + request_resource(&ioport_resource, &lp2); +} + +/* + * Tag parsing. + * + * This is the new way of passing data to the kernel at boot time. Rather + * than passing a fixed inflexible structure to the kernel, we pass a list + * of variable-sized tags to the kernel. The first tag must be a ATAG_CORE + * tag for the list to be recognised (to distinguish the tagged list from + * a param_struct). The list is terminated with a zero-length tag (this tag + * is not parsed in any way). + */ +static int __init parse_tag_core(const struct tag *tag) +{ + if (tag->hdr.size > 2) { + if ((tag->u.core.flags & 1) == 0) + root_mountflags &= ~MS_RDONLY; + ROOT_DEV = tag->u.core.rootdev; + } + return 0; +} + +__tagtable(ATAG_CORE, parse_tag_core); + +static int __init parse_tag_mem32(const struct tag *tag) +{ + if (meminfo.nr_banks >= NR_BANKS) { + printk(KERN_WARNING + "Ignoring memory bank 0x%08x size %dKB\n", + tag->u.mem.start, tag->u.mem.size / 1024); + return -EINVAL; + } + meminfo.bank[meminfo.nr_banks].start = tag->u.mem.start; + meminfo.bank[meminfo.nr_banks].size = tag->u.mem.size; + meminfo.bank[meminfo.nr_banks].node = PHYS_TO_NID(tag->u.mem.start); + meminfo.nr_banks += 1; + + return 0; +} + +__tagtable(ATAG_MEM, parse_tag_mem32); + +#if defined(CONFIG_DUMMY_CONSOLE) +struct screen_info screen_info = { + orig_video_lines: 30, + orig_video_cols: 80, + orig_video_mode: 0, + orig_video_ega_bx: 0, + orig_video_isVGA: 1, + orig_video_points: 8 +}; + +static int __init parse_tag_videotext(const struct tag *tag) +{ + screen_info.orig_x = tag->u.videotext.x; + screen_info.orig_y = tag->u.videotext.y; + screen_info.orig_video_page = tag->u.videotext.video_page; + screen_info.orig_video_mode = tag->u.videotext.video_mode; + screen_info.orig_video_cols = tag->u.videotext.video_cols; + screen_info.orig_video_ega_bx = tag->u.videotext.video_ega_bx; + screen_info.orig_video_lines = tag->u.videotext.video_lines; + screen_info.orig_video_isVGA = tag->u.videotext.video_isvga; + screen_info.orig_video_points = tag->u.videotext.video_points; + return 0; +} + +__tagtable(ATAG_VIDEOTEXT, parse_tag_videotext); +#endif + +static int __init parse_tag_ramdisk(const struct tag *tag) +{ + setup_ramdisk((tag->u.ramdisk.flags & 1) == 0, + (tag->u.ramdisk.flags & 2) == 0, + tag->u.ramdisk.start, tag->u.ramdisk.size); + return 0; +} + +__tagtable(ATAG_RAMDISK, parse_tag_ramdisk); + +static int __init parse_tag_initrd(const struct tag *tag) +{ + printk(KERN_WARNING "ATAG_INITRD is deprecated; please update your bootloader. \n"); + phys_initrd_start = (unsigned long)tag->u.initrd.start; + phys_initrd_size = (unsigned long)tag->u.initrd.size; + return 0; +} + +__tagtable(ATAG_INITRD, parse_tag_initrd); + +static int __init parse_tag_initrd2(const struct tag *tag) +{ + printk(KERN_WARNING "ATAG_INITRD is deprecated; please update your bootloader. \n"); + phys_initrd_start = (unsigned long)tag->u.initrd.start; + phys_initrd_size = (unsigned long)tag->u.initrd.size; + return 0; +} + +__tagtable(ATAG_INITRD2, parse_tag_initrd2); + +static int __init parse_tag_serialnr(const struct tag *tag) +{ + system_serial_low = tag->u.serialnr.low; + system_serial_high = tag->u.serialnr.high; + return 0; +} + +__tagtable(ATAG_SERIAL, parse_tag_serialnr); + +static int __init parse_tag_revision(const struct tag *tag) +{ + system_rev = tag->u.revision.rev; + return 0; +} + +__tagtable(ATAG_REVISION, parse_tag_revision); + +static int __init parse_tag_cmdline(const struct tag *tag) +{ + strncpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); + default_command_line[COMMAND_LINE_SIZE - 1] = '\0'; + return 0; +} + +__tagtable(ATAG_CMDLINE, parse_tag_cmdline); + +/* + * Scan the tag table for this tag, and call its parse function. + * The tag table is built by the linker from all the __tagtable + * declarations. + */ +static int __init parse_tag(const struct tag *tag) +{ + extern struct tagtable __tagtable_begin, __tagtable_end; + struct tagtable *t; + + for (t = &__tagtable_begin; t < &__tagtable_end; t++) + if (tag->hdr.tag == t->tag) { + t->parse(tag); + break; + } + + return t < &__tagtable_end; +} + +/* + * Parse all tags in the list, checking both the global and architecture + * specific tag tables. + */ +static void __init parse_tags(const struct tag *t) +{ + for (; t->hdr.size; t = tag_next(t)) + if (!parse_tag(t)) + printk(KERN_WARNING + "Ignoring unrecognised tag 0x%08x\n", + t->hdr.tag); +} + +/* + * This holds our defaults. + */ +static struct init_tags { + struct tag_header hdr1; + struct tag_core core; + struct tag_header hdr2; + struct tag_mem32 mem; + struct tag_header hdr3; +} init_tags __initdata = { + { tag_size(tag_core), ATAG_CORE }, + { 1, PAGE_SIZE, 0xff }, + { tag_size(tag_mem32), ATAG_MEM }, + { MEM_SIZE, PHYS_OFFSET }, + { 0, ATAG_NONE } +}; + +void __init setup_arch(char **cmdline_p) +{ + struct tag *tags = (struct tag *)&init_tags; + struct machine_desc *mdesc; + char *from = default_command_line; + + setup_processor(); + mdesc = setup_machine(machine_arch_type); + machine_name = mdesc->name; + + if (mdesc->param_offset) + tags = (struct tag *)mdesc->param_offset; //FIXME - ugly? + + /* + * If we have the old style parameters, convert them to + * a tag list. + */ + if (tags->hdr.tag != ATAG_CORE) + convert_to_tag_list(tags); + if (tags->hdr.tag != ATAG_CORE) + tags = (struct tag *)&init_tags; + if (tags->hdr.tag == ATAG_CORE) { + if (meminfo.nr_banks != 0) + squash_mem_tags(tags); + parse_tags(tags); + } + + init_mm.start_code = (unsigned long) &_text; + init_mm.end_code = (unsigned long) &_etext; + init_mm.end_data = (unsigned long) &_edata; + init_mm.brk = (unsigned long) &_end; + + memcpy(saved_command_line, from, COMMAND_LINE_SIZE); + saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; + parse_cmdline(&meminfo, cmdline_p, from); + bootmem_init(&meminfo); + paging_init(&meminfo); + request_standard_resources(&meminfo, mdesc); + + /* + * Set up various architecture-specific pointers + */ + init_arch_irq = mdesc->init_irq; + +#ifdef CONFIG_VT +#if defined(CONFIG_DUMMY_CONSOLE) + conswitchp = &dummy_con; +#endif +#endif +} + +static const char *hwcap_str[] = { + "swp", + "half", + "thumb", + "26bit", + "fastmult", + "fpa", + "vfp", + "edsp", + NULL +}; + +static int c_show(struct seq_file *m, void *v) +{ + int i; + + seq_printf(m, "Processor\t: %s %s rev %d (%s)\n", + proc_info.manufacturer, proc_info.cpu_name, + (int)processor_id & 15, elf_platform); + + seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", + loops_per_jiffy / (500000/HZ), + (loops_per_jiffy / (5000/HZ)) % 100); + + /* dump out the processor features */ + seq_puts(m, "Features\t: "); + + for (i = 0; hwcap_str[i]; i++) + if (elf_hwcap & (1 << i)) + seq_printf(m, "%s ", hwcap_str[i]); + + seq_puts(m, "\n"); + + seq_printf(m, "CPU part\t\t: %07x\n", processor_id >> 4); + seq_printf(m, "CPU revision\t: %d\n\n", processor_id & 15); + seq_printf(m, "Hardware\t: %s\n", machine_name); + seq_printf(m, "Revision\t: %04x\n", system_rev); + seq_printf(m, "Serial\t\t: %08x%08x\n", + system_serial_high, system_serial_low); + + return 0; +} + +static void *c_start(struct seq_file *m, loff_t *pos) +{ + return *pos < 1 ? (void *)1 : NULL; +} + +static void *c_next(struct seq_file *m, void *v, loff_t *pos) +{ + ++*pos; + return NULL; +} + +static void c_stop(struct seq_file *m, void *v) +{ +} + +struct seq_operations cpuinfo_op = { + .start = c_start, + .next = c_next, + .stop = c_stop, + .show = c_show +}; diff -Nru a/arch/arm26/kernel/signal.c b/arch/arm26/kernel/signal.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/signal.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,542 @@ +/* + * linux/arch/arm26/kernel/signal.c + * + * Copyright (C) 1995-2002 Russell King + * Copyright (C) 2003 Ian Molton (ARM26) + * + * FIXME!!! This is probably very broken (13/05/2003) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "ptrace.h" + +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) + +/* + * For ARM syscalls, we encode the syscall number into the instruction. + */ +#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn)) +#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn)) + +static int do_signal(sigset_t *oldset, struct pt_regs * regs, int syscall); + +/* + * atomically swap in the new signal mask, and wait for a signal. + */ +asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t mask, struct pt_regs *regs) +{ + sigset_t saveset; + + mask &= _BLOCKABLE; + spin_lock_irq(¤t->sighand->siglock); + saveset = current->blocked; + siginitset(¤t->blocked, mask); + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + regs->ARM_r0 = -EINTR; + + while (1) { + current->state = TASK_INTERRUPTIBLE; + schedule(); + if (do_signal(&saveset, regs, 0)) + return regs->ARM_r0; + } +} + +asmlinkage int +sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, struct pt_regs *regs) +{ + sigset_t saveset, newset; + + /* XXX: Don't preclude handling different sized sigset_t's. */ + if (sigsetsize != sizeof(sigset_t)) + return -EINVAL; + + if (copy_from_user(&newset, unewset, sizeof(newset))) + return -EFAULT; + sigdelsetmask(&newset, ~_BLOCKABLE); + + spin_lock_irq(¤t->sighand->siglock); + saveset = current->blocked; + current->blocked = newset; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + regs->ARM_r0 = -EINTR; + + while (1) { + current->state = TASK_INTERRUPTIBLE; + schedule(); + if (do_signal(&saveset, regs, 0)) + return regs->ARM_r0; + } +} + +asmlinkage int +sys_sigaction(int sig, const struct old_sigaction *act, + struct old_sigaction *oact) +{ + struct k_sigaction new_ka, old_ka; + int ret; + + if (act) { + old_sigset_t mask; + if (verify_area(VERIFY_READ, act, sizeof(*act)) || + __get_user(new_ka.sa.sa_handler, &act->sa_handler) || + __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) + return -EFAULT; + __get_user(new_ka.sa.sa_flags, &act->sa_flags); + __get_user(mask, &act->sa_mask); + siginitset(&new_ka.sa.sa_mask, mask); + } + + ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); + + if (!ret && oact) { + if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || + __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || + __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) + return -EFAULT; + __put_user(old_ka.sa.sa_flags, &oact->sa_flags); + __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); + } + + return ret; +} + +/* + * Do a signal return; undo the signal stack. + */ +struct sigframe +{ + struct sigcontext sc; + unsigned long extramask[_NSIG_WORDS-1]; + unsigned long retcode; +}; + +struct rt_sigframe +{ + struct siginfo *pinfo; + void *puc; + struct siginfo info; + struct ucontext uc; + unsigned long retcode; +}; + +static int +restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) +{ + int err = 0; + + __get_user_error(regs->ARM_r0, &sc->arm_r0, err); + __get_user_error(regs->ARM_r1, &sc->arm_r1, err); + __get_user_error(regs->ARM_r2, &sc->arm_r2, err); + __get_user_error(regs->ARM_r3, &sc->arm_r3, err); + __get_user_error(regs->ARM_r4, &sc->arm_r4, err); + __get_user_error(regs->ARM_r5, &sc->arm_r5, err); + __get_user_error(regs->ARM_r6, &sc->arm_r6, err); + __get_user_error(regs->ARM_r7, &sc->arm_r7, err); + __get_user_error(regs->ARM_r8, &sc->arm_r8, err); + __get_user_error(regs->ARM_r9, &sc->arm_r9, err); + __get_user_error(regs->ARM_r10, &sc->arm_r10, err); + __get_user_error(regs->ARM_fp, &sc->arm_fp, err); + __get_user_error(regs->ARM_ip, &sc->arm_ip, err); + __get_user_error(regs->ARM_sp, &sc->arm_sp, err); + __get_user_error(regs->ARM_lr, &sc->arm_lr, err); + __get_user_error(regs->ARM_pc, &sc->arm_pc, err); + + err |= !valid_user_regs(regs); + + return err; +} + +asmlinkage int sys_sigreturn(struct pt_regs *regs) +{ + struct sigframe *frame; + sigset_t set; + + /* + * Since we stacked the signal on a 64-bit boundary, + * then 'sp' should be word aligned here. If it's + * not, then the user is trying to mess with us. + */ + if (regs->ARM_sp & 7) + goto badframe; + + frame = (struct sigframe *)regs->ARM_sp; + + if (verify_area(VERIFY_READ, frame, sizeof (*frame))) + goto badframe; + if (__get_user(set.sig[0], &frame->sc.oldmask) + || (_NSIG_WORDS > 1 + && __copy_from_user(&set.sig[1], &frame->extramask, + sizeof(frame->extramask)))) + goto badframe; + + sigdelsetmask(&set, ~_BLOCKABLE); + spin_lock_irq(¤t->sighand->siglock); + current->blocked = set; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + + if (restore_sigcontext(regs, &frame->sc)) + goto badframe; + + /* Send SIGTRAP if we're single-stepping */ + if (current->ptrace & PT_SINGLESTEP) { + ptrace_cancel_bpt(current); + send_sig(SIGTRAP, current, 1); + } + + return regs->ARM_r0; + +badframe: + force_sig(SIGSEGV, current); + return 0; +} + +asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) +{ + struct rt_sigframe *frame; + sigset_t set; + + /* + * Since we stacked the signal on a 64-bit boundary, + * then 'sp' should be word aligned here. If it's + * not, then the user is trying to mess with us. + */ + if (regs->ARM_sp & 7) + goto badframe; + + frame = (struct rt_sigframe *)regs->ARM_sp; + + if (verify_area(VERIFY_READ, frame, sizeof (*frame))) + goto badframe; + if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) + goto badframe; + + sigdelsetmask(&set, ~_BLOCKABLE); + spin_lock_irq(¤t->sighand->siglock); + current->blocked = set; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + + if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) + goto badframe; + + /* Send SIGTRAP if we're single-stepping */ + if (current->ptrace & PT_SINGLESTEP) { + ptrace_cancel_bpt(current); + send_sig(SIGTRAP, current, 1); + } + + return regs->ARM_r0; + +badframe: + force_sig(SIGSEGV, current); + return 0; +} + +static int +setup_sigcontext(struct sigcontext *sc, /*struct _fpstate *fpstate,*/ + struct pt_regs *regs, unsigned long mask) +{ + int err = 0; + + __put_user_error(regs->ARM_r0, &sc->arm_r0, err); + __put_user_error(regs->ARM_r1, &sc->arm_r1, err); + __put_user_error(regs->ARM_r2, &sc->arm_r2, err); + __put_user_error(regs->ARM_r3, &sc->arm_r3, err); + __put_user_error(regs->ARM_r4, &sc->arm_r4, err); + __put_user_error(regs->ARM_r5, &sc->arm_r5, err); + __put_user_error(regs->ARM_r6, &sc->arm_r6, err); + __put_user_error(regs->ARM_r7, &sc->arm_r7, err); + __put_user_error(regs->ARM_r8, &sc->arm_r8, err); + __put_user_error(regs->ARM_r9, &sc->arm_r9, err); + __put_user_error(regs->ARM_r10, &sc->arm_r10, err); + __put_user_error(regs->ARM_fp, &sc->arm_fp, err); + __put_user_error(regs->ARM_ip, &sc->arm_ip, err); + __put_user_error(regs->ARM_sp, &sc->arm_sp, err); + __put_user_error(regs->ARM_lr, &sc->arm_lr, err); + __put_user_error(regs->ARM_pc, &sc->arm_pc, err); + + __put_user_error(current->thread.trap_no, &sc->trap_no, err); + __put_user_error(current->thread.error_code, &sc->error_code, err); + __put_user_error(current->thread.address, &sc->fault_address, err); + __put_user_error(mask, &sc->oldmask, err); + + return err; +} + +static inline void * +get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, int framesize) +{ + unsigned long sp = regs->ARM_sp; + + /* + * This is the X/Open sanctioned signal stack switching. + */ + if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp)) + sp = current->sas_ss_sp + current->sas_ss_size; + + /* + * ATPCS B01 mandates 8-byte alignment + */ + return (void *)((sp - framesize) & ~7); +} + +static int +setup_return(struct pt_regs *regs, struct k_sigaction *ka, + unsigned long *rc, void *frame, int usig) +{ + unsigned long handler = (unsigned long)ka->sa.sa_handler; + unsigned long retcode; + + if (ka->sa.sa_flags & SA_RESTORER) { + retcode = (unsigned long)ka->sa.sa_restorer; + } else { + + if (__put_user((ka->sa.sa_flags & SA_SIGINFO)?SWI_SYS_RT_SIGRETURN:SWI_SYS_SIGRETURN, rc)) + return 1; + + retcode = ((unsigned long)rc); + } + + regs->ARM_r0 = usig; + regs->ARM_sp = (unsigned long)frame; + regs->ARM_lr = retcode; + regs->ARM_pc = handler & ~3; + + return 0; +} + +static int +setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *regs) +{ + struct sigframe *frame = get_sigframe(ka, regs, sizeof(*frame)); + int err = 0; + + if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) + return 1; + + err |= setup_sigcontext(&frame->sc, /*&frame->fpstate,*/ regs, set->sig[0]); + + if (_NSIG_WORDS > 1) { + err |= __copy_to_user(frame->extramask, &set->sig[1], + sizeof(frame->extramask)); + } + + if (err == 0) + err = setup_return(regs, ka, &frame->retcode, frame, usig); + + return err; +} + +static int +setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, + sigset_t *set, struct pt_regs *regs) +{ + struct rt_sigframe *frame = get_sigframe(ka, regs, sizeof(*frame)); + int err = 0; + + if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) + return 1; + + __put_user_error(&frame->info, &frame->pinfo, err); + __put_user_error(&frame->uc, &frame->puc, err); + err |= copy_siginfo_to_user(&frame->info, info); + + /* Clear all the bits of the ucontext we don't use. */ + err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext)); + + err |= setup_sigcontext(&frame->uc.uc_mcontext, /*&frame->fpstate,*/ + regs, set->sig[0]); + err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); + + if (err == 0) + err = setup_return(regs, ka, &frame->retcode, frame, usig); + + if (err == 0) { + /* + * For realtime signals we must also set the second and third + * arguments for the signal handler. + * -- Peter Maydell 2000-12-06 + */ + regs->ARM_r1 = (unsigned long)frame->pinfo; + regs->ARM_r2 = (unsigned long)frame->puc; + } + + return err; +} + +static inline void restart_syscall(struct pt_regs *regs) +{ + regs->ARM_r0 = regs->ARM_ORIG_r0; + regs->ARM_pc -= 4; +} + +/* + * OK, we're invoking a handler + */ +static void +handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, + struct pt_regs * regs, int syscall) +{ + struct thread_info *thread = current_thread_info(); + struct task_struct *tsk = current; + struct k_sigaction *ka = &tsk->sighand->action[sig-1]; + int usig = sig; + int ret; + + /* + * If we were from a system call, check for system call restarting... + */ + if (syscall) { + switch (regs->ARM_r0) { + case -ERESTART_RESTARTBLOCK: + current_thread_info()->restart_block.fn = + do_no_restart_syscall; + case -ERESTARTNOHAND: + regs->ARM_r0 = -EINTR; + break; + case -ERESTARTSYS: + if (!(ka->sa.sa_flags & SA_RESTART)) { + regs->ARM_r0 = -EINTR; + break; + } + /* fallthrough */ + case -ERESTARTNOINTR: + restart_syscall(regs); + } + } + + /* + * translate the signal + */ + if (usig < 32 && thread->exec_domain && thread->exec_domain->signal_invmap) + usig = thread->exec_domain->signal_invmap[usig]; + + /* + * Set up the stack frame + */ + if (ka->sa.sa_flags & SA_SIGINFO) + ret = setup_rt_frame(usig, ka, info, oldset, regs); + else + ret = setup_frame(usig, ka, oldset, regs); + + /* + * Check that the resulting registers are actually sane. + */ + ret |= !valid_user_regs(regs); + + if (ret == 0) { + if (ka->sa.sa_flags & SA_ONESHOT) + ka->sa.sa_handler = SIG_DFL; + + if (!(ka->sa.sa_flags & SA_NODEFER)) { + spin_lock_irq(&tsk->sighand->siglock); + sigorsets(&tsk->blocked, &tsk->blocked, + &ka->sa.sa_mask); + sigaddset(&tsk->blocked, sig); + recalc_sigpending(); + spin_unlock_irq(&tsk->sighand->siglock); + } + return; + } + + if (sig == SIGSEGV) + ka->sa.sa_handler = SIG_DFL; + force_sig(SIGSEGV, tsk); +} + +/* + * Note that 'init' is a special process: it doesn't get signals it doesn't + * want to handle. Thus you cannot kill init even with a SIGKILL even by + * mistake. + * + * Note that we go through the signals twice: once to check the signals that + * the kernel can handle, and then we build all the user-level signal handling + * stack-frames in one go after that. + */ +static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) +{ + siginfo_t info; + int signr; + + /* + * We want the common case to go fast, which + * is why we may in certain cases get here from + * kernel mode. Just return without doing anything + * if so. + */ + if (!user_mode(regs)) + return 0; + + if (current->ptrace & PT_SINGLESTEP) + ptrace_cancel_bpt(current); + + signr = get_signal_to_deliver(&info, regs, NULL); + if (signr > 0) { + handle_signal(signr, &info, oldset, regs, syscall); + if (current->ptrace & PT_SINGLESTEP) + ptrace_set_bpt(current); + return 1; + } + + /* + * No signal to deliver to the process - restart the syscall. + */ + if (syscall) { + if (regs->ARM_r0 == -ERESTART_RESTARTBLOCK) { + u32 *usp; + + regs->ARM_sp -= 12; + usp = (u32 *)regs->ARM_sp; + + put_user(regs->ARM_pc, &usp[0]); + /* swi __NR_restart_syscall */ + put_user(0xef000000 | __NR_restart_syscall, &usp[1]); + /* ldr pc, [sp], #12 */ +// FIXME!!! is #12 correct there? + put_user(0xe49df00c, &usp[2]); + + regs->ARM_pc = regs->ARM_sp + 4; + } + if (regs->ARM_r0 == -ERESTARTNOHAND || + regs->ARM_r0 == -ERESTARTSYS || + regs->ARM_r0 == -ERESTARTNOINTR) { + restart_syscall(regs); + } + } + if (current->ptrace & PT_SINGLESTEP) + ptrace_set_bpt(current); + return 0; +} + +asmlinkage void +do_notify_resume(struct pt_regs *regs, unsigned int thread_flags, int syscall) +{ + if (thread_flags & _TIF_SIGPENDING) + do_signal(¤t->blocked, regs, syscall); +} diff -Nru a/arch/arm26/kernel/sys_arm.c b/arch/arm26/kernel/sys_arm.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/sys_arm.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,283 @@ +/* + * linux/arch/arm26/kernel/sys_arm.c + * + * Copyright (C) People who wrote linux/arch/i386/kernel/sys_i386.c + * Copyright (C) 1995, 1996 Russell King. + * Copyright (C) 2003 Ian Molton. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This file contains various random system calls that + * have a non-standard calling sequence on the Linux/arm + * platform. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +extern unsigned long do_mremap(unsigned long addr, unsigned long old_len, + unsigned long new_len, unsigned long flags, + unsigned long new_addr); + +/* + * sys_pipe() is the normal C calling standard for creating + * a pipe. It's not the way unix traditionally does this, though. + */ +asmlinkage int sys_pipe(unsigned long * fildes) +{ + int fd[2]; + int error; + + error = do_pipe(fd); + if (!error) { + if (copy_to_user(fildes, fd, 2*sizeof(int))) + error = -EFAULT; + } + return error; +} + +/* common code for old and new mmaps */ +inline long do_mmap2( + unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long pgoff) +{ + int error = -EINVAL; + struct file * file = NULL; + + flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); + + /* + * If we are doing a fixed mapping, and address < PAGE_SIZE, + * then deny it. + */ + if (flags & MAP_FIXED && addr < PAGE_SIZE && vectors_base() == 0) + goto out; + + error = -EBADF; + if (!(flags & MAP_ANONYMOUS)) { + file = fget(fd); + if (!file) + goto out; + } + + down_write(¤t->mm->mmap_sem); + error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); + up_write(¤t->mm->mmap_sem); + + if (file) + fput(file); +out: + return error; +} + +struct mmap_arg_struct { + unsigned long addr; + unsigned long len; + unsigned long prot; + unsigned long flags; + unsigned long fd; + unsigned long offset; +}; + +asmlinkage int old_mmap(struct mmap_arg_struct *arg) +{ + int error = -EFAULT; + struct mmap_arg_struct a; + + if (copy_from_user(&a, arg, sizeof(a))) + goto out;; + + error = -EINVAL; + if (a.offset & ~PAGE_MASK) + goto out; + + error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); +out: + return error; +} + +asmlinkage unsigned long +sys_arm_mremap(unsigned long addr, unsigned long old_len, + unsigned long new_len, unsigned long flags, + unsigned long new_addr) +{ + unsigned long ret = -EINVAL; + + /* + * If we are doing a fixed mapping, and address < PAGE_SIZE, + * then deny it. + */ + if (flags & MREMAP_FIXED && new_addr < PAGE_SIZE && + vectors_base() == 0) + goto out; + + down_write(¤t->mm->mmap_sem); + ret = do_mremap(addr, old_len, new_len, flags, new_addr); + up_write(¤t->mm->mmap_sem); + +out: + return ret; +} + +/* + * Perform the select(nd, in, out, ex, tv) and mmap() system + * calls. + */ +extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); + +struct sel_arg_struct { + unsigned long n; + fd_set *inp, *outp, *exp; + struct timeval *tvp; +}; + +asmlinkage int old_select(struct sel_arg_struct *arg) +{ + struct sel_arg_struct a; + + if (copy_from_user(&a, arg, sizeof(a))) + return -EFAULT; + /* sys_select() does the appropriate kernel locking */ + return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp); +} + +/* + * sys_ipc() is the de-multiplexer for the SysV IPC calls.. + * + * This is really horribly ugly. + */ +asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth) +{ + int version, ret; + + version = call >> 16; /* hack for backward compatibility */ + call &= 0xffff; + + switch (call) { + case SEMOP: + return sys_semop (first, (struct sembuf *)ptr, second); + case SEMGET: + return sys_semget (first, second, third); + case SEMCTL: { + union semun fourth; + if (!ptr) + return -EINVAL; + if (get_user(fourth.__pad, (void **) ptr)) + return -EFAULT; + return sys_semctl (first, second, third, fourth); + } + + case MSGSND: + return sys_msgsnd (first, (struct msgbuf *) ptr, + second, third); + case MSGRCV: + switch (version) { + case 0: { + struct ipc_kludge tmp; + if (!ptr) + return -EINVAL; + if (copy_from_user(&tmp,(struct ipc_kludge *) ptr, + sizeof (tmp))) + return -EFAULT; + return sys_msgrcv (first, tmp.msgp, second, + tmp.msgtyp, third); + } + default: + return sys_msgrcv (first, + (struct msgbuf *) ptr, + second, fifth, third); + } + case MSGGET: + return sys_msgget ((key_t) first, second); + case MSGCTL: + return sys_msgctl (first, second, (struct msqid_ds *) ptr); + + case SHMAT: + switch (version) { + default: { + ulong raddr; + ret = sys_shmat (first, (char *) ptr, second, &raddr); + if (ret) + return ret; + return put_user (raddr, (ulong *) third); + } + case 1: /* iBCS2 emulator entry point */ + if (!segment_eq(get_fs(), get_ds())) + return -EINVAL; + return sys_shmat (first, (char *) ptr, + second, (ulong *) third); + } + case SHMDT: + return sys_shmdt ((char *)ptr); + case SHMGET: + return sys_shmget (first, second, third); + case SHMCTL: + return sys_shmctl (first, second, + (struct shmid_ds *) ptr); + default: + return -EINVAL; + } +} + +/* Fork a new task - this creates a new program thread. + * This is called indirectly via a small wrapper + */ +asmlinkage int sys_fork(struct pt_regs *regs) +{ + return do_fork(SIGCHLD, regs->ARM_sp, regs, 0, NULL, NULL); +} + +/* Clone a task - this clones the calling program thread. + * This is called indirectly via a small wrapper + */ +asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct pt_regs *regs) +{ + /* + * We don't support SETTID / CLEARTID (FIXME!!! (nicked from arm32)) + */ + if (clone_flags & (CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID)) + return -EINVAL; + + if (!newsp) + newsp = regs->ARM_sp; + + return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL, NULL); +} + +asmlinkage int sys_vfork(struct pt_regs *regs) +{ + return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0, NULL, NULL); +} + +/* sys_execve() executes a new program. + * This is called indirectly via a small wrapper + */ +asmlinkage int sys_execve(char *filenamei, char **argv, char **envp, struct pt_regs *regs) +{ + int error; + char * filename; + + filename = getname(filenamei); + error = PTR_ERR(filename); + if (IS_ERR(filename)) + goto out; + error = do_execve(filename, argv, envp, regs); + putname(filename); +out: + return error; +} diff -Nru a/arch/arm26/kernel/time-acorn.c b/arch/arm26/kernel/time-acorn.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/time-acorn.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,69 @@ +/* + * linux/arch/arm/kernel/time-acorn.c + * + * Copyright (c) 1996-2000 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Changelog: + * 24-Sep-1996 RMK Created + * 10-Oct-1996 RMK Brought up to date with arch-sa110eval + * 04-Dec-1997 RMK Updated for new arch/arm/time.c + * 13-May-2003 IM Brought over to ARM26 + */ +#include +#include +#include + +#include +#include +#include +#include + +extern unsigned long (*gettimeoffset)(void); + +static unsigned long ioctime_gettimeoffset(void) +{ + unsigned int count1, count2, status; + long offset; + + ioc_writeb (0, IOC_T0LATCH); + barrier (); + count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8); + barrier (); + status = ioc_readb(IOC_IRQREQA); + barrier (); + ioc_writeb (0, IOC_T0LATCH); + barrier (); + count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8); + + offset = count2; + if (count2 < count1) { + /* + * We have not had an interrupt between reading count1 + * and count2. + */ + if (status & (1 << 5)) + offset -= LATCH; + } else if (count2 > count1) { + /* + * We have just had another interrupt between reading + * count1 and count2. + */ + offset -= LATCH; + } + + offset = (LATCH - offset) * (tick_nsec / 1000); + return (offset + LATCH/2) / LATCH; +} + +void __init ioctime_init(void) +{ + ioc_writeb(LATCH & 255, IOC_T0LTCHL); + ioc_writeb(LATCH >> 8, IOC_T0LTCHH); + ioc_writeb(0, IOC_T0GO); + + gettimeoffset = ioctime_gettimeoffset; +} diff -Nru a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/time.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,202 @@ +/* + * linux/arch/arm26/kernel/time.c + * + * Copyright (C) 1991, 1992, 1995 Linus Torvalds + * Modifications for ARM (C) 1994-2001 Russell King + * Mods for ARM26 (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This file contains the ARM-specific time handling details: + * reading the RTC at bootup, etc... + * + * 1994-07-02 Alan Modra + * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime + * 1998-12-20 Updated NTP code according to technical memorandum Jan '96 + * "A Kernel Model for Precision Timekeeping" by Dave Mills + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +u64 jiffies_64 = INITIAL_JIFFIES; + +extern unsigned long wall_jiffies; + +/* this needs a better home */ +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; + +/* change this if you have some constant time drift */ +#define USECS_PER_JIFFY (1000000/HZ) + +static int dummy_set_rtc(void) +{ + return 0; +} + +/* + * hook for setting the RTC's idea of the current time. + */ +int (*set_rtc)(void) = dummy_set_rtc; + +static unsigned long dummy_gettimeoffset(void) +{ + return 0; +} + +/* + * hook for getting the time offset. Note that it is + * always called with interrupts disabled. + */ +unsigned long (*gettimeoffset)(void) = dummy_gettimeoffset; + +/* + * Handle kernel profile stuff... + */ +static inline void do_profile(struct pt_regs *regs) +{ + if (!user_mode(regs) && + prof_buffer && + current->pid) { + unsigned long pc = instruction_pointer(regs); + extern int _stext; + + pc -= (unsigned long)&_stext; + + pc >>= prof_shift; + + if (pc >= prof_len) + pc = prof_len - 1; + + prof_buffer[pc] += 1; + } +} + +static unsigned long next_rtc_update; + +/* + * If we have an externally synchronized linux clock, then update + * CMOS clock accordingly every ~11 minutes. set_rtc() has to be + * called as close as possible to 500 ms before the new second + * starts. + */ +static inline void do_set_rtc(void) +{ + if (time_status & STA_UNSYNC || set_rtc == NULL) + return; + +//FIXME - timespec.tv_sec is a time_t not unsigned long + if (next_rtc_update && + time_before((unsigned long)xtime.tv_sec, next_rtc_update)) + return; + + if (xtime.tv_nsec < 500000000 - ((unsigned) tick_nsec >> 1) && + xtime.tv_nsec >= 500000000 + ((unsigned) tick_nsec >> 1)) + return; + + if (set_rtc()) + /* + * rtc update failed. Try again in 60s + */ + next_rtc_update = xtime.tv_sec + 60; + else + next_rtc_update = xtime.tv_sec + 660; +} + +#define do_leds() + +void do_gettimeofday(struct timeval *tv) +{ + unsigned long flags; + unsigned long seq; + unsigned long usec, sec, lost; + + do { + seq = read_seqbegin_irqsave(&xtime_lock, flags); + usec = gettimeoffset(); + + lost = jiffies - wall_jiffies; + if (lost) + usec += lost * USECS_PER_JIFFY; + + sec = xtime.tv_sec; + usec += xtime.tv_nsec / 1000; + } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); + + /* usec may have gone up a lot: be safe */ + while (usec >= 1000000) { + usec -= 1000000; + sec++; + } + + tv->tv_sec = sec; + tv->tv_usec = usec; +} + +void do_settimeofday(struct timeval *tv) +{ + write_seqlock_irq(&xtime_lock); + /* + * This is revolting. We need to set "xtime" correctly. However, the + * value in this location is the value at the most recent update of + * wall time. Discover what correction gettimeofday() would have + * done, and then undo it! + */ + tv->tv_usec -= gettimeoffset(); + tv->tv_usec -= (jiffies - wall_jiffies) * USECS_PER_JIFFY; + + while (tv->tv_usec < 0) { + tv->tv_usec += 1000000; + tv->tv_sec--; + } + + xtime.tv_sec = tv->tv_sec; + xtime.tv_nsec = tv->tv_usec * 1000; + time_adjust = 0; /* stop active adjtime() */ + time_status |= STA_UNSYNC; + time_maxerror = NTP_PHASE_LIMIT; + time_esterror = NTP_PHASE_LIMIT; + write_sequnlock_irq(&xtime_lock); +} + +static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + do_timer(regs); + do_set_rtc(); //FIME - EVERY timer IRQ? + do_profile(regs); + return IRQ_HANDLED; //FIXME - is this right? +} + +static struct irqaction timer_irq = { + .name = "timer", + .flags = SA_INTERRUPT, + .handler = timer_interrupt, +}; + +extern void ioctime_init(void); + +/* + * Set up timer interrupt. + */ +void __init time_init(void) +{ + ioctime_init(); + + setup_irq(IRQ_TIMER, &timer_irq); +} + diff -Nru a/arch/arm26/kernel/traps.c b/arch/arm26/kernel/traps.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/kernel/traps.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,553 @@ +/* + * linux/arch/arm/kernel/traps.c + * + * Copyright (C) 1995-2002 Russell King + * Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds + * Copyright (C) 2003 Ian Molton (ARM26) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 'traps.c' handles hardware exceptions after we have saved some state in + * 'linux/arch/arm/lib/traps.S'. Mostly a debugging aid, but will probably + * kill the offending process. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ptrace.h" + +extern void c_backtrace (unsigned long fp, int pmode); +extern void show_pte(struct mm_struct *mm, unsigned long addr); + +const char *processor_modes[] = { "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" }; + +static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" "*bad reason*"}; + +/* + * Stack pointers should always be within the kernels view of + * physical memory. If it is not there, then we can't dump + * out any information relating to the stack. + */ +static int verify_stack(unsigned long sp) +{ + if (sp < PAGE_OFFSET || (sp > (unsigned long)high_memory && high_memory != 0)) + return -EFAULT; + + return 0; +} + +/* + * Dump out the contents of some memory nicely... + */ +static void dump_mem(const char *str, unsigned long bottom, unsigned long top) +{ + unsigned long p = bottom & ~31; + mm_segment_t fs; + int i; + + /* + * We need to switch to kernel mode so that we can use __get_user + * to safely read from kernel space. Note that we now dump the + * code first, just in case the backtrace kills us. + */ + fs = get_fs(); + set_fs(KERNEL_DS); + + printk("%s", str); + printk("(0x%08lx to 0x%08lx)\n", bottom, top); + + for (p = bottom & ~31; p < top;) { + printk("%04lx: ", p & 0xffff); + + for (i = 0; i < 8; i++, p += 4) { + unsigned int val; + + if (p < bottom || p >= top) + printk(" "); + else { + __get_user(val, (unsigned long *)p); + printk("%08x ", val); + } + } + printk ("\n"); + } + + set_fs(fs); +} + +static void dump_instr(struct pt_regs *regs) +{ + unsigned long addr = instruction_pointer(regs); + const int width = 8; + mm_segment_t fs; + int i; + + /* + * We need to switch to kernel mode so that we can use __get_user + * to safely read from kernel space. Note that we now dump the + * code first, just in case the backtrace kills us. + */ + fs = get_fs(); + set_fs(KERNEL_DS); + + printk("Code: "); + for (i = -4; i < 1; i++) { + unsigned int val, bad; + + bad = __get_user(val, &((u32 *)addr)[i]); + + if (!bad) + printk(i == 0 ? "(%0*x) " : "%0*x ", width, val); + else { + printk("bad PC value."); + break; + } + } + printk("\n"); + + set_fs(fs); +} + +/*static*/ void __dump_stack(struct task_struct *tsk, unsigned long sp) +{ + dump_mem("Stack: ", sp, 8192+(unsigned long)tsk->thread_info); +} + +void dump_stack(void) +{ +#ifdef CONFIG_DEBUG_ERRORS + __backtrace(); +#endif +} + +//FIXME - was a static fn +void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) +{ + unsigned int fp; + int ok = 1; + + printk("Backtrace: "); + fp = regs->ARM_fp; + if (!fp) { + printk("no frame pointer"); + ok = 0; + } else if (verify_stack(fp)) { + printk("invalid frame pointer 0x%08x", fp); + ok = 0; + } else if (fp < (unsigned long)(tsk->thread_info + 1)) + printk("frame pointer underflow"); + printk("\n"); + + if (ok) + c_backtrace(fp, processor_mode(regs)); +} + +/* + * This is called from SysRq-T (show_task) to display the current + * call trace for each process. Very useful. + */ +void show_trace_task(struct task_struct *tsk) +{ + if (tsk != current) { + unsigned int fp = thread_saved_fp(tsk); + c_backtrace(fp, 0x10); + } +} + +spinlock_t die_lock = SPIN_LOCK_UNLOCKED; + +/* + * This function is protected against re-entrancy. + */ +NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) +{ + struct task_struct *tsk = current; + + console_verbose(); + spin_lock_irq(&die_lock); + + printk("Internal error: %s: %x\n", str, err); + printk("CPU: %d\n", smp_processor_id()); + show_regs(regs); + printk("Process %s (pid: %d, stack limit = 0x%p)\n", + current->comm, current->pid, tsk->thread_info + 1); + + if (!user_mode(regs) || in_interrupt()) { + __dump_stack(tsk, (unsigned long)(regs + 1)); + dump_backtrace(regs, tsk); + dump_instr(regs); + } +while(1); + spin_unlock_irq(&die_lock); + do_exit(SIGSEGV); +} + +void die_if_kernel(const char *str, struct pt_regs *regs, int err) +{ + if (user_mode(regs)) + return; + + die(str, regs, err); +} + +static DECLARE_MUTEX(undef_sem); +static int (*undef_hook)(struct pt_regs *); + +int request_undef_hook(int (*fn)(struct pt_regs *)) +{ + int ret = -EBUSY; + + down(&undef_sem); + if (undef_hook == NULL) { + undef_hook = fn; + ret = 0; + } + up(&undef_sem); + + return ret; +} + +int release_undef_hook(int (*fn)(struct pt_regs *)) +{ + int ret = -EINVAL; + + down(&undef_sem); + if (undef_hook == fn) { + undef_hook = NULL; + ret = 0; + } + up(&undef_sem); + + return ret; +} + +static int undefined_extension(struct pt_regs *regs, unsigned int op) +{ + switch (op) { + case 1: /* 0xde01 / 0x?7f001f0 */ + ptrace_break(current, regs); + return 0; + } + return 1; +} + +asmlinkage void do_undefinstr(struct pt_regs *regs) +{ + siginfo_t info; + void *pc; + + regs->ARM_pc -= 4; + + pc = (unsigned long *)instruction_pointer(regs); /* strip PSR */ + + if (user_mode(regs)) { + u32 instr; + + get_user(instr, (u32 *)pc); + + if ((instr & 0x0fff00ff) == 0x07f000f0 && + undefined_extension(regs, (instr >> 8) & 255) == 0) { + regs->ARM_pc += 4; + return; + } + } else { + if (undef_hook && undef_hook(regs) == 0) { + regs->ARM_pc += 4; + return; + } + } + +#ifdef CONFIG_DEBUG_USER + printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", + current->comm, current->pid, pc); + dump_instr(regs); +#endif + + current->thread.error_code = 0; + current->thread.trap_no = 6; + + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_code = ILL_ILLOPC; + info.si_addr = pc; + + force_sig_info(SIGILL, &info, current); + + die_if_kernel("Oops - undefined instruction", regs, 0); +} + +asmlinkage void do_excpt(unsigned long address, struct pt_regs *regs, int mode) +{ + siginfo_t info; + +#ifdef CONFIG_DEBUG_USER + printk(KERN_INFO "%s (%d): address exception: pc=%08lx\n", + current->comm, current->pid, instruction_pointer(regs)); + dump_instr(regs); +#endif + + current->thread.error_code = 0; + current->thread.trap_no = 11; + + info.si_signo = SIGBUS; + info.si_errno = 0; + info.si_code = BUS_ADRERR; + info.si_addr = (void *)address; + + force_sig_info(SIGBUS, &info, current); + + die_if_kernel("Oops - address exception", regs, mode); +} + +asmlinkage void do_unexp_fiq (struct pt_regs *regs) +{ +#ifndef CONFIG_IGNORE_FIQ + printk("Hmm. Unexpected FIQ received, but trying to continue\n"); + printk("You may have a hardware problem...\n"); +#endif +} + +/* + * bad_mode handles the impossible case in the vectors. If you see one of + * these, then it's extremely serious, and could mean you have buggy hardware. + * It never returns, and never tries to sync. We hope that we can at least + * dump out some state information... + */ +asmlinkage void bad_mode(struct pt_regs *regs, int reason, int proc_mode) +{ + unsigned int vectors = vectors_base(); + + console_verbose(); + + printk(KERN_CRIT "Bad mode in %s handler detected: mode %s\n", + handler[reason<5?reason:4], processor_modes[proc_mode]); + + /* + * Dump out the vectors and stub routines. Maybe a better solution + * would be to dump them out only if we detect that they are corrupted. + */ + dump_mem(KERN_CRIT "Vectors: ", vectors, vectors + 0x40); + dump_mem(KERN_CRIT "Stubs: ", vectors + 0x200, vectors + 0x4b8); + + die("Oops", regs, 0); + local_irq_disable(); + panic("bad mode"); +} + +static int bad_syscall(int n, struct pt_regs *regs) +{ + struct thread_info *thread = current_thread_info(); + siginfo_t info; + + if (current->personality != PER_LINUX && thread->exec_domain->handler) { + thread->exec_domain->handler(n, regs); + return regs->ARM_r0; + } + +#ifdef CONFIG_DEBUG_USER + printk(KERN_ERR "[%d] %s: obsolete system call %08x.\n", + current->pid, current->comm, n); + dump_instr(regs); +#endif + + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_code = ILL_ILLTRP; + info.si_addr = (void *)instruction_pointer(regs) - 4; + + force_sig_info(SIGILL, &info, current); + die_if_kernel("Oops", regs, n); + return regs->ARM_r0; +} + +static inline void +do_cache_op(unsigned long start, unsigned long end, int flags) +{ + struct vm_area_struct *vma; + + if (end < start) + return; + + vma = find_vma(current->active_mm, start); + if (vma && vma->vm_start < end) { + if (start < vma->vm_start) + start = vma->vm_start; + if (end > vma->vm_end) + end = vma->vm_end; + } +} + +/* + * Handle all unrecognised system calls. + * 0x9f0000 - 0x9fffff are some more esoteric system calls + */ +#define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE) +asmlinkage int arm_syscall(int no, struct pt_regs *regs) +{ + siginfo_t info; + + if ((no >> 16) != 0x9f) + return bad_syscall(no, regs); + + switch (no & 0xffff) { + case 0: /* branch through 0 */ + info.si_signo = SIGSEGV; + info.si_errno = 0; + info.si_code = SEGV_MAPERR; + info.si_addr = NULL; + + force_sig_info(SIGSEGV, &info, current); + + die_if_kernel("branch through zero", regs, 0); + return 0; + + case NR(breakpoint): /* SWI BREAK_POINT */ + ptrace_break(current, regs); + return regs->ARM_r0; + + case NR(cacheflush): + return 0; + + case NR(usr26): + case NR(usr32): + break; + + default: + /* Calls 9f00xx..9f07ff are defined to return -ENOSYS + if not implemented, rather than raising SIGILL. This + way the calling program can gracefully determine whether + a feature is supported. */ + if (no <= 0x7ff) + return -ENOSYS; + break; + } +#ifdef CONFIG_DEBUG_USER + /* + * experience shows that these seem to indicate that + * something catastrophic has happened + */ + printk("[%d] %s: arm syscall %d\n", current->pid, current->comm, no); + dump_instr(regs); + if (user_mode(regs)) { + show_regs(regs); + c_backtrace(regs->ARM_fp, processor_mode(regs)); + } +#endif + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_code = ILL_ILLTRP; + info.si_addr = (void *)instruction_pointer(regs) - 4; + + force_sig_info(SIGILL, &info, current); + die_if_kernel("Oops", regs, no); + return 0; +} + +void __bad_xchg(volatile void *ptr, int size) +{ + printk("xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n", + __builtin_return_address(0), ptr, size); + BUG(); +} + +/* + * A data abort trap was taken, but we did not handle the instruction. + * Try to abort the user program, or panic if it was the kernel. + */ +asmlinkage void +baddataabort(int code, unsigned long instr, struct pt_regs *regs) +{ + unsigned long addr = instruction_pointer(regs); + siginfo_t info; + +#ifdef CONFIG_DEBUG_USER + printk(KERN_ERR "[%d] %s: bad data abort: code %d instr 0x%08lx\n", + current->pid, current->comm, code, instr); + dump_instr(regs); + show_pte(current->mm, addr); +#endif + + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_code = ILL_ILLOPC; + info.si_addr = (void *)addr; + + force_sig_info(SIGILL, &info, current); + die_if_kernel("unknown data abort code", regs, instr); +} + +void __bug(const char *file, int line, void *data) +{ + printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); + if (data) + printk(KERN_CRIT" - extra data = %p", data); + printk("\n"); + *(int *)0 = 0; +} + +void __readwrite_bug(const char *fn) +{ + printk("%s called, but not implemented", fn); + BUG(); +} + +void __pte_error(const char *file, int line, unsigned long val) +{ + printk("%s:%d: bad pte %08lx.\n", file, line, val); +} + +void __pmd_error(const char *file, int line, unsigned long val) +{ + printk("%s:%d: bad pmd %08lx.\n", file, line, val); +} + +void __pgd_error(const char *file, int line, unsigned long val) +{ + printk("%s:%d: bad pgd %08lx.\n", file, line, val); +} + +asmlinkage void __div0(void) +{ + printk("Division by zero in kernel.\n"); + dump_stack(); +} + +void abort(void) +{ + BUG(); + + /* if that doesn't kill us, halt */ + panic("Oops failed to kill thread"); +} + +void __init trap_init(void) +{ + extern void __trap_init(unsigned long); + unsigned long base = vectors_base(); + + __trap_init(base); + if (base != 0) + printk(KERN_DEBUG "Relocating machine vectors to 0x%08lx\n", + base); +} diff -Nru a/arch/arm26/lib/Makefile b/arch/arm26/lib/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,31 @@ +# +# linux/arch/arm/lib/Makefile +# +# Copyright (C) 1995-2000 Russell King +# + +L_TARGET := lib.a + +obj-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ + csumpartialcopy.o csumpartialcopyuser.o clearbit.o \ + copy_page.o delay.o findbit.o memchr.o memcpy.o \ + memset.o memzero.o setbit.o \ + strchr.o strrchr.o testchangebit.o \ + testclearbit.o testsetbit.o getuser.o \ + putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ + ucmpdi2.o udivdi3.o lib1funcs.o ecard.o io-acorn.o \ + floppydma.o io-readsb.o io-writesb.o io-writesl.o \ + uaccess-kernel.o uaccess-user.o io-readsw-armv3.o \ + io-writesw-armv3.o io-readsl-armv3.o + +obj-m := +obj-n := + +obj-$(CONFIG_VT)+= kbd.o + +obj-y += ecard.o io-acorn.o floppydma.o + + +csumpartialcopy.o: csumpartialcopygeneric.S +csumpartialcopyuser.o: csumpartialcopygeneric.S + diff -Nru a/arch/arm26/lib/ashldi3.c b/arch/arm26/lib/ashldi3.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/ashldi3.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,61 @@ +/* More subroutines needed by GCC output code on some machines. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. + */ +/* support functions required by the kernel. based on code from gcc-2.95.3 */ +/* I Molton 29/07/01 */ + +#include "gcclib.h" + +DItype +__ashldi3 (DItype u, word_type b) +{ + DIunion w; + word_type bm; + DIunion uu; + + if (b == 0) + return u; + + uu.ll = u; + + bm = (sizeof (SItype) * BITS_PER_UNIT) - b; + if (bm <= 0) + { + w.s.low = 0; + w.s.high = (USItype)uu.s.low << -bm; + } + else + { + USItype carries = (USItype)uu.s.low >> bm; + w.s.low = (USItype)uu.s.low << b; + w.s.high = ((USItype)uu.s.high << b) | carries; + } + + return w.ll; +} + diff -Nru a/arch/arm26/lib/ashrdi3.c b/arch/arm26/lib/ashrdi3.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/ashrdi3.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,61 @@ +/* More subroutines needed by GCC output code on some machines. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. + */ +/* support functions required by the kernel. based on code from gcc-2.95.3 */ +/* I Molton 29/07/01 */ + +#include "gcclib.h" + +DItype +__ashrdi3 (DItype u, word_type b) +{ + DIunion w; + word_type bm; + DIunion uu; + + if (b == 0) + return u; + + uu.ll = u; + + bm = (sizeof (SItype) * BITS_PER_UNIT) - b; + if (bm <= 0) + { + /* w.s.high = 1..1 or 0..0 */ + w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1); + w.s.low = uu.s.high >> -bm; + } + else + { + USItype carries = (USItype)uu.s.high << bm; + w.s.high = uu.s.high >> b; + w.s.low = ((USItype)uu.s.low >> b) | carries; + } + + return w.ll; +} diff -Nru a/arch/arm26/lib/backtrace.S b/arch/arm26/lib/backtrace.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/backtrace.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,145 @@ +/* + * linux/arch/arm/lib/backtrace.S + * + * Copyright (C) 1995, 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + .text + +@ fp is 0 or stack frame + +#define frame r4 +#define next r5 +#define save r6 +#define mask r7 +#define offset r8 + +ENTRY(__backtrace) + mov r1, #0x10 + mov r0, fp + +ENTRY(c_backtrace) + +#ifdef CONFIG_NO_FRAME_POINTER + mov pc, lr +#else + + stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location... + mov mask, #0xfc000003 + tst mask, r0 + movne r0, #0 + movs frame, r0 +1: moveq r0, #-2 + LOADREGS(eqfd, sp!, {r4 - r8, pc}) + +2: stmfd sp!, {pc} @ calculate offset of PC in STMIA instruction + ldr r0, [sp], #4 + adr r1, 2b - 4 + sub offset, r0, r1 + +3: tst frame, mask @ Check for address exceptions... + bne 1b + +1001: ldr next, [frame, #-12] @ get fp +1002: ldr r2, [frame, #-4] @ get lr +1003: ldr r3, [frame, #0] @ get pc + sub save, r3, offset @ Correct PC for prefetching + bic save, save, mask +1004: ldr r1, [save, #0] @ get instruction at function + mov r1, r1, lsr #10 + ldr r3, .Ldsi+4 + teq r1, r3 + subeq save, save, #4 + adr r0, .Lfe + mov r1, save + bic r2, r2, mask + bl printk @ print pc and link register + + ldr r0, [frame, #-8] @ get sp + sub r0, r0, #4 +1005: ldr r1, [save, #4] @ get instruction at function+4 + mov r3, r1, lsr #10 + ldr r2, .Ldsi+4 + teq r3, r2 @ Check for stmia sp!, {args} + addeq save, save, #4 @ next instruction + bleq .Ldumpstm + + sub r0, frame, #16 +1006: ldr r1, [save, #4] @ Get 'stmia sp!, {rlist, fp, ip, lr, pc}' instruction + mov r3, r1, lsr #10 + ldr r2, .Ldsi + teq r3, r2 + bleq .Ldumpstm + + teq frame, next + movne frame, next + teqne frame, #0 + bne 3b + LOADREGS(fd, sp!, {r4 - r8, pc}) + +/* + * Fixup for LDMDB + */ + .section .fixup,"ax" + .align 0 +1007: ldr r0, =.Lbad + mov r1, frame + bl printk + LOADREGS(fd, sp!, {r4 - r8, pc}) + .ltorg + .previous + + .section __ex_table,"a" + .align 3 + .long 1001b, 1007b + .long 1002b, 1007b + .long 1003b, 1007b + .long 1004b, 1007b + .long 1005b, 1007b + .long 1006b, 1007b + .previous + +#define instr r4 +#define reg r5 +#define stack r6 + +.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, lr} + mov stack, r0 + mov instr, r1 + mov reg, #9 + mov r7, #0 +1: mov r3, #1 + tst instr, r3, lsl reg + beq 2f + add r7, r7, #1 + teq r7, #4 + moveq r7, #0 + moveq r3, #'\n' + movne r3, #' ' + ldr r2, [stack], #-4 + mov r1, reg + adr r0, .Lfp + bl printk +2: subs reg, reg, #1 + bpl 1b + teq r7, #0 + adrne r0, .Lcr + blne printk + mov r0, stack + LOADREGS(fd, sp!, {instr, reg, stack, r7, pc}) + +.Lfe: .asciz "Function entered at [<%p>] from [<%p>]\n" +.Lfp: .asciz " r%d = %08X%c" +.Lcr: .asciz "\n" +.Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n" + .align +.Ldsi: .word 0x00e92dd8 >> 2 + .word 0x00e92d00 >> 2 + +#endif diff -Nru a/arch/arm26/lib/changebit.S b/arch/arm26/lib/changebit.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/changebit.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,28 @@ +/* + * linux/arch/arm/lib/changebit.S + * + * Copyright (C) 1995-1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + +/* Purpose : Function to change a bit + * Prototype: int change_bit(int bit, void *addr) + */ +ENTRY(_change_bit_be) + eor r0, r0, #0x18 @ big endian byte ordering +ENTRY(_change_bit_le) + and r2, r0, #7 + mov r3, #1 + mov r3, r3, lsl r2 + save_and_disable_irqs ip, r2 + ldrb r2, [r1, r0, lsr #3] + eor r2, r2, r3 + strb r2, [r1, r0, lsr #3] + restore_irqs ip + RETINSTR(mov,pc,lr) diff -Nru a/arch/arm26/lib/clearbit.S b/arch/arm26/lib/clearbit.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/clearbit.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,31 @@ +/* + * linux/arch/arm/lib/clearbit.S + * + * Copyright (C) 1995-1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + +/* + * Purpose : Function to clear a bit + * Prototype: int clear_bit(int bit, void *addr) + */ +ENTRY(_clear_bit_be) + eor r0, r0, #0x18 @ big endian byte ordering +ENTRY(_clear_bit_le) + and r2, r0, #7 + mov r3, #1 + mov r3, r3, lsl r2 + save_and_disable_irqs ip, r2 + ldrb r2, [r1, r0, lsr #3] + bic r2, r2, r3 + strb r2, [r1, r0, lsr #3] + restore_irqs ip + RETINSTR(mov,pc,lr) + + diff -Nru a/arch/arm26/lib/copy_page.S b/arch/arm26/lib/copy_page.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/copy_page.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,62 @@ +/* + * linux/arch/arm/lib/copypage.S + * + * Copyright (C) 1995-1999 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include +#include +#include + + .text + .align 5 +/* + * ARMv3 optimised copy_user_page + * + * FIXME: rmk do we need to handle cache stuff... + * FIXME: im is this right on ARM26? + */ +ENTRY(__copy_user_page) + stmfd sp!, {r4, lr} @ 2 + mov r2, #PAGE_SZ/64 @ 1 + ldmia r1!, {r3, r4, ip, lr} @ 4+1 +1: stmia r0!, {r3, r4, ip, lr} @ 4 + ldmia r1!, {r3, r4, ip, lr} @ 4+1 + stmia r0!, {r3, r4, ip, lr} @ 4 + ldmia r1!, {r3, r4, ip, lr} @ 4+1 + stmia r0!, {r3, r4, ip, lr} @ 4 + ldmia r1!, {r3, r4, ip, lr} @ 4 + subs r2, r2, #1 @ 1 + stmia r0!, {r3, r4, ip, lr} @ 4 + ldmneia r1!, {r3, r4, ip, lr} @ 4 + bne 1b @ 1 + LOADREGS(fd, sp!, {r4, pc}) @ 3 + + .align 5 +/* + * ARMv3 optimised clear_user_page + * + * FIXME: rmk do we need to handle cache stuff... + */ +ENTRY(__clear_user_page) + str lr, [sp, #-4]! + mov r1, #PAGE_SZ/64 @ 1 + mov r2, #0 @ 1 + mov r3, #0 @ 1 + mov ip, #0 @ 1 + mov lr, #0 @ 1 +1: stmia r0!, {r2, r3, ip, lr} @ 4 + stmia r0!, {r2, r3, ip, lr} @ 4 + stmia r0!, {r2, r3, ip, lr} @ 4 + stmia r0!, {r2, r3, ip, lr} @ 4 + subs r1, r1, #1 @ 1 + bne 1b @ 1 + ldr pc, [sp], #4 + + .section ".init.text", #alloc, #execinstr + diff -Nru a/arch/arm26/lib/csumipv6.S b/arch/arm26/lib/csumipv6.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/csumipv6.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,32 @@ +/* + * linux/arch/arm/lib/csumipv6.S + * + * Copyright (C) 1995-1998 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + .text + +ENTRY(__csum_ipv6_magic) + str lr, [sp, #-4]! + adds ip, r2, r3 + ldmia r1, {r1 - r3, lr} + adcs ip, ip, r1 + adcs ip, ip, r2 + adcs ip, ip, r3 + adcs ip, ip, lr + ldmia r0, {r0 - r3} + adcs r0, ip, r0 + adcs r0, r0, r1 + adcs r0, r0, r2 + ldr r2, [sp, #4] + adcs r0, r0, r3 + adcs r0, r0, r2 + adcs r0, r0, #0 + LOADREGS(fd, sp!, {pc}) + diff -Nru a/arch/arm26/lib/csumpartial.S b/arch/arm26/lib/csumpartial.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/csumpartial.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,130 @@ +/* + * linux/arch/arm/lib/csumpartial.S + * + * Copyright (C) 1995-1998 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + .text + +/* + * Function: __u32 csum_partial(const char *src, int len, __u32 sum) + * Params : r0 = buffer, r1 = len, r2 = checksum + * Returns : r0 = new checksum + */ + +buf .req r0 +len .req r1 +sum .req r2 +td0 .req r3 +td1 .req r4 @ save before use +td2 .req r5 @ save before use +td3 .req lr + +.zero: mov r0, sum + add sp, sp, #4 + ldr pc, [sp], #4 + + /* + * Handle 0 to 7 bytes, with any alignment of source and + * destination pointers. Note that when we get here, C = 0 + */ +.less8: teq len, #0 @ check for zero count + beq .zero + + /* we must have at least one byte. */ + tst buf, #1 @ odd address? + ldrneb td0, [buf], #1 + subne len, len, #1 + adcnes sum, sum, td0, lsl #byte(1) + +.less4: tst len, #6 + beq .less8_byte + + /* we are now half-word aligned */ + +.less8_wordlp: +#if __LINUX_ARM_ARCH__ >= 4 + ldrh td0, [buf], #2 + sub len, len, #2 +#else + ldrb td0, [buf], #1 + ldrb td3, [buf], #1 + sub len, len, #2 + orr td0, td0, td3, lsl #8 +#endif + adcs sum, sum, td0 + tst len, #6 + bne .less8_wordlp + +.less8_byte: tst len, #1 @ odd number of bytes + ldrneb td0, [buf], #1 @ include last byte + adcnes sum, sum, td0, lsl #byte(0) @ update checksum + +.done: adc r0, sum, #0 @ collect up the last carry + ldr td0, [sp], #4 + tst td0, #1 @ check buffer alignment + movne td0, r0, lsl #8 @ rotate checksum by 8 bits + orrne r0, td0, r0, lsr #24 + ldr pc, [sp], #4 @ return + +.not_aligned: tst buf, #1 @ odd address + ldrneb td0, [buf], #1 @ make even + subne len, len, #1 + adcnes sum, sum, td0, lsl #byte(1) @ update checksum + + tst buf, #2 @ 32-bit aligned? +#if __LINUX_ARM_ARCH__ >= 4 + ldrneh td0, [buf], #2 @ make 32-bit aligned + subne len, len, #2 +#else + ldrneb td0, [buf], #1 + ldrneb ip, [buf], #1 + subne len, len, #2 + orrne td0, td0, ip, lsl #8 +#endif + adcnes sum, sum, td0 @ update checksum + mov pc, lr + +ENTRY(csum_partial) + stmfd sp!, {buf, lr} + cmp len, #8 @ Ensure that we have at least + blo .less8 @ 8 bytes to copy. + + adds sum, sum, #0 @ C = 0 + tst buf, #3 @ Test destination alignment + blne .not_aligned @ aligh destination, return here + +1: bics ip, len, #31 + beq 3f + + stmfd sp!, {r4 - r5} +2: ldmia buf!, {td0, td1, td2, td3} + adcs sum, sum, td0 + adcs sum, sum, td1 + adcs sum, sum, td2 + adcs sum, sum, td3 + ldmia buf!, {td0, td1, td2, td3} + adcs sum, sum, td0 + adcs sum, sum, td1 + adcs sum, sum, td2 + adcs sum, sum, td3 + sub ip, ip, #32 + teq ip, #0 + bne 2b + ldmfd sp!, {r4 - r5} + +3: tst len, #0x1c @ should not change C + beq .less4 + +4: ldr td0, [buf], #4 + sub len, len, #4 + adcs sum, sum, td0 + tst len, #0x1c + bne 4b + b .less4 diff -Nru a/arch/arm26/lib/csumpartialcopy.S b/arch/arm26/lib/csumpartialcopy.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/csumpartialcopy.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,52 @@ +/* + * linux/arch/arm/lib/csumpartialcopy.S + * + * Copyright (C) 1995-1998 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + .text + +/* Function: __u32 csum_partial_copy_nocheck(const char *src, char *dst, int len, __u32 sum) + * Params : r0 = src, r1 = dst, r2 = len, r3 = checksum + * Returns : r0 = new checksum + */ + + .macro save_regs + stmfd sp!, {r1, r4 - r8, fp, ip, lr, pc} + .endm + + .macro load_regs,flags + LOADREGS(\flags,fp,{r1, r4 - r8, fp, sp, pc}) + .endm + + .macro load1b, reg1 + ldrb \reg1, [r0], #1 + .endm + + .macro load2b, reg1, reg2 + ldrb \reg1, [r0], #1 + ldrb \reg2, [r0], #1 + .endm + + .macro load1l, reg1 + ldr \reg1, [r0], #4 + .endm + + .macro load2l, reg1, reg2 + ldr \reg1, [r0], #4 + ldr \reg2, [r0], #4 + .endm + + .macro load4l, reg1, reg2, reg3, reg4 + ldmia r0!, {\reg1, \reg2, \reg3, \reg4} + .endm + +#define FN_ENTRY ENTRY(csum_partial_copy_nocheck) + +#include "csumpartialcopygeneric.S" diff -Nru a/arch/arm26/lib/csumpartialcopygeneric.S b/arch/arm26/lib/csumpartialcopygeneric.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/csumpartialcopygeneric.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,352 @@ +/* + * linux/arch/arm/lib/csumpartialcopygeneric.S + * + * Copyright (C) 1995-2001 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * JMA 01/06/03 Commented out some shl0s; probobly irrelevant to arm26 + * + */ + +/* + * unsigned int + * csum_partial_copy_xxx(const char *src, char *dst, int len, int sum, ) + * r0 = src, r1 = dst, r2 = len, r3 = sum + * Returns : r0 = checksum + * + * Note that 'tst' and 'teq' preserve the carry flag. + */ + +/* Quick hack */ + .macro save_regs + stmfd sp!, {r1, r4 - r8, fp, ip, lr, pc} + .endm + +/* end Quick Hack */ + +src .req r0 +dst .req r1 +len .req r2 +sum .req r3 + +.zero: mov r0, sum + load_regs ea + + /* + * Align an unaligned destination pointer. We know that + * we have >= 8 bytes here, so we don't need to check + * the length. Note that the source pointer hasn't been + * aligned yet. + */ +.dst_unaligned: tst dst, #1 + beq .dst_16bit + + load1b ip + sub len, len, #1 + adcs sum, sum, ip, lsl #byte(1) @ update checksum + strb ip, [dst], #1 + tst dst, #2 + moveq pc, lr @ dst is now 32bit aligned + +.dst_16bit: load2b r8, ip + sub len, len, #2 + adcs sum, sum, r8, lsl #byte(0) + strb r8, [dst], #1 + adcs sum, sum, ip, lsl #byte(1) + strb ip, [dst], #1 + mov pc, lr @ dst is now 32bit aligned + + /* + * Handle 0 to 7 bytes, with any alignment of source and + * destination pointers. Note that when we get here, C = 0 + */ +.less8: teq len, #0 @ check for zero count + beq .zero + + /* we must have at least one byte. */ + tst dst, #1 @ dst 16-bit aligned + beq .less8_aligned + + /* Align dst */ + load1b ip + sub len, len, #1 + adcs sum, sum, ip, lsl #byte(1) @ update checksum + strb ip, [dst], #1 + tst len, #6 + beq .less8_byteonly + +1: load2b r8, ip + sub len, len, #2 + adcs sum, sum, r8, lsl #byte(0) + strb r8, [dst], #1 + adcs sum, sum, ip, lsl #byte(1) + strb ip, [dst], #1 +.less8_aligned: tst len, #6 + bne 1b +.less8_byteonly: + tst len, #1 + beq .done + load1b r8 + adcs sum, sum, r8, lsl #byte(0) @ update checksum + strb r8, [dst], #1 + b .done + +FN_ENTRY + mov ip, sp + save_regs + sub fp, ip, #4 + + cmp len, #8 @ Ensure that we have at least + blo .less8 @ 8 bytes to copy. + + adds sum, sum, #0 @ C = 0 + tst dst, #3 @ Test destination alignment + blne .dst_unaligned @ align destination, return here + + /* + * Ok, the dst pointer is now 32bit aligned, and we know + * that we must have more than 4 bytes to copy. Note + * that C contains the carry from the dst alignment above. + */ + + tst src, #3 @ Test source alignment + bne .src_not_aligned + + /* Routine for src & dst aligned */ + + bics ip, len, #15 + beq 2f + +1: load4l r4, r5, r6, r7 + stmia dst!, {r4, r5, r6, r7} + adcs sum, sum, r4 + adcs sum, sum, r5 + adcs sum, sum, r6 + adcs sum, sum, r7 + sub ip, ip, #16 + teq ip, #0 + bne 1b + +2: ands ip, len, #12 + beq 4f + tst ip, #8 + beq 3f + load2l r4, r5 + stmia dst!, {r4, r5} + adcs sum, sum, r4 + adcs sum, sum, r5 + tst ip, #4 + beq 4f + +3: load1l r4 + str r4, [dst], #4 + adcs sum, sum, r4 + +4: ands len, len, #3 + beq .done + load1l r4 + tst len, #2 +/* mov r5, r4, lsr #byte(0) +FIXME? 0 Shift anyhow! +*/ + beq .exit + adcs sum, sum, r4, push #16 + strb r5, [dst], #1 + mov r5, r4, lsr #byte(1) + strb r5, [dst], #1 + mov r5, r4, lsr #byte(2) +.exit: tst len, #1 + strneb r5, [dst], #1 + andne r5, r5, #255 + adcnes sum, sum, r5, lsl #byte(0) + + /* + * If the dst pointer was not 16-bit aligned, we + * need to rotate the checksum here to get around + * the inefficient byte manipulations in the + * architecture independent code. + */ +.done: adc r0, sum, #0 + ldr sum, [sp, #0] @ dst + tst sum, #1 + movne sum, r0, lsl #8 + orrne r0, sum, r0, lsr #24 + load_regs ea + +.src_not_aligned: + adc sum, sum, #0 @ include C from dst alignment + and ip, src, #3 + bic src, src, #3 + load1l r5 + cmp ip, #2 + beq .src2_aligned + bhi .src3_aligned + mov r4, r5, pull #8 @ C = 0 + bics ip, len, #15 + beq 2f +1: load4l r5, r6, r7, r8 + orr r4, r4, r5, push #24 + mov r5, r5, pull #8 + orr r5, r5, r6, push #24 + mov r6, r6, pull #8 + orr r6, r6, r7, push #24 + mov r7, r7, pull #8 + orr r7, r7, r8, push #24 + stmia dst!, {r4, r5, r6, r7} + adcs sum, sum, r4 + adcs sum, sum, r5 + adcs sum, sum, r6 + adcs sum, sum, r7 + mov r4, r8, pull #8 + sub ip, ip, #16 + teq ip, #0 + bne 1b +2: ands ip, len, #12 + beq 4f + tst ip, #8 + beq 3f + load2l r5, r6 + orr r4, r4, r5, push #24 + mov r5, r5, pull #8 + orr r5, r5, r6, push #24 + stmia dst!, {r4, r5} + adcs sum, sum, r4 + adcs sum, sum, r5 + mov r4, r6, pull #8 + tst ip, #4 + beq 4f +3: load1l r5 + orr r4, r4, r5, push #24 + str r4, [dst], #4 + adcs sum, sum, r4 + mov r4, r5, pull #8 +4: ands len, len, #3 + beq .done +/* mov r5, r4, lsr #byte(0) +FIXME? 0 Shift anyhow +*/ + tst len, #2 + beq .exit + adcs sum, sum, r4, push #16 + strb r5, [dst], #1 + mov r5, r4, lsr #byte(1) + strb r5, [dst], #1 + mov r5, r4, lsr #byte(2) + b .exit + +.src2_aligned: mov r4, r5, pull #16 + adds sum, sum, #0 + bics ip, len, #15 + beq 2f +1: load4l r5, r6, r7, r8 + orr r4, r4, r5, push #16 + mov r5, r5, pull #16 + orr r5, r5, r6, push #16 + mov r6, r6, pull #16 + orr r6, r6, r7, push #16 + mov r7, r7, pull #16 + orr r7, r7, r8, push #16 + stmia dst!, {r4, r5, r6, r7} + adcs sum, sum, r4 + adcs sum, sum, r5 + adcs sum, sum, r6 + adcs sum, sum, r7 + mov r4, r8, pull #16 + sub ip, ip, #16 + teq ip, #0 + bne 1b +2: ands ip, len, #12 + beq 4f + tst ip, #8 + beq 3f + load2l r5, r6 + orr r4, r4, r5, push #16 + mov r5, r5, pull #16 + orr r5, r5, r6, push #16 + stmia dst!, {r4, r5} + adcs sum, sum, r4 + adcs sum, sum, r5 + mov r4, r6, pull #16 + tst ip, #4 + beq 4f +3: load1l r5 + orr r4, r4, r5, push #16 + str r4, [dst], #4 + adcs sum, sum, r4 + mov r4, r5, pull #16 +4: ands len, len, #3 + beq .done +/* mov r5, r4, lsr #byte(0) +FIXME? 0 Shift anyhow +*/ + tst len, #2 + beq .exit + adcs sum, sum, r4 + strb r5, [dst], #1 + mov r5, r4, lsr #byte(1) + strb r5, [dst], #1 + tst len, #1 + beq .done + load1b r5 + b .exit + +.src3_aligned: mov r4, r5, pull #24 + adds sum, sum, #0 + bics ip, len, #15 + beq 2f +1: load4l r5, r6, r7, r8 + orr r4, r4, r5, push #8 + mov r5, r5, pull #24 + orr r5, r5, r6, push #8 + mov r6, r6, pull #24 + orr r6, r6, r7, push #8 + mov r7, r7, pull #24 + orr r7, r7, r8, push #8 + stmia dst!, {r4, r5, r6, r7} + adcs sum, sum, r4 + adcs sum, sum, r5 + adcs sum, sum, r6 + adcs sum, sum, r7 + mov r4, r8, pull #24 + sub ip, ip, #16 + teq ip, #0 + bne 1b +2: ands ip, len, #12 + beq 4f + tst ip, #8 + beq 3f + load2l r5, r6 + orr r4, r4, r5, push #8 + mov r5, r5, pull #24 + orr r5, r5, r6, push #8 + stmia dst!, {r4, r5} + adcs sum, sum, r4 + adcs sum, sum, r5 + mov r4, r6, pull #24 + tst ip, #4 + beq 4f +3: load1l r5 + orr r4, r4, r5, push #8 + str r4, [dst], #4 + adcs sum, sum, r4 + mov r4, r5, pull #24 +4: ands len, len, #3 + beq .done +/* mov r5, r4, lsr #byte(0) +FIXME? 0 Shift anyhow +*/ + tst len, #2 + beq .exit + strb r5, [dst], #1 + adcs sum, sum, r4 + load1l r4 +/* mov r5, r4, lsr #byte(0) +FIXME? 0 Shift anyhow +*/ + strb r5, [dst], #1 + adcs sum, sum, r4, push #24 + mov r5, r4, lsr #byte(1) + b .exit diff -Nru a/arch/arm26/lib/csumpartialcopyuser.S b/arch/arm26/lib/csumpartialcopyuser.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/csumpartialcopyuser.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,115 @@ +/* + * linux/arch/arm26/lib/csumpartialcopyuser.S + * + * Copyright (C) 1995-1998 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include + + .text + + .macro save_regs + stmfd sp!, {r1 - r2, r4 - r9, fp, ip, lr, pc} + mov r9, sp, lsr #13 + mov r9, r9, lsl #13 + ldr r9, [r9, #TSK_ADDR_LIMIT] + mov r9, r9, lsr #24 + .endm + + .macro load_regs,flags + ldm\flags fp, {r1, r2, r4-r9, fp, sp, pc}^ + .endm + + .macro load1b, reg1 + tst r9, #0x01 +9999: ldreqbt \reg1, [r0], #1 + ldrneb \reg1, [r0], #1 + .section __ex_table, "a" + .align 3 + .long 9999b, 6001f + .previous + .endm + + .macro load2b, reg1, reg2 + tst r9, #0x01 +9999: ldreqbt \reg1, [r0], #1 + ldrneb \reg1, [r0], #1 +9998: ldreqbt \reg2, [r0], #1 + ldrneb \reg2, [r0], #1 + .section __ex_table, "a" + .long 9999b, 6001f + .long 9998b, 6001f + .previous + .endm + + .macro load1l, reg1 + tst r9, #0x01 +9999: ldreqt \reg1, [r0], #4 + ldrne \reg1, [r0], #4 + .section __ex_table, "a" + .align 3 + .long 9999b, 6001f + .previous + .endm + + .macro load2l, reg1, reg2 + tst r9, #0x01 + ldmneia r0!, {\reg1, \reg2} +9999: ldreqt \reg1, [r0], #4 +9998: ldreqt \reg2, [r0], #4 + .section __ex_table, "a" + .long 9999b, 6001f + .long 9998b, 6001f + .previous + .endm + + .macro load4l, reg1, reg2, reg3, reg4 + tst r9, #0x01 + ldmneia r0!, {\reg1, \reg2, \reg3, \reg4} +9999: ldreqt \reg1, [r0], #4 +9998: ldreqt \reg2, [r0], #4 +9997: ldreqt \reg3, [r0], #4 +9996: ldreqt \reg4, [r0], #4 + .section __ex_table, "a" + .long 9999b, 6001f + .long 9998b, 6001f + .long 9997b, 6001f + .long 9996b, 6001f + .previous + .endm + +/* + * unsigned int + * csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr) + * r0 = src, r1 = dst, r2 = len, r3 = sum, [sp] = *err_ptr + * Returns : r0 = checksum, [[sp, #0], #0] = 0 or -EFAULT + */ + +#define FN_ENTRY ENTRY(csum_partial_copy_from_user) + +#include "csumpartialcopygeneric.S" + +/* + * FIXME: minor buglet here + * We don't return the checksum for the data present in the buffer. To do + * so properly, we would have to add in whatever registers were loaded before + * the fault, which, with the current asm above is not predictable. + */ + .align 4 +6001: mov r4, #-EFAULT + ldr r5, [fp, #4] @ *err_ptr + str r4, [r5] + ldmia sp, {r1, r2} @ retrieve dst, len + add r2, r2, r1 + mov r0, #0 @ zero the buffer +6002: teq r2, r1 + strneb r0, [r1], #1 + bne 6002b + load_regs ea diff -Nru a/arch/arm26/lib/delay.S b/arch/arm26/lib/delay.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/delay.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,57 @@ +/* + * linux/arch/arm/lib/delay.S + * + * Copyright (C) 1995, 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + +LC0: .word loops_per_jiffy + +/* + * 0 <= r0 <= 2000 + */ +ENTRY(udelay) + mov r2, #0x6800 + orr r2, r2, #0x00db + mul r1, r0, r2 + ldr r2, LC0 + ldr r2, [r2] + mov r1, r1, lsr #11 + mov r2, r2, lsr #11 + mul r0, r1, r2 + movs r0, r0, lsr #6 + RETINSTR(moveq,pc,lr) + +/* + * loops = (r0 * 0x10c6 * 100 * loops_per_jiffy) / 2^32 + * + * Oh, if only we had a cycle counter... + */ + +@ Delay routine +ENTRY(__delay) + subs r0, r0, #1 +#if 0 + RETINSTR(movls,pc,lr) + subs r0, r0, #1 + RETINSTR(movls,pc,lr) + subs r0, r0, #1 + RETINSTR(movls,pc,lr) + subs r0, r0, #1 + RETINSTR(movls,pc,lr) + subs r0, r0, #1 + RETINSTR(movls,pc,lr) + subs r0, r0, #1 + RETINSTR(movls,pc,lr) + subs r0, r0, #1 + RETINSTR(movls,pc,lr) + subs r0, r0, #1 +#endif + bhi __delay + RETINSTR(mov,pc,lr) diff -Nru a/arch/arm26/lib/ecard.S b/arch/arm26/lib/ecard.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/ecard.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,41 @@ +/* + * linux/arch/arm/lib/ecard.S + * + * Copyright (C) 1995, 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include /* for CONFIG_CPU_nn */ +#include +#include +#include + +#define CPSR2SPSR(rt) + +@ Purpose: call an expansion card loader to read bytes. +@ Proto : char read_loader(int offset, char *card_base, char *loader); +@ Returns: byte read + +ENTRY(ecard_loader_read) + stmfd sp!, {r4 - r12, lr} + mov r11, r1 + mov r1, r0 + CPSR2SPSR(r0) + mov lr, pc + mov pc, r2 + LOADREGS(fd, sp!, {r4 - r12, pc}) + +@ Purpose: call an expansion card loader to reset the card +@ Proto : void read_loader(int card_base, char *loader); +@ Returns: byte read + +ENTRY(ecard_loader_reset) + stmfd sp!, {r4 - r12, lr} + mov r11, r0 + CPSR2SPSR(r0) + mov lr, pc + add pc, r1, #8 + LOADREGS(fd, sp!, {r4 - r12, pc}) + diff -Nru a/arch/arm26/lib/findbit.S b/arch/arm26/lib/findbit.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/findbit.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,67 @@ +/* + * linux/arch/arm/lib/findbit.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 16th March 2001 - John Ripley + * Fixed so that "size" is an exclusive not an inclusive quantity. + * All users of these functions expect exclusive sizes, and may + * also call with zero size. + * Reworked by rmk. + */ +#include +#include + .text + +/* + * Purpose : Find a 'zero' bit + * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit); + */ +ENTRY(_find_first_zero_bit_le) + teq r1, #0 + beq 3f + mov r2, #0 +1: ldrb r3, [r0, r2, lsr #3] + eors r3, r3, #0xff @ invert bits + bne .found @ any now set - found zero bit + add r2, r2, #8 @ next bit pointer +2: cmp r2, r1 @ any more? + blo 1b +3: mov r0, r1 @ no free bits + RETINSTR(mov,pc,lr) + +/* + * Purpose : Find next 'zero' bit + * Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset) + */ +ENTRY(_find_next_zero_bit_le) + teq r1, #0 + beq 2b + ands ip, r2, #7 + beq 1b @ If new byte, goto old routine + ldrb r3, [r0, r2, lsr #3] + eor r3, r3, #0xff @ now looking for a 1 bit + movs r3, r3, lsr ip @ shift off unused bits + bne .found + orr r2, r2, #7 @ if zero, then no bits here + add r2, r2, #1 @ align bit pointer + b 2b @ loop for next bit + +/* + * One or more bits in the LSB of r3 are assumed to be set. + */ +.found: tst r3, #0x0f + addeq r2, r2, #4 + movne r3, r3, lsl #4 + tst r3, #0x30 + addeq r2, r2, #2 + movne r3, r3, lsl #2 + tst r3, #0x40 + addeq r2, r2, #1 + mov r0, r2 + RETINSTR(mov,pc,lr) + diff -Nru a/arch/arm26/lib/floppydma.S b/arch/arm26/lib/floppydma.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/floppydma.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,32 @@ +/* + * linux/arch/arm/lib/floppydma.S + * + * Copyright (C) 1995, 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + + .global floppy_fiqin_end +ENTRY(floppy_fiqin_start) + subs r9, r9, #1 + ldrgtb r12, [r11, #-4] + ldrleb r12, [r11], #0 + strb r12, [r10], #1 + subs pc, lr, #4 +floppy_fiqin_end: + + .global floppy_fiqout_end +ENTRY(floppy_fiqout_start) + subs r9, r9, #1 + ldrgeb r12, [r10], #1 + movlt r12, #0 + strleb r12, [r11], #0 + subles pc, lr, #4 + strb r12, [r11, #-4] + subs pc, lr, #4 +floppy_fiqout_end: diff -Nru a/arch/arm26/lib/gcclib.h b/arch/arm26/lib/gcclib.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/gcclib.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,21 @@ +/* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ +/* I Molton 29/07/01 */ + +#define BITS_PER_UNIT 8 +#define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT) + +typedef unsigned int UQItype __attribute__ ((mode (QI))); +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef int DItype __attribute__ ((mode (DI))); +typedef int word_type __attribute__ ((mode (__word__))); +typedef unsigned int UDItype __attribute__ ((mode (DI))); + +struct DIstruct {SItype low, high;}; + +typedef union +{ + struct DIstruct s; + DItype ll; +} DIunion; + diff -Nru a/arch/arm26/lib/getuser.S b/arch/arm26/lib/getuser.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/getuser.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,111 @@ +/* + * linux/arch/arm/lib/getuser.S + * + * Copyright (C) 2001 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Idea from x86 version, (C) Copyright 1998 Linus Torvalds + * + * These functions have a non-standard call interface to make them more + * efficient, especially as they return an error value in addition to + * the "real" return value. + * + * __get_user_X + * + * Inputs: r0 contains the address + * Outputs: r0 is the error code + * r1, r2 contains the zero-extended value + * lr corrupted + * + * No other registers must be altered. (see include/asm-arm/uaccess.h + * for specific ASM register usage). + * + * Note that ADDR_LIMIT is either 0 or 0xc0000000. + * Note also that it is intended that __get_user_bad is not global. + */ +#include +#include + + .global __get_user_1 +__get_user_1: + bic r1, sp, #0x1f00 + bic r1, r1, #0x00ff + str lr, [sp, #-4]! + ldr r1, [r1, #TI_ADDR_LIMIT] + sub r1, r1, #1 + cmp r0, r1 + bge __get_user_bad + cmp r0, #0x02000000 +1: ldrlsbt r1, [r0] + ldrgeb r1, [r0] + mov r0, #0 + ldmfd sp!, {pc}^ + + .global __get_user_2 +__get_user_2: + bic r2, sp, #0x1f00 + bic r2, r2, #0x00ff + str lr, [sp, #-4]! + ldr r2, [r2, #TI_ADDR_LIMIT] + sub r2, r2, #2 + cmp r0, r2 + bge __get_user_bad + cmp r0, #0x02000000 +2: ldrlsbt r1, [r0], #1 +3: ldrlsbt r2, [r0] + ldrgeb r1, [r0], #1 + ldrgeb r2, [r0] + orr r1, r1, r2, lsl #8 + mov r0, #0 + ldmfd sp!, {pc}^ + + .global __get_user_4 +__get_user_4: + bic r1, sp, #0x1f00 + bic r1, r1, #0x00ff + str lr, [sp, #-4]! + ldr r1, [r1, #TI_ADDR_LIMIT] + sub r1, r1, #4 + cmp r0, r1 + bge __get_user_bad + cmp r0, #0x02000000 +4: ldrlst r1, [r0] + ldrge r1, [r0] + mov r0, #0 + ldmfd sp!, {pc}^ + + .global __get_user_8 +__get_user_8: + bic r2, sp, #0x1f00 + bic r2, r2, #0x00ff + str lr, [sp, #-4]! + ldr r2, [r2, #TI_ADDR_LIMIT] + sub r2, r2, #8 + cmp r0, r2 + bge __get_user_bad_8 + cmp r0, #0x02000000 +5: ldrlst r1, [r0], #4 +6: ldrlst r2, [r0] + ldrge r1, [r0], #4 + ldrge r2, [r0] + mov r0, #0 + ldmfd sp!, {pc}^ + +__get_user_bad_8: + mov r2, #0 +__get_user_bad: + mov r1, #0 + mov r0, #-14 + ldmfd sp!, {pc}^ + +.section __ex_table, "a" + .long 1b, __get_user_bad + .long 2b, __get_user_bad + .long 3b, __get_user_bad + .long 4b, __get_user_bad + .long 5b, __get_user_bad_8 + .long 6b, __get_user_bad_8 +.previous diff -Nru a/arch/arm26/lib/io-acorn.S b/arch/arm26/lib/io-acorn.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/io-acorn.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,71 @@ +/* + * linux/arch/arm/lib/io-acorn.S + * + * Copyright (C) 1995, 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include /* for CONFIG_CPU_nn */ +#include +#include +#include + + .text + .align + + .equ diff_pcio_base, PCIO_BASE - IO_BASE + + .macro outw2 rd + mov r8, \rd, lsl #16 + orr r8, r8, r8, lsr #16 + str r8, [r3, r0, lsl #2] + mov r8, \rd, lsr #16 + orr r8, r8, r8, lsl #16 + str r8, [r3, r0, lsl #2] + .endm + + .macro inw2 rd, mask, temp + ldr \rd, [r0] + and \rd, \rd, \mask + ldr \temp, [r0] + orr \rd, \rd, \temp, lsl #16 + .endm + + .macro addr rd + tst \rd, #0x80000000 + mov \rd, \rd, lsl #2 + add \rd, \rd, #IO_BASE + addeq \rd, \rd, #diff_pcio_base + .endm + +.iosl_warning: + .ascii "<4>insl/outsl not implemented, called from %08lX\0" + .align + +/* + * These make no sense on Acorn machines. + * Print a warning message. + */ +ENTRY(insl) +ENTRY(outsl) + adr r0, .iosl_warning + mov r1, lr + b printk + +@ Purpose: write a memc register +@ Proto : void memc_write(int register, int value); +@ Returns: nothing + +ENTRY(memc_write) + cmp r0, #7 + RETINSTR(movgt,pc,lr) + mov r0, r0, lsl #17 + mov r1, r1, lsl #15 + mov r1, r1, lsr #17 + orr r0, r0, r1, lsl #2 + add r0, r0, #0x03600000 + strb r0, [r0] + RETINSTR(mov,pc,lr) + diff -Nru a/arch/arm26/lib/io-readsb.S b/arch/arm26/lib/io-readsb.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/io-readsb.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,116 @@ +/* + * linux/arch/arm/lib/io-readsb.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +.insb_align: rsb ip, ip, #4 + cmp ip, r2 + movgt ip, r2 + cmp ip, #2 + ldrb r3, [r0] + strb r3, [r1], #1 + ldrgeb r3, [r0] + strgeb r3, [r1], #1 + ldrgtb r3, [r0] + strgtb r3, [r1], #1 + subs r2, r2, ip + bne .insb_aligned + +ENTRY(__raw_readsb) + teq r2, #0 @ do we have to check for the zero len? + moveq pc, lr + ands ip, r1, #3 + bne .insb_align + +.insb_aligned: stmfd sp!, {r4 - r6, lr} + + subs r2, r2, #16 + bmi .insb_no_16 + +.insb_16_lp: ldrb r3, [r0] + ldrb r4, [r0] + orr r3, r3, r4, lsl #8 + ldrb r4, [r0] + orr r3, r3, r4, lsl #16 + ldrb r4, [r0] + orr r3, r3, r4, lsl #24 + ldrb r4, [r0] + ldrb r5, [r0] + orr r4, r4, r5, lsl #8 + ldrb r5, [r0] + orr r4, r4, r5, lsl #16 + ldrb r5, [r0] + orr r4, r4, r5, lsl #24 + ldrb r5, [r0] + ldrb r6, [r0] + orr r5, r5, r6, lsl #8 + ldrb r6, [r0] + orr r5, r5, r6, lsl #16 + ldrb r6, [r0] + orr r5, r5, r6, lsl #24 + ldrb r6, [r0] + ldrb ip, [r0] + orr r6, r6, ip, lsl #8 + ldrb ip, [r0] + orr r6, r6, ip, lsl #16 + ldrb ip, [r0] + orr r6, r6, ip, lsl #24 + stmia r1!, {r3 - r6} + + subs r2, r2, #16 + bpl .insb_16_lp + + tst r2, #15 + LOADREGS(eqfd, sp!, {r4 - r6, pc}) + +.insb_no_16: tst r2, #8 + beq .insb_no_8 + + ldrb r3, [r0] + ldrb r4, [r0] + orr r3, r3, r4, lsl #8 + ldrb r4, [r0] + orr r3, r3, r4, lsl #16 + ldrb r4, [r0] + orr r3, r3, r4, lsl #24 + ldrb r4, [r0] + ldrb r5, [r0] + orr r4, r4, r5, lsl #8 + ldrb r5, [r0] + orr r4, r4, r5, lsl #16 + ldrb r5, [r0] + orr r4, r4, r5, lsl #24 + stmia r1!, {r3, r4} + +.insb_no_8: tst r2, #4 + beq .insb_no_4 + + ldrb r3, [r0] + ldrb r4, [r0] + orr r3, r3, r4, lsl #8 + ldrb r4, [r0] + orr r3, r3, r4, lsl #16 + ldrb r4, [r0] + orr r3, r3, r4, lsl #24 + str r3, [r1], #4 + +.insb_no_4: ands r2, r2, #3 + LOADREGS(eqfd, sp!, {r4 - r6, pc}) + + cmp r2, #2 + ldrb r3, [r0] + strb r3, [r1], #1 + ldrgeb r3, [r0] + strgeb r3, [r1], #1 + ldrgtb r3, [r0] + strgtb r3, [r1] + + LOADREGS(fd, sp!, {r4 - r6, pc}) diff -Nru a/arch/arm26/lib/io-readsl-armv3.S b/arch/arm26/lib/io-readsl-armv3.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/io-readsl-armv3.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,78 @@ +/* + * linux/arch/arm/lib/io-readsl-armv3.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +/* + * Note that some reads can be aligned on half-word boundaries. + */ +ENTRY(__raw_readsl) + teq r2, #0 @ do we have to check for the zero len? + moveq pc, lr + ands ip, r1, #3 + bne 2f + +1: ldr r3, [r0] + str r3, [r1], #4 + subs r2, r2, #1 + bne 1b + mov pc, lr + +2: cmp ip, #2 + ldr ip, [r0] + blt 4f + bgt 6f + + strb ip, [r1], #1 + mov ip, ip, lsr #8 + strb ip, [r1], #1 + mov ip, ip, lsr #8 +3: subs r2, r2, #1 + ldrne r3, [r0] + orrne ip, ip, r3, lsl #16 + strne ip, [r1], #4 + movne ip, r3, lsr #16 + bne 3b + strb ip, [r1], #1 + mov ip, ip, lsr #8 + strb ip, [r1], #1 + mov pc, lr + +4: strb ip, [r1], #1 + mov ip, ip, lsr #8 + strb ip, [r1], #1 + mov ip, ip, lsr #8 + strb ip, [r1], #1 + mov ip, ip, lsr #8 +5: subs r2, r2, #1 + ldrne r3, [r0] + orrne ip, ip, r3, lsl #8 + strne ip, [r1], #4 + movne ip, r3, lsr #24 + bne 5b + strb ip, [r1], #1 + mov pc, lr + +6: strb ip, [r1], #1 + mov ip, ip, lsr #8 +7: subs r2, r2, #1 + ldrne r3, [r0] + orrne ip, ip, r3, lsl #24 + strne ip, [r1], #4 + movne ip, r3, lsr #8 + bne 7b + strb ip, [r1], #1 + mov ip, ip, lsr #8 + strb ip, [r1], #1 + mov ip, ip, lsr #8 + strb ip, [r1], #1 + mov pc, lr + diff -Nru a/arch/arm26/lib/io-readsw-armv3.S b/arch/arm26/lib/io-readsw-armv3.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/io-readsw-armv3.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,107 @@ +/* + * linux/arch/arm/lib/io-readsw-armv3.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +.insw_bad_alignment: + adr r0, .insw_bad_align_msg + mov r2, lr + b panic +.insw_bad_align_msg: + .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" + .align + +.insw_align: tst r1, #1 + bne .insw_bad_alignment + + ldr r3, [r0] + strb r3, [r1], #1 + mov r3, r3, lsr #8 + strb r3, [r1], #1 + + subs r2, r2, #1 + RETINSTR(moveq, pc, lr) + +ENTRY(__raw_readsw) + teq r2, #0 @ do we have to check for the zero len? + moveq pc, lr + tst r1, #3 + bne .insw_align + +.insw_aligned: mov ip, #0xff + orr ip, ip, ip, lsl #8 + stmfd sp!, {r4, r5, r6, lr} + + subs r2, r2, #8 + bmi .no_insw_8 + +.insw_8_lp: ldr r3, [r0] + and r3, r3, ip + ldr r4, [r0] + orr r3, r3, r4, lsl #16 + + ldr r4, [r0] + and r4, r4, ip + ldr r5, [r0] + orr r4, r4, r5, lsl #16 + + ldr r5, [r0] + and r5, r5, ip + ldr r6, [r0] + orr r5, r5, r6, lsl #16 + + ldr r6, [r0] + and r6, r6, ip + ldr lr, [r0] + orr r6, r6, lr, lsl #16 + + stmia r1!, {r3 - r6} + + subs r2, r2, #8 + bpl .insw_8_lp + + tst r2, #7 + LOADREGS(eqfd, sp!, {r4, r5, r6, pc}) + +.no_insw_8: tst r2, #4 + beq .no_insw_4 + + ldr r3, [r0] + and r3, r3, ip + ldr r4, [r0] + orr r3, r3, r4, lsl #16 + + ldr r4, [r0] + and r4, r4, ip + ldr r5, [r0] + orr r4, r4, r5, lsl #16 + + stmia r1!, {r3, r4} + +.no_insw_4: tst r2, #2 + beq .no_insw_2 + + ldr r3, [r0] + and r3, r3, ip + ldr r4, [r0] + orr r3, r3, r4, lsl #16 + + str r3, [r1], #4 + +.no_insw_2: tst r2, #1 + ldrne r3, [r0] + strneb r3, [r1], #1 + movne r3, r3, lsr #8 + strneb r3, [r1] + + LOADREGS(fd, sp!, {r4, r5, r6, pc}) + + diff -Nru a/arch/arm26/lib/io-writesb.S b/arch/arm26/lib/io-writesb.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/io-writesb.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,122 @@ +/* + * linux/arch/arm/lib/io-writesb.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +.outsb_align: rsb ip, ip, #4 + cmp ip, r2 + movgt ip, r2 + cmp ip, #2 + ldrb r3, [r1], #1 + strb r3, [r0] + ldrgeb r3, [r1], #1 + strgeb r3, [r0] + ldrgtb r3, [r1], #1 + strgtb r3, [r0] + subs r2, r2, ip + bne .outsb_aligned + +ENTRY(__raw_writesb) + teq r2, #0 @ do we have to check for the zero len? + moveq pc, lr + ands ip, r1, #3 + bne .outsb_align + +.outsb_aligned: stmfd sp!, {r4 - r6, lr} + + subs r2, r2, #16 + bmi .outsb_no_16 + +.outsb_16_lp: ldmia r1!, {r3 - r6} + + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + + strb r4, [r0] + mov r4, r4, lsr #8 + strb r4, [r0] + mov r4, r4, lsr #8 + strb r4, [r0] + mov r4, r4, lsr #8 + strb r4, [r0] + + strb r5, [r0] + mov r5, r5, lsr #8 + strb r5, [r0] + mov r5, r5, lsr #8 + strb r5, [r0] + mov r5, r5, lsr #8 + strb r5, [r0] + + strb r6, [r0] + mov r6, r6, lsr #8 + strb r6, [r0] + mov r6, r6, lsr #8 + strb r6, [r0] + mov r6, r6, lsr #8 + strb r6, [r0] + + subs r2, r2, #16 + bpl .outsb_16_lp + + tst r2, #15 + LOADREGS(eqfd, sp!, {r4 - r6, pc}) + +.outsb_no_16: tst r2, #8 + beq .outsb_no_8 + + ldmia r1!, {r3, r4} + + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + + strb r4, [r0] + mov r4, r4, lsr #8 + strb r4, [r0] + mov r4, r4, lsr #8 + strb r4, [r0] + mov r4, r4, lsr #8 + strb r4, [r0] + +.outsb_no_8: tst r2, #4 + beq .outsb_no_4 + + ldr r3, [r1], #4 + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + mov r3, r3, lsr #8 + strb r3, [r0] + +.outsb_no_4: ands r2, r2, #3 + LOADREGS(eqfd, sp!, {r4 - r6, pc}) + + cmp r2, #2 + ldrb r3, [r1], #1 + strb r3, [r0] + ldrgeb r3, [r1], #1 + strgeb r3, [r0] + ldrgtb r3, [r1] + strgtb r3, [r0] + + LOADREGS(fd, sp!, {r4 - r6, pc}) diff -Nru a/arch/arm26/lib/io-writesl.S b/arch/arm26/lib/io-writesl.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/io-writesl.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,56 @@ +/* + * linux/arch/arm/lib/io-writesl.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +ENTRY(__raw_writesl) + teq r2, #0 @ do we have to check for the zero len? + moveq pc, lr + ands ip, r1, #3 + bne 2f + +1: ldr r3, [r1], #4 + str r3, [r0] + subs r2, r2, #1 + bne 1b + mov pc, lr + +2: bic r1, r1, #3 + cmp ip, #2 + ldr r3, [r1], #4 + bgt 4f + blt 5f + +3: mov ip, r3, lsr #16 + ldr r3, [r1], #4 + orr ip, ip, r3, lsl #16 + str ip, [r0] + subs r2, r2, #1 + bne 3b + mov pc, lr + +4: mov ip, r3, lsr #24 + ldr r3, [r1], #4 + orr ip, ip, r3, lsl #8 + str ip, [r0] + subs r2, r2, #1 + bne 4b + mov pc, lr + +5: mov ip, r3, lsr #8 + ldr r3, [r1], #4 + orr ip, ip, r3, lsl #24 + str ip, [r0] + subs r2, r2, #1 + bne 5b + mov pc, lr + + diff -Nru a/arch/arm26/lib/io-writesw-armv3.S b/arch/arm26/lib/io-writesw-armv3.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/io-writesw-armv3.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,127 @@ +/* + * linux/arch/arm/lib/io-writesw-armv3.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +.outsw_bad_alignment: + adr r0, .outsw_bad_align_msg + mov r2, lr + b panic +.outsw_bad_align_msg: + .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" + .align + +.outsw_align: tst r1, #1 + bne .outsw_bad_alignment + + add r1, r1, #2 + + ldr r3, [r1, #-4] + mov r3, r3, lsr #16 + orr r3, r3, r3, lsl #16 + str r3, [r0] + subs r2, r2, #1 + RETINSTR(moveq, pc, lr) + +ENTRY(__raw_writesw) + teq r2, #0 @ do we have to check for the zero len? + moveq pc, lr + tst r1, #3 + bne .outsw_align + +.outsw_aligned: stmfd sp!, {r4, r5, r6, lr} + + subs r2, r2, #8 + bmi .no_outsw_8 + +.outsw_8_lp: ldmia r1!, {r3, r4, r5, r6} + + mov ip, r3, lsl #16 + orr ip, ip, ip, lsr #16 + str ip, [r0] + + mov ip, r3, lsr #16 + orr ip, ip, ip, lsl #16 + str ip, [r0] + + mov ip, r4, lsl #16 + orr ip, ip, ip, lsr #16 + str ip, [r0] + + mov ip, r4, lsr #16 + orr ip, ip, ip, lsl #16 + str ip, [r0] + + mov ip, r5, lsl #16 + orr ip, ip, ip, lsr #16 + str ip, [r0] + + mov ip, r5, lsr #16 + orr ip, ip, ip, lsl #16 + str ip, [r0] + + mov ip, r6, lsl #16 + orr ip, ip, ip, lsr #16 + str ip, [r0] + + mov ip, r6, lsr #16 + orr ip, ip, ip, lsl #16 + str ip, [r0] + + subs r2, r2, #8 + bpl .outsw_8_lp + + tst r2, #7 + LOADREGS(eqfd, sp!, {r4, r5, r6, pc}) + +.no_outsw_8: tst r2, #4 + beq .no_outsw_4 + + ldmia r1!, {r3, r4} + + mov ip, r3, lsl #16 + orr ip, ip, ip, lsr #16 + str ip, [r0] + + mov ip, r3, lsr #16 + orr ip, ip, ip, lsl #16 + str ip, [r0] + + mov ip, r4, lsl #16 + orr ip, ip, ip, lsr #16 + str ip, [r0] + + mov ip, r4, lsr #16 + orr ip, ip, ip, lsl #16 + str ip, [r0] + +.no_outsw_4: tst r2, #2 + beq .no_outsw_2 + + ldr r3, [r1], #4 + + mov ip, r3, lsl #16 + orr ip, ip, ip, lsr #16 + str ip, [r0] + + mov ip, r3, lsr #16 + orr ip, ip, ip, lsl #16 + str ip, [r0] + +.no_outsw_2: tst r2, #1 + + ldrne r3, [r1] + + movne ip, r3, lsl #16 + orrne ip, ip, ip, lsr #16 + strne ip, [r0] + + LOADREGS(fd, sp!, {r4, r5, r6, pc}) diff -Nru a/arch/arm26/lib/kbd.c b/arch/arm26/lib/kbd.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/kbd.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,279 @@ +#include +#include +//#include +#include + +/* + * Translation of escaped scancodes to keycodes. + * This is now user-settable. + * The keycodes 1-88,96-111,119 are fairly standard, and + * should probably not be changed - changing might confuse X. + * X also interprets scancode 0x5d (KEY_Begin). + * + * For 1-88 keycode equals scancode. + */ + +#define E0_KPENTER 96 +#define E0_RCTRL 97 +#define E0_KPSLASH 98 +#define E0_PRSCR 99 +#define E0_RALT 100 +#define E0_BREAK 101 /* (control-pause) */ +#define E0_HOME 102 +#define E0_UP 103 +#define E0_PGUP 104 +#define E0_LEFT 105 +#define E0_RIGHT 106 +#define E0_END 107 +#define E0_DOWN 108 +#define E0_PGDN 109 +#define E0_INS 110 +#define E0_DEL 111 + +/* for USB 106 keyboard */ +#define E0_YEN 124 +#define E0_BACKSLASH 89 + + +#define E1_PAUSE 119 + +/* + * The keycodes below are randomly located in 89-95,112-118,120-127. + * They could be thrown away (and all occurrences below replaced by 0), + * but that would force many users to use the `setkeycodes' utility, where + * they needed not before. It does not matter that there are duplicates, as + * long as no duplication occurs for any single keyboard. + */ +#define SC_LIM 89 + +#define FOCUS_PF1 85 /* actual code! */ +#define FOCUS_PF2 89 +#define FOCUS_PF3 90 +#define FOCUS_PF4 91 +#define FOCUS_PF5 92 +#define FOCUS_PF6 93 +#define FOCUS_PF7 94 +#define FOCUS_PF8 95 +#define FOCUS_PF9 120 +#define FOCUS_PF10 121 +#define FOCUS_PF11 122 +#define FOCUS_PF12 123 + +#define JAP_86 124 +/* tfj@olivia.ping.dk: + * The four keys are located over the numeric keypad, and are + * labelled A1-A4. It's an rc930 keyboard, from + * Regnecentralen/RC International, Now ICL. + * Scancodes: 59, 5a, 5b, 5c. + */ +#define RGN1 124 +#define RGN2 125 +#define RGN3 126 +#define RGN4 127 + +static unsigned char high_keys[128 - SC_LIM] = { + RGN1, RGN2, RGN3, RGN4, 0, 0, 0, /* 0x59-0x5f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ + 0, 0, 0, 0, 0, FOCUS_PF11, 0, FOCUS_PF12, /* 0x68-0x6f */ + 0, 0, 0, FOCUS_PF2, FOCUS_PF9, 0, 0, FOCUS_PF3, /* 0x70-0x77 */ + FOCUS_PF4, FOCUS_PF5, FOCUS_PF6, FOCUS_PF7, /* 0x78-0x7b */ + FOCUS_PF8, JAP_86, FOCUS_PF10, 0 /* 0x7c-0x7f */ +}; + +/* BTC */ +#define E0_MACRO 112 +/* LK450 */ +#define E0_F13 113 +#define E0_F14 114 +#define E0_HELP 115 +#define E0_DO 116 +#define E0_F17 117 +#define E0_KPMINPLUS 118 +/* + * My OmniKey generates e0 4c for the "OMNI" key and the + * right alt key does nada. [kkoller@nyx10.cs.du.edu] + */ +#define E0_OK 124 +/* + * New microsoft keyboard is rumoured to have + * e0 5b (left window button), e0 5c (right window button), + * e0 5d (menu button). [or: LBANNER, RBANNER, RMENU] + * [or: Windows_L, Windows_R, TaskMan] + */ +#define E0_MSLW 125 +#define E0_MSRW 126 +#define E0_MSTM 127 + +static unsigned char e0_keys[128] = { + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00-0x07 */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08-0x0f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10-0x17 */ + 0, 0, 0, 0, E0_KPENTER, E0_RCTRL, 0, 0, /* 0x18-0x1f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20-0x27 */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28-0x2f */ + 0, 0, 0, 0, 0, E0_KPSLASH, 0, E0_PRSCR, /* 0x30-0x37 */ + E0_RALT, 0, 0, 0, 0, E0_F13, E0_F14, E0_HELP, /* 0x38-0x3f */ + E0_DO, E0_F17, 0, 0, 0, 0, E0_BREAK, E0_HOME, /* 0x40-0x47 */ + E0_UP, E0_PGUP, 0, E0_LEFT, E0_OK, E0_RIGHT, E0_KPMINPLUS, E0_END, /* 0x48-0x4f */ + E0_DOWN, E0_PGDN, E0_INS, E0_DEL, 0, 0, 0, 0, /* 0x50-0x57 */ + 0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, 0, 0, /* 0x58-0x5f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ + 0, 0, 0, 0, 0, 0, 0, E0_MACRO, /* 0x68-0x6f */ + //0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */ + 0, 0, 0, 0, 0, E0_BACKSLASH, 0, 0, /* 0x70-0x77 */ + 0, 0, 0, E0_YEN, 0, 0, 0, 0 /* 0x78-0x7f */ +}; + +static int gen_setkeycode(unsigned int scancode, unsigned int keycode) +{ + if (scancode < SC_LIM || scancode > 255 || keycode > 127) + return -EINVAL; + if (scancode < 128) + high_keys[scancode - SC_LIM] = keycode; + else + e0_keys[scancode - 128] = keycode; + return 0; +} + +static int gen_getkeycode(unsigned int scancode) +{ + return + (scancode < SC_LIM || scancode > 255) ? -EINVAL : + (scancode < + 128) ? high_keys[scancode - SC_LIM] : e0_keys[scancode - 128]; +} + +static int +gen_translate(unsigned char scancode, unsigned char *keycode, char raw_mode) +{ + static int prev_scancode = 0; + + /* special prefix scancodes.. */ + if (scancode == 0xe0 || scancode == 0xe1) { + prev_scancode = scancode; + return 0; + } + + /* 0xFF is sent by a few keyboards, ignore it. 0x00 is error */ + if (scancode == 0x00 || scancode == 0xff) { + prev_scancode = 0; + return 0; + } + + scancode &= 0x7f; + + if (prev_scancode) { + /* + * usually it will be 0xe0, but a Pause key generates + * e1 1d 45 e1 9d c5 when pressed, and nothing when released + */ + if (prev_scancode != 0xe0) { + if (prev_scancode == 0xe1 && scancode == 0x1d) { + prev_scancode = 0x100; + return 0; + } + else if (prev_scancode == 0x100 + && scancode == 0x45) { + *keycode = E1_PAUSE; + prev_scancode = 0; + } else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO + "keyboard: unknown e1 escape sequence\n"); +#endif + prev_scancode = 0; + return 0; + } + } else { + prev_scancode = 0; + /* + * The keyboard maintains its own internal caps lock and + * num lock statuses. In caps lock mode E0 AA precedes make + * code and E0 2A follows break code. In num lock mode, + * E0 2A precedes make code and E0 AA follows break code. + * We do our own book-keeping, so we will just ignore these. + */ + /* + * For my keyboard there is no caps lock mode, but there are + * both Shift-L and Shift-R modes. The former mode generates + * E0 2A / E0 AA pairs, the latter E0 B6 / E0 36 pairs. + * So, we should also ignore the latter. - aeb@cwi.nl + */ + if (scancode == 0x2a || scancode == 0x36) + return 0; + + if (e0_keys[scancode]) + *keycode = e0_keys[scancode]; + else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO + "keyboard: unknown scancode e0 %02x\n", + scancode); +#endif + return 0; + } + } + } else if (scancode >= SC_LIM) { + /* This happens with the FOCUS 9000 keyboard + Its keys PF1..PF12 are reported to generate + 55 73 77 78 79 7a 7b 7c 74 7e 6d 6f + Moreover, unless repeated, they do not generate + key-down events, so we have to zero up_flag below */ + /* Also, Japanese 86/106 keyboards are reported to + generate 0x73 and 0x7d for \ - and \ | respectively. */ + /* Also, some Brazilian keyboard is reported to produce + 0x73 and 0x7e for \ ? and KP-dot, respectively. */ + + *keycode = high_keys[scancode - SC_LIM]; + + if (!*keycode) { + if (!raw_mode) { +#ifdef KBD_REPORT_UNKN + printk(KERN_INFO + "keyboard: unrecognized scancode (%02x)" + " - ignored\n", scancode); +#endif + } + return 0; + } + } else + *keycode = scancode; + return 1; +} + +static char gen_unexpected_up(unsigned char keycode) +{ + /* unexpected, but this can happen: maybe this was a key release for a + FOCUS 9000 PF key; if we want to see it, we have to clear up_flag */ + if (keycode >= SC_LIM || keycode == 85) + return 0; + else + return 0200; +} + +/* + * These are the default mappings + */ +int (*k_setkeycode)(unsigned int, unsigned int) = gen_setkeycode; +int (*k_getkeycode)(unsigned int) = gen_getkeycode; +int (*k_translate)(unsigned char, unsigned char *, char) = gen_translate; +char (*k_unexpected_up)(unsigned char) = gen_unexpected_up; +void (*k_leds)(unsigned char); + +/* Simple translation table for the SysRq keys */ + +#ifdef CONFIG_MAGIC_SYSRQ +static unsigned char gen_sysrq_xlate[128] = + "\000\0331234567890-=\177\t" /* 0x00 - 0x0f */ + "qwertyuiop[]\r\000as" /* 0x10 - 0x1f */ + "dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */ + "bnm,./\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */ + "\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */ + "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */ + "\r\000/"; /* 0x60 - 0x6f */ + +unsigned char *k_sysrq_xlate = gen_sysrq_xlate; +int k_sysrq_key = 0x54; +#endif diff -Nru a/arch/arm26/lib/lib1funcs.S b/arch/arm26/lib/lib1funcs.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/lib1funcs.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,314 @@ +@ libgcc1 routines for ARM cpu. +@ Division routines, written by Richard Earnshaw, (rearnsha@armltd.co.uk) + +/* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc. + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file. (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. + */ +/* This code is derived from gcc 2.95.3 */ +/* I Molton 29/07/01 */ + +#include +#include +#include +#include + +#define RET movs +#define RETc(x) mov##x##s +#define RETCOND ^ + +dividend .req r0 +divisor .req r1 +result .req r2 +overdone .req r2 +curbit .req r3 +ip .req r12 +sp .req r13 +lr .req r14 +pc .req r15 + +ENTRY(__udivsi3) + cmp divisor, #0 + beq Ldiv0 + mov curbit, #1 + mov result, #0 + cmp dividend, divisor + bcc Lgot_result_udivsi3 +1: + @ Unless the divisor is very big, shift it up in multiples of + @ four bits, since this is the amount of unwinding in the main + @ division loop. Continue shifting until the divisor is + @ larger than the dividend. + cmp divisor, #0x10000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #4 + movcc curbit, curbit, lsl #4 + bcc 1b + +2: + @ For very big divisors, we must shift it a bit at a time, or + @ we will be in danger of overflowing. + cmp divisor, #0x80000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #1 + movcc curbit, curbit, lsl #1 + bcc 2b + +3: + @ Test for possible subtractions, and note which bits + @ are done in the result. On the final pass, this may subtract + @ too much from the dividend, but the result will be ok, since the + @ "bit" will have been shifted out at the bottom. + cmp dividend, divisor + subcs dividend, dividend, divisor + orrcs result, result, curbit + cmp dividend, divisor, lsr #1 + subcs dividend, dividend, divisor, lsr #1 + orrcs result, result, curbit, lsr #1 + cmp dividend, divisor, lsr #2 + subcs dividend, dividend, divisor, lsr #2 + orrcs result, result, curbit, lsr #2 + cmp dividend, divisor, lsr #3 + subcs dividend, dividend, divisor, lsr #3 + orrcs result, result, curbit, lsr #3 + cmp dividend, #0 @ Early termination? + movnes curbit, curbit, lsr #4 @ No, any more bits to do? + movne divisor, divisor, lsr #4 + bne 3b +Lgot_result_udivsi3: + mov r0, result + RET pc, lr + +Ldiv0: + str lr, [sp, #-4]! + bl __div0 + mov r0, #0 @ about as wrong as it could be + ldmia sp!, {pc}RETCOND + +/* __umodsi3 ----------------------- */ + +ENTRY(__umodsi3) + cmp divisor, #0 + beq Ldiv0 + mov curbit, #1 + cmp dividend, divisor + RETc(cc) pc, lr +1: + @ Unless the divisor is very big, shift it up in multiples of + @ four bits, since this is the amount of unwinding in the main + @ division loop. Continue shifting until the divisor is + @ larger than the dividend. + cmp divisor, #0x10000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #4 + movcc curbit, curbit, lsl #4 + bcc 1b + +2: + @ For very big divisors, we must shift it a bit at a time, or + @ we will be in danger of overflowing. + cmp divisor, #0x80000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #1 + movcc curbit, curbit, lsl #1 + bcc 2b + +3: + @ Test for possible subtractions. On the final pass, this may + @ subtract too much from the dividend, so keep track of which + @ subtractions are done, we can fix them up afterwards... + mov overdone, #0 + cmp dividend, divisor + subcs dividend, dividend, divisor + cmp dividend, divisor, lsr #1 + subcs dividend, dividend, divisor, lsr #1 + orrcs overdone, overdone, curbit, ror #1 + cmp dividend, divisor, lsr #2 + subcs dividend, dividend, divisor, lsr #2 + orrcs overdone, overdone, curbit, ror #2 + cmp dividend, divisor, lsr #3 + subcs dividend, dividend, divisor, lsr #3 + orrcs overdone, overdone, curbit, ror #3 + mov ip, curbit + cmp dividend, #0 @ Early termination? + movnes curbit, curbit, lsr #4 @ No, any more bits to do? + movne divisor, divisor, lsr #4 + bne 3b + + @ Any subtractions that we should not have done will be recorded in + @ the top three bits of "overdone". Exactly which were not needed + @ are governed by the position of the bit, stored in ip. + @ If we terminated early, because dividend became zero, + @ then none of the below will match, since the bit in ip will not be + @ in the bottom nibble. + ands overdone, overdone, #0xe0000000 + RETc(eq) pc, lr @ No fixups needed + tst overdone, ip, ror #3 + addne dividend, dividend, divisor, lsr #3 + tst overdone, ip, ror #2 + addne dividend, dividend, divisor, lsr #2 + tst overdone, ip, ror #1 + addne dividend, dividend, divisor, lsr #1 + RET pc, lr + +ENTRY(__divsi3) + eor ip, dividend, divisor @ Save the sign of the result. + mov curbit, #1 + mov result, #0 + cmp divisor, #0 + rsbmi divisor, divisor, #0 @ Loops below use unsigned. + beq Ldiv0 + cmp dividend, #0 + rsbmi dividend, dividend, #0 + cmp dividend, divisor + bcc Lgot_result_divsi3 + +1: + @ Unless the divisor is very big, shift it up in multiples of + @ four bits, since this is the amount of unwinding in the main + @ division loop. Continue shifting until the divisor is + @ larger than the dividend. + cmp divisor, #0x10000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #4 + movcc curbit, curbit, lsl #4 + bcc 1b + +2: + @ For very big divisors, we must shift it a bit at a time, or + @ we will be in danger of overflowing. + cmp divisor, #0x80000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #1 + movcc curbit, curbit, lsl #1 + bcc 2b + +3: + @ Test for possible subtractions, and note which bits + @ are done in the result. On the final pass, this may subtract + @ too much from the dividend, but the result will be ok, since the + @ "bit" will have been shifted out at the bottom. + cmp dividend, divisor + subcs dividend, dividend, divisor + orrcs result, result, curbit + cmp dividend, divisor, lsr #1 + subcs dividend, dividend, divisor, lsr #1 + orrcs result, result, curbit, lsr #1 + cmp dividend, divisor, lsr #2 + subcs dividend, dividend, divisor, lsr #2 + orrcs result, result, curbit, lsr #2 + cmp dividend, divisor, lsr #3 + subcs dividend, dividend, divisor, lsr #3 + orrcs result, result, curbit, lsr #3 + cmp dividend, #0 @ Early termination? + movnes curbit, curbit, lsr #4 @ No, any more bits to do? + movne divisor, divisor, lsr #4 + bne 3b +Lgot_result_divsi3: + mov r0, result + cmp ip, #0 + rsbmi r0, r0, #0 + RET pc, lr + +ENTRY(__modsi3) + mov curbit, #1 + cmp divisor, #0 + rsbmi divisor, divisor, #0 @ Loops below use unsigned. + beq Ldiv0 + @ Need to save the sign of the dividend, unfortunately, we need + @ ip later on; this is faster than pushing lr and using that. + str dividend, [sp, #-4]! + cmp dividend, #0 + rsbmi dividend, dividend, #0 + cmp dividend, divisor + bcc Lgot_result_modsi3 + +1: + @ Unless the divisor is very big, shift it up in multiples of + @ four bits, since this is the amount of unwinding in the main + @ division loop. Continue shifting until the divisor is + @ larger than the dividend. + cmp divisor, #0x10000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #4 + movcc curbit, curbit, lsl #4 + bcc 1b + +2: + @ For very big divisors, we must shift it a bit at a time, or + @ we will be in danger of overflowing. + cmp divisor, #0x80000000 + cmpcc divisor, dividend + movcc divisor, divisor, lsl #1 + movcc curbit, curbit, lsl #1 + bcc 2b + +3: + @ Test for possible subtractions. On the final pass, this may + @ subtract too much from the dividend, so keep track of which + @ subtractions are done, we can fix them up afterwards... + mov overdone, #0 + cmp dividend, divisor + subcs dividend, dividend, divisor + cmp dividend, divisor, lsr #1 + subcs dividend, dividend, divisor, lsr #1 + orrcs overdone, overdone, curbit, ror #1 + cmp dividend, divisor, lsr #2 + subcs dividend, dividend, divisor, lsr #2 + orrcs overdone, overdone, curbit, ror #2 + cmp dividend, divisor, lsr #3 + subcs dividend, dividend, divisor, lsr #3 + orrcs overdone, overdone, curbit, ror #3 + mov ip, curbit + cmp dividend, #0 @ Early termination? + movnes curbit, curbit, lsr #4 @ No, any more bits to do? + movne divisor, divisor, lsr #4 + bne 3b + + @ Any subtractions that we should not have done will be recorded in + @ the top three bits of "overdone". Exactly which were not needed + @ are governed by the position of the bit, stored in ip. + @ If we terminated early, because dividend became zero, + @ then none of the below will match, since the bit in ip will not be + @ in the bottom nibble. + ands overdone, overdone, #0xe0000000 + beq Lgot_result_modsi3 + tst overdone, ip, ror #3 + addne dividend, dividend, divisor, lsr #3 + tst overdone, ip, ror #2 + addne dividend, dividend, divisor, lsr #2 + tst overdone, ip, ror #1 + addne dividend, dividend, divisor, lsr #1 +Lgot_result_modsi3: + ldr ip, [sp], #4 + cmp ip, #0 + rsbmi dividend, dividend, #0 + RET pc, lr diff -Nru a/arch/arm26/lib/longlong.h b/arch/arm26/lib/longlong.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/longlong.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,184 @@ +/* longlong.h -- based on code from gcc-2.95.3 + + definitions for mixed size 32/64 bit arithmetic. + Copyright (C) 1991, 92, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc. + + This definition file is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2, or (at your option) any later version. + + This definition file is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Borrowed from GCC 2.95.3, I Molton 29/07/01 */ + +#ifndef SI_TYPE_SIZE +#define SI_TYPE_SIZE 32 +#endif + +#define __BITS4 (SI_TYPE_SIZE / 4) +#define __ll_B (1L << (SI_TYPE_SIZE / 2)) +#define __ll_lowpart(t) ((USItype) (t) % __ll_B) +#define __ll_highpart(t) ((USItype) (t) / __ll_B) + +/* Define auxiliary asm macros. + + 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) + multiplies two USItype integers MULTIPLER and MULTIPLICAND, + and generates a two-part USItype product in HIGH_PROD and + LOW_PROD. + + 2) __umulsidi3(a,b) multiplies two USItype integers A and B, + and returns a UDItype product. This is just a variant of umul_ppmm. + + 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator, + denominator) divides a two-word unsigned integer, composed by the + integers HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and + places the quotient in QUOTIENT and the remainder in REMAINDER. + HIGH_NUMERATOR must be less than DENOMINATOR for correct operation. + If, in addition, the most significant bit of DENOMINATOR must be 1, + then the pre-processor symbol UDIV_NEEDS_NORMALIZATION is defined to 1. + + 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator, + denominator). Like udiv_qrnnd but the numbers are signed. The + quotient is rounded towards 0. + + 5) count_leading_zeros(count, x) counts the number of zero-bits from + the msb to the first non-zero bit. This is the number of steps X + needs to be shifted left to set the msb. Undefined for X == 0. + + 6) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1, + high_addend_2, low_addend_2) adds two two-word unsigned integers, + composed by HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and + LOW_ADDEND_2 respectively. The result is placed in HIGH_SUM and + LOW_SUM. Overflow (i.e. carry out) is not stored anywhere, and is + lost. + + 7) sub_ddmmss(high_difference, low_difference, high_minuend, + low_minuend, high_subtrahend, low_subtrahend) subtracts two + two-word unsigned integers, composed by HIGH_MINUEND_1 and + LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and LOW_SUBTRAHEND_2 + respectively. The result is placed in HIGH_DIFFERENCE and + LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere, + and is lost. + + If any of these macros are left undefined for a particular CPU, + C macros are used. */ + +#if defined (__arm__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("adds %1, %4, %5 \n\ + adc %0, %2, %3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%r" ((USItype) (ah)), \ + "rI" ((USItype) (bh)), \ + "%r" ((USItype) (al)), \ + "rI" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subs %1, %4, %5 \n\ + sbc %0, %2, %3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "r" ((USItype) (ah)), \ + "rI" ((USItype) (bh)), \ + "r" ((USItype) (al)), \ + "rI" ((USItype) (bl))) +#define umul_ppmm(xh, xl, a, b) \ +{register USItype __t0, __t1, __t2; \ + __asm__ ("%@ Inlined umul_ppmm \n\ + mov %2, %5, lsr #16 \n\ + mov %0, %6, lsr #16 \n\ + bic %3, %5, %2, lsl #16 \n\ + bic %4, %6, %0, lsl #16 \n\ + mul %1, %3, %4 \n\ + mul %4, %2, %4 \n\ + mul %3, %0, %3 \n\ + mul %0, %2, %0 \n\ + adds %3, %4, %3 \n\ + addcs %0, %0, #65536 \n\ + adds %1, %1, %3, lsl #16 \n\ + adc %0, %0, %3, lsr #16" \ + : "=&r" ((USItype) (xh)), \ + "=r" ((USItype) (xl)), \ + "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ + : "r" ((USItype) (a)), \ + "r" ((USItype) (b)));} +#define UMUL_TIME 20 +#define UDIV_TIME 100 +#endif /* __arm__ */ + +#define __umulsidi3(u, v) \ + ({DIunion __w; \ + umul_ppmm (__w.s.high, __w.s.low, u, v); \ + __w.ll; }) + +#define __udiv_qrnnd_c(q, r, n1, n0, d) \ + do { \ + USItype __d1, __d0, __q1, __q0; \ + USItype __r1, __r0, __m; \ + __d1 = __ll_highpart (d); \ + __d0 = __ll_lowpart (d); \ + \ + __r1 = (n1) % __d1; \ + __q1 = (n1) / __d1; \ + __m = (USItype) __q1 * __d0; \ + __r1 = __r1 * __ll_B | __ll_highpart (n0); \ + if (__r1 < __m) \ + { \ + __q1--, __r1 += (d); \ + if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\ + if (__r1 < __m) \ + __q1--, __r1 += (d); \ + } \ + __r1 -= __m; \ + \ + __r0 = __r1 % __d1; \ + __q0 = __r1 / __d1; \ + __m = (USItype) __q0 * __d0; \ + __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ + if (__r0 < __m) \ + { \ + __q0--, __r0 += (d); \ + if (__r0 >= (d)) \ + if (__r0 < __m) \ + __q0--, __r0 += (d); \ + } \ + __r0 -= __m; \ + \ + (q) = (USItype) __q1 * __ll_B | __q0; \ + (r) = __r0; \ + } while (0) + +#define UDIV_NEEDS_NORMALIZATION 1 +#define udiv_qrnnd __udiv_qrnnd_c + +extern const UQItype __clz_tab[]; +#define count_leading_zeros(count, x) \ + do { \ + USItype __xr = (x); \ + USItype __a; \ + \ + if (SI_TYPE_SIZE <= 32) \ + { \ + __a = __xr < ((USItype)1<<2*__BITS4) \ + ? (__xr < ((USItype)1<<__BITS4) ? 0 : __BITS4) \ + : (__xr < ((USItype)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \ + } \ + else \ + { \ + for (__a = SI_TYPE_SIZE - 8; __a > 0; __a -= 8) \ + if (((__xr >> __a) & 0xff) != 0) \ + break; \ + } \ + \ + (count) = SI_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \ + } while (0) diff -Nru a/arch/arm26/lib/lshrdi3.c b/arch/arm26/lib/lshrdi3.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/lshrdi3.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,61 @@ +/* More subroutines needed by GCC output code on some machines. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. + */ +/* support functions required by the kernel. based on code from gcc-2.95.3 */ +/* I Molton 29/07/01 */ + +#include "gcclib.h" + +DItype +__lshrdi3 (DItype u, word_type b) +{ + DIunion w; + word_type bm; + DIunion uu; + + if (b == 0) + return u; + + uu.ll = u; + + bm = (sizeof (SItype) * BITS_PER_UNIT) - b; + if (bm <= 0) + { + w.s.high = 0; + w.s.low = (USItype)uu.s.high >> -bm; + } + else + { + USItype carries = (USItype)uu.s.high << bm; + w.s.high = (USItype)uu.s.high >> b; + w.s.low = ((USItype)uu.s.low >> b) | carries; + } + + return w.ll; +} + diff -Nru a/arch/arm26/lib/memchr.S b/arch/arm26/lib/memchr.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/memchr.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,25 @@ +/* + * linux/arch/arm/lib/memchr.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include +#include + + .text + .align 5 +ENTRY(memchr) +1: subs r2, r2, #1 + bmi 2f + ldrb r3, [r0], #1 + teq r3, r1 + bne 1b + sub r0, r0, #1 +2: movne r0, #0 + RETINSTR(mov,pc,lr) diff -Nru a/arch/arm26/lib/memcpy.S b/arch/arm26/lib/memcpy.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/memcpy.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,318 @@ +/* + * linux/arch/arm/lib/memcpy.S + * + * Copyright (C) 1995-1999 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include +#include + + .text + +#define ENTER \ + mov ip,sp ;\ + stmfd sp!,{r4-r9,fp,ip,lr,pc} ;\ + sub fp,ip,#4 + +#define EXIT \ + LOADREGS(ea, fp, {r4 - r9, fp, sp, pc}) + +#define EXITEQ \ + LOADREGS(eqea, fp, {r4 - r9, fp, sp, pc}) + +/* + * Prototype: void memcpy(void *to,const void *from,unsigned long n); + * ARM3: cant use memcopy here!!! + */ +ENTRY(memcpy) +ENTRY(memmove) + ENTER + cmp r1, r0 + bcc 19f + subs r2, r2, #4 + blt 6f + ands ip, r0, #3 + bne 7f + ands ip, r1, #3 + bne 8f + +1: subs r2, r2, #8 + blt 5f + subs r2, r2, #0x14 + blt 3f +2: ldmia r1!,{r3 - r9, ip} + stmia r0!,{r3 - r9, ip} + subs r2, r2, #32 + bge 2b + cmn r2, #16 + ldmgeia r1!, {r3 - r6} + stmgeia r0!, {r3 - r6} + subge r2, r2, #0x10 +3: adds r2, r2, #0x14 +4: ldmgeia r1!, {r3 - r5} + stmgeia r0!, {r3 - r5} + subges r2, r2, #12 + bge 4b +5: adds r2, r2, #8 + blt 6f + subs r2, r2, #4 + ldrlt r3, [r1], #4 + ldmgeia r1!, {r4, r5} + strlt r3, [r0], #4 + stmgeia r0!, {r4, r5} + subge r2, r2, #4 + +6: adds r2, r2, #4 + EXITEQ + cmp r2, #2 + ldrb r3, [r1], #1 + ldrgeb r4, [r1], #1 + ldrgtb r5, [r1], #1 + strb r3, [r0], #1 + strgeb r4, [r0], #1 + strgtb r5, [r0], #1 + EXIT + +7: rsb ip, ip, #4 + cmp ip, #2 + ldrb r3, [r1], #1 + ldrgeb r4, [r1], #1 + ldrgtb r5, [r1], #1 + strb r3, [r0], #1 + strgeb r4, [r0], #1 + strgtb r5, [r0], #1 + subs r2, r2, ip + blt 6b + ands ip, r1, #3 + beq 1b + +8: bic r1, r1, #3 + ldr r7, [r1], #4 + cmp ip, #2 + bgt 15f + beq 11f + cmp r2, #12 + blt 10f + sub r2, r2, #12 +9: mov r3, r7, pull #8 + ldmia r1!, {r4 - r7} + orr r3, r3, r4, push #24 + mov r4, r4, pull #8 + orr r4, r4, r5, push #24 + mov r5, r5, pull #8 + orr r5, r5, r6, push #24 + mov r6, r6, pull #8 + orr r6, r6, r7, push #24 + stmia r0!, {r3 - r6} + subs r2, r2, #16 + bge 9b + adds r2, r2, #12 + blt 100f +10: mov r3, r7, pull #8 + ldr r7, [r1], #4 + subs r2, r2, #4 + orr r3, r3, r7, push #24 + str r3, [r0], #4 + bge 10b +100: sub r1, r1, #3 + b 6b + +11: cmp r2, #12 + blt 13f /* */ + sub r2, r2, #12 +12: mov r3, r7, pull #16 + ldmia r1!, {r4 - r7} + orr r3, r3, r4, push #16 + mov r4, r4, pull #16 + orr r4, r4, r5, push #16 + mov r5, r5, pull #16 + orr r5, r5, r6, push #16 + mov r6, r6, pull #16 + orr r6, r6, r7, push #16 + stmia r0!, {r3 - r6} + subs r2, r2, #16 + bge 12b + adds r2, r2, #12 + blt 14f +13: mov r3, r7, pull #16 + ldr r7, [r1], #4 + subs r2, r2, #4 + orr r3, r3, r7, push #16 + str r3, [r0], #4 + bge 13b +14: sub r1, r1, #2 + b 6b + +15: cmp r2, #12 + blt 17f + sub r2, r2, #12 +16: mov r3, r7, pull #24 + ldmia r1!, {r4 - r7} + orr r3, r3, r4, push #8 + mov r4, r4, pull #24 + orr r4, r4, r5, push #8 + mov r5, r5, pull #24 + orr r5, r5, r6, push #8 + mov r6, r6, pull #24 + orr r6, r6, r7, push #8 + stmia r0!, {r3 - r6} + subs r2, r2, #16 + bge 16b + adds r2, r2, #12 + blt 18f +17: mov r3, r7, pull #24 + ldr r7, [r1], #4 + subs r2, r2, #4 + orr r3, r3, r7, push #8 + str r3, [r0], #4 + bge 17b +18: sub r1, r1, #1 + b 6b + + +19: add r1, r1, r2 + add r0, r0, r2 + subs r2, r2, #4 + blt 24f + ands ip, r0, #3 + bne 25f + ands ip, r1, #3 + bne 26f + +20: subs r2, r2, #8 + blt 23f + subs r2, r2, #0x14 + blt 22f +21: ldmdb r1!, {r3 - r9, ip} + stmdb r0!, {r3 - r9, ip} + subs r2, r2, #32 + bge 21b +22: cmn r2, #16 + ldmgedb r1!, {r3 - r6} + stmgedb r0!, {r3 - r6} + subge r2, r2, #16 + adds r2, r2, #20 + ldmgedb r1!, {r3 - r5} + stmgedb r0!, {r3 - r5} + subge r2, r2, #12 +23: adds r2, r2, #8 + blt 24f + subs r2, r2, #4 + ldrlt r3, [r1, #-4]! + ldmgedb r1!, {r4, r5} + strlt r3, [r0, #-4]! + stmgedb r0!, {r4, r5} + subge r2, r2, #4 + +24: adds r2, r2, #4 + EXITEQ + cmp r2, #2 + ldrb r3, [r1, #-1]! + ldrgeb r4, [r1, #-1]! + ldrgtb r5, [r1, #-1]! + strb r3, [r0, #-1]! + strgeb r4, [r0, #-1]! + strgtb r5, [r0, #-1]! + EXIT + +25: cmp ip, #2 + ldrb r3, [r1, #-1]! + ldrgeb r4, [r1, #-1]! + ldrgtb r5, [r1, #-1]! + strb r3, [r0, #-1]! + strgeb r4, [r0, #-1]! + strgtb r5, [r0, #-1]! + subs r2, r2, ip + blt 24b + ands ip, r1, #3 + beq 20b + +26: bic r1, r1, #3 + ldr r3, [r1], #0 + cmp ip, #2 + blt 34f + beq 30f + cmp r2, #12 + blt 28f + sub r2, r2, #12 +27: mov r7, r3, push #8 + ldmdb r1!, {r3, r4, r5, r6} + orr r7, r7, r6, pull #24 + mov r6, r6, push #8 + orr r6, r6, r5, pull #24 + mov r5, r5, push #8 + orr r5, r5, r4, pull #24 + mov r4, r4, push #8 + orr r4, r4, r3, pull #24 + stmdb r0!, {r4, r5, r6, r7} + subs r2, r2, #16 + bge 27b + adds r2, r2, #12 + blt 29f +28: mov ip, r3, push #8 + ldr r3, [r1, #-4]! + subs r2, r2, #4 + orr ip, ip, r3, pull #24 + str ip, [r0, #-4]! + bge 28b +29: add r1, r1, #3 + b 24b + +30: cmp r2, #12 + blt 32f + sub r2, r2, #12 +31: mov r7, r3, push #16 + ldmdb r1!, {r3, r4, r5, r6} + orr r7, r7, r6, pull #16 + mov r6, r6, push #16 + orr r6, r6, r5, pull #16 + mov r5, r5, push #16 + orr r5, r5, r4, pull #16 + mov r4, r4, push #16 + orr r4, r4, r3, pull #16 + stmdb r0!, {r4, r5, r6, r7} + subs r2, r2, #16 + bge 31b + adds r2, r2, #12 + blt 33f +32: mov ip, r3, push #16 + ldr r3, [r1, #-4]! + subs r2, r2, #4 + orr ip, ip, r3, pull #16 + str ip, [r0, #-4]! + bge 32b +33: add r1, r1, #2 + b 24b + +34: cmp r2, #12 + blt 36f + sub r2, r2, #12 +35: mov r7, r3, push #24 + ldmdb r1!, {r3, r4, r5, r6} + orr r7, r7, r6, pull #8 + mov r6, r6, push #24 + orr r6, r6, r5, pull #8 + mov r5, r5, push #24 + orr r5, r5, r4, pull #8 + mov r4, r4, push #24 + orr r4, r4, r3, pull #8 + stmdb r0!, {r4, r5, r6, r7} + subs r2, r2, #16 + bge 35b + adds r2, r2, #12 + blt 37f +36: mov ip, r3, push #24 + ldr r3, [r1, #-4]! + subs r2, r2, #4 + orr ip, ip, r3, pull #8 + str ip, [r0, #-4]! + bge 36b +37: add r1, r1, #1 + b 24b + + .align diff -Nru a/arch/arm26/lib/memset.S b/arch/arm26/lib/memset.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/memset.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,80 @@ +/* + * linux/arch/arm/lib/memset.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include +#include + + .text + .align 5 + .word 0 + +1: subs r2, r2, #4 @ 1 do we have enough + blt 5f @ 1 bytes to align with? + cmp r3, #2 @ 1 + strltb r1, [r0], #1 @ 1 + strleb r1, [r0], #1 @ 1 + strb r1, [r0], #1 @ 1 + add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) +/* + * The pointer is now aligned and the length is adjusted. Try doing the + * memzero again. + */ + +ENTRY(memset) + ands r3, r0, #3 @ 1 unaligned? + bne 1b @ 1 +/* + * we know that the pointer in r0 is aligned to a word boundary. + */ + orr r1, r1, r1, lsl #8 + orr r1, r1, r1, lsl #16 + mov r3, r1 + cmp r2, #16 + blt 4f +/* + * We need an extra register for this loop - save the return address and + * use the LR + */ + str lr, [sp, #-4]! + mov ip, r1 + mov lr, r1 + +2: subs r2, r2, #64 + stmgeia r0!, {r1, r3, ip, lr} @ 64 bytes at a time. + stmgeia r0!, {r1, r3, ip, lr} + stmgeia r0!, {r1, r3, ip, lr} + stmgeia r0!, {r1, r3, ip, lr} + bgt 2b + LOADREGS(eqfd, sp!, {pc}) @ Now <64 bytes to go. +/* + * No need to correct the count; we're only testing bits from now on + */ + tst r2, #32 + stmneia r0!, {r1, r3, ip, lr} + stmneia r0!, {r1, r3, ip, lr} + tst r2, #16 + stmneia r0!, {r1, r3, ip, lr} + ldr lr, [sp], #4 + +4: tst r2, #8 + stmneia r0!, {r1, r3} + tst r2, #4 + strne r1, [r0], #4 +/* + * When we get here, we've got less than 4 bytes to zero. We + * may have an unaligned pointer as well. + */ +5: tst r2, #2 + strneb r1, [r0], #1 + strneb r1, [r0], #1 + tst r2, #1 + strneb r1, [r0], #1 + RETINSTR(mov,pc,lr) diff -Nru a/arch/arm26/lib/memzero.S b/arch/arm26/lib/memzero.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/memzero.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,80 @@ +/* + * linux/arch/arm/lib/memzero.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + .text + .align 5 + .word 0 +/* + * Align the pointer in r0. r3 contains the number of bytes that we are + * mis-aligned by, and r1 is the number of bytes. If r1 < 4, then we + * don't bother; we use byte stores instead. + */ +1: subs r1, r1, #4 @ 1 do we have enough + blt 5f @ 1 bytes to align with? + cmp r3, #2 @ 1 + strltb r2, [r0], #1 @ 1 + strleb r2, [r0], #1 @ 1 + strb r2, [r0], #1 @ 1 + add r1, r1, r3 @ 1 (r1 = r1 - (4 - r3)) +/* + * The pointer is now aligned and the length is adjusted. Try doing the + * memzero again. + */ + +ENTRY(__memzero) + mov r2, #0 @ 1 + ands r3, r0, #3 @ 1 unaligned? + bne 1b @ 1 +/* + * r3 = 0, and we know that the pointer in r0 is aligned to a word boundary. + */ + cmp r1, #16 @ 1 we can skip this chunk if we + blt 4f @ 1 have < 16 bytes +/* + * We need an extra register for this loop - save the return address and + * use the LR + */ + str lr, [sp, #-4]! @ 1 + mov ip, r2 @ 1 + mov lr, r2 @ 1 + +3: subs r1, r1, #64 @ 1 write 32 bytes out per loop + stmgeia r0!, {r2, r3, ip, lr} @ 4 + stmgeia r0!, {r2, r3, ip, lr} @ 4 + stmgeia r0!, {r2, r3, ip, lr} @ 4 + stmgeia r0!, {r2, r3, ip, lr} @ 4 + bgt 3b @ 1 + LOADREGS(eqfd, sp!, {pc}) @ 1/2 quick exit +/* + * No need to correct the count; we're only testing bits from now on + */ + tst r1, #32 @ 1 + stmneia r0!, {r2, r3, ip, lr} @ 4 + stmneia r0!, {r2, r3, ip, lr} @ 4 + tst r1, #16 @ 1 16 bytes or more? + stmneia r0!, {r2, r3, ip, lr} @ 4 + ldr lr, [sp], #4 @ 1 + +4: tst r1, #8 @ 1 8 bytes or more? + stmneia r0!, {r2, r3} @ 2 + tst r1, #4 @ 1 4 bytes or more? + strne r2, [r0], #4 @ 1 +/* + * When we get here, we've got less than 4 bytes to zero. We + * may have an unaligned pointer as well. + */ +5: tst r1, #2 @ 1 2 bytes or more? + strneb r2, [r0], #1 @ 1 + strneb r2, [r0], #1 @ 1 + tst r1, #1 @ 1 a byte left over + strneb r2, [r0], #1 @ 1 + RETINSTR(mov,pc,lr) @ 1 diff -Nru a/arch/arm26/lib/muldi3.c b/arch/arm26/lib/muldi3.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/muldi3.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,77 @@ +/* More subroutines needed by GCC output code on some machines. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. + */ +/* support functions required by the kernel. based on code from gcc-2.95.3 */ +/* I Molton 29/07/01 */ + +#include "gcclib.h" + +#define umul_ppmm(xh, xl, a, b) \ +{register USItype __t0, __t1, __t2; \ + __asm__ ("%@ Inlined umul_ppmm \n\ + mov %2, %5, lsr #16 \n\ + mov %0, %6, lsr #16 \n\ + bic %3, %5, %2, lsl #16 \n\ + bic %4, %6, %0, lsl #16 \n\ + mul %1, %3, %4 \n\ + mul %4, %2, %4 \n\ + mul %3, %0, %3 \n\ + mul %0, %2, %0 \n\ + adds %3, %4, %3 \n\ + addcs %0, %0, #65536 \n\ + adds %1, %1, %3, lsl #16 \n\ + adc %0, %0, %3, lsr #16" \ + : "=&r" ((USItype) (xh)), \ + "=r" ((USItype) (xl)), \ + "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ + : "r" ((USItype) (a)), \ + "r" ((USItype) (b)));} + + +#define __umulsidi3(u, v) \ + ({DIunion __w; \ + umul_ppmm (__w.s.high, __w.s.low, u, v); \ + __w.ll; }) + + +DItype +__muldi3 (DItype u, DItype v) +{ + DIunion w; + DIunion uu, vv; + + uu.ll = u, + vv.ll = v; + + w.ll = __umulsidi3 (uu.s.low, vv.s.low); + w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high + + (USItype) uu.s.high * (USItype) vv.s.low); + + return w.ll; +} + diff -Nru a/arch/arm26/lib/putuser.S b/arch/arm26/lib/putuser.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/putuser.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,108 @@ +/* + * linux/arch/arm/lib/putuser.S + * + * Copyright (C) 2001 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Idea from x86 version, (C) Copyright 1998 Linus Torvalds + * + * These functions have a non-standard call interface to make + * them more efficient, especially as they return an error + * value in addition to the "real" return value. + * + * __put_user_X + * + * Inputs: r0 contains the address + * r1, r2 contains the value + * Outputs: r0 is the error code + * lr corrupted + * + * No other registers must be altered. (see include/asm-arm/uaccess.h + * for specific ASM register usage). + * + * Note that ADDR_LIMIT is either 0 or 0xc0000000 + * Note also that it is intended that __put_user_bad is not global. + */ +#include +#include + + .global __put_user_1 +__put_user_1: + bic r2, sp, #0x1f00 + bic r2, r2, #0x00ff + str lr, [sp, #-4]! + ldr r2, [r2, #TI_ADDR_LIMIT] + sub r2, r2, #1 + cmp r0, r2 + bge __put_user_bad +1: cmp r0, #0x02000000 + strlsbt r1, [r0] + strgeb r1, [r0] + mov r0, #0 + ldmfd sp!, {pc}^ + + .global __put_user_2 +__put_user_2: + bic r2, sp, #0x1f00 + bic r2, r2, #0x00ff + str lr, [sp, #-4]! + ldr r2, [r2, #TI_ADDR_LIMIT] + sub r2, r2, #2 + cmp r0, r2 + bge __put_user_bad +2: cmp r0, #0x02000000 + strlsbt r1, [r0], #1 + strgeb r1, [r0], #1 + mov r1, r1, lsr #8 +3: strlsbt r1, [r0] + strgeb r1, [r0] + mov r0, #0 + ldmfd sp!, {pc}^ + + .global __put_user_4 +__put_user_4: + bic r2, sp, #0x1f00 + bic r2, r2, #0x00ff + str lr, [sp, #-4]! + ldr r2, [r2, #TI_ADDR_LIMIT] + sub r2, r2, #4 + cmp r0, r2 +4: bge __put_user_bad + cmp r0, #0x02000000 + strlst r1, [r0] + strge r1, [r0] + mov r0, #0 + ldmfd sp!, {pc}^ + + .global __put_user_8 +__put_user_8: + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + str lr, [sp, #-4]! + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #8 + cmp r0, ip + bge __put_user_bad + cmp r0, #0x02000000 +5: strlst r1, [r0], #4 +6: strlst r2, [r0] + strge r1, [r0], #4 + strge r2, [r0] + mov r0, #0 + ldmfd sp!, {pc}^ + +__put_user_bad: + mov r0, #-14 + mov pc, lr + +.section __ex_table, "a" + .long 1b, __put_user_bad + .long 2b, __put_user_bad + .long 3b, __put_user_bad + .long 4b, __put_user_bad + .long 5b, __put_user_bad + .long 6b, __put_user_bad +.previous diff -Nru a/arch/arm26/lib/setbit.S b/arch/arm26/lib/setbit.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/setbit.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,29 @@ +/* + * linux/arch/arm/lib/setbit.S + * + * Copyright (C) 1995-1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + +/* + * Purpose : Function to set a bit + * Prototype: int set_bit(int bit, void *addr) + */ +ENTRY(_set_bit_be) + eor r0, r0, #0x18 @ big endian byte ordering +ENTRY(_set_bit_le) + and r2, r0, #7 + mov r3, #1 + mov r3, r3, lsl r2 + save_and_disable_irqs ip, r2 + ldrb r2, [r1, r0, lsr #3] + orr r2, r2, r3 + strb r2, [r1, r0, lsr #3] + restore_irqs ip + RETINSTR(mov,pc,lr) diff -Nru a/arch/arm26/lib/strchr.S b/arch/arm26/lib/strchr.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/strchr.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,25 @@ +/* + * linux/arch/arm/lib/strchr.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include +#include + + .text + .align 5 +ENTRY(strchr) +1: ldrb r2, [r0], #1 + teq r2, r1 + teqne r2, #0 + bne 1b + teq r2, #0 + moveq r0, #0 + subne r0, r0, #1 + RETINSTR(mov,pc,lr) diff -Nru a/arch/arm26/lib/strrchr.S b/arch/arm26/lib/strrchr.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/strrchr.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,25 @@ +/* + * linux/arch/arm/lib/strrchr.S + * + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include +#include + + .text + .align 5 +ENTRY(strrchr) + mov r3, #0 +1: ldrb r2, [r0], #1 + teq r2, r1 + subeq r3, r0, #1 + teq r2, #0 + bne 1b + mov r0, r3 + RETINSTR(mov,pc,lr) diff -Nru a/arch/arm26/lib/testchangebit.S b/arch/arm26/lib/testchangebit.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/testchangebit.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,29 @@ +/* + * linux/arch/arm/lib/testchangebit.S + * + * Copyright (C) 1995-1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + +ENTRY(_test_and_change_bit_be) + eor r0, r0, #0x18 @ big endian byte ordering +ENTRY(_test_and_change_bit_le) + add r1, r1, r0, lsr #3 + and r3, r0, #7 + mov r0, #1 + save_and_disable_irqs ip, r2 + ldrb r2, [r1] + tst r2, r0, lsl r3 + eor r2, r2, r0, lsl r3 + strb r2, [r1] + restore_irqs ip + moveq r0, #0 + RETINSTR(mov,pc,lr) + + diff -Nru a/arch/arm26/lib/testclearbit.S b/arch/arm26/lib/testclearbit.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/testclearbit.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,29 @@ +/* + * linux/arch/arm/lib/testclearbit.S + * + * Copyright (C) 1995-1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + +ENTRY(_test_and_clear_bit_be) + eor r0, r0, #0x18 @ big endian byte ordering +ENTRY(_test_and_clear_bit_le) + add r1, r1, r0, lsr #3 @ Get byte offset + and r3, r0, #7 @ Get bit offset + mov r0, #1 + save_and_disable_irqs ip, r2 + ldrb r2, [r1] + tst r2, r0, lsl r3 + bic r2, r2, r0, lsl r3 + strb r2, [r1] + restore_irqs ip + moveq r0, #0 + RETINSTR(mov,pc,lr) + + diff -Nru a/arch/arm26/lib/testsetbit.S b/arch/arm26/lib/testsetbit.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/testsetbit.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,29 @@ +/* + * linux/arch/arm/lib/testsetbit.S + * + * Copyright (C) 1995-1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + .text + +ENTRY(_test_and_set_bit_be) + eor r0, r0, #0x18 @ big endian byte ordering +ENTRY(_test_and_set_bit_le) + add r1, r1, r0, lsr #3 @ Get byte offset + and r3, r0, #7 @ Get bit offset + mov r0, #1 + save_and_disable_irqs ip, r2 + ldrb r2, [r1] + tst r2, r0, lsl r3 + orr r2, r2, r0, lsl r3 + strb r2, [r1] + restore_irqs ip + moveq r0, #0 + RETINSTR(mov,pc,lr) + + diff -Nru a/arch/arm26/lib/uaccess-kernel.S b/arch/arm26/lib/uaccess-kernel.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/uaccess-kernel.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,173 @@ +/* + * linux/arch/arm26/lib/uaccess-kernel.S + * + * Copyright (C) 1998 Russell King + * + * Note! Some code fragments found in here have a special calling + * convention - they are not APCS compliant! + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + .text + +//FIXME - surely this can be done in C not asm, removing the problem of keeping C and asm in sync? (this is a struct uaccess_t) + + .globl uaccess_kernel +uaccess_kernel: + .word uaccess_kernel_put_byte + .word uaccess_kernel_get_byte + .word uaccess_kernel_put_half + .word uaccess_kernel_get_half + .word uaccess_kernel_put_word + .word uaccess_kernel_get_word + .word uaccess_kernel_put_dword + .word uaccess_kernel_copy + .word uaccess_kernel_copy + .word uaccess_kernel_clear + .word uaccess_kernel_strncpy + .word uaccess_kernel_strnlen + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_kernel_put_byte: + stmfd sp!, {lr} + strb r0, [r1] + ldmfd sp!, {pc}^ + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_kernel_put_half: + stmfd sp!, {lr} + strb r0, [r1] + mov r0, r0, lsr #8 + strb r0, [r1, #1] + ldmfd sp!, {pc}^ + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_kernel_put_word: + stmfd sp!, {lr} + str r0, [r1] + ldmfd sp!, {pc}^ + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_kernel_put_dword: + stmfd sp!, {lr} + str r0, [r1], #4 + str r0, [r1], #0 + ldmfd sp!, {pc}^ + +@ In : r0 = addr, r1 = error +@ Out: r0 = x, r1 = error +uaccess_kernel_get_byte: + stmfd sp!, {lr} + ldrb r0, [r0] + ldmfd sp!, {pc}^ + +@ In : r0 = addr, r1 = error +@ Out: r0 = x, r1 = error +uaccess_kernel_get_half: + stmfd sp!, {lr} + ldr r0, [r0] + mov r0, r0, lsl #16 + mov r0, r0, lsr #16 + ldmfd sp!, {pc}^ + +@ In : r0 = addr, r1 = error +@ Out: r0 = x, r1 = error +uaccess_kernel_get_word: + stmfd sp!, {lr} + ldr r0, [r0] + ldmfd sp!, {pc}^ + + +/* Prototype: int uaccess_kernel_copy(void *to, const char *from, size_t n) + * Purpose : copy a block to kernel memory from kernel memory + * Params : to - kernel memory + * : from - kernel memory + * : n - number of bytes to copy + * Returns : Number of bytes NOT copied. + */ +uaccess_kernel_copy: + stmfd sp!, {lr} + bl memcpy + mov r0, #0 + ldmfd sp!, {pc}^ + +/* Prototype: int uaccess_kernel_clear(void *addr, size_t sz) + * Purpose : clear some kernel memory + * Params : addr - kernel memory address to clear + * : sz - number of bytes to clear + * Returns : number of bytes NOT cleared + */ +uaccess_kernel_clear: + stmfd sp!, {lr} + mov r2, #0 + cmp r1, #4 + blt 2f + ands ip, r0, #3 + beq 1f + cmp ip, #1 + strb r2, [r0], #1 + strleb r2, [r0], #1 + strltb r2, [r0], #1 + rsb ip, ip, #4 + sub r1, r1, ip @ 7 6 5 4 3 2 1 +1: subs r1, r1, #8 @ -1 -2 -3 -4 -5 -6 -7 + bmi 2f + str r2, [r0], #4 + str r2, [r0], #4 + b 1b +2: adds r1, r1, #4 @ 3 2 1 0 -1 -2 -3 + strpl r2, [r0], #4 + tst r1, #2 @ 1x 1x 0x 0x 1x 1x 0x + strneb r2, [r0], #1 + strneb r2, [r0], #1 + tst r1, #1 @ x1 x0 x1 x0 x1 x0 x1 + strneb r2, [r0], #1 + mov r0, #0 + ldmfd sp!, {pc}^ + +/* Prototype: size_t uaccess_kernel_strncpy(char *dst, char *src, size_t len) + * Purpose : copy a string from kernel memory to kernel memory + * Params : dst - kernel memory destination + * : src - kernel memory source + * : len - maximum length of string + * Returns : number of characters copied + */ +uaccess_kernel_strncpy: + stmfd sp!, {lr} + mov ip, r2 +1: subs r2, r2, #1 + bmi 2f + ldrb r3, [r1], #1 + strb r3, [r0], #1 + teq r3, #0 + bne 1b +2: subs r0, ip, r2 + ldmfd sp!, {pc}^ + +/* Prototype: int uaccess_kernel_strlen(char *str, long n) + * Purpose : get length of a string in kernel memory + * Params : str - address of string in kernel memory + * Returns : length of string *including terminator*, + * or zero on exception, or n + 1 if too long + */ +uaccess_kernel_strnlen: + stmfd sp!, {lr} + mov r2, r0 +1: ldrb r1, [r0], #1 + teq r1, #0 + beq 2f + subs r1, r1, #1 + bne 1b + add r0, r0, #1 +2: sub r0, r0, r2 + ldmfd sp!, {pc}^ + diff -Nru a/arch/arm26/lib/uaccess-user.S b/arch/arm26/lib/uaccess-user.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/uaccess-user.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,718 @@ +/* + * linux/arch/arm26/lib/uaccess-user.S + * + * Copyright (C) 1995, 1996,1997,1998 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Routines to block copy data to/from user memory + * These are highly optimised both for the 4k page size + * and for various alignments. + */ +#include +#include +#include +#include + + .text + +//FIXME - surely this can be done in C not asm, removing the problem of keeping C and asm in sync? (this is a struct uaccess_t) + .globl uaccess_user +uaccess_user: + .word uaccess_user_put_byte + .word uaccess_user_get_byte + .word uaccess_user_put_half + .word uaccess_user_get_half + .word uaccess_user_put_word + .word uaccess_user_get_word + .word uaccess_user_put_dword + .word uaccess_user_copy_from_user + .word uaccess_user_copy_to_user + .word uaccess_user_clear_user + .word uaccess_user_strncpy_from_user + .word uaccess_user_strnlen_user + + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_user_put_byte: + stmfd sp!, {lr} +USER( strbt r0, [r1]) + ldmfd sp!, {pc}^ + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_user_put_half: + stmfd sp!, {lr} +USER( strbt r0, [r1], #1) + mov r0, r0, lsr #8 +USER( strbt r0, [r1]) + ldmfd sp!, {pc}^ + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_user_put_word: + stmfd sp!, {lr} +USER( strt r0, [r1]) + ldmfd sp!, {pc}^ + +@ In : r0 = x, r1 = addr, r2 = error +@ Out: r2 = error +uaccess_user_put_dword: + stmfd sp!, {lr} +USER( strt r0, [r1], #4) +USER( strt r0, [r1], #0) + ldmfd sp!, {pc}^ + +9001: mov r2, #-EFAULT + ldmfd sp!, {pc}^ + + +@ In : r0 = addr, r1 = error +@ Out: r0 = x, r1 = error +uaccess_user_get_byte: + stmfd sp!, {lr} +USER( ldrbt r0, [r0]) + ldmfd sp!, {pc}^ + +@ In : r0 = addr, r1 = error +@ Out: r0 = x, r1 = error +uaccess_user_get_half: + stmfd sp!, {lr} +USER( ldrt r0, [r0]) + mov r0, r0, lsl #16 + mov r0, r0, lsr #16 + ldmfd sp!, {pc}^ + +@ In : r0 = addr, r1 = error +@ Out: r0 = x, r1 = error +uaccess_user_get_word: + stmfd sp!, {lr} +USER( ldrt r0, [r0]) + ldmfd sp!, {pc}^ + +9001: mov r1, #-EFAULT + ldmfd sp!, {pc}^ + +/* Prototype: int uaccess_user_copy_to_user(void *to, const char *from, size_t n) + * Purpose : copy a block to user memory from kernel memory + * Params : to - user memory + * : from - kernel memory + * : n - number of bytes to copy + * Returns : Number of bytes NOT copied. + */ + +.c2u_dest_not_aligned: + rsb ip, ip, #4 + cmp ip, #2 + ldrb r3, [r1], #1 +USER( strbt r3, [r0], #1) @ May fault + ldrgeb r3, [r1], #1 +USER( strgebt r3, [r0], #1) @ May fault + ldrgtb r3, [r1], #1 +USER( strgtbt r3, [r0], #1) @ May fault + sub r2, r2, ip + b .c2u_dest_aligned + +ENTRY(uaccess_user_copy_to_user) + stmfd sp!, {r2, r4 - r7, lr} + cmp r2, #4 + blt .c2u_not_enough + ands ip, r0, #3 + bne .c2u_dest_not_aligned +.c2u_dest_aligned: + + ands ip, r1, #3 + bne .c2u_src_not_aligned +/* + * Seeing as there has to be at least 8 bytes to copy, we can + * copy one word, and force a user-mode page fault... + */ + +.c2u_0fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .c2u_0nowords + ldr r3, [r1], #4 +USER( strt r3, [r0], #4) @ May fault + mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .c2u_0fupi +/* + * ip = max no. of bytes to copy before needing another "strt" insn + */ + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #32 + blt .c2u_0rem8lp + +.c2u_0cpy8lp: ldmia r1!, {r3 - r6} + stmia r0!, {r3 - r6} @ Shouldnt fault + ldmia r1!, {r3 - r6} + stmia r0!, {r3 - r6} @ Shouldnt fault + subs ip, ip, #32 + bpl .c2u_0cpy8lp +.c2u_0rem8lp: cmn ip, #16 + ldmgeia r1!, {r3 - r6} + stmgeia r0!, {r3 - r6} @ Shouldnt fault + tst ip, #8 + ldmneia r1!, {r3 - r4} + stmneia r0!, {r3 - r4} @ Shouldnt fault + tst ip, #4 + ldrne r3, [r1], #4 + strnet r3, [r0], #4 @ Shouldnt fault + ands ip, ip, #3 + beq .c2u_0fupi +.c2u_0nowords: teq ip, #0 + beq .c2u_finished +.c2u_nowords: cmp ip, #2 + ldrb r3, [r1], #1 +USER( strbt r3, [r0], #1) @ May fault + ldrgeb r3, [r1], #1 +USER( strgebt r3, [r0], #1) @ May fault + ldrgtb r3, [r1], #1 +USER( strgtbt r3, [r0], #1) @ May fault + b .c2u_finished + +.c2u_not_enough: + movs ip, r2 + bne .c2u_nowords +.c2u_finished: mov r0, #0 + LOADREGS(fd,sp!,{r2, r4 - r7, pc}) + +.c2u_src_not_aligned: + bic r1, r1, #3 + ldr r7, [r1], #4 + cmp ip, #2 + bgt .c2u_3fupi + beq .c2u_2fupi +.c2u_1fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .c2u_1nowords + mov r3, r7, pull #8 + ldr r7, [r1], #4 + orr r3, r3, r7, push #24 +USER( strt r3, [r0], #4) @ May fault + mov ip, r0, lsl #32 - PAGE_SHIFT + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .c2u_1fupi + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #16 + blt .c2u_1rem8lp + +.c2u_1cpy8lp: mov r3, r7, pull #8 + ldmia r1!, {r4 - r7} + orr r3, r3, r4, push #24 + mov r4, r4, pull #8 + orr r4, r4, r5, push #24 + mov r5, r5, pull #8 + orr r5, r5, r6, push #24 + mov r6, r6, pull #8 + orr r6, r6, r7, push #24 + stmia r0!, {r3 - r6} @ Shouldnt fault + subs ip, ip, #16 + bpl .c2u_1cpy8lp +.c2u_1rem8lp: tst ip, #8 + movne r3, r7, pull #8 + ldmneia r1!, {r4, r7} + orrne r3, r3, r4, push #24 + movne r4, r4, pull #8 + orrne r4, r4, r7, push #24 + stmneia r0!, {r3 - r4} @ Shouldnt fault + tst ip, #4 + movne r3, r7, pull #8 + ldrne r7, [r1], #4 + orrne r3, r3, r7, push #24 + strnet r3, [r0], #4 @ Shouldnt fault + ands ip, ip, #3 + beq .c2u_1fupi +.c2u_1nowords: mov r3, r7, lsr #byte(1) + teq ip, #0 + beq .c2u_finished + cmp ip, #2 +USER( strbt r3, [r0], #1) @ May fault + movge r3, r7, lsr #byte(2) +USER( strgebt r3, [r0], #1) @ May fault + movgt r3, r7, lsr #byte(3) +USER( strgtbt r3, [r0], #1) @ May fault + b .c2u_finished + +.c2u_2fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .c2u_2nowords + mov r3, r7, pull #16 + ldr r7, [r1], #4 + orr r3, r3, r7, push #16 +USER( strt r3, [r0], #4) @ May fault + mov ip, r0, lsl #32 - PAGE_SHIFT + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .c2u_2fupi + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #16 + blt .c2u_2rem8lp + +.c2u_2cpy8lp: mov r3, r7, pull #16 + ldmia r1!, {r4 - r7} + orr r3, r3, r4, push #16 + mov r4, r4, pull #16 + orr r4, r4, r5, push #16 + mov r5, r5, pull #16 + orr r5, r5, r6, push #16 + mov r6, r6, pull #16 + orr r6, r6, r7, push #16 + stmia r0!, {r3 - r6} @ Shouldnt fault + subs ip, ip, #16 + bpl .c2u_2cpy8lp +.c2u_2rem8lp: tst ip, #8 + movne r3, r7, pull #16 + ldmneia r1!, {r4, r7} + orrne r3, r3, r4, push #16 + movne r4, r4, pull #16 + orrne r4, r4, r7, push #16 + stmneia r0!, {r3 - r4} @ Shouldnt fault + tst ip, #4 + movne r3, r7, pull #16 + ldrne r7, [r1], #4 + orrne r3, r3, r7, push #16 + strnet r3, [r0], #4 @ Shouldnt fault + ands ip, ip, #3 + beq .c2u_2fupi +.c2u_2nowords: mov r3, r7, lsr #byte(2) + teq ip, #0 + beq .c2u_finished + cmp ip, #2 +USER( strbt r3, [r0], #1) @ May fault + movge r3, r7, lsr #byte(3) +USER( strgebt r3, [r0], #1) @ May fault + ldrgtb r3, [r1], #0 +USER( strgtbt r3, [r0], #1) @ May fault + b .c2u_finished + +.c2u_3fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .c2u_3nowords + mov r3, r7, pull #24 + ldr r7, [r1], #4 + orr r3, r3, r7, push #8 +USER( strt r3, [r0], #4) @ May fault + mov ip, r0, lsl #32 - PAGE_SHIFT + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .c2u_3fupi + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #16 + blt .c2u_3rem8lp + +.c2u_3cpy8lp: mov r3, r7, pull #24 + ldmia r1!, {r4 - r7} + orr r3, r3, r4, push #8 + mov r4, r4, pull #24 + orr r4, r4, r5, push #8 + mov r5, r5, pull #24 + orr r5, r5, r6, push #8 + mov r6, r6, pull #24 + orr r6, r6, r7, push #8 + stmia r0!, {r3 - r6} @ Shouldnt fault + subs ip, ip, #16 + bpl .c2u_3cpy8lp +.c2u_3rem8lp: tst ip, #8 + movne r3, r7, pull #24 + ldmneia r1!, {r4, r7} + orrne r3, r3, r4, push #8 + movne r4, r4, pull #24 + orrne r4, r4, r7, push #8 + stmneia r0!, {r3 - r4} @ Shouldnt fault + tst ip, #4 + movne r3, r7, pull #24 + ldrne r7, [r1], #4 + orrne r3, r3, r7, push #8 + strnet r3, [r0], #4 @ Shouldnt fault + ands ip, ip, #3 + beq .c2u_3fupi +.c2u_3nowords: mov r3, r7, lsr #byte(3) + teq ip, #0 + beq .c2u_finished + cmp ip, #2 +USER( strbt r3, [r0], #1) @ May fault + ldrgeb r3, [r1], #1 +USER( strgebt r3, [r0], #1) @ May fault + ldrgtb r3, [r1], #0 +USER( strgtbt r3, [r0], #1) @ May fault + b .c2u_finished + + .section .fixup,"ax" + .align 0 +9001: LOADREGS(fd,sp!, {r0, r4 - r7, pc}) + .previous + +/* Prototype: unsigned long uaccess_user_copy_from_user(void *to,const void *from,unsigned long n); + * Purpose : copy a block from user memory to kernel memory + * Params : to - kernel memory + * : from - user memory + * : n - number of bytes to copy + * Returns : Number of bytes NOT copied. + */ +.cfu_dest_not_aligned: + rsb ip, ip, #4 + cmp ip, #2 +USER( ldrbt r3, [r1], #1) @ May fault + strb r3, [r0], #1 +USER( ldrgebt r3, [r1], #1) @ May fault + strgeb r3, [r0], #1 +USER( ldrgtbt r3, [r1], #1) @ May fault + strgtb r3, [r0], #1 + sub r2, r2, ip + b .cfu_dest_aligned + +ENTRY(uaccess_user_copy_from_user) + stmfd sp!, {r0, r2, r4 - r7, lr} + cmp r2, #4 + blt .cfu_not_enough + ands ip, r0, #3 + bne .cfu_dest_not_aligned +.cfu_dest_aligned: + ands ip, r1, #3 + bne .cfu_src_not_aligned +/* + * Seeing as there has to be at least 8 bytes to copy, we can + * copy one word, and force a user-mode page fault... + */ + +.cfu_0fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .cfu_0nowords +USER( ldrt r3, [r1], #4) + str r3, [r0], #4 + mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .cfu_0fupi +/* + * ip = max no. of bytes to copy before needing another "strt" insn + */ + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #32 + blt .cfu_0rem8lp + +.cfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault + stmia r0!, {r3 - r6} + ldmia r1!, {r3 - r6} @ Shouldnt fault + stmia r0!, {r3 - r6} + subs ip, ip, #32 + bpl .cfu_0cpy8lp +.cfu_0rem8lp: cmn ip, #16 + ldmgeia r1!, {r3 - r6} @ Shouldnt fault + stmgeia r0!, {r3 - r6} + tst ip, #8 + ldmneia r1!, {r3 - r4} @ Shouldnt fault + stmneia r0!, {r3 - r4} + tst ip, #4 + ldrnet r3, [r1], #4 @ Shouldnt fault + strne r3, [r0], #4 + ands ip, ip, #3 + beq .cfu_0fupi +.cfu_0nowords: teq ip, #0 + beq .cfu_finished +.cfu_nowords: cmp ip, #2 +USER( ldrbt r3, [r1], #1) @ May fault + strb r3, [r0], #1 +USER( ldrgebt r3, [r1], #1) @ May fault + strgeb r3, [r0], #1 +USER( ldrgtbt r3, [r1], #1) @ May fault + strgtb r3, [r0], #1 + b .cfu_finished + +.cfu_not_enough: + movs ip, r2 + bne .cfu_nowords +.cfu_finished: mov r0, #0 + add sp, sp, #8 + LOADREGS(fd,sp!,{r4 - r7, pc}) + +.cfu_src_not_aligned: + bic r1, r1, #3 +USER( ldrt r7, [r1], #4) @ May fault + cmp ip, #2 + bgt .cfu_3fupi + beq .cfu_2fupi +.cfu_1fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .cfu_1nowords + mov r3, r7, pull #8 +USER( ldrt r7, [r1], #4) @ May fault + orr r3, r3, r7, push #24 + str r3, [r0], #4 + mov ip, r1, lsl #32 - PAGE_SHIFT + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .cfu_1fupi + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #16 + blt .cfu_1rem8lp + +.cfu_1cpy8lp: mov r3, r7, pull #8 + ldmia r1!, {r4 - r7} @ Shouldnt fault + orr r3, r3, r4, push #24 + mov r4, r4, pull #8 + orr r4, r4, r5, push #24 + mov r5, r5, pull #8 + orr r5, r5, r6, push #24 + mov r6, r6, pull #8 + orr r6, r6, r7, push #24 + stmia r0!, {r3 - r6} + subs ip, ip, #16 + bpl .cfu_1cpy8lp +.cfu_1rem8lp: tst ip, #8 + movne r3, r7, pull #8 + ldmneia r1!, {r4, r7} @ Shouldnt fault + orrne r3, r3, r4, push #24 + movne r4, r4, pull #8 + orrne r4, r4, r7, push #24 + stmneia r0!, {r3 - r4} + tst ip, #4 + movne r3, r7, pull #8 +USER( ldrnet r7, [r1], #4) @ May fault + orrne r3, r3, r7, push #24 + strne r3, [r0], #4 + ands ip, ip, #3 + beq .cfu_1fupi +.cfu_1nowords: mov r3, r7, lsr #byte(1) + teq ip, #0 + beq .cfu_finished + cmp ip, #2 + strb r3, [r0], #1 + movge r3, r7, lsr #byte(2) + strgeb r3, [r0], #1 + movgt r3, r7, lsr #byte(3) + strgtb r3, [r0], #1 + b .cfu_finished + +.cfu_2fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .cfu_2nowords + mov r3, r7, pull #16 +USER( ldrt r7, [r1], #4) @ May fault + orr r3, r3, r7, push #16 + str r3, [r0], #4 + mov ip, r1, lsl #32 - PAGE_SHIFT + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .cfu_2fupi + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #16 + blt .cfu_2rem8lp + +.cfu_2cpy8lp: mov r3, r7, pull #16 + ldmia r1!, {r4 - r7} @ Shouldnt fault + orr r3, r3, r4, push #16 + mov r4, r4, pull #16 + orr r4, r4, r5, push #16 + mov r5, r5, pull #16 + orr r5, r5, r6, push #16 + mov r6, r6, pull #16 + orr r6, r6, r7, push #16 + stmia r0!, {r3 - r6} + subs ip, ip, #16 + bpl .cfu_2cpy8lp +.cfu_2rem8lp: tst ip, #8 + movne r3, r7, pull #16 + ldmneia r1!, {r4, r7} @ Shouldnt fault + orrne r3, r3, r4, push #16 + movne r4, r4, pull #16 + orrne r4, r4, r7, push #16 + stmneia r0!, {r3 - r4} + tst ip, #4 + movne r3, r7, pull #16 +USER( ldrnet r7, [r1], #4) @ May fault + orrne r3, r3, r7, push #16 + strne r3, [r0], #4 + ands ip, ip, #3 + beq .cfu_2fupi +.cfu_2nowords: mov r3, r7, lsr #byte(2) + teq ip, #0 + beq .cfu_finished + cmp ip, #2 + strb r3, [r0], #1 + movge r3, r7, lsr #byte(3) + strgeb r3, [r0], #1 +USER( ldrgtbt r3, [r1], #0) @ May fault + strgtb r3, [r0], #1 + b .cfu_finished + +.cfu_3fupi: subs r2, r2, #4 + addmi ip, r2, #4 + bmi .cfu_3nowords + mov r3, r7, pull #24 +USER( ldrt r7, [r1], #4) @ May fault + orr r3, r3, r7, push #8 + str r3, [r0], #4 + mov ip, r1, lsl #32 - PAGE_SHIFT + rsb ip, ip, #0 + movs ip, ip, lsr #32 - PAGE_SHIFT + beq .cfu_3fupi + cmp r2, ip + movlt ip, r2 + sub r2, r2, ip + subs ip, ip, #16 + blt .cfu_3rem8lp + +.cfu_3cpy8lp: mov r3, r7, pull #24 + ldmia r1!, {r4 - r7} @ Shouldnt fault + orr r3, r3, r4, push #8 + mov r4, r4, pull #24 + orr r4, r4, r5, push #8 + mov r5, r5, pull #24 + orr r5, r5, r6, push #8 + mov r6, r6, pull #24 + orr r6, r6, r7, push #8 + stmia r0!, {r3 - r6} + subs ip, ip, #16 + bpl .cfu_3cpy8lp +.cfu_3rem8lp: tst ip, #8 + movne r3, r7, pull #24 + ldmneia r1!, {r4, r7} @ Shouldnt fault + orrne r3, r3, r4, push #8 + movne r4, r4, pull #24 + orrne r4, r4, r7, push #8 + stmneia r0!, {r3 - r4} + tst ip, #4 + movne r3, r7, pull #24 +USER( ldrnet r7, [r1], #4) @ May fault + orrne r3, r3, r7, push #8 + strne r3, [r0], #4 + ands ip, ip, #3 + beq .cfu_3fupi +.cfu_3nowords: mov r3, r7, lsr #byte(3) + teq ip, #0 + beq .cfu_finished + cmp ip, #2 + strb r3, [r0], #1 +USER( ldrgebt r3, [r1], #1) @ May fault + strgeb r3, [r0], #1 +USER( ldrgtbt r3, [r1], #1) @ May fault + strgtb r3, [r0], #1 + b .cfu_finished + + .section .fixup,"ax" + .align 0 + /* + * We took an exception. r0 contains a pointer to + * the byte not copied. + */ +9001: ldr r2, [sp], #4 @ void *to + sub r2, r0, r2 @ bytes copied + ldr r1, [sp], #4 @ unsigned long count + subs r4, r1, r2 @ bytes left to copy + movne r1, r4 + blne __memzero + mov r0, r4 + LOADREGS(fd,sp!, {r4 - r7, pc}) + .previous + +/* Prototype: int uaccess_user_clear_user(void *addr, size_t sz) + * Purpose : clear some user memory + * Params : addr - user memory address to clear + * : sz - number of bytes to clear + * Returns : number of bytes NOT cleared + */ +ENTRY(uaccess_user_clear_user) + stmfd sp!, {r1, lr} + mov r2, #0 + cmp r1, #4 + blt 2f + ands ip, r0, #3 + beq 1f + cmp ip, #2 +USER( strbt r2, [r0], #1) +USER( strlebt r2, [r0], #1) +USER( strltbt r2, [r0], #1) + rsb ip, ip, #4 + sub r1, r1, ip @ 7 6 5 4 3 2 1 +1: subs r1, r1, #8 @ -1 -2 -3 -4 -5 -6 -7 +USER( strplt r2, [r0], #4) +USER( strplt r2, [r0], #4) + bpl 1b + adds r1, r1, #4 @ 3 2 1 0 -1 -2 -3 +USER( strplt r2, [r0], #4) +2: tst r1, #2 @ 1x 1x 0x 0x 1x 1x 0x +USER( strnebt r2, [r0], #1) +USER( strnebt r2, [r0], #1) + tst r1, #1 @ x1 x0 x1 x0 x1 x0 x1 +USER( strnebt r2, [r0], #1) + mov r0, #0 + LOADREGS(fd,sp!, {r1, pc}) + + .section .fixup,"ax" + .align 0 +9001: LOADREGS(fd,sp!, {r0, pc}) + .previous + +/* + * Copy a string from user space to kernel space. + * r0 = dst, r1 = src, r2 = byte length + * returns the number of characters copied (strlen of copied string), + * -EFAULT on exception, or "len" if we fill the whole buffer + */ +ENTRY(uaccess_user_strncpy_from_user) + save_lr + mov ip, r1 +1: subs r2, r2, #1 +USER( ldrplbt r3, [r1], #1) + bmi 2f + strb r3, [r0], #1 + teq r3, #0 + bne 1b + sub r1, r1, #1 @ take NUL character out of count +2: sub r0, r1, ip + restore_pc + + .section .fixup,"ax" + .align 0 +9001: mov r3, #0 + strb r3, [r0, #0] @ null terminate + mov r0, #-EFAULT + restore_pc + .previous + +/* Prototype: unsigned long uaccess_user_strnlen_user(const char *str, long n) + * Purpose : get length of a string in user memory + * Params : str - address of string in user memory + * Returns : length of string *including terminator* + * or zero on exception, or n + 1 if too long + */ +ENTRY(uaccess_user_strnlen_user) + save_lr + mov r2, r0 +1: +USER( ldrbt r3, [r0], #1) + teq r3, #0 + beq 2f + subs r1, r1, #1 + bne 1b + add r0, r0, #1 +2: sub r0, r0, r2 + restore_pc + + .section .fixup,"ax" + .align 0 +9001: mov r0, #0 + restore_pc + .previous + diff -Nru a/arch/arm26/lib/ucmpdi2.c b/arch/arm26/lib/ucmpdi2.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/ucmpdi2.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,51 @@ +/* More subroutines needed by GCC output code on some machines. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. + */ +/* support functions required by the kernel. based on code from gcc-2.95.3 */ +/* I Molton 29/07/01 */ + +#include "gcclib.h" + +word_type +__ucmpdi2 (DItype a, DItype b) +{ + DIunion au, bu; + + au.ll = a, bu.ll = b; + + if ((USItype) au.s.high < (USItype) bu.s.high) + return 0; + else if ((USItype) au.s.high > (USItype) bu.s.high) + return 2; + if ((USItype) au.s.low < (USItype) bu.s.low) + return 0; + else if ((USItype) au.s.low > (USItype) bu.s.low) + return 2; + return 1; +} + diff -Nru a/arch/arm26/lib/udivdi3.c b/arch/arm26/lib/udivdi3.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/lib/udivdi3.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,242 @@ +/* More subroutines needed by GCC output code on some machines. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. + */ +/* support functions required by the kernel. based on code from gcc-2.95.3 */ +/* I Molton 29/07/01 */ + +#include "gcclib.h" +#include "longlong.h" + +static const UQItype __clz_tab[] = +{ + 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +}; + +UDItype +__udivmoddi4 (UDItype n, UDItype d, UDItype *rp) +{ + DIunion ww; + DIunion nn, dd; + DIunion rr; + USItype d0, d1, n0, n1, n2; + USItype q0, q1; + USItype b, bm; + + nn.ll = n; + dd.ll = d; + + d0 = dd.s.low; + d1 = dd.s.high; + n0 = nn.s.low; + n1 = nn.s.high; + + if (d1 == 0) + { + if (d0 > n1) + { + /* 0q = nn / 0D */ + + count_leading_zeros (bm, d0); + + if (bm != 0) + { + /* Normalize, i.e. make the most significant bit of the + denominator set. */ + + d0 = d0 << bm; + n1 = (n1 << bm) | (n0 >> (SI_TYPE_SIZE - bm)); + n0 = n0 << bm; + } + + udiv_qrnnd (q0, n0, n1, n0, d0); + q1 = 0; + + /* Remainder in n0 >> bm. */ + } + else + { + /* qq = NN / 0d */ + + if (d0 == 0) + d0 = 1 / d0; /* Divide intentionally by zero. */ + + count_leading_zeros (bm, d0); + + if (bm == 0) + { + /* From (n1 >= d0) /\ (the most significant bit of d0 is set), + conclude (the most significant bit of n1 is set) /\ (the + leading quotient digit q1 = 1). + + This special case is necessary, not an optimization. + (Shifts counts of SI_TYPE_SIZE are undefined.) */ + + n1 -= d0; + q1 = 1; + } + else + { + /* Normalize. */ + + b = SI_TYPE_SIZE - bm; + + d0 = d0 << bm; + n2 = n1 >> b; + n1 = (n1 << bm) | (n0 >> b); + n0 = n0 << bm; + + udiv_qrnnd (q1, n1, n2, n1, d0); + } + + /* n1 != d0... */ + + udiv_qrnnd (q0, n0, n1, n0, d0); + + /* Remainder in n0 >> bm. */ + } + + if (rp != 0) + { + rr.s.low = n0 >> bm; + rr.s.high = 0; + *rp = rr.ll; + } + } + else + { + if (d1 > n1) + { + /* 00 = nn / DD */ + + q0 = 0; + q1 = 0; + + /* Remainder in n1n0. */ + if (rp != 0) + { + rr.s.low = n0; + rr.s.high = n1; + *rp = rr.ll; + } + } + else + { + /* 0q = NN / dd */ + + count_leading_zeros (bm, d1); + if (bm == 0) + { + /* From (n1 >= d1) /\ (the most significant bit of d1 is set), + conclude (the most significant bit of n1 is set) /\ (the + quotient digit q0 = 0 or 1). + + This special case is necessary, not an optimization. */ + + /* The condition on the next line takes advantage of that + n1 >= d1 (true due to program flow). */ + if (n1 > d1 || n0 >= d0) + { + q0 = 1; + sub_ddmmss (n1, n0, n1, n0, d1, d0); + } + else + q0 = 0; + + q1 = 0; + + if (rp != 0) + { + rr.s.low = n0; + rr.s.high = n1; + *rp = rr.ll; + } + } + else + { + USItype m1, m0; + /* Normalize. */ + + b = SI_TYPE_SIZE - bm; + + d1 = (d1 << bm) | (d0 >> b); + d0 = d0 << bm; + n2 = n1 >> b; + n1 = (n1 << bm) | (n0 >> b); + n0 = n0 << bm; + + udiv_qrnnd (q0, n1, n2, n1, d1); + umul_ppmm (m1, m0, q0, d0); + + if (m1 > n1 || (m1 == n1 && m0 > n0)) + { + q0--; + sub_ddmmss (m1, m0, m1, m0, d1, d0); + } + + q1 = 0; + + /* Remainder in (n1n0 - m1m0) >> bm. */ + if (rp != 0) + { + sub_ddmmss (n1, n0, n1, n0, m1, m0); + rr.s.low = (n1 << b) | (n0 >> bm); + rr.s.high = n1 >> bm; + *rp = rr.ll; + } + } + } + } + + ww.s.low = q0; + ww.s.high = q1; + return ww.ll; +} + +UDItype +__udivdi3 (UDItype n, UDItype d) +{ + return __udivmoddi4 (n, d, (UDItype *) 0); +} + +UDItype +__umoddi3 (UDItype u, UDItype v) +{ + UDItype w; + + (void) __udivmoddi4 (u ,v, &w); + + return w; +} + diff -Nru a/arch/arm26/machine/Makefile b/arch/arm26/machine/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/machine/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,12 @@ +# +# Makefile for the linux kernel. +# + +# Object file lists. + +obj-y := arch.o dma.o irq.o oldlatches.o \ + small_page.o + +extra-y := head.o + +AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) diff -Nru a/arch/arm26/machine/arch.c b/arch/arm26/machine/arch.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/machine/arch.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,36 @@ +/* + * linux/arch/arm26/mach-arc/arch.c + * + * Copyright (C) 1998-2001 Russell King + * Copyright (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Architecture specific fixups. + */ +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +extern void arc_init_irq(void); + +#ifdef CONFIG_ARCH_ARC +MACHINE_START(ARCHIMEDES, "Acorn-Archimedes") +#elif defined(CONFIG_ARCH_A5K) +MACHINE_START(A5K, "Acorn-A5000") +#endif + MAINTAINER("Ian Molton") + BOOT_PARAMS(0x0207c000) + INITIRQ(arc_init_irq) +MACHINE_END + diff -Nru a/arch/arm26/machine/dma.c b/arch/arm26/machine/dma.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/machine/dma.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,215 @@ +/* + * linux/arch/arm/kernel/dma-arc.c + * + * Copyright (C) 1998-1999 Dave Gilbert / Russell King + * Copyright (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * DMA functions specific to Archimedes and A5000 architecture + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define DPRINTK(x...) printk(KERN_DEBUG x) + +#if defined(CONFIG_BLK_DEV_FD1772) || defined(CONFIG_BLK_DEV_FD1772_MODULE) + +extern unsigned char fdc1772_dma_read, fdc1772_dma_read_end; +extern unsigned char fdc1772_dma_write, fdc1772_dma_write_end; +extern void fdc1772_setupdma(unsigned int count,unsigned int addr); + +static void arc_floppy_data_enable_dma(dmach_t channel, dma_t *dma) +{ + DPRINTK("arc_floppy_data_enable_dma\n"); + + if (dma->using_sg) + BUG(); + + switch (dma->dma_mode) { + case DMA_MODE_READ: { /* read */ + unsigned long flags; + DPRINTK("enable_dma fdc1772 data read\n"); + local_save_flags_cli(flags); + clf(); + + memcpy ((void *)0x1c, (void *)&fdc1772_dma_read, + &fdc1772_dma_read_end - &fdc1772_dma_read); + fdc1772_setupdma(dma->buf.length, dma->buf.__address); /* Sets data pointer up */ + enable_fiq(FIQ_FLOPPYDATA); + loacl_irq_restore(flags); + } + break; + + case DMA_MODE_WRITE: { /* write */ + unsigned long flags; + DPRINTK("enable_dma fdc1772 data write\n"); + local_save_flags_cli(flags); + clf(); + memcpy ((void *)0x1c, (void *)&fdc1772_dma_write, + &fdc1772_dma_write_end - &fdc1772_dma_write); + fdc1772_setupdma(dma->buf.length, dma->buf.__address); /* Sets data pointer up */ + enable_fiq(FIQ_FLOPPYDATA); + + local_irq_restore(flags); + } + break; + default: + printk ("enable_dma: dma%d not initialised\n", channel); + } +} + +static int arc_floppy_data_get_dma_residue(dmach_t channel, dma_t *dma) +{ + extern unsigned int fdc1772_bytestogo; + + /* 10/1/1999 DAG - I presume its the number of bytes left? */ + return fdc1772_bytestogo; +} + +static void arc_floppy_cmdend_enable_dma(dmach_t channel, dma_t *dma) +{ + /* Need to build a branch at the FIQ address */ + extern void fdc1772_comendhandler(void); + unsigned long flags; + + DPRINTK("arc_floppy_cmdend_enable_dma\n"); + /*printk("enable_dma fdc1772 command end FIQ\n");*/ + save_flags(flags); + clf(); + + /* B fdc1772_comendhandler */ + *((unsigned int *)0x1c)=0xea000000 | + (((unsigned int)fdc1772_comendhandler-(0x1c+8))/4); + + local_irq_restore(flags); +} + +static int arc_floppy_cmdend_get_dma_residue(dmach_t channel, dma_t *dma) +{ + /* 10/1/1999 DAG - Presume whether there is an outstanding command? */ + extern unsigned int fdc1772_fdc_int_done; + + /* Explicit! If the int done is 0 then 1 int to go */ + return (fdc1772_fdc_int_done==0)?1:0; +} + +static void arc_disable_dma(dmach_t channel, dma_t *dma) +{ + disable_fiq(dma->dma_irq); +} + +static struct dma_ops arc_floppy_data_dma_ops = { + .type = "FIQDMA", + .enable = arc_floppy_data_enable_dma, + .disable = arc_disable_dma, + .residue = arc_floppy_data_get_dma_residue, +}; + +static struct dma_ops arc_floppy_cmdend_dma_ops = { + .type = "FIQCMD", + .enable = arc_floppy_cmdend_enable_dma, + .disable = arc_disable_dma, + .residue = arc_floppy_cmdend_get_dma_residue, +}; +#endif + +#ifdef CONFIG_ARCH_A5K +static struct fiq_handler fh = { + .name = "floppydata" +}; + +static int a5k_floppy_get_dma_residue(dmach_t channel, dma_t *dma) +{ + struct pt_regs regs; + get_fiq_regs(®s); + return regs.ARM_r9; +} + +static void a5k_floppy_enable_dma(dmach_t channel, dma_t *dma) +{ + struct pt_regs regs; + void *fiqhandler_start; + unsigned int fiqhandler_length; + extern void floppy_fiqsetup(unsigned long len, unsigned long addr, + unsigned long port); + + if (dma->using_sg) + BUG(); + + if (dma->dma_mode == DMA_MODE_READ) { + extern unsigned char floppy_fiqin_start, floppy_fiqin_end; + fiqhandler_start = &floppy_fiqin_start; + fiqhandler_length = &floppy_fiqin_end - &floppy_fiqin_start; + } else { + extern unsigned char floppy_fiqout_start, floppy_fiqout_end; + fiqhandler_start = &floppy_fiqout_start; + fiqhandler_length = &floppy_fiqout_end - &floppy_fiqout_start; + } + if (claim_fiq(&fh)) { + printk("floppydma: couldn't claim FIQ.\n"); + return; + } + memcpy((void *)0x1c, fiqhandler_start, fiqhandler_length); + regs.ARM_r9 = dma->buf.length; + regs.ARM_r10 = (unsigned long)dma->buf.__address; + regs.ARM_fp = FLOPPYDMA_BASE; + set_fiq_regs(®s); + enable_fiq(dma->dma_irq); +} + +static void a5k_floppy_disable_dma(dmach_t channel, dma_t *dma) +{ + disable_fiq(dma->dma_irq); + release_fiq(&fh); +} + +static struct dma_ops a5k_floppy_dma_ops = { + .type = "FIQDMA", + .enable = a5k_floppy_enable_dma, + .disable = a5k_floppy_disable_dma, + .residue = a5k_floppy_get_dma_residue, +}; +#endif + +/* + * This is virtual DMA - we don't need anything here + */ +static void sound_enable_disable_dma(dmach_t channel, dma_t *dma) +{ +} + +static struct dma_ops sound_dma_ops = { + .type = "VIRTUAL", + .enable = sound_enable_disable_dma, + .disable = sound_enable_disable_dma, +}; + +void __init arch_dma_init(dma_t *dma) +{ +#if defined(CONFIG_BLK_DEV_FD1772) || defined(CONFIG_BLK_DEV_FD1772_MODULE) + if (machine_is_archimedes()) { + dma[DMA_VIRTUAL_FLOPPY0].dma_irq = FIQ_FLOPPYDATA; + dma[DMA_VIRTUAL_FLOPPY0].d_ops = &arc_floppy_data_dma_ops; + dma[DMA_VIRTUAL_FLOPPY1].dma_irq = 1; + dma[DMA_VIRTUAL_FLOPPY1].d_ops = &arc_floppy_cmdend_dma_ops; + } +#endif +#ifdef CONFIG_ARCH_A5K + if (machine_is_a5k()) { + dma[DMA_VIRTUAL_FLOPPY0].dma_irq = FIQ_FLOPPYDATA; + dma[DMA_VIRTUAL_FLOPPY0].d_ops = &a5k_floppy_dma_ops; + } +#endif + dma[DMA_VIRTUAL_SOUND].d_ops = &sound_dma_ops; +} diff -Nru a/arch/arm26/machine/head.S b/arch/arm26/machine/head.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/machine/head.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,93 @@ +/* + * linux/arch/arm/kernel/head-armo.S + * + * Copyright (C) 1994-2000 Russell King + * Copyright (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 26-bit kernel startup code + */ +#include +#include +#include + + .globl swapper_pg_dir + .equ swapper_pg_dir, 0x0207d000 + +/* + * Entry point. + */ + .section ".init.text",#alloc,#execinstr +ENTRY(stext) +__entry: cmp pc, #0x02000000 + ldrlt pc, LC0 @ if 0x01800000, call at 0x02080000 + teq r0, #0 @ Check for old calling method + blne oldparams @ Move page if old + adr r0, LC0 + ldmib r0, {r2-r5, sp} @ Setup stack + mov r0, #0 +1: cmp r2, r3 @ Clear BSS + strcc r0, [r2], #4 + bcc 1b + + bl detect_proc_type + str r0, [r4] + bl detect_arch_type + str r0, [r5] + + mov fp, #0 + b start_kernel + +LC0: .word _stext + .word __bss_start @ r2 + .word _end @ r3 + .word processor_id @ r4 + .word __machine_arch_type @ r5 + .word init_thread_union+8192 @ sp +arm2_id: .long 0x41560200 +arm250_id: .long 0x41560250 + .align + +oldparams: mov r4, #0x02000000 + add r3, r4, #0x00080000 + add r4, r4, #0x0007c000 +1: ldmia r0!, {r5 - r12} + stmia r4!, {r5 - r12} + cmp r4, r3 + blt 1b + mov pc, lr + +/* + * We need some way to automatically detect the difference between + * these two machines. Unfortunately, it is not possible to detect + * the presence of the SuperIO chip, because that will hang the old + * Archimedes machines solid. + */ +/* DAG: Outdated, these have been combined !!!!!!! */ +detect_arch_type: +#if defined(CONFIG_ARCH_ARC) + mov r0, #MACH_TYPE_ARCHIMEDES +#elif defined(CONFIG_ARCH_A5K) + mov r0, #MACH_TYPE_A5K +#endif + mov pc, lr + +detect_proc_type: + mov ip, lr + mov r2, #0xea000000 @ Point undef instr to continuation + adr r0, continue - 12 + orr r0, r2, r0, lsr #2 + mov r1, #0 + str r0, [r1, #4] + ldr r0, arm2_id + swp r2, r2, [r1] @ check for swp (ARM2 cant) + ldr r0, arm250_id + mrc 15, 0, r3, c0, c0 @ check for CP#15 (ARM250 cant) + mov r0, r3 +continue: mov r2, #0xeb000000 @ Make undef vector loop + sub r2, r2, #2 + str r2, [r1, #4] + mov pc, ip diff -Nru a/arch/arm26/machine/irq.c b/arch/arm26/machine/irq.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/machine/irq.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,165 @@ +/* + * linux/arch/arm/mach-arc/irq.c + * + * Copyright (C) 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Changelog: + * 24-09-1996 RMK Created + * 10-10-1996 RMK Brought up to date with arch-sa110eval + * 22-10-1996 RMK Changed interrupt numbers & uses new inb/outb macros + * 11-01-1998 RMK Added mask_and_ack_irq + * 22-08-1998 RMK Restructured IRQ routines + * 08-09-2002 IM Brought up to date for 2.5 + * 01-06-2003 JMA Removed arc_fiq_chip + */ +#include +#include + +#include +#include +#include +#include +#include + +extern void init_FIQ(void); + +#define a_clf() clf() +#define a_stf() stf() + +static void arc_ack_irq_a(unsigned int irq) +{ + unsigned int val, mask; + + mask = 1 << irq; + a_clf(); + val = ioc_readb(IOC_IRQMASKA); + ioc_writeb(val & ~mask, IOC_IRQMASKA); + ioc_writeb(mask, IOC_IRQCLRA); + a_stf(); +} + +static void arc_mask_irq_a(unsigned int irq) +{ + unsigned int val, mask; + + mask = 1 << irq; + a_clf(); + val = ioc_readb(IOC_IRQMASKA); + ioc_writeb(val & ~mask, IOC_IRQMASKA); + a_stf(); +} + +static void arc_unmask_irq_a(unsigned int irq) +{ + unsigned int val, mask; + + mask = 1 << irq; + a_clf(); + val = ioc_readb(IOC_IRQMASKA); + ioc_writeb(val | mask, IOC_IRQMASKA); + a_stf(); +} + +static struct irqchip arc_a_chip = { + .ack = arc_ack_irq_a, + .mask = arc_mask_irq_a, + .unmask = arc_unmask_irq_a, +}; + +static void arc_mask_irq_b(unsigned int irq) +{ + unsigned int val, mask; + + mask = 1 << (irq & 7); + val = ioc_readb(IOC_IRQMASKB); + ioc_writeb(val & ~mask, IOC_IRQMASKB); +} + +static void arc_unmask_irq_b(unsigned int irq) +{ + unsigned int val, mask; + + mask = 1 << (irq & 7); + val = ioc_readb(IOC_IRQMASKB); + ioc_writeb(val | mask, IOC_IRQMASKB); +} + +static struct irqchip arc_b_chip = { + .ack = arc_mask_irq_b, + .mask = arc_mask_irq_b, + .unmask = arc_unmask_irq_b, +}; + +/* FIXME - JMA none of these functions are used in arm26 +static void arc_mask_irq_fiq(unsigned int irq) +{ + unsigned int val, mask; + + mask = 1 << (irq & 7); + val = ioc_readb(IOC_FIQMASK); + ioc_writeb(val & ~mask, IOC_FIQMASK); +} + +static void arc_unmask_irq_fiq(unsigned int irq) +{ + unsigned int val, mask; + + mask = 1 << (irq & 7); + val = ioc_readb(IOC_FIQMASK); + ioc_writeb(val | mask, IOC_FIQMASK); +} + +static struct irqchip arc_fiq_chip = { + .ack = arc_mask_irq_fiq, + .mask = arc_mask_irq_fiq, + .unmask = arc_unmask_irq_fiq, +}; +*/ + +void __init arc_init_irq(void) +{ + unsigned int irq, flags; + + ioc_writeb(0, IOC_IRQMASKA); + ioc_writeb(0, IOC_IRQMASKB); + ioc_writeb(0, IOC_FIQMASK); + + for (irq = 0; irq < NR_IRQS; irq++) { + flags = IRQF_VALID; + + if (irq <= 6 || (irq >= 9 && irq <= 15)) + flags |= IRQF_PROBE; + + if (irq == IRQ_KEYBOARDTX) + flags |= IRQF_NOAUTOEN; + + switch (irq) { + case 0 ... 7: + set_irq_chip(irq, &arc_a_chip); + set_irq_handler(irq, do_level_IRQ); + set_irq_flags(irq, flags); + break; + + case 8 ... 15: + set_irq_chip(irq, &arc_b_chip); + set_irq_handler(irq, do_level_IRQ); + set_irq_flags(irq, flags); + +/* case 64 ... 72: + set_irq_chip(irq, &arc_fiq_chip); + set_irq_flags(irq, flags); + break; +*/ + + } + } + + irq_desc[IRQ_KEYBOARDTX].noautoenable = 1; + + init_FIQ(); +} + diff -Nru a/arch/arm26/machine/oldlatches.c b/arch/arm26/machine/oldlatches.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/machine/oldlatches.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,72 @@ +/* + * linux/arch/arm/kernel/oldlatches.c + * + * Copyright (C) David Alan Gilbert 1995/1996,2000 + * Copyright (C) Ian Molton 2003 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Support for the latches on the old Archimedes which control the floppy, + * hard disc and printer + */ +#include +#include +#include +#include + +#include +#include +#include +#include + +static unsigned char latch_a_copy; +static unsigned char latch_b_copy; + +/* newval=(oldval & ~mask)|newdata */ +void oldlatch_aupdate(unsigned char mask,unsigned char newdata) +{ + unsigned long flags; + + BUG_ON(!machine_is_archimedes()); + + local_irq_save(flags); //FIXME: was local_save_flags + latch_a_copy = (latch_a_copy & ~mask) | newdata; + __raw_writeb(latch_a_copy, LATCHA_BASE); + local_irq_restore(flags); + + printk("Latch: A = 0x%02x\n", latch_a_copy); +} + + +/* newval=(oldval & ~mask)|newdata */ +void oldlatch_bupdate(unsigned char mask,unsigned char newdata) +{ + unsigned long flags; + + BUG_ON(!machine_is_archimedes()); + + + local_irq_save(flags);//FIXME: was local_save_flags + latch_b_copy = (latch_b_copy & ~mask) | newdata; + __raw_writeb(latch_b_copy, LATCHB_BASE); + local_irq_restore(flags); + + printk("Latch: B = 0x%02x\n", latch_b_copy); +} + +static int __init oldlatch_init(void) +{ + if (machine_is_archimedes()) { + oldlatch_aupdate(0xff, 0xff); + /* Thats no FDC reset...*/ + oldlatch_bupdate(0xff, LATCHB_FDCRESET); + } + return 0; +} + +arch_initcall(oldlatch_init); + +EXPORT_SYMBOL(oldlatch_aupdate); +EXPORT_SYMBOL(oldlatch_bupdate); diff -Nru a/arch/arm26/machine/small_page.c b/arch/arm26/machine/small_page.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/machine/small_page.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,191 @@ +/* + * linux/arch/arm/mm/small_page.c + * + * Copyright (C) 1996 Russell King + * Copyright (C) 2003 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Changelog: + * 26/01/1996 RMK Cleaned up various areas to make little more generic + * 07/02/1999 RMK Support added for 16K and 32K page sizes + * containing 8K blocks + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define PEDANTIC + +/* + * Requirement: + * We need to be able to allocate naturally aligned memory of finer + * granularity than the page size. This is typically used for the + * second level page tables on 32-bit ARMs. + * + * Theory: + * We "misuse" the Linux memory management system. We use alloc_page + * to allocate a page and then mark it as reserved. The Linux memory + * management system will then ignore the "offset", "next_hash" and + * "pprev_hash" entries in the mem_map for this page. + * + * We then use a bitstring in the "offset" field to mark which segments + * of the page are in use, and manipulate this as required during the + * allocation and freeing of these small pages. + * + * We also maintain a queue of pages being used for this purpose using + * the "next_hash" and "pprev_hash" entries of mem_map; + */ + +struct order { + struct list_head queue; + unsigned int mask; /* (1 << shift) - 1 */ + unsigned int shift; /* (1 << shift) size of page */ + unsigned int block_mask; /* nr_blocks - 1 */ + unsigned int all_used; /* (1 << nr_blocks) - 1 */ +}; + + +static struct order orders[] = { +#if PAGE_SIZE == 32768 + { LIST_HEAD_INIT(orders[0].queue), 2047, 11, 15, 0x0000ffff }, + { LIST_HEAD_INIT(orders[1].queue), 8191, 13, 3, 0x0000000f } +#else +#error unsupported page size (ARGH!) +#endif +}; + +#define USED_MAP(pg) ((pg)->index) +#define TEST_AND_CLEAR_USED(pg,off) (test_and_clear_bit(off, &USED_MAP(pg))) +#define SET_USED(pg,off) (set_bit(off, &USED_MAP(pg))) + +static spinlock_t small_page_lock = SPIN_LOCK_UNLOCKED; + +static unsigned long __get_small_page(int priority, struct order *order) +{ + unsigned long flags; + struct page *page; + int offset; + + do { + spin_lock_irqsave(&small_page_lock, flags); + + if (list_empty(&order->queue)) + goto need_new_page; + + page = list_entry(order->queue.next, struct page, list); +again: +#ifdef PEDANTIC + if (USED_MAP(page) & ~order->all_used) + PAGE_BUG(page); +#endif + offset = ffz(USED_MAP(page)); + SET_USED(page, offset); + if (USED_MAP(page) == order->all_used) + list_del_init(&page->list); + spin_unlock_irqrestore(&small_page_lock, flags); + + return (unsigned long) page_address(page) + (offset << order->shift); + +need_new_page: + spin_unlock_irqrestore(&small_page_lock, flags); + page = alloc_page(priority); + spin_lock_irqsave(&small_page_lock, flags); + + if (list_empty(&order->queue)) { + if (!page) + goto no_page; + SetPageReserved(page); + USED_MAP(page) = 0; + list_add(&page->list, &order->queue); + goto again; + } + + spin_unlock_irqrestore(&small_page_lock, flags); + __free_page(page); + } while (1); + +no_page: + spin_unlock_irqrestore(&small_page_lock, flags); + return 0; +} + +static void __free_small_page(unsigned long spage, struct order *order) +{ + unsigned long flags; + struct page *page; + + if (virt_addr_valid(spage)) { + page = virt_to_page(spage); + + /* + * The container-page must be marked Reserved + */ + if (!PageReserved(page) || spage & order->mask) + goto non_small; + +#ifdef PEDANTIC + if (USED_MAP(page) & ~order->all_used) + PAGE_BUG(page); +#endif + + spage = spage >> order->shift; + spage &= order->block_mask; + + /* + * the following must be atomic wrt get_page + */ + spin_lock_irqsave(&small_page_lock, flags); + + if (USED_MAP(page) == order->all_used) + list_add(&page->list, &order->queue); + + if (!TEST_AND_CLEAR_USED(page, spage)) + goto already_free; + + if (USED_MAP(page) == 0) + goto free_page; + + spin_unlock_irqrestore(&small_page_lock, flags); + } + return; + +free_page: + /* + * unlink the page from the small page queue and free it + */ + list_del_init(&page->list); + spin_unlock_irqrestore(&small_page_lock, flags); + ClearPageReserved(page); + __free_page(page); + return; + +non_small: + printk("Trying to free non-small page from %p\n", __builtin_return_address(0)); + return; +already_free: + printk("Trying to free free small page from %p\n", __builtin_return_address(0)); +} + +unsigned long get_page_8k(int priority) +{ + return __get_small_page(priority, orders+1); +} + +void free_page_8k(unsigned long spage) +{ + __free_small_page(spage, orders+1); +} diff -Nru a/arch/arm26/mm/Makefile b/arch/arm26/mm/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/mm/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,12 @@ +# +# Makefile for the linux arm26-specific parts of the memory manager. +# +# Note! Dependencies are done automagically by 'make dep', which also +# removes any old dependencies. DON'T put your own dependencies here +# unless it's something special (ie not a .c file). +# +# Note 2! The CFLAGS definition is now in the main makefile... + +# Object file lists. + +obj-y := init.o extable.o proc-funcs.o mm-memc.o fault.o diff -Nru a/arch/arm26/mm/extable.c b/arch/arm26/mm/extable.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/mm/extable.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,40 @@ +/* + * linux/arch/arm/mm/extable.c + */ + +#include +#include +#include + +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; +} + +int fixup_exception(struct pt_regs *regs) +{ + const struct exception_table_entry *fixup; + + fixup = search_exception_tables(instruction_pointer(regs)); + if (fixup) + regs->ARM_pc = fixup->fixup | PSR_I_BIT | MODE_SVC26; + + return fixup != NULL; +} + diff -Nru a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/mm/fault.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,318 @@ +/* + * linux/arch/arm/mm/fault-common.c + * + * Copyright (C) 1995 Linus Torvalds + * Modifications for ARM processor (c) 1995-2001 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include //FIXME this header may be bogusly included + +#include "fault.h" + +#define FAULT_CODE_LDRSTRPOST 0x80 +#define FAULT_CODE_LDRSTRPRE 0x40 +#define FAULT_CODE_LDRSTRREG 0x20 +#define FAULT_CODE_LDMSTM 0x10 +#define FAULT_CODE_LDCSTC 0x08 +#define FAULT_CODE_PREFETCH 0x04 +#define FAULT_CODE_WRITE 0x02 +#define FAULT_CODE_FORCECOW 0x01 + +#define DO_COW(m) ((m) & (FAULT_CODE_WRITE|FAULT_CODE_FORCECOW)) +#define READ_FAULT(m) (!((m) & FAULT_CODE_WRITE)) +#define DEBUG +/* + * This is useful to dump out the page tables associated with + * 'addr' in mm 'mm'. + */ +void show_pte(struct mm_struct *mm, unsigned long addr) +{ + pgd_t *pgd; + + if (!mm) + mm = &init_mm; + + printk(KERN_ALERT "pgd = %p\n", mm->pgd); + pgd = pgd_offset(mm, addr); + printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); + + do { + pmd_t *pmd; + pte_t *pte; + + pmd = pmd_offset(pgd, addr); + + if (pmd_none(*pmd)) + break; + + if (pmd_bad(*pmd)) { + printk("(bad)"); + break; + } + + /* We must not map this if we have highmem enabled */ + /* FIXME */ + pte = pte_offset_map(pmd, addr); + printk(", *pte=%08lx", pte_val(*pte)); + pte_unmap(pte); + } while(0); + + printk("\n"); +} + +/* + * Oops. The kernel tried to access some page that wasn't present. + */ +static void +__do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, + struct pt_regs *regs) +{ + /* + * Are we prepared to handle this kernel fault? + */ + if (fixup_exception(regs)) + return; + + /* + * No handler, we'll have to terminate things with extreme prejudice. + */ + bust_spinlocks(1); + printk(KERN_ALERT + "Unable to handle kernel %s at virtual address %08lx\n", + (addr < PAGE_SIZE) ? "NULL pointer dereference" : + "paging request", addr); + + show_pte(mm, addr); + die("Oops", regs, fsr); + bust_spinlocks(0); + do_exit(SIGKILL); +} + +/* + * Something tried to access memory that isn't in our memory map.. + * User mode accesses just cause a SIGSEGV + */ +static void +__do_user_fault(struct task_struct *tsk, unsigned long addr, + unsigned int fsr, int code, struct pt_regs *regs) +{ + struct siginfo si; + +#ifdef CONFIG_DEBUG_USER + printk("%s: unhandled page fault at 0x%08lx, code 0x%03x\n", + tsk->comm, addr, fsr); + show_pte(tsk->mm, addr); + show_regs(regs); + //dump_backtrace(regs, tsk); // FIXME ARM32 dropped this - why? + while(1); +#endif + + tsk->thread.address = addr; + tsk->thread.error_code = fsr; + tsk->thread.trap_no = 14; + si.si_signo = SIGSEGV; + si.si_errno = 0; + si.si_code = code; + si.si_addr = (void *)addr; + force_sig_info(SIGSEGV, &si, tsk); +} + +static int +__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, + struct task_struct *tsk) +{ + struct vm_area_struct *vma; + int fault, mask; + + vma = find_vma(mm, addr); + fault = -2; /* bad map area */ + if (!vma) + goto out; + if (vma->vm_start > addr) + goto check_stack; + + /* + * Ok, we have a good vm_area for this + * memory access, so we can handle it. + */ +good_area: + if (READ_FAULT(fsr)) /* read? */ + mask = VM_READ|VM_EXEC; + else + mask = VM_WRITE; + + fault = -1; /* bad access type */ + if (!(vma->vm_flags & mask)) + goto out; + + /* + * If for any reason at all we couldn't handle + * the fault, make sure we exit gracefully rather + * than endlessly redo the fault. + */ +survive: + fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, DO_COW(fsr)); + + /* + * Handle the "normal" cases first - successful and sigbus + */ + switch (fault) { + case 2: + tsk->maj_flt++; + return fault; + case 1: + tsk->min_flt++; + case 0: + return fault; + } + + fault = -3; /* out of memory */ + if (tsk->pid != 1) + goto out; + + /* + * If we are out of memory for pid1, + * sleep for a while and retry + */ + yield(); + goto survive; + +check_stack: + if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) + goto good_area; +out: + return fault; +} + +int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +{ + struct task_struct *tsk; + struct mm_struct *mm; + int fault; + + tsk = current; + mm = tsk->mm; + + printk("do_page_fault: pid: %d\n", tsk->pid); + /* + * If we're in an interrupt or have no user + * context, we must not take the fault.. + */ + if (in_interrupt() || !mm) + goto no_context; + + down_read(&mm->mmap_sem); + fault = __do_page_fault(mm, addr, fsr, tsk); + up_read(&mm->mmap_sem); + + /* + * Handle the "normal" case first + */ + if (fault > 0) + return 0; + + /* + * We had some memory, but were unable to + * successfully fix up this page fault. + */ + if (fault == 0){ + goto do_sigbus; + } + + /* + * If we are in kernel mode at this point, we + * have no context to handle this fault with. + */ + if (!user_mode(regs)){ + goto no_context; + } + + if (fault == -3) { + /* + * We ran out of memory, or some other thing happened to + * us that made us unable to handle the page fault gracefully. + */ + printk("VM: killing process %s\n", tsk->comm); + do_exit(SIGKILL); + } + else{ + __do_user_fault(tsk, addr, fsr, fault == -1 ? SEGV_ACCERR : SEGV_MAPERR, regs); + } + + return 0; + + +/* + * We ran out of memory, or some other thing happened to us that made + * us unable to handle the page fault gracefully. + */ +do_sigbus: + /* + * Send a sigbus, regardless of whether we were in kernel + * or user mode. + */ + tsk->thread.address = addr; //FIXME - need other bits setting? + tsk->thread.error_code = fsr; + tsk->thread.trap_no = 14; + force_sig(SIGBUS, tsk); +#ifdef CONFIG_DEBUG_USER + printk(KERN_DEBUG "%s: sigbus at 0x%08lx, pc=0x%08lx\n", + current->comm, addr, instruction_pointer(regs)); +#endif + + /* Kernel mode? Handle exceptions or die */ + if (user_mode(regs)) + return 0; + +no_context: + __do_kernel_fault(mm, addr, fsr, regs); + return 0; +} + +/* + * Handle a data abort. Note that we have to handle a range of addresses + * on ARM2/3 for ldm. If both pages are zero-mapped, then we have to force + * a copy-on-write. However, on the second page, we always force COW. + */ +asmlinkage void +do_DataAbort(unsigned long min_addr, unsigned long max_addr, int mode, struct pt_regs *regs) +{ + do_page_fault(min_addr, mode, regs); + + if ((min_addr ^ max_addr) >> PAGE_SHIFT){ + do_page_fault(max_addr, mode | FAULT_CODE_FORCECOW, regs); + } +} + +asmlinkage int +do_PrefetchAbort(unsigned long addr, struct pt_regs *regs) +{ +#if 0 + if (the memc mapping for this page exists) { + printk ("Page in, but got abort (undefined instruction?)\n"); + return 0; + } +#endif + do_page_fault(addr, FAULT_CODE_PREFETCH, regs); + return 1; +} + diff -Nru a/arch/arm26/mm/fault.h b/arch/arm26/mm/fault.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/mm/fault.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,5 @@ +void show_pte(struct mm_struct *mm, unsigned long addr); + +int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs); + +unsigned long search_extable(unsigned long addr); //FIXME - is it right? diff -Nru a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/mm/init.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,401 @@ +/* + * linux/arch/arm/mm/init.c + * + * Copyright (C) 1995-2002 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#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 + +#define TABLE_SIZE PTRS_PER_PTE * sizeof(pte_t)) + +struct mmu_gather mmu_gathers[NR_CPUS]; + +extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; +extern char _stext, _text, _etext, _end, __init_begin, __init_end; +extern unsigned long phys_initrd_start; +extern unsigned long phys_initrd_size; + +/* + * The sole use of this is to pass memory configuration + * data from paging_init to mem_init. + */ +static struct meminfo meminfo __initdata = { 0, }; + +/* + * empty_zero_page is a special page that is used for + * zero-initialized data and COW. + */ +struct page *empty_zero_page; + +void show_mem(void) +{ + int free = 0, total = 0, reserved = 0; + int shared = 0, cached = 0, slab = 0; + struct page *page, *end; + + printk("Mem-info:\n"); + show_free_areas(); + printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); + + + page = NODE_MEM_MAP(0); + end = page + NODE_DATA(0)->node_size; + + do { + total++; + if (PageReserved(page)) + reserved++; + else if (PageSwapCache(page)) + cached++; + else if (PageSlab(page)) + slab++; + else if (!page_count(page)) + free++; + else + shared += atomic_read(&page->count) - 1; + page++; + } while (page < end); + + printk("%d pages of RAM\n", total); + printk("%d free pages\n", free); + printk("%d reserved pages\n", reserved); + printk("%d slab pages\n", slab); + printk("%d pages shared\n", shared); + printk("%d pages swap cached\n", cached); +} + +struct node_info { + unsigned int start; + unsigned int end; + int bootmap_pages; +}; + +#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) +#define PFN_UP(x) (PAGE_ALIGN(x) >> PAGE_SHIFT) +#define PFN_SIZE(x) ((x) >> PAGE_SHIFT) +#define PFN_RANGE(s,e) PFN_SIZE(PAGE_ALIGN((unsigned long)(e)) - \ + (((unsigned long)(s)) & PAGE_MASK)) + +/* + * FIXME: We really want to avoid allocating the bootmap bitmap + * over the top of the initrd. Hopefully, this is located towards + * the start of a bank, so if we allocate the bootmap bitmap at + * the end, we won't clash. + */ +static unsigned int __init +find_bootmap_pfn(struct meminfo *mi, unsigned int bootmap_pages) +{ + unsigned int start_pfn, bootmap_pfn; + unsigned int start, end; + + start_pfn = PFN_UP((unsigned long)&_end); + bootmap_pfn = 0; + + /* ARM26 machines only have one node */ + if (mi->bank->node != 0) + BUG(); + + start = PFN_UP(mi->bank->start); + end = PFN_DOWN(mi->bank->size + mi->bank->start); + + if (start < start_pfn) + start = start_pfn; + + if (end <= start) + BUG(); + + if (end - start >= bootmap_pages) + bootmap_pfn = start; + else + BUG(); + + return bootmap_pfn; +} + +/* + * Scan the memory info structure and pull out: + * - the end of memory + * - the number of nodes + * - the pfn range of each node + * - the number of bootmem bitmap pages + */ +static void __init +find_memend_and_nodes(struct meminfo *mi, struct node_info *np) +{ + unsigned int memend_pfn = 0; + numnodes = 1; + + np->bootmap_pages = 0; + + if (mi->bank->size == 0) { + BUG(); + } + + /* + * Get the start and end pfns for this bank + */ + np->start = PFN_UP(mi->bank->start); + np->end = PFN_DOWN(mi->bank->start + mi->bank->size); + + if (memend_pfn < np->end) + memend_pfn = np->end; + + /* + * Calculate the number of pages we require to + * store the bootmem bitmaps. + */ + np->bootmap_pages = bootmem_bootmap_pages(np->end - np->start); + + /* + * This doesn't seem to be used by the Linux memory + * manager any more. If we can get rid of it, we + * also get rid of some of the stuff above as well. + */ + max_low_pfn = memend_pfn - PFN_DOWN(PHYS_OFFSET); + max_pfn = memend_pfn - PFN_DOWN(PHYS_OFFSET); + mi->end = memend_pfn << PAGE_SHIFT; + +} + +/* + * Reserve the various regions of node 0 + */ +static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int bootmap_pages) +{ + pg_data_t *pgdat = NODE_DATA(0); + + /* + * Register the kernel text and data with bootmem. + * Note that this can only be in node 0. + */ + reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext); + + /* + * And don't forget to reserve the allocator bitmap, + * which will be freed later. + */ + reserve_bootmem_node(pgdat, bootmap_pfn << PAGE_SHIFT, + bootmap_pages << PAGE_SHIFT); + + /* + * These should likewise go elsewhere. They pre-reserve + * the screen memory region at the start of main system + * memory. + */ + reserve_bootmem_node(pgdat, 0x02000000, 0x00080000); + +#ifdef CONFIG_BLK_DEV_INITRD + initrd_start = phys_initrd_start; + initrd_end = initrd_start + phys_initrd_size; + + /* Achimedes machines only have one node, so initrd is in node 0 */ + reserve_bootmem_node(pgdat, __pa(initrd_start), + initrd_end - initrd_start); +#endif + +} + + +/* + * Initialise the bootmem allocator for all nodes. This is called + * early during the architecture specific initialisation. + */ +void __init bootmem_init(struct meminfo *mi) +{ + struct node_info node_info; + unsigned int bootmap_pfn; + + find_memend_and_nodes(mi, &node_info); + + bootmap_pfn = find_bootmap_pfn(mi, node_info.bootmap_pages); + + /* + * Note that node 0 must always have some pages. + */ + if (node_info.end == 0) + BUG(); + + /* + * Initialise the bootmem allocator. + */ + init_bootmem_node(NODE_DATA(node), bootmap_pfn, node_info.start, node_info.end); + + /* + * Register all available RAM in this node with the bootmem allocator. + */ + free_bootmem_node(NODE_DATA(node), mi->bank->start, mi->bank->size); + + /* + * Reserve ram for stuff like initrd, video, kernel, etc. + */ + + reserve_node_zero(bootmap_pfn, node_info.bootmap_pages); + +} + +/* + * paging_init() sets up the page tables, initialises the zone memory + * maps, and sets up the zero page, bad page and bad page tables. + */ +void __init paging_init(struct meminfo *mi) +{ + void *zero_page; + unsigned long zone_size[MAX_NR_ZONES]; + unsigned long zhole_size[MAX_NR_ZONES]; + struct bootmem_data *bdata; + pg_data_t *pgdat; + int i; + + memcpy(&meminfo, mi, sizeof(meminfo)); + + /* + * allocate the zero page. Note that we count on this going ok. + */ + zero_page = alloc_bootmem_low_pages(PAGE_SIZE); + + /* + * initialise the page tables. + */ + memtable_init(mi); + flush_tlb_all(); + + /* + * initialise the zones in node 0 (archimedes have only 1 node) + */ + + for (i = 0; i < MAX_NR_ZONES; i++) { + zone_size[i] = 0; + zhole_size[i] = 0; + } + + pgdat = NODE_DATA(0); + bdata = pgdat->bdata; + + zone_size[0] = bdata->node_low_pfn - + (bdata->node_boot_start >> PAGE_SHIFT); + if (!zone_size[0]) + BUG(); + + free_area_init_node(0, pgdat, 0, zone_size, + bdata->node_boot_start >> PAGE_SHIFT, 0); + + mem_map = contig_page_data.node_mem_map; + + /* + * finish off the bad pages once + * the mem_map is initialised + */ + memzero(zero_page, PAGE_SIZE); + empty_zero_page = virt_to_page(zero_page); +} + +static inline void free_area(unsigned long addr, unsigned long end, char *s) +{ + unsigned int size = (end - addr) >> 10; + + for (; addr < end; addr += PAGE_SIZE) { + struct page *page = virt_to_page(addr); + ClearPageReserved(page); + set_page_count(page, 1); + free_page(addr); + totalram_pages++; + } + + if (size && s) + printk(KERN_INFO "Freeing %s memory: %dK\n", s, size); +} + +/* + * mem_init() marks the free areas in the mem_map and tells us how much + * memory is free. This is done after various parts of the system have + * claimed their memory after the kernel image. + */ +void __init mem_init(void) +{ + unsigned int codepages, datapages, initpages; + pg_data_t *pgdat = NODE_DATA(0); + extern int sysctl_overcommit_memory; + + datapages = &_end - &_etext; + codepages = &_etext - &_text; + initpages = &__init_end - &__init_begin; + + high_memory = (void *)__va(meminfo.end); + max_mapnr = virt_to_page(high_memory) - mem_map; + + /* this will put all unused low memory onto the freelists */ + if (pgdat->node_size != 0) + totalram_pages += free_all_bootmem_node(pgdat); + + printk(KERN_INFO "Memory:"); + + num_physpages = meminfo.bank[0].size >> PAGE_SHIFT; + + printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT)); + printk(KERN_NOTICE "Memory: %luKB available (%dK code, " + "%dK data, %dK init)\n", + (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), + codepages >> 10, datapages >> 10, initpages >> 10); + /* + * Turn on overcommit on tiny machines + */ + if (PAGE_SIZE >= 16384 && num_physpages <= 128) { + sysctl_overcommit_memory = 1; + printk("Turning on overcommit\n"); + } +} + +void free_initmem(void) +{ + free_area((unsigned long)(&__init_begin), + (unsigned long)(&__init_end), + "init"); +} + +#ifdef CONFIG_BLK_DEV_INITRD + +static int keep_initrd; + +void free_initrd_mem(unsigned long start, unsigned long end) +{ + if (!keep_initrd) + free_area(start, end, "initrd"); +} + +static int __init keepinitrd_setup(char *__unused) +{ + keep_initrd = 1; + return 1; +} + +__setup("keepinitrd", keepinitrd_setup); +#endif diff -Nru a/arch/arm26/mm/mm-memc.c b/arch/arm26/mm/mm-memc.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/mm/mm-memc.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,204 @@ +/* + * linux/arch/arm/mm/mm-armo.c + * + * Copyright (C) 1998-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Page table sludge for older ARM processor architectures. + */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#define MEMC_TABLE_SIZE (256*sizeof(unsigned long)) + +kmem_cache_t *pte_cache, *pgd_cache; +int page_nr; + +/* + * Allocate space for a page table and a MEMC table. + * Note that we place the MEMC + * table before the page directory. This means we can + * easily get to both tightly-associated data structures + * with a single pointer. + */ +static inline pgd_t *alloc_pgd_table(void) +{ + void *pg2k = kmem_cache_alloc(pgd_cache, GFP_KERNEL); + + if (pg2k) + pg2k += MEMC_TABLE_SIZE; + + return (pgd_t *)pg2k; +} + +/* + * Free a page table. this function is the counterpart to get_pgd_slow + * below, not alloc_pgd_table above. + */ +void free_pgd_slow(pgd_t *pgd) +{ + unsigned long tbl = (unsigned long)pgd; + + tbl -= MEMC_TABLE_SIZE; + + kmem_cache_free(pgd_cache, (void *)tbl); +} + +/* + * Allocate a new pgd and fill it in ready for use + * + * A new tasks pgd is completely empty (all pages !present) except for: + * + * o The machine vectors at virtual address 0x0 + * o The vmalloc region at the top of address space + * + */ +#define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD) + +pgd_t *get_pgd_slow(struct mm_struct *mm) +{ + void *pg2k; + pgd_t *new_pgd, *init_pgd; + pmd_t *new_pmd, *init_pmd; + pte_t *new_pte, *init_pte; + struct mm_struct bob; + + new_pgd = alloc_pgd_table(); + if (!new_pgd) + goto no_pgd; + + /* + * This lock is here just to satisfy pmd_alloc and pte_lock + * FIXME: I bet we could avoid taking it pretty much altogether + */ + spin_lock(&mm->page_table_lock); + + /* + * On ARM, first page must always be allocated since it contains + * the machine vectors. + */ + new_pmd = pmd_alloc(mm, new_pgd, 0); + if (!new_pmd) + goto no_pmd; + + new_pte = pte_alloc_kernel(mm, new_pmd, 0); + if (!new_pte) + goto no_pte; + + init_pgd = pgd_offset(&init_mm, 0); + init_pmd = pmd_offset(init_pgd, 0); + init_pte = pte_offset(init_pmd, 0); + + set_pte(new_pte, *init_pte); + + /* + * the page table entries are zeroed + * when the table is created. (see the cache_ctor functions below) + * Now we need to plonk the kernel (vmalloc) area at the end of + * the address space. We copy this from the init thread, just like + * the init_pte we copied above... + */ + memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR, + (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t)); + + spin_unlock(&mm->page_table_lock); + + /* update MEMC tables */ + cpu_memc_update_all(new_pgd); + return new_pgd; + +no_pte: + spin_unlock(&mm->page_table_lock); + pmd_free(new_pmd); + free_pgd_slow(new_pgd); + return NULL; + +no_pmd: + spin_unlock(&mm->page_table_lock); + free_pgd_slow(new_pgd); + return NULL; + +no_pgd: + return NULL; +} + +/* + * No special code is required here. + */ +void setup_mm_for_reboot(char mode) +{ +} + +/* + * This contains the code to setup the memory map on an ARM2/ARM250/ARM3 + * o swapper_pg_dir = 0x0207d000 + * o kernel proper starts at 0x0208000 + * o create (allocate) a pte to contain the machine vectors + * o populate the pte (points to 0x02078000) (FIXME - is it zeroed?) + * o populate the init tasks page directory (pgd) with the new pte + * o zero the rest of the init tasks pgdir (FIXME - what about vmalloc?!) + */ +void __init memtable_init(struct meminfo *mi) +{ + pte_t *pte; + int i; + + page_nr = max_low_pfn; + + pte = alloc_bootmem_low_pages(PTRS_PER_PTE * sizeof(pte_t)); + pte[0] = mk_pte_phys(PAGE_OFFSET + SCREEN_SIZE, PAGE_READONLY); + pmd_populate(&init_mm, pmd_offset(swapper_pg_dir, 0), pte); + + for (i = 1; i < PTRS_PER_PGD; i++) + pgd_val(swapper_pg_dir[i]) = 0; +} + +void __init iotable_init(struct map_desc *io_desc) +{ + /* nothing to do */ +} + +/* + * We never have holes in the memmap + */ +void __init create_memmap_holes(struct meminfo *mi) +{ +} + +static void pte_cache_ctor(void *pte, kmem_cache_t *cache, unsigned long flags) +{ + memzero(pte, sizeof(pte_t) * PTRS_PER_PTE); +} + +static void pgd_cache_ctor(void *pgd, kmem_cache_t *cache, unsigned long flags) +{ + memzero(pgd + MEMC_TABLE_SIZE, USER_PTRS_PER_PGD * sizeof(pgd_t)); +} + +void __init pgtable_cache_init(void) +{ + pte_cache = kmem_cache_create("pte-cache", + sizeof(pte_t) * PTRS_PER_PTE, + 0, 0, pte_cache_ctor, NULL); + if (!pte_cache) + BUG(); + + pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE + + sizeof(pgd_t) * PTRS_PER_PGD, + 0, 0, pgd_cache_ctor, NULL); + if (!pgd_cache) + BUG(); +} diff -Nru a/arch/arm26/mm/proc-funcs.S b/arch/arm26/mm/proc-funcs.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/mm/proc-funcs.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,359 @@ +/* + * linux/arch/arm/mm/proc-arm2,3.S + * + * Copyright (C) 1997-1999 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * MMU functions for ARM2,3 + * + * These are the low level assembler for performing cache + * and memory functions on ARM2, ARM250 and ARM3 processors. + */ +#include +#include +#include +#include +#include + +/* + * MEMC workhorse code. It's both a horse which things it's a pig. + */ +/* + * Function: cpu_memc_update_entry(pgd_t *pgd, unsigned long phys_pte, unsigned long addr) + * Params : pgd Page tables/MEMC mapping + * : phys_pte physical address, or PTE + * : addr virtual address + */ +ENTRY(cpu_memc_update_entry) + tst r1, #PAGE_PRESENT @ is the page present + orreq r1, r1, #PAGE_OLD | PAGE_CLEAN + moveq r2, #0x01f00000 + mov r3, r1, lsr #13 @ convert to physical page nr + and r3, r3, #0x3fc + adr ip, memc_phys_table_32 + ldr r3, [ip, r3] + tst r1, #PAGE_OLD | PAGE_NOT_USER + biceq r3, r3, #0x200 + tsteq r1, #PAGE_READONLY | PAGE_CLEAN + biceq r3, r3, #0x300 + mov r2, r2, lsr #15 @ virtual -> nr + orr r3, r3, r2, lsl #15 + and r2, r2, #0x300 + orr r3, r3, r2, lsl #2 + and r2, r3, #255 + sub r0, r0, #256 * 4 + str r3, [r0, r2, lsl #2] + strb r3, [r3] + movs pc, lr +/* + * Params : r0 = preserved + * : r1 = memc table base (preserved) + * : r2 = page table entry + * : r3 = preserved + * : r4 = unused + * : r5 = memc physical address translation table + * : ip = virtual address (preserved) + */ +update_pte: + mov r4, r2, lsr #13 + and r4, r4, #0x3fc + ldr r4, [r5, r4] @ covert to MEMC page + + tst r2, #PAGE_OLD | PAGE_NOT_USER @ check for MEMC read + biceq r4, r4, #0x200 + tsteq r2, #PAGE_READONLY | PAGE_CLEAN @ check for MEMC write + biceq r4, r4, #0x300 + + orr r4, r4, ip + and r2, ip, #0x01800000 + orr r4, r4, r2, lsr #13 + + and r2, r4, #255 + str r4, [r1, r2, lsl #2] + movs pc, lr + +/* + * Params : r0 = preserved + * : r1 = memc table base (preserved) + * : r2 = page table base + * : r3 = preserved + * : r4 = unused + * : r5 = memc physical address translation table + * : ip = virtual address (updated) + */ +update_pte_table: + stmfd sp!, {r0, lr} + bic r0, r2, #3 +1: ldr r2, [r0], #4 @ get entry + tst r2, #PAGE_PRESENT @ page present + blne update_pte @ process pte + add ip, ip, #32768 @ increment virt addr + ldr r2, [r0], #4 @ get entry + tst r2, #PAGE_PRESENT @ page present + blne update_pte @ process pte + add ip, ip, #32768 @ increment virt addr + ldr r2, [r0], #4 @ get entry + tst r2, #PAGE_PRESENT @ page present + blne update_pte @ process pte + add ip, ip, #32768 @ increment virt addr + ldr r2, [r0], #4 @ get entry + tst r2, #PAGE_PRESENT @ page present + blne update_pte @ process pte + add ip, ip, #32768 @ increment virt addr + tst ip, #32768 * 31 @ finished? + bne 1b + ldmfd sp!, {r0, pc}^ + +/* + * Function: cpu_memc_update_all(pgd_t *pgd) + * Params : pgd Page tables/MEMC mapping + * Notes : this is optimised for 32k pages + */ +ENTRY(cpu_memc_update_all) + stmfd sp!, {r4, r5, lr} + bl clear_tables + sub r1, r0, #256 * 4 @ start of MEMC tables + adr r5, memc_phys_table_32 @ Convert to logical page number + mov ip, #0 @ virtual address +1: ldmia r0!, {r2, r3} @ load two pgd entries + tst r2, #PAGE_PRESENT @ is pgd entry present? + addeq ip, ip, #1048576 @FIXME - PAGE_PRESENT is for PTEs technically... + blne update_pte_table + mov r2, r3 + tst r2, #PAGE_PRESENT @ is pgd entry present? + addeq ip, ip, #1048576 + blne update_pte_table + teq ip, #32 * 1048576 + bne 1b + ldmfd sp!, {r4, r5, pc}^ + +/* + * Build the table to map from physical page number to memc page number + */ + .type memc_phys_table_32, #object +memc_phys_table_32: + .irp b7, 0x00, 0x80 + .irp b6, 0x00, 0x02 + .irp b5, 0x00, 0x04 + .irp b4, 0x00, 0x01 + + .irp b3, 0x00, 0x40 + .irp b2, 0x00, 0x20 + .irp b1, 0x00, 0x10 + .irp b0, 0x00, 0x08 + .long 0x03800300 + \b7 + \b6 + \b5 + \b4 + \b3 + \b2 + \b1 + \b0 + .endr + .endr + .endr + .endr + + .endr + .endr + .endr + .endr + .size memc_phys_table_32, . - memc_phys_table_32 + +/* + * helper for cpu_memc_update_all, this clears out all + * mappings, setting them close to the top of memory, + * and inaccessible (0x01f00000). + * Params : r0 = page table pointer + */ +clear_tables: ldr r1, _arm3_set_pgd - 4 + ldr r2, [r1] + sub r1, r0, #256 * 4 @ start of MEMC tables + add r2, r1, r2, lsl #2 @ end of tables + mov r3, #0x03f00000 @ Default mapping (null mapping) + orr r3, r3, #0x00000f00 + orr r4, r3, #1 + orr r5, r3, #2 + orr ip, r3, #3 +1: stmia r1!, {r3, r4, r5, ip} + add r3, r3, #4 + add r4, r4, #4 + add r5, r5, #4 + add ip, ip, #4 + stmia r1!, {r3, r4, r5, ip} + add r3, r3, #4 + add r4, r4, #4 + add r5, r5, #4 + add ip, ip, #4 + teq r1, r2 + bne 1b + mov pc, lr + +/* + * Function: *_set_pgd(pgd_t *pgd) + * Params : pgd New page tables/MEMC mapping + * Purpose : update MEMC hardware with new mapping + */ + .word page_nr @ extern - declared in mm-memc.c +_arm3_set_pgd: mcr p15, 0, r1, c1, c0, 0 @ flush cache +_arm2_set_pgd: stmfd sp!, {lr} + ldr r1, _arm3_set_pgd - 4 + ldr r2, [r1] + sub r0, r0, #256 * 4 @ start of MEMC tables + add r1, r0, r2, lsl #2 @ end of tables +1: ldmia r0!, {r2, r3, ip, lr} + strb r2, [r2] + strb r3, [r3] + strb ip, [ip] + strb lr, [lr] + ldmia r0!, {r2, r3, ip, lr} + strb r2, [r2] + strb r3, [r3] + strb ip, [ip] + strb lr, [lr] + teq r0, r1 + bne 1b + ldmfd sp!, {pc}^ + +/* + * Function: *_proc_init (void) + * Purpose : Initialise the cache control registers + */ +_arm3_proc_init: + mov r0, #0x001f0000 + orr r0, r0, #0x0000ff00 + orr r0, r0, #0x000000ff + mcr p15, 0, r0, c3, c0 @ ARM3 Cacheable + mcr p15, 0, r0, c4, c0 @ ARM3 Updateable + mov r0, #0 + mcr p15, 0, r0, c5, c0 @ ARM3 Disruptive + mcr p15, 0, r0, c1, c0 @ ARM3 Flush + mov r0, #3 + mcr p15, 0, r0, c2, c0 @ ARM3 Control +_arm2_proc_init: + movs pc, lr + +/* + * Function: *_proc_fin (void) + * Purpose : Finalise processor (disable caches) + */ +_arm3_proc_fin: mov r0, #2 + mcr p15, 0, r0, c2, c0 +_arm2_proc_fin: orrs pc, lr, #PSR_I_BIT|PSR_F_BIT + +/* + * Function: *_xchg_1 (int new, volatile void *ptr) + * Params : new New value to store at... + * : ptr pointer to byte-wide location + * Purpose : Performs an exchange operation + * Returns : Original byte data at 'ptr' + */ +_arm2_xchg_1: mov r2, pc + orr r2, r2, #PSR_I_BIT + teqp r2, #0 + ldrb r2, [r1] + strb r0, [r1] + mov r0, r2 + movs pc, lr + +_arm3_xchg_1: swpb r0, r0, [r1] + movs pc, lr + +/* + * Function: *_xchg_4 (int new, volatile void *ptr) + * Params : new New value to store at... + * : ptr pointer to word-wide location + * Purpose : Performs an exchange operation + * Returns : Original word data at 'ptr' + */ +_arm2_xchg_4: mov r2, pc + orr r2, r2, #PSR_I_BIT + teqp r2, #0 + ldr r2, [r1] + str r0, [r1] + mov r0, r2 + movs pc, lr + +_arm3_xchg_4: swp r0, r0, [r1] + movs pc, lr + +_arm2_3_check_bugs: + bics pc, lr, #PSR_F_BIT @ Clear FIQ disable bit + +armvlsi_name: .asciz "ARM/VLSI" +_arm2_name: .asciz "ARM 2" +_arm250_name: .asciz "ARM 250" +_arm3_name: .asciz "ARM 3" + + .section ".init.text", #alloc, #execinstr +/* + * Purpose : Function pointers used to access above functions - all calls + * come through these + */ + .globl arm2_processor_functions +arm2_processor_functions: + .word _arm2_3_check_bugs + .word _arm2_proc_init + .word _arm2_proc_fin + .word _arm2_set_pgd + .word _arm2_xchg_1 + .word _arm2_xchg_4 + +cpu_arm2_info: + .long armvlsi_name + .long _arm2_name + + .globl arm250_processor_functions +arm250_processor_functions: + .word _arm2_3_check_bugs + .word _arm2_proc_init + .word _arm2_proc_fin + .word _arm2_set_pgd + .word _arm3_xchg_1 + .word _arm3_xchg_4 + +cpu_arm250_info: + .long armvlsi_name + .long _arm250_name + + .globl arm3_processor_functions +arm3_processor_functions: + .word _arm2_3_check_bugs + .word _arm3_proc_init + .word _arm3_proc_fin + .word _arm3_set_pgd + .word _arm3_xchg_1 + .word _arm3_xchg_4 + +cpu_arm3_info: + .long armvlsi_name + .long _arm3_name + +arm2_arch_name: .asciz "armv1" +arm3_arch_name: .asciz "armv2" +arm2_elf_name: .asciz "v1" +arm3_elf_name: .asciz "v2" + .align + + .section ".proc.info", #alloc, #execinstr + + .long 0x41560200 + .long 0xfffffff0 + .long arm2_arch_name + .long arm2_elf_name + .long 0 + .long cpu_arm2_info + .long arm2_processor_functions + + .long 0x41560250 + .long 0xfffffff0 + .long arm3_arch_name + .long arm3_elf_name + .long 0 + .long cpu_arm250_info + .long arm250_processor_functions + + .long 0x41560300 + .long 0xfffffff0 + .long arm3_arch_name + .long arm3_elf_name + .long 0 + .long cpu_arm3_info + .long arm3_processor_functions + diff -Nru a/arch/arm26/nwfpe/ARM-gcc.h b/arch/arm26/nwfpe/ARM-gcc.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/ARM-gcc.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,120 @@ +/* +------------------------------------------------------------------------------- +The macro `BITS64' can be defined to indicate that 64-bit integer types are +supported by the compiler. +------------------------------------------------------------------------------- +*/ +#define BITS64 + +/* +------------------------------------------------------------------------------- +Each of the following `typedef's defines the most convenient type that holds +integers of at least as many bits as specified. For example, `uint8' should +be the most convenient type that can hold unsigned integers of as many as +8 bits. The `flag' type must be able to hold either a 0 or 1. For most +implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed +to the same as `int'. +------------------------------------------------------------------------------- +*/ +typedef char flag; +typedef unsigned char uint8; +typedef signed char int8; +typedef int uint16; +typedef int int16; +typedef unsigned int uint32; +typedef signed int int32; +#ifdef BITS64 +typedef unsigned long long int bits64; +typedef signed long long int sbits64; +#endif + +/* +------------------------------------------------------------------------------- +Each of the following `typedef's defines a type that holds integers +of _exactly_ the number of bits specified. For instance, for most +implementation of C, `bits16' and `sbits16' should be `typedef'ed to +`unsigned short int' and `signed short int' (or `short int'), respectively. +------------------------------------------------------------------------------- +*/ +typedef unsigned char bits8; +typedef signed char sbits8; +typedef unsigned short int bits16; +typedef signed short int sbits16; +typedef unsigned int bits32; +typedef signed int sbits32; +#ifdef BITS64 +typedef unsigned long long int uint64; +typedef signed long long int int64; +#endif + +#ifdef BITS64 +/* +------------------------------------------------------------------------------- +The `LIT64' macro takes as its argument a textual integer literal and if +necessary ``marks'' the literal as having a 64-bit integer type. For +example, the Gnu C Compiler (`gcc') requires that 64-bit literals be +appended with the letters `LL' standing for `long long', which is `gcc's +name for the 64-bit integer type. Some compilers may allow `LIT64' to be +defined as the identity macro: `#define LIT64( a ) a'. +------------------------------------------------------------------------------- +*/ +#define LIT64( a ) a##LL +#endif + +/* +------------------------------------------------------------------------------- +The macro `INLINE' can be used before functions that should be inlined. If +a compiler does not support explicit inlining, this macro should be defined +to be `static'. +------------------------------------------------------------------------------- +*/ +#define INLINE extern __inline__ + + +/* For use as a GCC soft-float library we need some special function names. */ + +#ifdef __LIBFLOAT__ + +/* Some 32-bit ops can be mapped straight across by just changing the name. */ +#define float32_add __addsf3 +#define float32_sub __subsf3 +#define float32_mul __mulsf3 +#define float32_div __divsf3 +#define int32_to_float32 __floatsisf +#define float32_to_int32_round_to_zero __fixsfsi +#define float32_to_uint32_round_to_zero __fixunssfsi + +/* These ones go through the glue code. To avoid namespace pollution + we rename the internal functions too. */ +#define float32_eq ___float32_eq +#define float32_le ___float32_le +#define float32_lt ___float32_lt + +/* All the 64-bit ops have to go through the glue, so we pull the same + trick. */ +#define float64_add ___float64_add +#define float64_sub ___float64_sub +#define float64_mul ___float64_mul +#define float64_div ___float64_div +#define int32_to_float64 ___int32_to_float64 +#define float64_to_int32_round_to_zero ___float64_to_int32_round_to_zero +#define float64_to_uint32_round_to_zero ___float64_to_uint32_round_to_zero +#define float64_to_float32 ___float64_to_float32 +#define float32_to_float64 ___float32_to_float64 +#define float64_eq ___float64_eq +#define float64_le ___float64_le +#define float64_lt ___float64_lt + +#if 0 +#define float64_add __adddf3 +#define float64_sub __subdf3 +#define float64_mul __muldf3 +#define float64_div __divdf3 +#define int32_to_float64 __floatsidf +#define float64_to_int32_round_to_zero __fixdfsi +#define float64_to_uint32_round_to_zero __fixunsdfsi +#define float64_to_float32 __truncdfsf2 +#define float32_to_float64 __extendsfdf2 +#endif + +#endif diff -Nru a/arch/arm26/nwfpe/ChangeLog b/arch/arm26/nwfpe/ChangeLog --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/ChangeLog Fri Jun 13 01:07:45 2003 @@ -0,0 +1,83 @@ +2002-01-19 Russell King + + * fpa11.h - Add documentation + - remove userRegisters pointer from this structure. + - add new method to obtain integer register values. + * softfloat.c - Remove float128 + * softfloat.h - Remove float128 + * softfloat-specialize - Remove float128 + + * The FPA11 structure is not a kernel-specific data structure. + It is used by users of ptrace to examine the values of the + floating point registers. Therefore, any changes to the + FPA11 structure (size or position of elements contained + within) have to be well thought out. + + * Since 128-bit float requires the FPA11 structure to change + size, it has been removed. 128-bit float is currently unused, + and needs various things to be re-worked so that we won't + overflow the available space in the task structure. + + * The changes are designed to break any patch that goes on top + of this code, so that the authors properly review their changes. + +1999-08-19 Scott Bambrough + + * fpmodule.c - Changed version number to 0.95 + * fpa11.h - modified FPA11, FPREG structures + * fpa11.c - Changes due to FPA11, FPREG structure alterations. + * fpa11_cpdo.c - Changes due to FPA11, FPREG structure alterations. + * fpa11_cpdt.c - Changes due to FPA11, FPREG structure alterations. + * fpa11_cprt.c - Changes due to FPA11, FPREG structure alterations. + * single_cpdo.c - Changes due to FPA11, FPREG structure alterations. + * double_cpdo.c - Changes due to FPA11, FPREG structure alterations. + * extended_cpdo.c - Changes due to FPA11, FPREG structure alterations. + + * I discovered several bugs. First and worst is that the kernel + passes in a pointer to the FPE's state area. This is defined + as a struct user_fp (see user.h). This pointer was cast to a + FPA11*. Unfortunately FPA11 and user_fp are of different sizes; + user_fp is smaller. This meant that the FPE scribbled on things + below its area, which is bad, as the area is in the thread_struct + embedded in the process task structure. Thus we were scribbling + over one of the most important structures in the entire OS. + + * user_fp and FPA11 have now been harmonized. Most of the changes + in the above code were dereferencing problems due to moving the + register type out of FPREG, and getting rid of the union variable + fpvalue. + + * Second I noticed resetFPA11 was not always being called for a + task. This should happen on the first floating point exception + that occurs. It is controlled by init_flag in FPA11. The + comment in the code beside init_flag state the kernel guarantees + this to be zero. Not so. I found that the kernel recycles task + structures, and that recycled ones may not have init_flag zeroed. + I couldn't even find anything that guarantees it is zeroed when + when the task structure is initially allocated. In any case + I now initialize the entire FPE state in the thread structure to + zero when allocated and recycled. See alloc_task_struct() and + flush_thread() in arch/arm/process.c. The change to + alloc_task_struct() may not be necessary, but I left it in for + completeness (better safe than sorry). + +1998-11-23 Scott Bambrough + + * README.FPE - fix typo in description of lfm/sfm instructions + * NOTES - Added file to describe known bugs/problems + * fpmodule.c - Changed version number to 0.94 + +1998-11-20 Scott Bambrough + + * README.FPE - fix description of URD, NRM instructions + * TODO - remove URD, NRM instructions from TODO list + * single_cpdo.c - implement URD, NRM + * double_cpdo.c - implement URD, NRM + * extended_cpdo.c - implement URD, NRM + +1998-11-19 Scott Bambrough + + * ChangeLog - Added this file to track changes made. + * fpa11.c - added code to initialize register types to typeNone + * fpa11_cpdt.c - fixed bug in storeExtended (typeExtended changed to + typeDouble in switch statement) diff -Nru a/arch/arm26/nwfpe/Makefile b/arch/arm26/nwfpe/Makefile --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/Makefile Fri Jun 13 01:07:45 2003 @@ -0,0 +1,15 @@ +# +# Copyright (C) 1998, 1999, 2001 Philip Blundell +# + +obj-y := +obj-m := +obj-n := + +obj-$(CONFIG_FPE_NWFPE) += nwfpe.o + +nwfpe-objs := fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o \ + fpmodule.o fpopcode.o softfloat.o \ + single_cpdo.o double_cpdo.o extended_cpdo.o \ + entry.o + diff -Nru a/arch/arm26/nwfpe/double_cpdo.c b/arch/arm26/nwfpe/double_cpdo.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/double_cpdo.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,288 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "softfloat.h" +#include "fpopcode.h" + +float64 float64_exp(float64 Fm); +float64 float64_ln(float64 Fm); +float64 float64_sin(float64 rFm); +float64 float64_cos(float64 rFm); +float64 float64_arcsin(float64 rFm); +float64 float64_arctan(float64 rFm); +float64 float64_log(float64 rFm); +float64 float64_tan(float64 rFm); +float64 float64_arccos(float64 rFm); +float64 float64_pow(float64 rFn,float64 rFm); +float64 float64_pol(float64 rFn,float64 rFm); + +unsigned int DoubleCPDO(const unsigned int opcode) +{ + FPA11 *fpa11 = GET_FPA11(); + float64 rFm, rFn = 0; //FIXME - should be zero? + unsigned int Fd, Fm, Fn, nRc = 1; + + //printk("DoubleCPDO(0x%08x)\n",opcode); + + Fm = getFm(opcode); + if (CONSTANT_FM(opcode)) + { + rFm = getDoubleConstant(Fm); + } + else + { + switch (fpa11->fType[Fm]) + { + case typeSingle: + rFm = float32_to_float64(fpa11->fpreg[Fm].fSingle); + break; + + case typeDouble: + rFm = fpa11->fpreg[Fm].fDouble; + break; + + case typeExtended: + // !! patb + //printk("not implemented! why not?\n"); + //!! ScottB + // should never get here, if extended involved + // then other operand should be promoted then + // ExtendedCPDO called. + break; + + default: return 0; + } + } + + if (!MONADIC_INSTRUCTION(opcode)) + { + Fn = getFn(opcode); + switch (fpa11->fType[Fn]) + { + case typeSingle: + rFn = float32_to_float64(fpa11->fpreg[Fn].fSingle); + break; + + case typeDouble: + rFn = fpa11->fpreg[Fn].fDouble; + break; + + default: return 0; + } + } + + Fd = getFd(opcode); + /* !! this switch isn't optimized; better (opcode & MASK_ARITHMETIC_OPCODE)>>24, sort of */ + switch (opcode & MASK_ARITHMETIC_OPCODE) + { + /* dyadic opcodes */ + case ADF_CODE: + fpa11->fpreg[Fd].fDouble = float64_add(rFn,rFm); + break; + + case MUF_CODE: + case FML_CODE: + fpa11->fpreg[Fd].fDouble = float64_mul(rFn,rFm); + break; + + case SUF_CODE: + fpa11->fpreg[Fd].fDouble = float64_sub(rFn,rFm); + break; + + case RSF_CODE: + fpa11->fpreg[Fd].fDouble = float64_sub(rFm,rFn); + break; + + case DVF_CODE: + case FDV_CODE: + fpa11->fpreg[Fd].fDouble = float64_div(rFn,rFm); + break; + + case RDF_CODE: + case FRD_CODE: + fpa11->fpreg[Fd].fDouble = float64_div(rFm,rFn); + break; + +#if 0 + case POW_CODE: + fpa11->fpreg[Fd].fDouble = float64_pow(rFn,rFm); + break; + + case RPW_CODE: + fpa11->fpreg[Fd].fDouble = float64_pow(rFm,rFn); + break; +#endif + + case RMF_CODE: + fpa11->fpreg[Fd].fDouble = float64_rem(rFn,rFm); + break; + +#if 0 + case POL_CODE: + fpa11->fpreg[Fd].fDouble = float64_pol(rFn,rFm); + break; +#endif + + /* monadic opcodes */ + case MVF_CODE: + fpa11->fpreg[Fd].fDouble = rFm; + break; + + case MNF_CODE: + { + unsigned int *p = (unsigned int*)&rFm; + p[1] ^= 0x80000000; + fpa11->fpreg[Fd].fDouble = rFm; + } + break; + + case ABS_CODE: + { + unsigned int *p = (unsigned int*)&rFm; + p[1] &= 0x7fffffff; + fpa11->fpreg[Fd].fDouble = rFm; + } + break; + + case RND_CODE: + case URD_CODE: + fpa11->fpreg[Fd].fDouble = float64_round_to_int(rFm); + break; + + case SQT_CODE: + fpa11->fpreg[Fd].fDouble = float64_sqrt(rFm); + break; + +#if 0 + case LOG_CODE: + fpa11->fpreg[Fd].fDouble = float64_log(rFm); + break; + + case LGN_CODE: + fpa11->fpreg[Fd].fDouble = float64_ln(rFm); + break; + + case EXP_CODE: + fpa11->fpreg[Fd].fDouble = float64_exp(rFm); + break; + + case SIN_CODE: + fpa11->fpreg[Fd].fDouble = float64_sin(rFm); + break; + + case COS_CODE: + fpa11->fpreg[Fd].fDouble = float64_cos(rFm); + break; + + case TAN_CODE: + fpa11->fpreg[Fd].fDouble = float64_tan(rFm); + break; + + case ASN_CODE: + fpa11->fpreg[Fd].fDouble = float64_arcsin(rFm); + break; + + case ACS_CODE: + fpa11->fpreg[Fd].fDouble = float64_arccos(rFm); + break; + + case ATN_CODE: + fpa11->fpreg[Fd].fDouble = float64_arctan(rFm); + break; +#endif + + case NRM_CODE: + break; + + default: + { + nRc = 0; + } + } + + if (0 != nRc) fpa11->fType[Fd] = typeDouble; + return nRc; +} + +#if 0 +float64 float64_exp(float64 rFm) +{ + return rFm; +//series +} + +float64 float64_ln(float64 rFm) +{ + return rFm; +//series +} + +float64 float64_sin(float64 rFm) +{ + return rFm; +//series +} + +float64 float64_cos(float64 rFm) +{ + return rFm; + //series +} + +#if 0 +float64 float64_arcsin(float64 rFm) +{ +//series +} + +float64 float64_arctan(float64 rFm) +{ + //series +} +#endif + +float64 float64_log(float64 rFm) +{ + return float64_div(float64_ln(rFm),getDoubleConstant(7)); +} + +float64 float64_tan(float64 rFm) +{ + return float64_div(float64_sin(rFm),float64_cos(rFm)); +} + +float64 float64_arccos(float64 rFm) +{ +return rFm; + //return float64_sub(halfPi,float64_arcsin(rFm)); +} + +float64 float64_pow(float64 rFn,float64 rFm) +{ + return float64_exp(float64_mul(rFm,float64_ln(rFn))); +} + +float64 float64_pol(float64 rFn,float64 rFm) +{ + return float64_arctan(float64_div(rFn,rFm)); +} +#endif diff -Nru a/arch/arm26/nwfpe/entry.S b/arch/arm26/nwfpe/entry.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/entry.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,114 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998 + (c) Philip Blundell 1998-1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include + +/* This is the kernel's entry point into the floating point emulator. +It is called from the kernel with code similar to this: + + mov fp, #0 + teqp pc, #PSR_I_BIT | MODE_SVC + ldr r4, .LC2 + ldr pc, [r4] @ Call FP module USR entry point + +The kernel expects the emulator to return via one of two possible +points of return it passes to the emulator. The emulator, if +successful in its emulation, jumps to ret_from_exception and the +kernel takes care of returning control from the trap to the user code. +If the emulator is unable to emulate the instruction, it returns to +fpundefinstr and the kernel halts the user program with a core dump. + +This routine does four things: + +1) It saves SP into a variable called userRegisters. The kernel has +created a struct pt_regs on the stack and saved the user registers +into it. See /usr/include/asm/proc/ptrace.h for details. The +emulator code uses userRegisters as the base of an array of words from +which the contents of the registers can be extracted. + +2) It locates the FP emulator work area within the TSS structure and +points `fpa11' to it. + +3) It calls EmulateAll to emulate a floating point instruction. +EmulateAll returns 1 if the emulation was successful, or 0 if not. + +4) If an instruction has been emulated successfully, it looks ahead at +the next instruction. If it is a floating point instruction, it +executes the instruction, without returning to user space. In this +way it repeatedly looks ahead and executes floating point instructions +until it encounters a non floating point instruction, at which time it +returns via _fpreturn. + +This is done to reduce the effect of the trap overhead on each +floating point instructions. GCC attempts to group floating point +instructions to allow the emulator to spread the cost of the trap over +several floating point instructions. */ + + .globl nwfpe_enter +nwfpe_enter: + mov sl, sp + bl FPA11_CheckInit @ check to see if we are initialised + + ldr r5, [sp, #60] @ get contents of PC + bic r5, r5, #0xfc000003 + ldr r0, [r5, #-4] @ get actual instruction into r0 + bl EmulateAll @ emulate the instruction +1: cmp r0, #0 @ was emulation successful + beq fpundefinstr @ no, return failure + +next: +.Lx1: ldrt r6, [r5], #4 @ get the next instruction and + @ increment PC + + and r2, r6, #0x0F000000 @ test for FP insns + teq r2, #0x0C000000 + teqne r2, #0x0D000000 + teqne r2, #0x0E000000 + bne ret_from_exception @ return ok if not a fp insn + + ldr r9, [sp, #60] @ get new condition codes + and r9, r9, #0xfc000003 + orr r7, r5, r9 + str r7, [sp, #60] @ update PC copy in regs + + mov r0, r6 @ save a copy + mov r1, r9 @ fetch the condition codes + bl checkCondition @ check the condition + cmp r0, #0 @ r0 = 0 ==> condition failed + + @ if condition code failed to match, next insn + beq next @ get the next instruction; + + mov r0, r6 @ prepare for EmulateAll() + adr lr, 1b + orr lr, lr, #3 + b EmulateAll @ if r0 != 0, goto EmulateAll + +.Lret: b ret_from_exception @ let the user eat segfaults + + @ We need to be prepared for the instruction at .Lx1 to fault. + @ Emit the appropriate exception gunk to fix things up. + .section __ex_table,"a" + .align 3 + .long .Lx1 + ldr lr, [lr, $(.Lret - .Lx1)/4] + .previous diff -Nru a/arch/arm26/nwfpe/extended_cpdo.c b/arch/arm26/nwfpe/extended_cpdo.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/extended_cpdo.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,273 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "softfloat.h" +#include "fpopcode.h" + +floatx80 floatx80_exp(floatx80 Fm); +floatx80 floatx80_ln(floatx80 Fm); +floatx80 floatx80_sin(floatx80 rFm); +floatx80 floatx80_cos(floatx80 rFm); +floatx80 floatx80_arcsin(floatx80 rFm); +floatx80 floatx80_arctan(floatx80 rFm); +floatx80 floatx80_log(floatx80 rFm); +floatx80 floatx80_tan(floatx80 rFm); +floatx80 floatx80_arccos(floatx80 rFm); +floatx80 floatx80_pow(floatx80 rFn,floatx80 rFm); +floatx80 floatx80_pol(floatx80 rFn,floatx80 rFm); + +unsigned int ExtendedCPDO(const unsigned int opcode) +{ + FPA11 *fpa11 = GET_FPA11(); + floatx80 rFm, rFn; + unsigned int Fd, Fm, Fn, nRc = 1; + + //printk("ExtendedCPDO(0x%08x)\n",opcode); + + Fm = getFm(opcode); + if (CONSTANT_FM(opcode)) + { + rFm = getExtendedConstant(Fm); + } + else + { + switch (fpa11->fType[Fm]) + { + case typeSingle: + rFm = float32_to_floatx80(fpa11->fpreg[Fm].fSingle); + break; + + case typeDouble: + rFm = float64_to_floatx80(fpa11->fpreg[Fm].fDouble); + break; + + case typeExtended: + rFm = fpa11->fpreg[Fm].fExtended; + break; + + default: return 0; + } + } + + if (!MONADIC_INSTRUCTION(opcode)) + { + Fn = getFn(opcode); + switch (fpa11->fType[Fn]) + { + case typeSingle: + rFn = float32_to_floatx80(fpa11->fpreg[Fn].fSingle); + break; + + case typeDouble: + rFn = float64_to_floatx80(fpa11->fpreg[Fn].fDouble); + break; + + case typeExtended: + rFn = fpa11->fpreg[Fn].fExtended; + break; + + default: return 0; + } + } + + Fd = getFd(opcode); + switch (opcode & MASK_ARITHMETIC_OPCODE) + { + /* dyadic opcodes */ + case ADF_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_add(rFn,rFm); + break; + + case MUF_CODE: + case FML_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_mul(rFn,rFm); + break; + + case SUF_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_sub(rFn,rFm); + break; + + case RSF_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_sub(rFm,rFn); + break; + + case DVF_CODE: + case FDV_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_div(rFn,rFm); + break; + + case RDF_CODE: + case FRD_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_div(rFm,rFn); + break; + +#if 0 + case POW_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_pow(rFn,rFm); + break; + + case RPW_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_pow(rFm,rFn); + break; +#endif + + case RMF_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_rem(rFn,rFm); + break; + +#if 0 + case POL_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_pol(rFn,rFm); + break; +#endif + + /* monadic opcodes */ + case MVF_CODE: + fpa11->fpreg[Fd].fExtended = rFm; + break; + + case MNF_CODE: + rFm.high ^= 0x8000; + fpa11->fpreg[Fd].fExtended = rFm; + break; + + case ABS_CODE: + rFm.high &= 0x7fff; + fpa11->fpreg[Fd].fExtended = rFm; + break; + + case RND_CODE: + case URD_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_round_to_int(rFm); + break; + + case SQT_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_sqrt(rFm); + break; + +#if 0 + case LOG_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_log(rFm); + break; + + case LGN_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_ln(rFm); + break; + + case EXP_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_exp(rFm); + break; + + case SIN_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_sin(rFm); + break; + + case COS_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_cos(rFm); + break; + + case TAN_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_tan(rFm); + break; + + case ASN_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_arcsin(rFm); + break; + + case ACS_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_arccos(rFm); + break; + + case ATN_CODE: + fpa11->fpreg[Fd].fExtended = floatx80_arctan(rFm); + break; +#endif + + case NRM_CODE: + break; + + default: + { + nRc = 0; + } + } + + if (0 != nRc) fpa11->fType[Fd] = typeExtended; + return nRc; +} + +#if 0 +floatx80 floatx80_exp(floatx80 Fm) +{ +//series +} + +floatx80 floatx80_ln(floatx80 Fm) +{ +//series +} + +floatx80 floatx80_sin(floatx80 rFm) +{ +//series +} + +floatx80 floatx80_cos(floatx80 rFm) +{ +//series +} + +floatx80 floatx80_arcsin(floatx80 rFm) +{ +//series +} + +floatx80 floatx80_arctan(floatx80 rFm) +{ + //series +} + +floatx80 floatx80_log(floatx80 rFm) +{ + return floatx80_div(floatx80_ln(rFm),getExtendedConstant(7)); +} + +floatx80 floatx80_tan(floatx80 rFm) +{ + return floatx80_div(floatx80_sin(rFm),floatx80_cos(rFm)); +} + +floatx80 floatx80_arccos(floatx80 rFm) +{ + //return floatx80_sub(halfPi,floatx80_arcsin(rFm)); +} + +floatx80 floatx80_pow(floatx80 rFn,floatx80 rFm) +{ + return floatx80_exp(floatx80_mul(rFm,floatx80_ln(rFn))); +} + +floatx80 floatx80_pol(floatx80 rFn,floatx80 rFm) +{ + return floatx80_arctan(floatx80_div(rFn,rFm)); +} +#endif diff -Nru a/arch/arm26/nwfpe/fpa11.c b/arch/arm26/nwfpe/fpa11.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpa11.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,221 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "fpopcode.h" + +#include "fpmodule.h" +#include "fpmodule.inl" + +#include +#include + +/* forward declarations */ +unsigned int EmulateCPDO(const unsigned int); +unsigned int EmulateCPDT(const unsigned int); +unsigned int EmulateCPRT(const unsigned int); + +/* Reset the FPA11 chip. Called to initialize and reset the emulator. */ +void resetFPA11(void) +{ + int i; + FPA11 *fpa11 = GET_FPA11(); + + /* initialize the register type array */ + for (i=0;i<=7;i++) + { + fpa11->fType[i] = typeNone; + } + + /* FPSR: set system id to FP_EMULATOR, set AC, clear all other bits */ + fpa11->fpsr = FP_EMULATOR | BIT_AC; + + /* FPCR: set SB, AB and DA bits, clear all others */ +#if MAINTAIN_FPCR + fpa11->fpcr = MASK_RESET; +#endif +} + +void SetRoundingMode(const unsigned int opcode) +{ +#if MAINTAIN_FPCR + FPA11 *fpa11 = GET_FPA11(); + fpa11->fpcr &= ~MASK_ROUNDING_MODE; +#endif + switch (opcode & MASK_ROUNDING_MODE) + { + default: + case ROUND_TO_NEAREST: + float_rounding_mode = float_round_nearest_even; +#if MAINTAIN_FPCR + fpa11->fpcr |= ROUND_TO_NEAREST; +#endif + break; + + case ROUND_TO_PLUS_INFINITY: + float_rounding_mode = float_round_up; +#if MAINTAIN_FPCR + fpa11->fpcr |= ROUND_TO_PLUS_INFINITY; +#endif + break; + + case ROUND_TO_MINUS_INFINITY: + float_rounding_mode = float_round_down; +#if MAINTAIN_FPCR + fpa11->fpcr |= ROUND_TO_MINUS_INFINITY; +#endif + break; + + case ROUND_TO_ZERO: + float_rounding_mode = float_round_to_zero; +#if MAINTAIN_FPCR + fpa11->fpcr |= ROUND_TO_ZERO; +#endif + break; + } +} + +void SetRoundingPrecision(const unsigned int opcode) +{ +#if MAINTAIN_FPCR + FPA11 *fpa11 = GET_FPA11(); + fpa11->fpcr &= ~MASK_ROUNDING_PRECISION; +#endif + switch (opcode & MASK_ROUNDING_PRECISION) + { + case ROUND_SINGLE: + floatx80_rounding_precision = 32; +#if MAINTAIN_FPCR + fpa11->fpcr |= ROUND_SINGLE; +#endif + break; + + case ROUND_DOUBLE: + floatx80_rounding_precision = 64; +#if MAINTAIN_FPCR + fpa11->fpcr |= ROUND_DOUBLE; +#endif + break; + + case ROUND_EXTENDED: + floatx80_rounding_precision = 80; +#if MAINTAIN_FPCR + fpa11->fpcr |= ROUND_EXTENDED; +#endif + break; + + default: floatx80_rounding_precision = 80; + } +} + +void FPA11_CheckInit(void) +{ + FPA11 *fpa11 = GET_FPA11(); + if (unlikely(fpa11->initflag == 0)) + { + resetFPA11(); + SetRoundingMode(ROUND_TO_NEAREST); + SetRoundingPrecision(ROUND_EXTENDED); + fpa11->initflag = 1; + } +} + +/* Emulate the instruction in the opcode. */ +unsigned int EmulateAll(unsigned int opcode) +{ + unsigned int nRc = 1, code; + + code = opcode & 0x00000f00; + if (code == 0x00000100 || code == 0x00000200) + { + /* For coprocessor 1 or 2 (FPA11) */ + code = opcode & 0x0e000000; + if (code == 0x0e000000) + { + if (opcode & 0x00000010) + { + /* Emulate conversion opcodes. */ + /* Emulate register transfer opcodes. */ + /* Emulate comparison opcodes. */ + nRc = EmulateCPRT(opcode); + } + else + { + /* Emulate monadic arithmetic opcodes. */ + /* Emulate dyadic arithmetic opcodes. */ + nRc = EmulateCPDO(opcode); + } + } + else if (code == 0x0c000000) + { + /* Emulate load/store opcodes. */ + /* Emulate load/store multiple opcodes. */ + nRc = EmulateCPDT(opcode); + } + else + { + /* Invalid instruction detected. Return FALSE. */ + nRc = 0; + } + } + + return(nRc); +} + +#if 0 +unsigned int EmulateAll1(unsigned int opcode) +{ + switch ((opcode >> 24) & 0xf) + { + case 0xc: + case 0xd: + if ((opcode >> 20) & 0x1) + { + switch ((opcode >> 8) & 0xf) + { + case 0x1: return PerformLDF(opcode); break; + case 0x2: return PerformLFM(opcode); break; + default: return 0; + } + } + else + { + switch ((opcode >> 8) & 0xf) + { + case 0x1: return PerformSTF(opcode); break; + case 0x2: return PerformSFM(opcode); break; + default: return 0; + } + } + break; + + case 0xe: + if (opcode & 0x10) + return EmulateCPDO(opcode); + else + return EmulateCPRT(opcode); + break; + + default: return 0; + } +} +#endif + diff -Nru a/arch/arm26/nwfpe/fpa11.h b/arch/arm26/nwfpe/fpa11.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpa11.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,87 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.com, 1998-1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef __FPA11_H__ +#define __FPA11_H__ + +#define GET_FPA11() ((FPA11 *)(¤t_thread_info()->fpstate)) + +/* + * The processes registers are always at the very top of the 8K + * stack+task struct. Use the same method as 'current' uses to + * reach them. + */ +register unsigned int *user_registers asm("sl"); + +#define GET_USERREG() (user_registers) + +#include + +/* includes */ +#include "fpsr.h" /* FP control and status register definitions */ +#include "softfloat.h" + +#define typeNone 0x00 +#define typeSingle 0x01 +#define typeDouble 0x02 +#define typeExtended 0x03 + +/* + * This must be no more and no less than 12 bytes. + */ +typedef union tagFPREG { + floatx80 fExtended; + float64 fDouble; + float32 fSingle; +} FPREG; + +/* + * FPA11 device model. + * + * This structure is exported to user space. Do not re-order. + * Only add new stuff to the end, and do not change the size of + * any element. Elements of this structure are used by user + * space, and must match struct user_fp in include/asm-arm/user.h. + * We include the byte offsets below for documentation purposes. + * + * The size of this structure and FPREG are checked by fpmodule.c + * on initialisation. If the rules have been broken, NWFPE will + * not initialise. + */ +typedef struct tagFPA11 { +/* 0 */ FPREG fpreg[8]; /* 8 floating point registers */ +/* 96 */ FPSR fpsr; /* floating point status register */ +/* 100 */ FPCR fpcr; /* floating point control register */ +/* 104 */ unsigned char fType[8]; /* type of floating point value held in + floating point registers. One of none + single, double or extended. */ +/* 112 */ int initflag; /* this is special. The kernel guarantees + to set it to 0 when a thread is launched, + so we can use it to detect whether this + instance of the emulator needs to be + initialised. */ +} FPA11; + +extern void resetFPA11(void); +extern void SetRoundingMode(const unsigned int); +extern void SetRoundingPrecision(const unsigned int); + +#endif diff -Nru a/arch/arm26/nwfpe/fpa11.inl b/arch/arm26/nwfpe/fpa11.inl --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpa11.inl Fri Jun 13 01:07:45 2003 @@ -0,0 +1,51 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" + +/* Read and write floating point status register */ +extern __inline__ unsigned int readFPSR(void) +{ + FPA11 *fpa11 = GET_FPA11(); + return(fpa11->fpsr); +} + +extern __inline__ void writeFPSR(FPSR reg) +{ + FPA11 *fpa11 = GET_FPA11(); + /* the sysid byte in the status register is readonly */ + fpa11->fpsr = (fpa11->fpsr & MASK_SYSID) | (reg & ~MASK_SYSID); +} + +/* Read and write floating point control register */ +extern __inline__ FPCR readFPCR(void) +{ + FPA11 *fpa11 = GET_FPA11(); + /* clear SB, AB and DA bits before returning FPCR */ + return(fpa11->fpcr & ~MASK_RFC); +} + +extern __inline__ void writeFPCR(FPCR reg) +{ + FPA11 *fpa11 = GET_FPA11(); + fpa11->fpcr &= ~MASK_WFC; /* clear SB, AB and DA bits */ + fpa11->fpcr |= (reg & MASK_WFC); /* write SB, AB and DA bits */ +} diff -Nru a/arch/arm26/nwfpe/fpa11_cpdo.c b/arch/arm26/nwfpe/fpa11_cpdo.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpa11_cpdo.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,117 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "fpopcode.h" + +unsigned int SingleCPDO(const unsigned int opcode); +unsigned int DoubleCPDO(const unsigned int opcode); +unsigned int ExtendedCPDO(const unsigned int opcode); + +unsigned int EmulateCPDO(const unsigned int opcode) +{ + FPA11 *fpa11 = GET_FPA11(); + unsigned int Fd, nType, nDest, nRc = 1; + + //printk("EmulateCPDO(0x%08x)\n",opcode); + + /* Get the destination size. If not valid let Linux perform + an invalid instruction trap. */ + nDest = getDestinationSize(opcode); + if (typeNone == nDest) return 0; + + SetRoundingMode(opcode); + + /* Compare the size of the operands in Fn and Fm. + Choose the largest size and perform operations in that size, + in order to make use of all the precision of the operands. + If Fm is a constant, we just grab a constant of a size + matching the size of the operand in Fn. */ + if (MONADIC_INSTRUCTION(opcode)) + nType = nDest; + else + nType = fpa11->fType[getFn(opcode)]; + + if (!CONSTANT_FM(opcode)) + { + register unsigned int Fm = getFm(opcode); + if (nType < fpa11->fType[Fm]) + { + nType = fpa11->fType[Fm]; + } + } + + switch (nType) + { + case typeSingle : nRc = SingleCPDO(opcode); break; + case typeDouble : nRc = DoubleCPDO(opcode); break; + case typeExtended : nRc = ExtendedCPDO(opcode); break; + default : nRc = 0; + } + + /* If the operation succeeded, check to see if the result in the + destination register is the correct size. If not force it + to be. */ + Fd = getFd(opcode); + nType = fpa11->fType[Fd]; + if ((0 != nRc) && (nDest != nType)) + { + switch (nDest) + { + case typeSingle: + { + if (typeDouble == nType) + fpa11->fpreg[Fd].fSingle = + float64_to_float32(fpa11->fpreg[Fd].fDouble); + else + fpa11->fpreg[Fd].fSingle = + floatx80_to_float32(fpa11->fpreg[Fd].fExtended); + } + break; + + case typeDouble: + { + if (typeSingle == nType) + fpa11->fpreg[Fd].fDouble = + float32_to_float64(fpa11->fpreg[Fd].fSingle); + else + fpa11->fpreg[Fd].fDouble = + floatx80_to_float64(fpa11->fpreg[Fd].fExtended); + } + break; + + case typeExtended: + { + if (typeSingle == nType) + fpa11->fpreg[Fd].fExtended = + float32_to_floatx80(fpa11->fpreg[Fd].fSingle); + else + fpa11->fpreg[Fd].fExtended = + float64_to_floatx80(fpa11->fpreg[Fd].fDouble); + } + break; + } + + fpa11->fType[Fd] = nDest; + } + + return nRc; +} diff -Nru a/arch/arm26/nwfpe/fpa11_cpdt.c b/arch/arm26/nwfpe/fpa11_cpdt.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpa11_cpdt.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,368 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.com, 1998-1999 + (c) Philip Blundell, 1998 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "softfloat.h" +#include "fpopcode.h" +#include "fpmodule.h" +#include "fpmodule.inl" + +#include + +static inline +void loadSingle(const unsigned int Fn,const unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + fpa11->fType[Fn] = typeSingle; + get_user(fpa11->fpreg[Fn].fSingle, pMem); +} + +static inline +void loadDouble(const unsigned int Fn,const unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + unsigned int *p; + p = (unsigned int*)&fpa11->fpreg[Fn].fDouble; + fpa11->fType[Fn] = typeDouble; + get_user(p[0], &pMem[1]); + get_user(p[1], &pMem[0]); /* sign & exponent */ +} + +static inline +void loadExtended(const unsigned int Fn,const unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + unsigned int *p; + p = (unsigned int*)&fpa11->fpreg[Fn].fExtended; + fpa11->fType[Fn] = typeExtended; + get_user(p[0], &pMem[0]); /* sign & exponent */ + get_user(p[1], &pMem[2]); /* ls bits */ + get_user(p[2], &pMem[1]); /* ms bits */ +} + +static inline +void loadMultiple(const unsigned int Fn,const unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + register unsigned int *p; + unsigned long x; + + p = (unsigned int*)&(fpa11->fpreg[Fn]); + get_user(x, &pMem[0]); + fpa11->fType[Fn] = (x >> 14) & 0x00000003; + + switch (fpa11->fType[Fn]) + { + case typeSingle: + case typeDouble: + { + get_user(p[0], &pMem[2]); /* Single */ + get_user(p[1], &pMem[1]); /* double msw */ + p[2] = 0; /* empty */ + } + break; + + case typeExtended: + { + get_user(p[1], &pMem[2]); + get_user(p[2], &pMem[1]); /* msw */ + p[0] = (x & 0x80003fff); + } + break; + } +} + +static inline +void storeSingle(const unsigned int Fn,unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + union + { + float32 f; + unsigned int i[1]; + } val; + + switch (fpa11->fType[Fn]) + { + case typeDouble: + val.f = float64_to_float32(fpa11->fpreg[Fn].fDouble); + break; + + case typeExtended: + val.f = floatx80_to_float32(fpa11->fpreg[Fn].fExtended); + break; + + default: val.f = fpa11->fpreg[Fn].fSingle; + } + + put_user(val.i[0], pMem); +} + +static inline +void storeDouble(const unsigned int Fn,unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + union + { + float64 f; + unsigned int i[2]; + } val; + + switch (fpa11->fType[Fn]) + { + case typeSingle: + val.f = float32_to_float64(fpa11->fpreg[Fn].fSingle); + break; + + case typeExtended: + val.f = floatx80_to_float64(fpa11->fpreg[Fn].fExtended); + break; + + default: val.f = fpa11->fpreg[Fn].fDouble; + } + + put_user(val.i[1], &pMem[0]); /* msw */ + put_user(val.i[0], &pMem[1]); /* lsw */ +} + +static inline +void storeExtended(const unsigned int Fn,unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + union + { + floatx80 f; + unsigned int i[3]; + } val; + + switch (fpa11->fType[Fn]) + { + case typeSingle: + val.f = float32_to_floatx80(fpa11->fpreg[Fn].fSingle); + break; + + case typeDouble: + val.f = float64_to_floatx80(fpa11->fpreg[Fn].fDouble); + break; + + default: val.f = fpa11->fpreg[Fn].fExtended; + } + + put_user(val.i[0], &pMem[0]); /* sign & exp */ + put_user(val.i[1], &pMem[2]); + put_user(val.i[2], &pMem[1]); /* msw */ +} + +static inline +void storeMultiple(const unsigned int Fn,unsigned int *pMem) +{ + FPA11 *fpa11 = GET_FPA11(); + register unsigned int nType, *p; + + p = (unsigned int*)&(fpa11->fpreg[Fn]); + nType = fpa11->fType[Fn]; + + switch (nType) + { + case typeSingle: + case typeDouble: + { + put_user(p[0], &pMem[2]); /* single */ + put_user(p[1], &pMem[1]); /* double msw */ + put_user(nType << 14, &pMem[0]); + } + break; + + case typeExtended: + { + put_user(p[2], &pMem[1]); /* msw */ + put_user(p[1], &pMem[2]); + put_user((p[0] & 0x80003fff) | (nType << 14), &pMem[0]); + } + break; + } +} + +unsigned int PerformLDF(const unsigned int opcode) +{ + unsigned int *pBase, *pAddress, *pFinal, nRc = 1, + write_back = WRITE_BACK(opcode); + + //printk("PerformLDF(0x%08x), Fd = 0x%08x\n",opcode,getFd(opcode)); + + pBase = (unsigned int*)readRegister(getRn(opcode)); + if (REG_PC == getRn(opcode)) + { + pBase += 2; + write_back = 0; + } + + pFinal = pBase; + if (BIT_UP_SET(opcode)) + pFinal += getOffset(opcode); + else + pFinal -= getOffset(opcode); + + if (PREINDEXED(opcode)) pAddress = pFinal; else pAddress = pBase; + + switch (opcode & MASK_TRANSFER_LENGTH) + { + case TRANSFER_SINGLE : loadSingle(getFd(opcode),pAddress); break; + case TRANSFER_DOUBLE : loadDouble(getFd(opcode),pAddress); break; + case TRANSFER_EXTENDED: loadExtended(getFd(opcode),pAddress); break; + default: nRc = 0; + } + + if (write_back) writeRegister(getRn(opcode),(unsigned int)pFinal); + return nRc; +} + +unsigned int PerformSTF(const unsigned int opcode) +{ + unsigned int *pBase, *pAddress, *pFinal, nRc = 1, + write_back = WRITE_BACK(opcode); + + //printk("PerformSTF(0x%08x), Fd = 0x%08x\n",opcode,getFd(opcode)); + SetRoundingMode(ROUND_TO_NEAREST); + + pBase = (unsigned int*)readRegister(getRn(opcode)); + if (REG_PC == getRn(opcode)) + { + pBase += 2; + write_back = 0; + } + + pFinal = pBase; + if (BIT_UP_SET(opcode)) + pFinal += getOffset(opcode); + else + pFinal -= getOffset(opcode); + + if (PREINDEXED(opcode)) pAddress = pFinal; else pAddress = pBase; + + switch (opcode & MASK_TRANSFER_LENGTH) + { + case TRANSFER_SINGLE : storeSingle(getFd(opcode),pAddress); break; + case TRANSFER_DOUBLE : storeDouble(getFd(opcode),pAddress); break; + case TRANSFER_EXTENDED: storeExtended(getFd(opcode),pAddress); break; + default: nRc = 0; + } + + if (write_back) writeRegister(getRn(opcode),(unsigned int)pFinal); + return nRc; +} + +unsigned int PerformLFM(const unsigned int opcode) +{ + unsigned int i, Fd, *pBase, *pAddress, *pFinal, + write_back = WRITE_BACK(opcode); + + pBase = (unsigned int*)readRegister(getRn(opcode)); + if (REG_PC == getRn(opcode)) + { + pBase += 2; + write_back = 0; + } + + pFinal = pBase; + if (BIT_UP_SET(opcode)) + pFinal += getOffset(opcode); + else + pFinal -= getOffset(opcode); + + if (PREINDEXED(opcode)) pAddress = pFinal; else pAddress = pBase; + + Fd = getFd(opcode); + for (i=getRegisterCount(opcode);i>0;i--) + { + loadMultiple(Fd,pAddress); + pAddress += 3; Fd++; + if (Fd == 8) Fd = 0; + } + + if (write_back) writeRegister(getRn(opcode),(unsigned int)pFinal); + return 1; +} + +unsigned int PerformSFM(const unsigned int opcode) +{ + unsigned int i, Fd, *pBase, *pAddress, *pFinal, + write_back = WRITE_BACK(opcode); + + pBase = (unsigned int*)readRegister(getRn(opcode)); + if (REG_PC == getRn(opcode)) + { + pBase += 2; + write_back = 0; + } + + pFinal = pBase; + if (BIT_UP_SET(opcode)) + pFinal += getOffset(opcode); + else + pFinal -= getOffset(opcode); + + if (PREINDEXED(opcode)) pAddress = pFinal; else pAddress = pBase; + + Fd = getFd(opcode); + for (i=getRegisterCount(opcode);i>0;i--) + { + storeMultiple(Fd,pAddress); + pAddress += 3; Fd++; + if (Fd == 8) Fd = 0; + } + + if (write_back) writeRegister(getRn(opcode),(unsigned int)pFinal); + return 1; +} + +#if 1 +unsigned int EmulateCPDT(const unsigned int opcode) +{ + unsigned int nRc = 0; + + //printk("EmulateCPDT(0x%08x)\n",opcode); + + if (LDF_OP(opcode)) + { + nRc = PerformLDF(opcode); + } + else if (LFM_OP(opcode)) + { + nRc = PerformLFM(opcode); + } + else if (STF_OP(opcode)) + { + nRc = PerformSTF(opcode); + } + else if (SFM_OP(opcode)) + { + nRc = PerformSFM(opcode); + } + else + { + nRc = 0; + } + + return nRc; +} +#endif diff -Nru a/arch/arm26/nwfpe/fpa11_cprt.c b/arch/arm26/nwfpe/fpa11_cprt.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpa11_cprt.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,289 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + (c) Philip Blundell, 1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "milieu.h" +#include "softfloat.h" +#include "fpopcode.h" +#include "fpa11.inl" +#include "fpmodule.h" +#include "fpmodule.inl" + +extern flag floatx80_is_nan(floatx80); +extern flag float64_is_nan( float64); +extern flag float32_is_nan( float32); + +void SetRoundingMode(const unsigned int opcode); + +unsigned int PerformFLT(const unsigned int opcode); +unsigned int PerformFIX(const unsigned int opcode); + +static unsigned int +PerformComparison(const unsigned int opcode); + +unsigned int EmulateCPRT(const unsigned int opcode) +{ + unsigned int nRc = 1; + + //printk("EmulateCPRT(0x%08x)\n",opcode); + + if (opcode & 0x800000) + { + /* This is some variant of a comparison (PerformComparison will + sort out which one). Since most of the other CPRT + instructions are oddball cases of some sort or other it makes + sense to pull this out into a fast path. */ + return PerformComparison(opcode); + } + + /* Hint to GCC that we'd like a jump table rather than a load of CMPs */ + switch ((opcode & 0x700000) >> 20) + { + case FLT_CODE >> 20: nRc = PerformFLT(opcode); break; + case FIX_CODE >> 20: nRc = PerformFIX(opcode); break; + + case WFS_CODE >> 20: writeFPSR(readRegister(getRd(opcode))); break; + case RFS_CODE >> 20: writeRegister(getRd(opcode),readFPSR()); break; + +#if 0 /* We currently have no use for the FPCR, so there's no point + in emulating it. */ + case WFC_CODE >> 20: writeFPCR(readRegister(getRd(opcode))); + case RFC_CODE >> 20: writeRegister(getRd(opcode),readFPCR()); break; +#endif + + default: nRc = 0; + } + + return nRc; +} + +unsigned int PerformFLT(const unsigned int opcode) +{ + FPA11 *fpa11 = GET_FPA11(); + + unsigned int nRc = 1; + SetRoundingMode(opcode); + + switch (opcode & MASK_ROUNDING_PRECISION) + { + case ROUND_SINGLE: + { + fpa11->fType[getFn(opcode)] = typeSingle; + fpa11->fpreg[getFn(opcode)].fSingle = + int32_to_float32(readRegister(getRd(opcode))); + } + break; + + case ROUND_DOUBLE: + { + fpa11->fType[getFn(opcode)] = typeDouble; + fpa11->fpreg[getFn(opcode)].fDouble = + int32_to_float64(readRegister(getRd(opcode))); + } + break; + + case ROUND_EXTENDED: + { + fpa11->fType[getFn(opcode)] = typeExtended; + fpa11->fpreg[getFn(opcode)].fExtended = + int32_to_floatx80(readRegister(getRd(opcode))); + } + break; + + default: nRc = 0; + } + + return nRc; +} + +unsigned int PerformFIX(const unsigned int opcode) +{ + FPA11 *fpa11 = GET_FPA11(); + unsigned int nRc = 1; + unsigned int Fn = getFm(opcode); + + SetRoundingMode(opcode); + + switch (fpa11->fType[Fn]) + { + case typeSingle: + { + writeRegister(getRd(opcode), + float32_to_int32(fpa11->fpreg[Fn].fSingle)); + } + break; + + case typeDouble: + { + writeRegister(getRd(opcode), + float64_to_int32(fpa11->fpreg[Fn].fDouble)); + } + break; + + case typeExtended: + { + writeRegister(getRd(opcode), + floatx80_to_int32(fpa11->fpreg[Fn].fExtended)); + } + break; + + default: nRc = 0; + } + + return nRc; +} + + +static unsigned int __inline__ +PerformComparisonOperation(floatx80 Fn, floatx80 Fm) +{ + unsigned int flags = 0; + + /* test for less than condition */ + if (floatx80_lt(Fn,Fm)) + { + flags |= CC_NEGATIVE; + } + + /* test for equal condition */ + if (floatx80_eq(Fn,Fm)) + { + flags |= CC_ZERO; + } + + /* test for greater than or equal condition */ + if (floatx80_lt(Fm,Fn)) + { + flags |= CC_CARRY; + } + + writeConditionCodes(flags); + return 1; +} + +/* This instruction sets the flags N, Z, C, V in the FPSR. */ + +static unsigned int PerformComparison(const unsigned int opcode) +{ + FPA11 *fpa11 = GET_FPA11(); + unsigned int Fn, Fm; + floatx80 rFn, rFm; + int e_flag = opcode & 0x400000; /* 1 if CxFE */ + int n_flag = opcode & 0x200000; /* 1 if CNxx */ + unsigned int flags = 0; + + //printk("PerformComparison(0x%08x)\n",opcode); + + Fn = getFn(opcode); + Fm = getFm(opcode); + + /* Check for unordered condition and convert all operands to 80-bit + format. + ?? Might be some mileage in avoiding this conversion if possible. + Eg, if both operands are 32-bit, detect this and do a 32-bit + comparison (cheaper than an 80-bit one). */ + switch (fpa11->fType[Fn]) + { + case typeSingle: + //printk("single.\n"); + if (float32_is_nan(fpa11->fpreg[Fn].fSingle)) + goto unordered; + rFn = float32_to_floatx80(fpa11->fpreg[Fn].fSingle); + break; + + case typeDouble: + //printk("double.\n"); + if (float64_is_nan(fpa11->fpreg[Fn].fDouble)) + goto unordered; + rFn = float64_to_floatx80(fpa11->fpreg[Fn].fDouble); + break; + + case typeExtended: + //printk("extended.\n"); + if (floatx80_is_nan(fpa11->fpreg[Fn].fExtended)) + goto unordered; + rFn = fpa11->fpreg[Fn].fExtended; + break; + + default: return 0; + } + + if (CONSTANT_FM(opcode)) + { + //printk("Fm is a constant: #%d.\n",Fm); + rFm = getExtendedConstant(Fm); + if (floatx80_is_nan(rFm)) + goto unordered; + } + else + { + //printk("Fm = r%d which contains a ",Fm); + switch (fpa11->fType[Fm]) + { + case typeSingle: + //printk("single.\n"); + if (float32_is_nan(fpa11->fpreg[Fm].fSingle)) + goto unordered; + rFm = float32_to_floatx80(fpa11->fpreg[Fm].fSingle); + break; + + case typeDouble: + //printk("double.\n"); + if (float64_is_nan(fpa11->fpreg[Fm].fDouble)) + goto unordered; + rFm = float64_to_floatx80(fpa11->fpreg[Fm].fDouble); + break; + + case typeExtended: + //printk("extended.\n"); + if (floatx80_is_nan(fpa11->fpreg[Fm].fExtended)) + goto unordered; + rFm = fpa11->fpreg[Fm].fExtended; + break; + + default: return 0; + } + } + + if (n_flag) + { + rFm.high ^= 0x8000; + } + + return PerformComparisonOperation(rFn,rFm); + + unordered: + /* ?? The FPA data sheet is pretty vague about this, in particular + about whether the non-E comparisons can ever raise exceptions. + This implementation is based on a combination of what it says in + the data sheet, observation of how the Acorn emulator actually + behaves (and how programs expect it to) and guesswork. */ + flags |= CC_OVERFLOW; + flags &= ~(CC_ZERO | CC_NEGATIVE); + + if (BIT_AC & readFPSR()) flags |= CC_CARRY; + + if (e_flag) float_raise(float_flag_invalid); + + writeConditionCodes(flags); + return 1; +} diff -Nru a/arch/arm26/nwfpe/fpmodule.c b/arch/arm26/nwfpe/fpmodule.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpmodule.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,182 @@ + +/* + NetWinder Floating Point Emulator + (c) Rebel.com, 1998-1999 + (c) Philip Blundell, 1998-1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" + +#include +#include +#include + +/* XXX */ +#include +#include +#include +#include +#include +#include +/* XXX */ + +#include "softfloat.h" +#include "fpopcode.h" +#include "fpmodule.h" +#include "fpa11.inl" + +/* kernel symbols required for signal handling */ +typedef struct task_struct* PTASK; + +#ifdef MODULE +void fp_send_sig(unsigned long sig, PTASK p, int priv); +#if LINUX_VERSION_CODE > 0x20115 +MODULE_AUTHOR("Scott Bambrough "); +MODULE_DESCRIPTION("NWFPE floating point emulator"); +#endif + +#else +#define fp_send_sig send_sig +#define kern_fp_enter fp_enter + +extern char fpe_type[]; +#endif + +/* kernel function prototypes required */ +void fp_setup(void); + +/* external declarations for saved kernel symbols */ +extern void (*kern_fp_enter)(void); + +/* Original value of fp_enter from kernel before patched by fpe_init. */ +static void (*orig_fp_enter)(void); + +/* forward declarations */ +extern void nwfpe_enter(void); + +#ifdef MODULE +/* + * Return 0 if we can be unloaded. This can only happen if + * kern_fp_enter is still pointing at nwfpe_enter + */ +static int fpe_unload(void) +{ + return (kern_fp_enter == nwfpe_enter) ? 0 : 1; +} +#endif + +static int __init fpe_init(void) +{ + if (sizeof(FPA11) > sizeof(union fp_state)) { + printk(KERN_ERR "nwfpe: bad structure size\n"); + return -EINVAL; + } + + if (sizeof(FPREG) != 12) { + printk(KERN_ERR "nwfpe: bad register size\n"); + return -EINVAL; + } + +#ifdef MODULE + if (!mod_member_present(&__this_module, can_unload)) + return -EINVAL; + __this_module.can_unload = fpe_unload; +#else + if (fpe_type[0] && strcmp(fpe_type, "nwfpe")) + return 0; +#endif + + /* Display title, version and copyright information. */ + printk(KERN_WARNING "NetWinder Floating Point Emulator V0.95 " + "(c) 1998-1999 Rebel.com\n"); + + /* Save pointer to the old FP handler and then patch ourselves in */ + orig_fp_enter = kern_fp_enter; + kern_fp_enter = nwfpe_enter; + + return 0; +} + +static void __exit fpe_exit(void) +{ + /* Restore the values we saved earlier. */ + kern_fp_enter = orig_fp_enter; +} + +/* +ScottB: November 4, 1998 + +Moved this function out of softfloat-specialize into fpmodule.c. +This effectively isolates all the changes required for integrating with the +Linux kernel into fpmodule.c. Porting to NetBSD should only require modifying +fpmodule.c to integrate with the NetBSD kernel (I hope!). + +[1/1/99: Not quite true any more unfortunately. There is Linux-specific +code to access data in user space in some other source files at the +moment (grep for get_user / put_user calls). --philb] + +float_exception_flags is a global variable in SoftFloat. + +This function is called by the SoftFloat routines to raise a floating +point exception. We check the trap enable byte in the FPSR, and raise +a SIGFPE exception if necessary. If not the relevant bits in the +cumulative exceptions flag byte are set and we return. +*/ + +void float_raise(signed char flags) +{ + register unsigned int fpsr, cumulativeTraps; + +#ifdef CONFIG_DEBUG_USER + printk(KERN_DEBUG "NWFPE: %s[%d] takes exception %08x at %p from %08x\n", + current->comm, current->pid, flags, + __builtin_return_address(0), GET_USERREG()[15]); +#endif + + /* Keep SoftFloat exception flags up to date. */ + float_exception_flags |= flags; + + /* Read fpsr and initialize the cumulativeTraps. */ + fpsr = readFPSR(); + cumulativeTraps = 0; + + /* For each type of exception, the cumulative trap exception bit is only + set if the corresponding trap enable bit is not set. */ + if ((!(fpsr & BIT_IXE)) && (flags & BIT_IXC)) + cumulativeTraps |= BIT_IXC; + if ((!(fpsr & BIT_UFE)) && (flags & BIT_UFC)) + cumulativeTraps |= BIT_UFC; + if ((!(fpsr & BIT_OFE)) && (flags & BIT_OFC)) + cumulativeTraps |= BIT_OFC; + if ((!(fpsr & BIT_DZE)) && (flags & BIT_DZC)) + cumulativeTraps |= BIT_DZC; + if ((!(fpsr & BIT_IOE)) && (flags & BIT_IOC)) + cumulativeTraps |= BIT_IOC; + + /* Set the cumulative exceptions flags. */ + if (cumulativeTraps) + writeFPSR(fpsr | cumulativeTraps); + + /* Raise an exception if necessary. */ + if (fpsr & (flags << 16)) + fp_send_sig(SIGFPE, current, 1); +} + +module_init(fpe_init); +module_exit(fpe_exit); diff -Nru a/arch/arm26/nwfpe/fpmodule.h b/arch/arm26/nwfpe/fpmodule.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpmodule.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,47 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.com, 1998-1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef __FPMODULE_H__ +#define __FPMODULE_H__ + +#include + +#define REG_ORIG_R0 16 +#define REG_CPSR 15 +#define REG_PC 15 +#define REG_LR 14 +#define REG_SP 13 +#define REG_IP 12 +#define REG_FP 11 +#define REG_R10 10 +#define REG_R9 9 +#define REG_R9 9 +#define REG_R8 8 +#define REG_R7 7 +#define REG_R6 6 +#define REG_R5 5 +#define REG_R4 4 +#define REG_R3 3 +#define REG_R2 2 +#define REG_R1 1 +#define REG_R0 0 + +#endif diff -Nru a/arch/arm26/nwfpe/fpmodule.inl b/arch/arm26/nwfpe/fpmodule.inl --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpmodule.inl Fri Jun 13 01:07:45 2003 @@ -0,0 +1,84 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +extern __inline__ +unsigned int readRegister(const unsigned int nReg) +{ + /* Note: The CPU thinks it has dealt with the current instruction. As + a result the program counter has been advanced to the next + instruction, and points 4 bytes beyond the actual instruction + that caused the invalid instruction trap to occur. We adjust + for this in this routine. LDF/STF instructions with Rn = PC + depend on the PC being correct, as they use PC+8 in their + address calculations. */ + unsigned int *userRegisters = GET_USERREG(); + unsigned int val = userRegisters[nReg]; + if (REG_PC == nReg) val -= 4; + return val; +} + +extern __inline__ +void writeRegister(const unsigned int nReg, const unsigned int val) +{ + unsigned int *userRegisters = GET_USERREG(); + userRegisters[nReg] = val; +} + +extern __inline__ +unsigned int readCPSR(void) +{ + return(readRegister(REG_CPSR)); +} + +extern __inline__ +void writeCPSR(const unsigned int val) +{ + writeRegister(REG_CPSR,val); +} + +extern __inline__ +unsigned int readConditionCodes(void) +{ +#ifdef __FPEM_TEST__ + return(0); +#else + return(readCPSR() & CC_MASK); +#endif +} + +extern __inline__ +void writeConditionCodes(const unsigned int val) +{ + unsigned int *userRegisters = GET_USERREG(); + unsigned int rval; + /* + * Operate directly on userRegisters since + * the CPSR may be the PC register itself. + */ + rval = userRegisters[REG_CPSR] & ~CC_MASK; + userRegisters[REG_CPSR] = rval | (val & CC_MASK); +} + +extern __inline__ +unsigned int readMemoryInt(unsigned int *pMem) +{ + return *pMem; +} diff -Nru a/arch/arm26/nwfpe/fpopcode.c b/arch/arm26/nwfpe/fpopcode.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpopcode.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,148 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "softfloat.h" +#include "fpopcode.h" +#include "fpsr.h" +#include "fpmodule.h" +#include "fpmodule.inl" + +const floatx80 floatx80Constant[] = { + { 0x0000, 0x0000000000000000ULL}, /* extended 0.0 */ + { 0x3fff, 0x8000000000000000ULL}, /* extended 1.0 */ + { 0x4000, 0x8000000000000000ULL}, /* extended 2.0 */ + { 0x4000, 0xc000000000000000ULL}, /* extended 3.0 */ + { 0x4001, 0x8000000000000000ULL}, /* extended 4.0 */ + { 0x4001, 0xa000000000000000ULL}, /* extended 5.0 */ + { 0x3ffe, 0x8000000000000000ULL}, /* extended 0.5 */ + { 0x4002, 0xa000000000000000ULL} /* extended 10.0 */ +}; + +const float64 float64Constant[] = { + 0x0000000000000000ULL, /* double 0.0 */ + 0x3ff0000000000000ULL, /* double 1.0 */ + 0x4000000000000000ULL, /* double 2.0 */ + 0x4008000000000000ULL, /* double 3.0 */ + 0x4010000000000000ULL, /* double 4.0 */ + 0x4014000000000000ULL, /* double 5.0 */ + 0x3fe0000000000000ULL, /* double 0.5 */ + 0x4024000000000000ULL /* double 10.0 */ +}; + +const float32 float32Constant[] = { + 0x00000000, /* single 0.0 */ + 0x3f800000, /* single 1.0 */ + 0x40000000, /* single 2.0 */ + 0x40400000, /* single 3.0 */ + 0x40800000, /* single 4.0 */ + 0x40a00000, /* single 5.0 */ + 0x3f000000, /* single 0.5 */ + 0x41200000 /* single 10.0 */ +}; + +unsigned int getTransferLength(const unsigned int opcode) +{ + unsigned int nRc; + + switch (opcode & MASK_TRANSFER_LENGTH) + { + case 0x00000000: nRc = 1; break; /* single precision */ + case 0x00008000: nRc = 2; break; /* double precision */ + case 0x00400000: nRc = 3; break; /* extended precision */ + default: nRc = 0; + } + + return(nRc); +} + +unsigned int getRegisterCount(const unsigned int opcode) +{ + unsigned int nRc; + + switch (opcode & MASK_REGISTER_COUNT) + { + case 0x00000000: nRc = 4; break; + case 0x00008000: nRc = 1; break; + case 0x00400000: nRc = 2; break; + case 0x00408000: nRc = 3; break; + default: nRc = 0; + } + + return(nRc); +} + +unsigned int getRoundingPrecision(const unsigned int opcode) +{ + unsigned int nRc; + + switch (opcode & MASK_ROUNDING_PRECISION) + { + case 0x00000000: nRc = 1; break; + case 0x00000080: nRc = 2; break; + case 0x00080000: nRc = 3; break; + default: nRc = 0; + } + + return(nRc); +} + +unsigned int getDestinationSize(const unsigned int opcode) +{ + unsigned int nRc; + + switch (opcode & MASK_DESTINATION_SIZE) + { + case 0x00000000: nRc = typeSingle; break; + case 0x00000080: nRc = typeDouble; break; + case 0x00080000: nRc = typeExtended; break; + default: nRc = typeNone; + } + + return(nRc); +} + +/* condition code lookup table + index into the table is test code: EQ, NE, ... LT, GT, AL, NV + bit position in short is condition code: NZCV */ +static const unsigned short aCC[16] = { + 0xF0F0, // EQ == Z set + 0x0F0F, // NE + 0xCCCC, // CS == C set + 0x3333, // CC + 0xFF00, // MI == N set + 0x00FF, // PL + 0xAAAA, // VS == V set + 0x5555, // VC + 0x0C0C, // HI == C set && Z clear + 0xF3F3, // LS == C clear || Z set + 0xAA55, // GE == (N==V) + 0x55AA, // LT == (N!=V) + 0x0A05, // GT == (!Z && (N==V)) + 0xF5FA, // LE == (Z || (N!=V)) + 0xFFFF, // AL always + 0 // NV +}; + +unsigned int checkCondition(const unsigned int opcode, const unsigned int ccodes) +{ + return (aCC[opcode>>28] >> (ccodes>>28)) & 1; +} diff -Nru a/arch/arm26/nwfpe/fpopcode.h b/arch/arm26/nwfpe/fpopcode.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpopcode.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,390 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef __FPOPCODE_H__ +#define __FPOPCODE_H__ + +/* +ARM Floating Point Instruction Classes +| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +|c o n d|1 1 0 P|U|u|W|L| Rn |v| Fd |0|0|0|1| o f f s e t | CPDT +|c o n d|1 1 0 P|U|w|W|L| Rn |x| Fd |0|0|0|1| o f f s e t | CPDT +| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +|c o n d|1 1 1 0|a|b|c|d|e| Fn |j| Fd |0|0|0|1|f|g|h|0|i| Fm | CPDO +|c o n d|1 1 1 0|a|b|c|L|e| Fn | Rd |0|0|0|1|f|g|h|1|i| Fm | CPRT +|c o n d|1 1 1 0|a|b|c|1|e| Fn |1|1|1|1|0|0|0|1|f|g|h|1|i| Fm | comparisons +| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + +CPDT data transfer instructions + LDF, STF, LFM, SFM + +CPDO dyadic arithmetic instructions + ADF, MUF, SUF, RSF, DVF, RDF, + POW, RPW, RMF, FML, FDV, FRD, POL + +CPDO monadic arithmetic instructions + MVF, MNF, ABS, RND, SQT, LOG, LGN, EXP, + SIN, COS, TAN, ASN, ACS, ATN, URD, NRM + +CPRT joint arithmetic/data transfer instructions + FIX (arithmetic followed by load/store) + FLT (load/store followed by arithmetic) + CMF, CNF CMFE, CNFE (comparisons) + WFS, RFS (write/read floating point status register) + WFC, RFC (write/read floating point control register) + +cond condition codes +P pre/post index bit: 0 = postindex, 1 = preindex +U up/down bit: 0 = stack grows down, 1 = stack grows up +W write back bit: 1 = update base register (Rn) +L load/store bit: 0 = store, 1 = load +Rn base register +Rd destination/source register +Fd floating point destination register +Fn floating point source register +Fm floating point source register or floating point constant + +uv transfer length (TABLE 1) +wx register count (TABLE 2) +abcd arithmetic opcode (TABLES 3 & 4) +ef destination size (rounding precision) (TABLE 5) +gh rounding mode (TABLE 6) +j dyadic/monadic bit: 0 = dyadic, 1 = monadic +i constant bit: 1 = constant (TABLE 6) +*/ + +/* +TABLE 1 ++-------------------------+---+---+---------+---------+ +| Precision | u | v | FPSR.EP | length | ++-------------------------+---+---+---------+---------+ +| Single | 0 ü 0 | x | 1 words | +| Double | 1 ü 1 | x | 2 words | +| Extended | 1 ü 1 | x | 3 words | +| Packed decimal | 1 ü 1 | 0 | 3 words | +| Expanded packed decimal | 1 ü 1 | 1 | 4 words | ++-------------------------+---+---+---------+---------+ +Note: x = don't care +*/ + +/* +TABLE 2 ++---+---+---------------------------------+ +| w | x | Number of registers to transfer | ++---+---+---------------------------------+ +| 0 ü 1 | 1 | +| 1 ü 0 | 2 | +| 1 ü 1 | 3 | +| 0 ü 0 | 4 | ++---+---+---------------------------------+ +*/ + +/* +TABLE 3: Dyadic Floating Point Opcodes ++---+---+---+---+----------+-----------------------+-----------------------+ +| a | b | c | d | Mnemonic | Description | Operation | ++---+---+---+---+----------+-----------------------+-----------------------+ +| 0 | 0 | 0 | 0 | ADF | Add | Fd := Fn + Fm | +| 0 | 0 | 0 | 1 | MUF | Multiply | Fd := Fn * Fm | +| 0 | 0 | 1 | 0 | SUF | Subtract | Fd := Fn - Fm | +| 0 | 0 | 1 | 1 | RSF | Reverse subtract | Fd := Fm - Fn | +| 0 | 1 | 0 | 0 | DVF | Divide | Fd := Fn / Fm | +| 0 | 1 | 0 | 1 | RDF | Reverse divide | Fd := Fm / Fn | +| 0 | 1 | 1 | 0 | POW | Power | Fd := Fn ^ Fm | +| 0 | 1 | 1 | 1 | RPW | Reverse power | Fd := Fm ^ Fn | +| 1 | 0 | 0 | 0 | RMF | Remainder | Fd := IEEE rem(Fn/Fm) | +| 1 | 0 | 0 | 1 | FML | Fast Multiply | Fd := Fn * Fm | +| 1 | 0 | 1 | 0 | FDV | Fast Divide | Fd := Fn / Fm | +| 1 | 0 | 1 | 1 | FRD | Fast reverse divide | Fd := Fm / Fn | +| 1 | 1 | 0 | 0 | POL | Polar angle (ArcTan2) | Fd := arctan2(Fn,Fm) | +| 1 | 1 | 0 | 1 | | undefined instruction | trap | +| 1 | 1 | 1 | 0 | | undefined instruction | trap | +| 1 | 1 | 1 | 1 | | undefined instruction | trap | ++---+---+---+---+----------+-----------------------+-----------------------+ +Note: POW, RPW, POL are deprecated, and are available for backwards + compatibility only. +*/ + +/* +TABLE 4: Monadic Floating Point Opcodes ++---+---+---+---+----------+-----------------------+-----------------------+ +| a | b | c | d | Mnemonic | Description | Operation | ++---+---+---+---+----------+-----------------------+-----------------------+ +| 0 | 0 | 0 | 0 | MVF | Move | Fd := Fm | +| 0 | 0 | 0 | 1 | MNF | Move negated | Fd := - Fm | +| 0 | 0 | 1 | 0 | ABS | Absolute value | Fd := abs(Fm) | +| 0 | 0 | 1 | 1 | RND | Round to integer | Fd := int(Fm) | +| 0 | 1 | 0 | 0 | SQT | Square root | Fd := sqrt(Fm) | +| 0 | 1 | 0 | 1 | LOG | Log base 10 | Fd := log10(Fm) | +| 0 | 1 | 1 | 0 | LGN | Log base e | Fd := ln(Fm) | +| 0 | 1 | 1 | 1 | EXP | Exponent | Fd := e ^ Fm | +| 1 | 0 | 0 | 0 | SIN | Sine | Fd := sin(Fm) | +| 1 | 0 | 0 | 1 | COS | Cosine | Fd := cos(Fm) | +| 1 | 0 | 1 | 0 | TAN | Tangent | Fd := tan(Fm) | +| 1 | 0 | 1 | 1 | ASN | Arc Sine | Fd := arcsin(Fm) | +| 1 | 1 | 0 | 0 | ACS | Arc Cosine | Fd := arccos(Fm) | +| 1 | 1 | 0 | 1 | ATN | Arc Tangent | Fd := arctan(Fm) | +| 1 | 1 | 1 | 0 | URD | Unnormalized round | Fd := int(Fm) | +| 1 | 1 | 1 | 1 | NRM | Normalize | Fd := norm(Fm) | ++---+---+---+---+----------+-----------------------+-----------------------+ +Note: LOG, LGN, EXP, SIN, COS, TAN, ASN, ACS, ATN are deprecated, and are + available for backwards compatibility only. +*/ + +/* +TABLE 5 ++-------------------------+---+---+ +| Rounding Precision | e | f | ++-------------------------+---+---+ +| IEEE Single precision | 0 ü 0 | +| IEEE Double precision | 0 ü 1 | +| IEEE Extended precision | 1 ü 0 | +| undefined (trap) | 1 ü 1 | ++-------------------------+---+---+ +*/ + +/* +TABLE 5 ++---------------------------------+---+---+ +| Rounding Mode | g | h | ++---------------------------------+---+---+ +| Round to nearest (default) | 0 ü 0 | +| Round toward plus infinity | 0 ü 1 | +| Round toward negative infinity | 1 ü 0 | +| Round toward zero | 1 ü 1 | ++---------------------------------+---+---+ +*/ + +/* +=== +=== Definitions for load and store instructions +=== +*/ + +/* bit masks */ +#define BIT_PREINDEX 0x01000000 +#define BIT_UP 0x00800000 +#define BIT_WRITE_BACK 0x00200000 +#define BIT_LOAD 0x00100000 + +/* masks for load/store */ +#define MASK_CPDT 0x0c000000 /* data processing opcode */ +#define MASK_OFFSET 0x000000ff +#define MASK_TRANSFER_LENGTH 0x00408000 +#define MASK_REGISTER_COUNT MASK_TRANSFER_LENGTH +#define MASK_COPROCESSOR 0x00000f00 + +/* Tests for transfer length */ +#define TRANSFER_SINGLE 0x00000000 +#define TRANSFER_DOUBLE 0x00008000 +#define TRANSFER_EXTENDED 0x00400000 +#define TRANSFER_PACKED MASK_TRANSFER_LENGTH + +/* Get the coprocessor number from the opcode. */ +#define getCoprocessorNumber(opcode) ((opcode & MASK_COPROCESSOR) >> 8) + +/* Get the offset from the opcode. */ +#define getOffset(opcode) (opcode & MASK_OFFSET) + +/* Tests for specific data transfer load/store opcodes. */ +#define TEST_OPCODE(opcode,mask) (((opcode) & (mask)) == (mask)) + +#define LOAD_OP(opcode) TEST_OPCODE((opcode),MASK_CPDT | BIT_LOAD) +#define STORE_OP(opcode) ((opcode & (MASK_CPDT | BIT_LOAD)) == MASK_CPDT) + +#define LDF_OP(opcode) (LOAD_OP(opcode) && (getCoprocessorNumber(opcode) == 1)) +#define LFM_OP(opcode) (LOAD_OP(opcode) && (getCoprocessorNumber(opcode) == 2)) +#define STF_OP(opcode) (STORE_OP(opcode) && (getCoprocessorNumber(opcode) == 1)) +#define SFM_OP(opcode) (STORE_OP(opcode) && (getCoprocessorNumber(opcode) == 2)) + +#define PREINDEXED(opcode) ((opcode & BIT_PREINDEX) != 0) +#define POSTINDEXED(opcode) ((opcode & BIT_PREINDEX) == 0) +#define BIT_UP_SET(opcode) ((opcode & BIT_UP) != 0) +#define BIT_UP_CLEAR(opcode) ((opcode & BIT_DOWN) == 0) +#define WRITE_BACK(opcode) ((opcode & BIT_WRITE_BACK) != 0) +#define LOAD(opcode) ((opcode & BIT_LOAD) != 0) +#define STORE(opcode) ((opcode & BIT_LOAD) == 0) + +/* +=== +=== Definitions for arithmetic instructions +=== +*/ +/* bit masks */ +#define BIT_MONADIC 0x00008000 +#define BIT_CONSTANT 0x00000008 + +#define CONSTANT_FM(opcode) ((opcode & BIT_CONSTANT) != 0) +#define MONADIC_INSTRUCTION(opcode) ((opcode & BIT_MONADIC) != 0) + +/* instruction identification masks */ +#define MASK_CPDO 0x0e000000 /* arithmetic opcode */ +#define MASK_ARITHMETIC_OPCODE 0x00f08000 +#define MASK_DESTINATION_SIZE 0x00080080 + +/* dyadic arithmetic opcodes. */ +#define ADF_CODE 0x00000000 +#define MUF_CODE 0x00100000 +#define SUF_CODE 0x00200000 +#define RSF_CODE 0x00300000 +#define DVF_CODE 0x00400000 +#define RDF_CODE 0x00500000 +#define POW_CODE 0x00600000 +#define RPW_CODE 0x00700000 +#define RMF_CODE 0x00800000 +#define FML_CODE 0x00900000 +#define FDV_CODE 0x00a00000 +#define FRD_CODE 0x00b00000 +#define POL_CODE 0x00c00000 +/* 0x00d00000 is an invalid dyadic arithmetic opcode */ +/* 0x00e00000 is an invalid dyadic arithmetic opcode */ +/* 0x00f00000 is an invalid dyadic arithmetic opcode */ + +/* monadic arithmetic opcodes. */ +#define MVF_CODE 0x00008000 +#define MNF_CODE 0x00108000 +#define ABS_CODE 0x00208000 +#define RND_CODE 0x00308000 +#define SQT_CODE 0x00408000 +#define LOG_CODE 0x00508000 +#define LGN_CODE 0x00608000 +#define EXP_CODE 0x00708000 +#define SIN_CODE 0x00808000 +#define COS_CODE 0x00908000 +#define TAN_CODE 0x00a08000 +#define ASN_CODE 0x00b08000 +#define ACS_CODE 0x00c08000 +#define ATN_CODE 0x00d08000 +#define URD_CODE 0x00e08000 +#define NRM_CODE 0x00f08000 + +/* +=== +=== Definitions for register transfer and comparison instructions +=== +*/ + +#define MASK_CPRT 0x0e000010 /* register transfer opcode */ +#define MASK_CPRT_CODE 0x00f00000 +#define FLT_CODE 0x00000000 +#define FIX_CODE 0x00100000 +#define WFS_CODE 0x00200000 +#define RFS_CODE 0x00300000 +#define WFC_CODE 0x00400000 +#define RFC_CODE 0x00500000 +#define CMF_CODE 0x00900000 +#define CNF_CODE 0x00b00000 +#define CMFE_CODE 0x00d00000 +#define CNFE_CODE 0x00f00000 + +/* +=== +=== Common definitions +=== +*/ + +/* register masks */ +#define MASK_Rd 0x0000f000 +#define MASK_Rn 0x000f0000 +#define MASK_Fd 0x00007000 +#define MASK_Fm 0x00000007 +#define MASK_Fn 0x00070000 + +/* condition code masks */ +#define CC_MASK 0xf0000000 +#define CC_NEGATIVE 0x80000000 +#define CC_ZERO 0x40000000 +#define CC_CARRY 0x20000000 +#define CC_OVERFLOW 0x10000000 +#define CC_EQ 0x00000000 +#define CC_NE 0x10000000 +#define CC_CS 0x20000000 +#define CC_HS CC_CS +#define CC_CC 0x30000000 +#define CC_LO CC_CC +#define CC_MI 0x40000000 +#define CC_PL 0x50000000 +#define CC_VS 0x60000000 +#define CC_VC 0x70000000 +#define CC_HI 0x80000000 +#define CC_LS 0x90000000 +#define CC_GE 0xa0000000 +#define CC_LT 0xb0000000 +#define CC_GT 0xc0000000 +#define CC_LE 0xd0000000 +#define CC_AL 0xe0000000 +#define CC_NV 0xf0000000 + +/* rounding masks/values */ +#define MASK_ROUNDING_MODE 0x00000060 +#define ROUND_TO_NEAREST 0x00000000 +#define ROUND_TO_PLUS_INFINITY 0x00000020 +#define ROUND_TO_MINUS_INFINITY 0x00000040 +#define ROUND_TO_ZERO 0x00000060 + +#define MASK_ROUNDING_PRECISION 0x00080080 +#define ROUND_SINGLE 0x00000000 +#define ROUND_DOUBLE 0x00000080 +#define ROUND_EXTENDED 0x00080000 + +/* Get the condition code from the opcode. */ +#define getCondition(opcode) (opcode >> 28) + +/* Get the source register from the opcode. */ +#define getRn(opcode) ((opcode & MASK_Rn) >> 16) + +/* Get the destination floating point register from the opcode. */ +#define getFd(opcode) ((opcode & MASK_Fd) >> 12) + +/* Get the first source floating point register from the opcode. */ +#define getFn(opcode) ((opcode & MASK_Fn) >> 16) + +/* Get the second source floating point register from the opcode. */ +#define getFm(opcode) (opcode & MASK_Fm) + +/* Get the destination register from the opcode. */ +#define getRd(opcode) ((opcode & MASK_Rd) >> 12) + +/* Get the rounding mode from the opcode. */ +#define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) + +static inline const floatx80 getExtendedConstant(const unsigned int nIndex) +{ + extern const floatx80 floatx80Constant[]; + return floatx80Constant[nIndex]; +} + +static inline const float64 getDoubleConstant(const unsigned int nIndex) +{ + extern const float64 float64Constant[]; + return float64Constant[nIndex]; +} + +static inline const float32 getSingleConstant(const unsigned int nIndex) +{ + extern const float32 float32Constant[]; + return float32Constant[nIndex]; +} + +extern unsigned int getRegisterCount(const unsigned int opcode); +extern unsigned int getDestinationSize(const unsigned int opcode); + +#endif diff -Nru a/arch/arm26/nwfpe/fpsr.h b/arch/arm26/nwfpe/fpsr.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/fpsr.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,108 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.com, 1998-1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef __FPSR_H__ +#define __FPSR_H__ + +/* +The FPSR is a 32 bit register consisting of 4 parts, each exactly +one byte. + + SYSTEM ID + EXCEPTION TRAP ENABLE BYTE + SYSTEM CONTROL BYTE + CUMULATIVE EXCEPTION FLAGS BYTE + +The FPCR is a 32 bit register consisting of bit flags. +*/ + +/* SYSTEM ID +------------ +Note: the system id byte is read only */ + +typedef unsigned int FPSR; /* type for floating point status register */ +typedef unsigned int FPCR; /* type for floating point control register */ + +#define MASK_SYSID 0xff000000 +#define BIT_HARDWARE 0x80000000 +#define FP_EMULATOR 0x01000000 /* System ID for emulator */ +#define FP_ACCELERATOR 0x81000000 /* System ID for FPA11 */ + +/* EXCEPTION TRAP ENABLE BYTE +----------------------------- */ + +#define MASK_TRAP_ENABLE 0x00ff0000 +#define MASK_TRAP_ENABLE_STRICT 0x001f0000 +#define BIT_IXE 0x00100000 /* inexact exception enable */ +#define BIT_UFE 0x00080000 /* underflow exception enable */ +#define BIT_OFE 0x00040000 /* overflow exception enable */ +#define BIT_DZE 0x00020000 /* divide by zero exception enable */ +#define BIT_IOE 0x00010000 /* invalid operation exception enable */ + +/* SYSTEM CONTROL BYTE +---------------------- */ + +#define MASK_SYSTEM_CONTROL 0x0000ff00 +#define MASK_TRAP_STRICT 0x00001f00 + +#define BIT_AC 0x00001000 /* use alternative C-flag definition + for compares */ +#define BIT_EP 0x00000800 /* use expanded packed decimal format */ +#define BIT_SO 0x00000400 /* select synchronous operation of FPA */ +#define BIT_NE 0x00000200 /* NaN exception bit */ +#define BIT_ND 0x00000100 /* no denormalized numbers bit */ + +/* CUMULATIVE EXCEPTION FLAGS BYTE +---------------------------------- */ + +#define MASK_EXCEPTION_FLAGS 0x000000ff +#define MASK_EXCEPTION_FLAGS_STRICT 0x0000001f + +#define BIT_IXC 0x00000010 /* inexact exception flag */ +#define BIT_UFC 0x00000008 /* underflow exception flag */ +#define BIT_OFC 0x00000004 /* overfloat exception flag */ +#define BIT_DZC 0x00000002 /* divide by zero exception flag */ +#define BIT_IOC 0x00000001 /* invalid operation exception flag */ + +/* Floating Point Control Register +----------------------------------*/ + +#define BIT_RU 0x80000000 /* rounded up bit */ +#define BIT_IE 0x10000000 /* inexact bit */ +#define BIT_MO 0x08000000 /* mantissa overflow bit */ +#define BIT_EO 0x04000000 /* exponent overflow bit */ +#define BIT_SB 0x00000800 /* store bounce */ +#define BIT_AB 0x00000400 /* arithmetic bounce */ +#define BIT_RE 0x00000200 /* rounding exception */ +#define BIT_DA 0x00000100 /* disable FPA */ + +#define MASK_OP 0x00f08010 /* AU operation code */ +#define MASK_PR 0x00080080 /* AU precision */ +#define MASK_S1 0x00070000 /* AU source register 1 */ +#define MASK_S2 0x00000007 /* AU source register 2 */ +#define MASK_DS 0x00007000 /* AU destination register */ +#define MASK_RM 0x00000060 /* AU rounding mode */ +#define MASK_ALU 0x9cfff2ff /* only ALU can write these bits */ +#define MASK_RESET 0x00000d00 /* bits set on reset, all others cleared */ +#define MASK_WFC MASK_RESET +#define MASK_RFC ~MASK_RESET + +#endif diff -Nru a/arch/arm26/nwfpe/milieu.h b/arch/arm26/nwfpe/milieu.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/milieu.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,48 @@ + +/* +=============================================================================== + +This C header file is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/softfloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these three paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +/* +------------------------------------------------------------------------------- +Include common integer types and flags. +------------------------------------------------------------------------------- +*/ +#include "ARM-gcc.h" + +/* +------------------------------------------------------------------------------- +Symbolic Boolean literals. +------------------------------------------------------------------------------- +*/ +enum { + FALSE = 0, + TRUE = 1 +}; + diff -Nru a/arch/arm26/nwfpe/single_cpdo.c b/arch/arm26/nwfpe/single_cpdo.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/single_cpdo.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,255 @@ +/* + NetWinder Floating Point Emulator + (c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "fpa11.h" +#include "softfloat.h" +#include "fpopcode.h" + +float32 float32_exp(float32 Fm); +float32 float32_ln(float32 Fm); +float32 float32_sin(float32 rFm); +float32 float32_cos(float32 rFm); +float32 float32_arcsin(float32 rFm); +float32 float32_arctan(float32 rFm); +float32 float32_log(float32 rFm); +float32 float32_tan(float32 rFm); +float32 float32_arccos(float32 rFm); +float32 float32_pow(float32 rFn,float32 rFm); +float32 float32_pol(float32 rFn,float32 rFm); + +unsigned int SingleCPDO(const unsigned int opcode) +{ + FPA11 *fpa11 = GET_FPA11(); + float32 rFm, rFn = 0; //FIXME - should be zero? + unsigned int Fd, Fm, Fn, nRc = 1; + + Fm = getFm(opcode); + if (CONSTANT_FM(opcode)) + { + rFm = getSingleConstant(Fm); + } + else + { + switch (fpa11->fType[Fm]) + { + case typeSingle: + rFm = fpa11->fpreg[Fm].fSingle; + break; + + default: return 0; + } + } + + if (!MONADIC_INSTRUCTION(opcode)) + { + Fn = getFn(opcode); + switch (fpa11->fType[Fn]) + { + case typeSingle: + rFn = fpa11->fpreg[Fn].fSingle; + break; + + default: return 0; + } + } + + Fd = getFd(opcode); + switch (opcode & MASK_ARITHMETIC_OPCODE) + { + /* dyadic opcodes */ + case ADF_CODE: + fpa11->fpreg[Fd].fSingle = float32_add(rFn,rFm); + break; + + case MUF_CODE: + case FML_CODE: + fpa11->fpreg[Fd].fSingle = float32_mul(rFn,rFm); + break; + + case SUF_CODE: + fpa11->fpreg[Fd].fSingle = float32_sub(rFn,rFm); + break; + + case RSF_CODE: + fpa11->fpreg[Fd].fSingle = float32_sub(rFm,rFn); + break; + + case DVF_CODE: + case FDV_CODE: + fpa11->fpreg[Fd].fSingle = float32_div(rFn,rFm); + break; + + case RDF_CODE: + case FRD_CODE: + fpa11->fpreg[Fd].fSingle = float32_div(rFm,rFn); + break; + +#if 0 + case POW_CODE: + fpa11->fpreg[Fd].fSingle = float32_pow(rFn,rFm); + break; + + case RPW_CODE: + fpa11->fpreg[Fd].fSingle = float32_pow(rFm,rFn); + break; +#endif + + case RMF_CODE: + fpa11->fpreg[Fd].fSingle = float32_rem(rFn,rFm); + break; + +#if 0 + case POL_CODE: + fpa11->fpreg[Fd].fSingle = float32_pol(rFn,rFm); + break; +#endif + + /* monadic opcodes */ + case MVF_CODE: + fpa11->fpreg[Fd].fSingle = rFm; + break; + + case MNF_CODE: + rFm ^= 0x80000000; + fpa11->fpreg[Fd].fSingle = rFm; + break; + + case ABS_CODE: + rFm &= 0x7fffffff; + fpa11->fpreg[Fd].fSingle = rFm; + break; + + case RND_CODE: + case URD_CODE: + fpa11->fpreg[Fd].fSingle = float32_round_to_int(rFm); + break; + + case SQT_CODE: + fpa11->fpreg[Fd].fSingle = float32_sqrt(rFm); + break; + +#if 0 + case LOG_CODE: + fpa11->fpreg[Fd].fSingle = float32_log(rFm); + break; + + case LGN_CODE: + fpa11->fpreg[Fd].fSingle = float32_ln(rFm); + break; + + case EXP_CODE: + fpa11->fpreg[Fd].fSingle = float32_exp(rFm); + break; + + case SIN_CODE: + fpa11->fpreg[Fd].fSingle = float32_sin(rFm); + break; + + case COS_CODE: + fpa11->fpreg[Fd].fSingle = float32_cos(rFm); + break; + + case TAN_CODE: + fpa11->fpreg[Fd].fSingle = float32_tan(rFm); + break; + + case ASN_CODE: + fpa11->fpreg[Fd].fSingle = float32_arcsin(rFm); + break; + + case ACS_CODE: + fpa11->fpreg[Fd].fSingle = float32_arccos(rFm); + break; + + case ATN_CODE: + fpa11->fpreg[Fd].fSingle = float32_arctan(rFm); + break; +#endif + + case NRM_CODE: + break; + + default: + { + nRc = 0; + } + } + + if (0 != nRc) fpa11->fType[Fd] = typeSingle; + return nRc; +} + +#if 0 +float32 float32_exp(float32 Fm) +{ +//series +} + +float32 float32_ln(float32 Fm) +{ +//series +} + +float32 float32_sin(float32 rFm) +{ +//series +} + +float32 float32_cos(float32 rFm) +{ +//series +} + +float32 float32_arcsin(float32 rFm) +{ +//series +} + +float32 float32_arctan(float32 rFm) +{ + //series +} + +float32 float32_arccos(float32 rFm) +{ + //return float32_sub(halfPi,float32_arcsin(rFm)); +} + +float32 float32_log(float32 rFm) +{ + return float32_div(float32_ln(rFm),getSingleConstant(7)); +} + +float32 float32_tan(float32 rFm) +{ + return float32_div(float32_sin(rFm),float32_cos(rFm)); +} + +float32 float32_pow(float32 rFn,float32 rFm) +{ + return float32_exp(float32_mul(rFm,float32_ln(rFn))); +} + +float32 float32_pol(float32 rFn,float32 rFm) +{ + return float32_arctan(float32_div(rFn,rFm)); +} +#endif diff -Nru a/arch/arm26/nwfpe/softfloat-macros b/arch/arm26/nwfpe/softfloat-macros --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/softfloat-macros Fri Jun 13 01:07:45 2003 @@ -0,0 +1,740 @@ + +/* +=============================================================================== + +This C source fragment is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/softfloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these three paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +/* +------------------------------------------------------------------------------- +Shifts `a' right by the number of bits given in `count'. If any nonzero +bits are shifted off, they are ``jammed'' into the least significant bit of +the result by setting the least significant bit to 1. The value of `count' +can be arbitrarily large; in particular, if `count' is greater than 32, the +result will be either 0 or 1, depending on whether `a' is zero or nonzero. +The result is stored in the location pointed to by `zPtr'. +------------------------------------------------------------------------------- +*/ +INLINE void shift32RightJamming( bits32 a, int16 count, bits32 *zPtr ) +{ + bits32 z; + if ( count == 0 ) { + z = a; + } + else if ( count < 32 ) { + z = ( a>>count ) | ( ( a<<( ( - count ) & 31 ) ) != 0 ); + } + else { + z = ( a != 0 ); + } + *zPtr = z; +} + +/* +------------------------------------------------------------------------------- +Shifts `a' right by the number of bits given in `count'. If any nonzero +bits are shifted off, they are ``jammed'' into the least significant bit of +the result by setting the least significant bit to 1. The value of `count' +can be arbitrarily large; in particular, if `count' is greater than 64, the +result will be either 0 or 1, depending on whether `a' is zero or nonzero. +The result is stored in the location pointed to by `zPtr'. +------------------------------------------------------------------------------- +*/ +INLINE void shift64RightJamming( bits64 a, int16 count, bits64 *zPtr ) +{ + bits64 z; + + __asm__("@shift64RightJamming -- start"); + if ( count == 0 ) { + z = a; + } + else if ( count < 64 ) { + z = ( a>>count ) | ( ( a<<( ( - count ) & 63 ) ) != 0 ); + } + else { + z = ( a != 0 ); + } + __asm__("@shift64RightJamming -- end"); + *zPtr = z; +} + +/* +------------------------------------------------------------------------------- +Shifts the 128-bit value formed by concatenating `a0' and `a1' right by 64 +_plus_ the number of bits given in `count'. The shifted result is at most +64 nonzero bits; this is stored at the location pointed to by `z0Ptr'. The +bits shifted off form a second 64-bit result as follows: The _last_ bit +shifted off is the most-significant bit of the extra result, and the other +63 bits of the extra result are all zero if and only if _all_but_the_last_ +bits shifted off were all zero. This extra result is stored in the location +pointed to by `z1Ptr'. The value of `count' can be arbitrarily large. + (This routine makes more sense if `a0' and `a1' are considered to form a +fixed-point value with binary point between `a0' and `a1'. This fixed-point +value is shifted right by the number of bits given in `count', and the +integer part of the result is returned at the location pointed to by +`z0Ptr'. The fractional part of the result may be slightly corrupted as +described above, and is returned at the location pointed to by `z1Ptr'.) +------------------------------------------------------------------------------- +*/ +INLINE void + shift64ExtraRightJamming( + bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) +{ + bits64 z0, z1; + int8 negCount = ( - count ) & 63; + + if ( count == 0 ) { + z1 = a1; + z0 = a0; + } + else if ( count < 64 ) { + z1 = ( a0<>count; + } + else { + if ( count == 64 ) { + z1 = a0 | ( a1 != 0 ); + } + else { + z1 = ( ( a0 | a1 ) != 0 ); + } + z0 = 0; + } + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Shifts the 128-bit value formed by concatenating `a0' and `a1' right by the +number of bits given in `count'. Any bits shifted off are lost. The value +of `count' can be arbitrarily large; in particular, if `count' is greater +than 128, the result will be 0. The result is broken into two 64-bit pieces +which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + shift128Right( + bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) +{ + bits64 z0, z1; + int8 negCount = ( - count ) & 63; + + if ( count == 0 ) { + z1 = a1; + z0 = a0; + } + else if ( count < 64 ) { + z1 = ( a0<>count ); + z0 = a0>>count; + } + else { + z1 = ( count < 64 ) ? ( a0>>( count & 63 ) ) : 0; + z0 = 0; + } + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Shifts the 128-bit value formed by concatenating `a0' and `a1' right by the +number of bits given in `count'. If any nonzero bits are shifted off, they +are ``jammed'' into the least significant bit of the result by setting the +least significant bit to 1. The value of `count' can be arbitrarily large; +in particular, if `count' is greater than 128, the result will be either 0 +or 1, depending on whether the concatenation of `a0' and `a1' is zero or +nonzero. The result is broken into two 64-bit pieces which are stored at +the locations pointed to by `z0Ptr' and `z1Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + shift128RightJamming( + bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) +{ + bits64 z0, z1; + int8 negCount = ( - count ) & 63; + + if ( count == 0 ) { + z1 = a1; + z0 = a0; + } + else if ( count < 64 ) { + z1 = ( a0<>count ) | ( ( a1<>count; + } + else { + if ( count == 64 ) { + z1 = a0 | ( a1 != 0 ); + } + else if ( count < 128 ) { + z1 = ( a0>>( count & 63 ) ) | ( ( ( a0<>count ); + z0 = a0>>count; + } + else { + if ( count == 64 ) { + z2 = a1; + z1 = a0; + } + else { + a2 |= a1; + if ( count < 128 ) { + z2 = a0<>( count & 63 ); + } + else { + z2 = ( count == 128 ) ? a0 : ( a0 != 0 ); + z1 = 0; + } + } + z0 = 0; + } + z2 |= ( a2 != 0 ); + } + *z2Ptr = z2; + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Shifts the 128-bit value formed by concatenating `a0' and `a1' left by the +number of bits given in `count'. Any bits shifted off are lost. The value +of `count' must be less than 64. The result is broken into two 64-bit +pieces which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + shortShift128Left( + bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) +{ + + *z1Ptr = a1<>( ( - count ) & 63 ) ); + +} + +/* +------------------------------------------------------------------------------- +Shifts the 192-bit value formed by concatenating `a0', `a1', and `a2' left +by the number of bits given in `count'. Any bits shifted off are lost. +The value of `count' must be less than 64. The result is broken into three +64-bit pieces which are stored at the locations pointed to by `z0Ptr', +`z1Ptr', and `z2Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + shortShift192Left( + bits64 a0, + bits64 a1, + bits64 a2, + int16 count, + bits64 *z0Ptr, + bits64 *z1Ptr, + bits64 *z2Ptr + ) +{ + bits64 z0, z1, z2; + int8 negCount; + + z2 = a2<>negCount; + z0 |= a1>>negCount; + } + *z2Ptr = z2; + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Adds the 128-bit value formed by concatenating `a0' and `a1' to the 128-bit +value formed by concatenating `b0' and `b1'. Addition is modulo 2^128, so +any carry out is lost. The result is broken into two 64-bit pieces which +are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + add128( + bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 *z0Ptr, bits64 *z1Ptr ) +{ + bits64 z1; + + z1 = a1 + b1; + *z1Ptr = z1; + *z0Ptr = a0 + b0 + ( z1 < a1 ); + +} + +/* +------------------------------------------------------------------------------- +Adds the 192-bit value formed by concatenating `a0', `a1', and `a2' to the +192-bit value formed by concatenating `b0', `b1', and `b2'. Addition is +modulo 2^192, so any carry out is lost. The result is broken into three +64-bit pieces which are stored at the locations pointed to by `z0Ptr', +`z1Ptr', and `z2Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + add192( + bits64 a0, + bits64 a1, + bits64 a2, + bits64 b0, + bits64 b1, + bits64 b2, + bits64 *z0Ptr, + bits64 *z1Ptr, + bits64 *z2Ptr + ) +{ + bits64 z0, z1, z2; + int8 carry0, carry1; + + z2 = a2 + b2; + carry1 = ( z2 < a2 ); + z1 = a1 + b1; + carry0 = ( z1 < a1 ); + z0 = a0 + b0; + z1 += carry1; + z0 += ( z1 < carry1 ); + z0 += carry0; + *z2Ptr = z2; + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Subtracts the 128-bit value formed by concatenating `b0' and `b1' from the +128-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo +2^128, so any borrow out (carry out) is lost. The result is broken into two +64-bit pieces which are stored at the locations pointed to by `z0Ptr' and +`z1Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + sub128( + bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 *z0Ptr, bits64 *z1Ptr ) +{ + + *z1Ptr = a1 - b1; + *z0Ptr = a0 - b0 - ( a1 < b1 ); + +} + +/* +------------------------------------------------------------------------------- +Subtracts the 192-bit value formed by concatenating `b0', `b1', and `b2' +from the 192-bit value formed by concatenating `a0', `a1', and `a2'. +Subtraction is modulo 2^192, so any borrow out (carry out) is lost. The +result is broken into three 64-bit pieces which are stored at the locations +pointed to by `z0Ptr', `z1Ptr', and `z2Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + sub192( + bits64 a0, + bits64 a1, + bits64 a2, + bits64 b0, + bits64 b1, + bits64 b2, + bits64 *z0Ptr, + bits64 *z1Ptr, + bits64 *z2Ptr + ) +{ + bits64 z0, z1, z2; + int8 borrow0, borrow1; + + z2 = a2 - b2; + borrow1 = ( a2 < b2 ); + z1 = a1 - b1; + borrow0 = ( a1 < b1 ); + z0 = a0 - b0; + z0 -= ( z1 < borrow1 ); + z1 -= borrow1; + z0 -= borrow0; + *z2Ptr = z2; + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Multiplies `a' by `b' to obtain a 128-bit product. The product is broken +into two 64-bit pieces which are stored at the locations pointed to by +`z0Ptr' and `z1Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void mul64To128( bits64 a, bits64 b, bits64 *z0Ptr, bits64 *z1Ptr ) +{ + bits32 aHigh, aLow, bHigh, bLow; + bits64 z0, zMiddleA, zMiddleB, z1; + + aLow = a; + aHigh = a>>32; + bLow = b; + bHigh = b>>32; + z1 = ( (bits64) aLow ) * bLow; + zMiddleA = ( (bits64) aLow ) * bHigh; + zMiddleB = ( (bits64) aHigh ) * bLow; + z0 = ( (bits64) aHigh ) * bHigh; + zMiddleA += zMiddleB; + z0 += ( ( (bits64) ( zMiddleA < zMiddleB ) )<<32 ) + ( zMiddleA>>32 ); + zMiddleA <<= 32; + z1 += zMiddleA; + z0 += ( z1 < zMiddleA ); + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Multiplies the 128-bit value formed by concatenating `a0' and `a1' by `b' to +obtain a 192-bit product. The product is broken into three 64-bit pieces +which are stored at the locations pointed to by `z0Ptr', `z1Ptr', and +`z2Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + mul128By64To192( + bits64 a0, + bits64 a1, + bits64 b, + bits64 *z0Ptr, + bits64 *z1Ptr, + bits64 *z2Ptr + ) +{ + bits64 z0, z1, z2, more1; + + mul64To128( a1, b, &z1, &z2 ); + mul64To128( a0, b, &z0, &more1 ); + add128( z0, more1, 0, z1, &z0, &z1 ); + *z2Ptr = z2; + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Multiplies the 128-bit value formed by concatenating `a0' and `a1' to the +128-bit value formed by concatenating `b0' and `b1' to obtain a 256-bit +product. The product is broken into four 64-bit pieces which are stored at +the locations pointed to by `z0Ptr', `z1Ptr', `z2Ptr', and `z3Ptr'. +------------------------------------------------------------------------------- +*/ +INLINE void + mul128To256( + bits64 a0, + bits64 a1, + bits64 b0, + bits64 b1, + bits64 *z0Ptr, + bits64 *z1Ptr, + bits64 *z2Ptr, + bits64 *z3Ptr + ) +{ + bits64 z0, z1, z2, z3; + bits64 more1, more2; + + mul64To128( a1, b1, &z2, &z3 ); + mul64To128( a1, b0, &z1, &more2 ); + add128( z1, more2, 0, z2, &z1, &z2 ); + mul64To128( a0, b0, &z0, &more1 ); + add128( z0, more1, 0, z1, &z0, &z1 ); + mul64To128( a0, b1, &more1, &more2 ); + add128( more1, more2, 0, z2, &more1, &z2 ); + add128( z0, z1, 0, more1, &z0, &z1 ); + *z3Ptr = z3; + *z2Ptr = z2; + *z1Ptr = z1; + *z0Ptr = z0; + +} + +/* +------------------------------------------------------------------------------- +Returns an approximation to the 64-bit integer quotient obtained by dividing +`b' into the 128-bit value formed by concatenating `a0' and `a1'. The +divisor `b' must be at least 2^63. If q is the exact quotient truncated +toward zero, the approximation returned lies between q and q + 2 inclusive. +If the exact quotient q is larger than 64 bits, the maximum positive 64-bit +unsigned integer is returned. +------------------------------------------------------------------------------- +*/ +static bits64 estimateDiv128To64( bits64 a0, bits64 a1, bits64 b ) +{ + bits64 b0, b1; + bits64 rem0, rem1, term0, term1; + bits64 z; + if ( b <= a0 ) return LIT64( 0xFFFFFFFFFFFFFFFF ); + b0 = b>>32; + z = ( b0<<32 <= a0 ) ? LIT64( 0xFFFFFFFF00000000 ) : ( a0 / b0 )<<32; + mul64To128( b, z, &term0, &term1 ); + sub128( a0, a1, term0, term1, &rem0, &rem1 ); + while ( ( (sbits64) rem0 ) < 0 ) { + z -= LIT64( 0x100000000 ); + b1 = b<<32; + add128( rem0, rem1, b0, b1, &rem0, &rem1 ); + } + rem0 = ( rem0<<32 ) | ( rem1>>32 ); + z |= ( b0<<32 <= rem0 ) ? 0xFFFFFFFF : rem0 / b0; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns an approximation to the square root of the 32-bit significand given +by `a'. Considered as an integer, `a' must be at least 2^31. If bit 0 of +`aExp' (the least significant bit) is 1, the integer returned approximates +2^31*sqrt(`a'/2^31), where `a' is considered an integer. If bit 0 of `aExp' +is 0, the integer returned approximates 2^31*sqrt(`a'/2^30). In either +case, the approximation returned lies strictly within +/-2 of the exact +value. +------------------------------------------------------------------------------- +*/ +static bits32 estimateSqrt32( int16 aExp, bits32 a ) +{ + static const bits16 sqrtOddAdjustments[] = { + 0x0004, 0x0022, 0x005D, 0x00B1, 0x011D, 0x019F, 0x0236, 0x02E0, + 0x039C, 0x0468, 0x0545, 0x0631, 0x072B, 0x0832, 0x0946, 0x0A67 + }; + static const bits16 sqrtEvenAdjustments[] = { + 0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E, + 0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002 + }; + int8 index; + bits32 z; + + index = ( a>>27 ) & 15; + if ( aExp & 1 ) { + z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ]; + z = ( ( a / z )<<14 ) + ( z<<15 ); + a >>= 1; + } + else { + z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ]; + z = a / z + z; + z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 ); + if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 ); + } + return ( (bits32) ( ( ( (bits64) a )<<31 ) / z ) ) + ( z>>1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns the number of leading 0 bits before the most-significant 1 bit +of `a'. If `a' is zero, 32 is returned. +------------------------------------------------------------------------------- +*/ +static int8 countLeadingZeros32( bits32 a ) +{ + static const int8 countLeadingZerosHigh[] = { + 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + int8 shiftCount; + + shiftCount = 0; + if ( a < 0x10000 ) { + shiftCount += 16; + a <<= 16; + } + if ( a < 0x1000000 ) { + shiftCount += 8; + a <<= 8; + } + shiftCount += countLeadingZerosHigh[ a>>24 ]; + return shiftCount; + +} + +/* +------------------------------------------------------------------------------- +Returns the number of leading 0 bits before the most-significant 1 bit +of `a'. If `a' is zero, 64 is returned. +------------------------------------------------------------------------------- +*/ +static int8 countLeadingZeros64( bits64 a ) +{ + int8 shiftCount; + + shiftCount = 0; + if ( a < ( (bits64) 1 )<<32 ) { + shiftCount += 32; + } + else { + a >>= 32; + } + shiftCount += countLeadingZeros32( a ); + return shiftCount; + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' +is equal to the 128-bit value formed by concatenating `b0' and `b1'. +Otherwise, returns 0. +------------------------------------------------------------------------------- +*/ +INLINE flag eq128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) +{ + + return ( a0 == b0 ) && ( a1 == b1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' is less +than or equal to the 128-bit value formed by concatenating `b0' and `b1'. +Otherwise, returns 0. +------------------------------------------------------------------------------- +*/ +INLINE flag le128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) +{ + + return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 <= b1 ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' is less +than the 128-bit value formed by concatenating `b0' and `b1'. Otherwise, +returns 0. +------------------------------------------------------------------------------- +*/ +INLINE flag lt128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) +{ + + return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 < b1 ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' is +not equal to the 128-bit value formed by concatenating `b0' and `b1'. +Otherwise, returns 0. +------------------------------------------------------------------------------- +*/ +INLINE flag ne128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) +{ + + return ( a0 != b0 ) || ( a1 != b1 ); + +} + diff -Nru a/arch/arm26/nwfpe/softfloat-specialize b/arch/arm26/nwfpe/softfloat-specialize --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/softfloat-specialize Fri Jun 13 01:07:45 2003 @@ -0,0 +1,366 @@ + +/* +=============================================================================== + +This C source fragment is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/softfloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these three paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +/* +------------------------------------------------------------------------------- +Underflow tininess-detection mode, statically initialized to default value. +(The declaration in `softfloat.h' must match the `int8' type here.) +------------------------------------------------------------------------------- +*/ +int8 float_detect_tininess = float_tininess_after_rounding; + +/* +------------------------------------------------------------------------------- +Raises the exceptions specified by `flags'. Floating-point traps can be +defined here if desired. It is currently not possible for such a trap to +substitute a result value. If traps are not implemented, this routine +should be simply `float_exception_flags |= flags;'. + +ScottB: November 4, 1998 +Moved this function out of softfloat-specialize into fpmodule.c. +This effectively isolates all the changes required for integrating with the +Linux kernel into fpmodule.c. Porting to NetBSD should only require modifying +fpmodule.c to integrate with the NetBSD kernel (I hope!). +------------------------------------------------------------------------------- +void float_raise( int8 flags ) +{ + float_exception_flags |= flags; +} +*/ + +/* +------------------------------------------------------------------------------- +Internal canonical NaN format. +------------------------------------------------------------------------------- +*/ +typedef struct { + flag sign; + bits64 high, low; +} commonNaNT; + +/* +------------------------------------------------------------------------------- +The pattern for a default generated single-precision NaN. +------------------------------------------------------------------------------- +*/ +#define float32_default_nan 0xFFFFFFFF + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is a NaN; +otherwise returns 0. +------------------------------------------------------------------------------- +*/ +flag float32_is_nan( float32 a ) +{ + + return ( 0xFF000000 < (bits32) ( a<<1 ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is a signaling +NaN; otherwise returns 0. +------------------------------------------------------------------------------- +*/ +flag float32_is_signaling_nan( float32 a ) +{ + + return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the single-precision floating-point NaN +`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid +exception is raised. +------------------------------------------------------------------------------- +*/ +static commonNaNT float32ToCommonNaN( float32 a ) +{ + commonNaNT z; + + if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); + z.sign = a>>31; + z.low = 0; + z.high = ( (bits64) a )<<41; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the canonical NaN `a' to the single- +precision floating-point format. +------------------------------------------------------------------------------- +*/ +static float32 commonNaNToFloat32( commonNaNT a ) +{ + + return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>41 ); + +} + +/* +------------------------------------------------------------------------------- +Takes two single-precision floating-point values `a' and `b', one of which +is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a +signaling NaN, the invalid exception is raised. +------------------------------------------------------------------------------- +*/ +static float32 propagateFloat32NaN( float32 a, float32 b ) +{ + flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; + + aIsNaN = float32_is_nan( a ); + aIsSignalingNaN = float32_is_signaling_nan( a ); + bIsNaN = float32_is_nan( b ); + bIsSignalingNaN = float32_is_signaling_nan( b ); + a |= 0x00400000; + b |= 0x00400000; + if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); + if ( aIsNaN ) { + return ( aIsSignalingNaN & bIsNaN ) ? b : a; + } + else { + return b; + } + +} + +/* +------------------------------------------------------------------------------- +The pattern for a default generated double-precision NaN. +------------------------------------------------------------------------------- +*/ +#define float64_default_nan LIT64( 0xFFFFFFFFFFFFFFFF ) + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is a NaN; +otherwise returns 0. +------------------------------------------------------------------------------- +*/ +flag float64_is_nan( float64 a ) +{ + + return ( LIT64( 0xFFE0000000000000 ) < (bits64) ( a<<1 ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is a signaling +NaN; otherwise returns 0. +------------------------------------------------------------------------------- +*/ +flag float64_is_signaling_nan( float64 a ) +{ + + return + ( ( ( a>>51 ) & 0xFFF ) == 0xFFE ) + && ( a & LIT64( 0x0007FFFFFFFFFFFF ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the double-precision floating-point NaN +`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid +exception is raised. +------------------------------------------------------------------------------- +*/ +static commonNaNT float64ToCommonNaN( float64 a ) +{ + commonNaNT z; + + if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); + z.sign = a>>63; + z.low = 0; + z.high = a<<12; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the canonical NaN `a' to the double- +precision floating-point format. +------------------------------------------------------------------------------- +*/ +static float64 commonNaNToFloat64( commonNaNT a ) +{ + + return + ( ( (bits64) a.sign )<<63 ) + | LIT64( 0x7FF8000000000000 ) + | ( a.high>>12 ); + +} + +/* +------------------------------------------------------------------------------- +Takes two double-precision floating-point values `a' and `b', one of which +is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a +signaling NaN, the invalid exception is raised. +------------------------------------------------------------------------------- +*/ +static float64 propagateFloat64NaN( float64 a, float64 b ) +{ + flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; + + aIsNaN = float64_is_nan( a ); + aIsSignalingNaN = float64_is_signaling_nan( a ); + bIsNaN = float64_is_nan( b ); + bIsSignalingNaN = float64_is_signaling_nan( b ); + a |= LIT64( 0x0008000000000000 ); + b |= LIT64( 0x0008000000000000 ); + if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); + if ( aIsNaN ) { + return ( aIsSignalingNaN & bIsNaN ) ? b : a; + } + else { + return b; + } + +} + +#ifdef FLOATX80 + +/* +------------------------------------------------------------------------------- +The pattern for a default generated extended double-precision NaN. The +`high' and `low' values hold the most- and least-significant bits, +respectively. +------------------------------------------------------------------------------- +*/ +#define floatx80_default_nan_high 0xFFFF +#define floatx80_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is a +NaN; otherwise returns 0. +------------------------------------------------------------------------------- +*/ +flag floatx80_is_nan( floatx80 a ) +{ + + return ( ( a.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( a.low<<1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is a +signaling NaN; otherwise returns 0. +------------------------------------------------------------------------------- +*/ +flag floatx80_is_signaling_nan( floatx80 a ) +{ + //register int lr; + bits64 aLow; + + //__asm__("mov %0, lr" : : "g" (lr)); + //fp_printk("floatx80_is_signalling_nan() called from 0x%08x\n",lr); + aLow = a.low & ~ LIT64( 0x4000000000000000 ); + return + ( ( a.high & 0x7FFF ) == 0x7FFF ) + && (bits64) ( aLow<<1 ) + && ( a.low == aLow ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the extended double-precision floating- +point NaN `a' to the canonical NaN format. If `a' is a signaling NaN, the +invalid exception is raised. +------------------------------------------------------------------------------- +*/ +static commonNaNT floatx80ToCommonNaN( floatx80 a ) +{ + commonNaNT z; + + if ( floatx80_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); + z.sign = a.high>>15; + z.low = 0; + z.high = a.low<<1; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the canonical NaN `a' to the extended +double-precision floating-point format. +------------------------------------------------------------------------------- +*/ +static floatx80 commonNaNToFloatx80( commonNaNT a ) +{ + floatx80 z; + + z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 ); + z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF; + return z; + +} + +/* +------------------------------------------------------------------------------- +Takes two extended double-precision floating-point values `a' and `b', one +of which is a NaN, and returns the appropriate NaN result. If either `a' or +`b' is a signaling NaN, the invalid exception is raised. +------------------------------------------------------------------------------- +*/ +static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b ) +{ + flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; + + aIsNaN = floatx80_is_nan( a ); + aIsSignalingNaN = floatx80_is_signaling_nan( a ); + bIsNaN = floatx80_is_nan( b ); + bIsSignalingNaN = floatx80_is_signaling_nan( b ); + a.low |= LIT64( 0xC000000000000000 ); + b.low |= LIT64( 0xC000000000000000 ); + if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); + if ( aIsNaN ) { + return ( aIsSignalingNaN & bIsNaN ) ? b : a; + } + else { + return b; + } + +} + +#endif diff -Nru a/arch/arm26/nwfpe/softfloat.c b/arch/arm26/nwfpe/softfloat.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/softfloat.c Fri Jun 13 01:07:45 2003 @@ -0,0 +1,3439 @@ +/* +=============================================================================== + +This C source file is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/softfloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these three paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +#include "fpa11.h" +#include "milieu.h" +#include "softfloat.h" + +/* +------------------------------------------------------------------------------- +Floating-point rounding mode, extended double-precision rounding precision, +and exception flags. +------------------------------------------------------------------------------- +*/ +int8 float_rounding_mode = float_round_nearest_even; +int8 floatx80_rounding_precision = 80; +int8 float_exception_flags; + +/* +------------------------------------------------------------------------------- +Primitive arithmetic functions, including multi-word arithmetic, and +division and square root approximations. (Can be specialized to target if +desired.) +------------------------------------------------------------------------------- +*/ +#include "softfloat-macros" + +/* +------------------------------------------------------------------------------- +Functions and definitions to determine: (1) whether tininess for underflow +is detected before or after rounding by default, (2) what (if anything) +happens when exceptions are raised, (3) how signaling NaNs are distinguished +from quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNs +are propagated from function inputs to output. These details are target- +specific. +------------------------------------------------------------------------------- +*/ +#include "softfloat-specialize" + +/* +------------------------------------------------------------------------------- +Takes a 64-bit fixed-point value `absZ' with binary point between bits 6 +and 7, and returns the properly rounded 32-bit integer corresponding to the +input. If `zSign' is nonzero, the input is negated before being converted +to an integer. Bit 63 of `absZ' must be zero. Ordinarily, the fixed-point +input is simply rounded to an integer, with the inexact exception raised if +the input cannot be represented exactly as an integer. If the fixed-point +input is too large, however, the invalid exception is raised and the largest +positive or negative integer is returned. +------------------------------------------------------------------------------- +*/ +static int32 roundAndPackInt32( flag zSign, bits64 absZ ) +{ + int8 roundingMode; + flag roundNearestEven; + int8 roundIncrement, roundBits; + int32 z; + + roundingMode = float_rounding_mode; + roundNearestEven = ( roundingMode == float_round_nearest_even ); + roundIncrement = 0x40; + if ( ! roundNearestEven ) { + if ( roundingMode == float_round_to_zero ) { + roundIncrement = 0; + } + else { + roundIncrement = 0x7F; + if ( zSign ) { + if ( roundingMode == float_round_up ) roundIncrement = 0; + } + else { + if ( roundingMode == float_round_down ) roundIncrement = 0; + } + } + } + roundBits = absZ & 0x7F; + absZ = ( absZ + roundIncrement )>>7; + absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); + z = absZ; + if ( zSign ) z = - z; + if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) { + float_exception_flags |= float_flag_invalid; + return zSign ? 0x80000000 : 0x7FFFFFFF; + } + if ( roundBits ) float_exception_flags |= float_flag_inexact; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns the fraction bits of the single-precision floating-point value `a'. +------------------------------------------------------------------------------- +*/ +INLINE bits32 extractFloat32Frac( float32 a ) +{ + + return a & 0x007FFFFF; + +} + +/* +------------------------------------------------------------------------------- +Returns the exponent bits of the single-precision floating-point value `a'. +------------------------------------------------------------------------------- +*/ +INLINE int16 extractFloat32Exp( float32 a ) +{ + + return ( a>>23 ) & 0xFF; + +} + +/* +------------------------------------------------------------------------------- +Returns the sign bit of the single-precision floating-point value `a'. +------------------------------------------------------------------------------- +*/ +INLINE flag extractFloat32Sign( float32 a ) +{ + + return a>>31; + +} + +/* +------------------------------------------------------------------------------- +Normalizes the subnormal single-precision floating-point value represented +by the denormalized significand `aSig'. The normalized exponent and +significand are stored at the locations pointed to by `zExpPtr' and +`zSigPtr', respectively. +------------------------------------------------------------------------------- +*/ +static void + normalizeFloat32Subnormal( bits32 aSig, int16 *zExpPtr, bits32 *zSigPtr ) +{ + int8 shiftCount; + + shiftCount = countLeadingZeros32( aSig ) - 8; + *zSigPtr = aSig<>7; + zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); + if ( zSig == 0 ) zExp = 0; + return packFloat32( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Takes an abstract floating-point value having sign `zSign', exponent `zExp', +and significand `zSig', and returns the proper single-precision floating- +point value corresponding to the abstract input. This routine is just like +`roundAndPackFloat32' except that `zSig' does not have to be normalized in +any way. In all cases, `zExp' must be 1 less than the ``true'' floating- +point exponent. +------------------------------------------------------------------------------- +*/ +static float32 + normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ) +{ + int8 shiftCount; + + shiftCount = countLeadingZeros32( zSig ) - 1; + return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<>52 ) & 0x7FF; + +} + +/* +------------------------------------------------------------------------------- +Returns the sign bit of the double-precision floating-point value `a'. +------------------------------------------------------------------------------- +*/ +INLINE flag extractFloat64Sign( float64 a ) +{ + + return a>>63; + +} + +/* +------------------------------------------------------------------------------- +Normalizes the subnormal double-precision floating-point value represented +by the denormalized significand `aSig'. The normalized exponent and +significand are stored at the locations pointed to by `zExpPtr' and +`zSigPtr', respectively. +------------------------------------------------------------------------------- +*/ +static void + normalizeFloat64Subnormal( bits64 aSig, int16 *zExpPtr, bits64 *zSigPtr ) +{ + int8 shiftCount; + + shiftCount = countLeadingZeros64( aSig ) - 11; + *zSigPtr = aSig<>10; + zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven ); + if ( zSig == 0 ) zExp = 0; + return packFloat64( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Takes an abstract floating-point value having sign `zSign', exponent `zExp', +and significand `zSig', and returns the proper double-precision floating- +point value corresponding to the abstract input. This routine is just like +`roundAndPackFloat64' except that `zSig' does not have to be normalized in +any way. In all cases, `zExp' must be 1 less than the ``true'' floating- +point exponent. +------------------------------------------------------------------------------- +*/ +static float64 + normalizeRoundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig ) +{ + int8 shiftCount; + + shiftCount = countLeadingZeros64( zSig ) - 1; + return roundAndPackFloat64( zSign, zExp - shiftCount, zSig<>15; + +} + +/* +------------------------------------------------------------------------------- +Normalizes the subnormal extended double-precision floating-point value +represented by the denormalized significand `aSig'. The normalized exponent +and significand are stored at the locations pointed to by `zExpPtr' and +`zSigPtr', respectively. +------------------------------------------------------------------------------- +*/ +static void + normalizeFloatx80Subnormal( bits64 aSig, int32 *zExpPtr, bits64 *zSigPtr ) +{ + int8 shiftCount; + + shiftCount = countLeadingZeros64( aSig ); + *zSigPtr = aSig<>( - shiftCount ); + if ( (bits32) ( aSig<<( shiftCount & 31 ) ) ) { + float_exception_flags |= float_flag_inexact; + } + return aSign ? - z : z; + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the single-precision floating-point value +`a' to the double-precision floating-point format. The conversion is +performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic. +------------------------------------------------------------------------------- +*/ +float64 float32_to_float64( float32 a ) +{ + flag aSign; + int16 aExp; + bits32 aSig; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + aSign = extractFloat32Sign( a ); + if ( aExp == 0xFF ) { + if ( aSig ) return commonNaNToFloat64( float32ToCommonNaN( a ) ); + return packFloat64( aSign, 0x7FF, 0 ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloat64( aSign, 0, 0 ); + normalizeFloat32Subnormal( aSig, &aExp, &aSig ); + --aExp; + } + return packFloat64( aSign, aExp + 0x380, ( (bits64) aSig )<<29 ); + +} + +#ifdef FLOATX80 + +/* +------------------------------------------------------------------------------- +Returns the result of converting the single-precision floating-point value +`a' to the extended double-precision floating-point format. The conversion +is performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic. +------------------------------------------------------------------------------- +*/ +floatx80 float32_to_floatx80( float32 a ) +{ + flag aSign; + int16 aExp; + bits32 aSig; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + aSign = extractFloat32Sign( a ); + if ( aExp == 0xFF ) { + if ( aSig ) return commonNaNToFloatx80( float32ToCommonNaN( a ) ); + return packFloatx80( aSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloatx80( aSign, 0, 0 ); + normalizeFloat32Subnormal( aSig, &aExp, &aSig ); + } + aSig |= 0x00800000; + return packFloatx80( aSign, aExp + 0x3F80, ( (bits64) aSig )<<40 ); + +} + +#endif + +/* +------------------------------------------------------------------------------- +Rounds the single-precision floating-point value `a' to an integer, and +returns the result as a single-precision floating-point value. The +operation is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float32 float32_round_to_int( float32 a ) +{ + flag aSign; + int16 aExp; + bits32 lastBitMask, roundBitsMask; + int8 roundingMode; + float32 z; + + aExp = extractFloat32Exp( a ); + if ( 0x96 <= aExp ) { + if ( ( aExp == 0xFF ) && extractFloat32Frac( a ) ) { + return propagateFloat32NaN( a, a ); + } + return a; + } + if ( aExp <= 0x7E ) { + if ( (bits32) ( a<<1 ) == 0 ) return a; + float_exception_flags |= float_flag_inexact; + aSign = extractFloat32Sign( a ); + switch ( float_rounding_mode ) { + case float_round_nearest_even: + if ( ( aExp == 0x7E ) && extractFloat32Frac( a ) ) { + return packFloat32( aSign, 0x7F, 0 ); + } + break; + case float_round_down: + return aSign ? 0xBF800000 : 0; + case float_round_up: + return aSign ? 0x80000000 : 0x3F800000; + } + return packFloat32( aSign, 0, 0 ); + } + lastBitMask = 1; + lastBitMask <<= 0x96 - aExp; + roundBitsMask = lastBitMask - 1; + z = a; + roundingMode = float_rounding_mode; + if ( roundingMode == float_round_nearest_even ) { + z += lastBitMask>>1; + if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask; + } + else if ( roundingMode != float_round_to_zero ) { + if ( extractFloat32Sign( z ) ^ ( roundingMode == float_round_up ) ) { + z += roundBitsMask; + } + } + z &= ~ roundBitsMask; + if ( z != a ) float_exception_flags |= float_flag_inexact; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns the result of adding the absolute values of the single-precision +floating-point values `a' and `b'. If `zSign' is true, the sum is negated +before being returned. `zSign' is ignored if the result is a NaN. The +addition is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +static float32 addFloat32Sigs( float32 a, float32 b, flag zSign ) +{ + int16 aExp, bExp, zExp; + bits32 aSig, bSig, zSig; + int16 expDiff; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + bSig = extractFloat32Frac( b ); + bExp = extractFloat32Exp( b ); + expDiff = aExp - bExp; + aSig <<= 6; + bSig <<= 6; + if ( 0 < expDiff ) { + if ( aExp == 0xFF ) { + if ( aSig ) return propagateFloat32NaN( a, b ); + return a; + } + if ( bExp == 0 ) { + --expDiff; + } + else { + bSig |= 0x20000000; + } + shift32RightJamming( bSig, expDiff, &bSig ); + zExp = aExp; + } + else if ( expDiff < 0 ) { + if ( bExp == 0xFF ) { + if ( bSig ) return propagateFloat32NaN( a, b ); + return packFloat32( zSign, 0xFF, 0 ); + } + if ( aExp == 0 ) { + ++expDiff; + } + else { + aSig |= 0x20000000; + } + shift32RightJamming( aSig, - expDiff, &aSig ); + zExp = bExp; + } + else { + if ( aExp == 0xFF ) { + if ( aSig | bSig ) return propagateFloat32NaN( a, b ); + return a; + } + if ( aExp == 0 ) return packFloat32( zSign, 0, ( aSig + bSig )>>6 ); + zSig = 0x40000000 + aSig + bSig; + zExp = aExp; + goto roundAndPack; + } + aSig |= 0x20000000; + zSig = ( aSig + bSig )<<1; + --zExp; + if ( (sbits32) zSig < 0 ) { + zSig = aSig + bSig; + ++zExp; + } + roundAndPack: + return roundAndPackFloat32( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of subtracting the absolute values of the single- +precision floating-point values `a' and `b'. If `zSign' is true, the +difference is negated before being returned. `zSign' is ignored if the +result is a NaN. The subtraction is performed according to the IEC/IEEE +Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +static float32 subFloat32Sigs( float32 a, float32 b, flag zSign ) +{ + int16 aExp, bExp, zExp; + bits32 aSig, bSig, zSig; + int16 expDiff; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + bSig = extractFloat32Frac( b ); + bExp = extractFloat32Exp( b ); + expDiff = aExp - bExp; + aSig <<= 7; + bSig <<= 7; + if ( 0 < expDiff ) goto aExpBigger; + if ( expDiff < 0 ) goto bExpBigger; + if ( aExp == 0xFF ) { + if ( aSig | bSig ) return propagateFloat32NaN( a, b ); + float_raise( float_flag_invalid ); + return float32_default_nan; + } + if ( aExp == 0 ) { + aExp = 1; + bExp = 1; + } + if ( bSig < aSig ) goto aBigger; + if ( aSig < bSig ) goto bBigger; + return packFloat32( float_rounding_mode == float_round_down, 0, 0 ); + bExpBigger: + if ( bExp == 0xFF ) { + if ( bSig ) return propagateFloat32NaN( a, b ); + return packFloat32( zSign ^ 1, 0xFF, 0 ); + } + if ( aExp == 0 ) { + ++expDiff; + } + else { + aSig |= 0x40000000; + } + shift32RightJamming( aSig, - expDiff, &aSig ); + bSig |= 0x40000000; + bBigger: + zSig = bSig - aSig; + zExp = bExp; + zSign ^= 1; + goto normalizeRoundAndPack; + aExpBigger: + if ( aExp == 0xFF ) { + if ( aSig ) return propagateFloat32NaN( a, b ); + return a; + } + if ( bExp == 0 ) { + --expDiff; + } + else { + bSig |= 0x40000000; + } + shift32RightJamming( bSig, expDiff, &bSig ); + aSig |= 0x40000000; + aBigger: + zSig = aSig - bSig; + zExp = aExp; + normalizeRoundAndPack: + --zExp; + return normalizeRoundAndPackFloat32( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of adding the single-precision floating-point values `a' +and `b'. The operation is performed according to the IEC/IEEE Standard for +Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float32 float32_add( float32 a, float32 b ) +{ + flag aSign, bSign; + + aSign = extractFloat32Sign( a ); + bSign = extractFloat32Sign( b ); + if ( aSign == bSign ) { + return addFloat32Sigs( a, b, aSign ); + } + else { + return subFloat32Sigs( a, b, aSign ); + } + +} + +/* +------------------------------------------------------------------------------- +Returns the result of subtracting the single-precision floating-point values +`a' and `b'. The operation is performed according to the IEC/IEEE Standard +for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float32 float32_sub( float32 a, float32 b ) +{ + flag aSign, bSign; + + aSign = extractFloat32Sign( a ); + bSign = extractFloat32Sign( b ); + if ( aSign == bSign ) { + return subFloat32Sigs( a, b, aSign ); + } + else { + return addFloat32Sigs( a, b, aSign ); + } + +} + +/* +------------------------------------------------------------------------------- +Returns the result of multiplying the single-precision floating-point values +`a' and `b'. The operation is performed according to the IEC/IEEE Standard +for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float32 float32_mul( float32 a, float32 b ) +{ + flag aSign, bSign, zSign; + int16 aExp, bExp, zExp; + bits32 aSig, bSig; + bits64 zSig64; + bits32 zSig; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + aSign = extractFloat32Sign( a ); + bSig = extractFloat32Frac( b ); + bExp = extractFloat32Exp( b ); + bSign = extractFloat32Sign( b ); + zSign = aSign ^ bSign; + if ( aExp == 0xFF ) { + if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { + return propagateFloat32NaN( a, b ); + } + if ( ( bExp | bSig ) == 0 ) { + float_raise( float_flag_invalid ); + return float32_default_nan; + } + return packFloat32( zSign, 0xFF, 0 ); + } + if ( bExp == 0xFF ) { + if ( bSig ) return propagateFloat32NaN( a, b ); + if ( ( aExp | aSig ) == 0 ) { + float_raise( float_flag_invalid ); + return float32_default_nan; + } + return packFloat32( zSign, 0xFF, 0 ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloat32( zSign, 0, 0 ); + normalizeFloat32Subnormal( aSig, &aExp, &aSig ); + } + if ( bExp == 0 ) { + if ( bSig == 0 ) return packFloat32( zSign, 0, 0 ); + normalizeFloat32Subnormal( bSig, &bExp, &bSig ); + } + zExp = aExp + bExp - 0x7F; + aSig = ( aSig | 0x00800000 )<<7; + bSig = ( bSig | 0x00800000 )<<8; + shift64RightJamming( ( (bits64) aSig ) * bSig, 32, &zSig64 ); + zSig = zSig64; + if ( 0 <= (sbits32) ( zSig<<1 ) ) { + zSig <<= 1; + --zExp; + } + return roundAndPackFloat32( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of dividing the single-precision floating-point value `a' +by the corresponding value `b'. The operation is performed according to the +IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float32 float32_div( float32 a, float32 b ) +{ + flag aSign, bSign, zSign; + int16 aExp, bExp, zExp; + bits32 aSig, bSig, zSig; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + aSign = extractFloat32Sign( a ); + bSig = extractFloat32Frac( b ); + bExp = extractFloat32Exp( b ); + bSign = extractFloat32Sign( b ); + zSign = aSign ^ bSign; + if ( aExp == 0xFF ) { + if ( aSig ) return propagateFloat32NaN( a, b ); + if ( bExp == 0xFF ) { + if ( bSig ) return propagateFloat32NaN( a, b ); + float_raise( float_flag_invalid ); + return float32_default_nan; + } + return packFloat32( zSign, 0xFF, 0 ); + } + if ( bExp == 0xFF ) { + if ( bSig ) return propagateFloat32NaN( a, b ); + return packFloat32( zSign, 0, 0 ); + } + if ( bExp == 0 ) { + if ( bSig == 0 ) { + if ( ( aExp | aSig ) == 0 ) { + float_raise( float_flag_invalid ); + return float32_default_nan; + } + float_raise( float_flag_divbyzero ); + return packFloat32( zSign, 0xFF, 0 ); + } + normalizeFloat32Subnormal( bSig, &bExp, &bSig ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloat32( zSign, 0, 0 ); + normalizeFloat32Subnormal( aSig, &aExp, &aSig ); + } + zExp = aExp - bExp + 0x7D; + aSig = ( aSig | 0x00800000 )<<7; + bSig = ( bSig | 0x00800000 )<<8; + if ( bSig <= ( aSig + aSig ) ) { + aSig >>= 1; + ++zExp; + } + zSig = ( ( (bits64) aSig )<<32 ) / bSig; + if ( ( zSig & 0x3F ) == 0 ) { + zSig |= ( ( (bits64) bSig ) * zSig != ( (bits64) aSig )<<32 ); + } + return roundAndPackFloat32( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the remainder of the single-precision floating-point value `a' +with respect to the corresponding value `b'. The operation is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float32 float32_rem( float32 a, float32 b ) +{ + flag aSign, bSign, zSign; + int16 aExp, bExp, expDiff; + bits32 aSig, bSig; + bits32 q; + bits64 aSig64, bSig64, q64; + bits32 alternateASig; + sbits32 sigMean; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + aSign = extractFloat32Sign( a ); + bSig = extractFloat32Frac( b ); + bExp = extractFloat32Exp( b ); + bSign = extractFloat32Sign( b ); + if ( aExp == 0xFF ) { + if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { + return propagateFloat32NaN( a, b ); + } + float_raise( float_flag_invalid ); + return float32_default_nan; + } + if ( bExp == 0xFF ) { + if ( bSig ) return propagateFloat32NaN( a, b ); + return a; + } + if ( bExp == 0 ) { + if ( bSig == 0 ) { + float_raise( float_flag_invalid ); + return float32_default_nan; + } + normalizeFloat32Subnormal( bSig, &bExp, &bSig ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return a; + normalizeFloat32Subnormal( aSig, &aExp, &aSig ); + } + expDiff = aExp - bExp; + aSig |= 0x00800000; + bSig |= 0x00800000; + if ( expDiff < 32 ) { + aSig <<= 8; + bSig <<= 8; + if ( expDiff < 0 ) { + if ( expDiff < -1 ) return a; + aSig >>= 1; + } + q = ( bSig <= aSig ); + if ( q ) aSig -= bSig; + if ( 0 < expDiff ) { + q = ( ( (bits64) aSig )<<32 ) / bSig; + q >>= 32 - expDiff; + bSig >>= 2; + aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; + } + else { + aSig >>= 2; + bSig >>= 2; + } + } + else { + if ( bSig <= aSig ) aSig -= bSig; + aSig64 = ( (bits64) aSig )<<40; + bSig64 = ( (bits64) bSig )<<40; + expDiff -= 64; + while ( 0 < expDiff ) { + q64 = estimateDiv128To64( aSig64, 0, bSig64 ); + q64 = ( 2 < q64 ) ? q64 - 2 : 0; + aSig64 = - ( ( bSig * q64 )<<38 ); + expDiff -= 62; + } + expDiff += 64; + q64 = estimateDiv128To64( aSig64, 0, bSig64 ); + q64 = ( 2 < q64 ) ? q64 - 2 : 0; + q = q64>>( 64 - expDiff ); + bSig <<= 6; + aSig = ( ( aSig64>>33 )<<( expDiff - 1 ) ) - bSig * q; + } + do { + alternateASig = aSig; + ++q; + aSig -= bSig; + } while ( 0 <= (sbits32) aSig ); + sigMean = aSig + alternateASig; + if ( ( sigMean < 0 ) || ( ( sigMean == 0 ) && ( q & 1 ) ) ) { + aSig = alternateASig; + } + zSign = ( (sbits32) aSig < 0 ); + if ( zSign ) aSig = - aSig; + return normalizeRoundAndPackFloat32( aSign ^ zSign, bExp, aSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the square root of the single-precision floating-point value `a'. +The operation is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float32 float32_sqrt( float32 a ) +{ + flag aSign; + int16 aExp, zExp; + bits32 aSig, zSig; + bits64 rem, term; + + aSig = extractFloat32Frac( a ); + aExp = extractFloat32Exp( a ); + aSign = extractFloat32Sign( a ); + if ( aExp == 0xFF ) { + if ( aSig ) return propagateFloat32NaN( a, 0 ); + if ( ! aSign ) return a; + float_raise( float_flag_invalid ); + return float32_default_nan; + } + if ( aSign ) { + if ( ( aExp | aSig ) == 0 ) return a; + float_raise( float_flag_invalid ); + return float32_default_nan; + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return 0; + normalizeFloat32Subnormal( aSig, &aExp, &aSig ); + } + zExp = ( ( aExp - 0x7F )>>1 ) + 0x7E; + aSig = ( aSig | 0x00800000 )<<8; + zSig = estimateSqrt32( aExp, aSig ) + 2; + if ( ( zSig & 0x7F ) <= 5 ) { + if ( zSig < 2 ) { + zSig = 0xFFFFFFFF; + } + else { + aSig >>= aExp & 1; + term = ( (bits64) zSig ) * zSig; + rem = ( ( (bits64) aSig )<<32 ) - term; + while ( (sbits64) rem < 0 ) { + --zSig; + rem += ( ( (bits64) zSig )<<1 ) | 1; + } + zSig |= ( rem != 0 ); + } + } + shift32RightJamming( zSig, 1, &zSig ); + return roundAndPackFloat32( 0, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is equal to the +corresponding value `b', and 0 otherwise. The comparison is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float32_eq( float32 a, float32 b ) +{ + + if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) + || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) + ) { + if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + return ( a == b ) || ( (bits32) ( ( a | b )<<1 ) == 0 ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is less than or +equal to the corresponding value `b', and 0 otherwise. The comparison is +performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float32_le( float32 a, float32 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) + || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + aSign = extractFloat32Sign( a ); + bSign = extractFloat32Sign( b ); + if ( aSign != bSign ) return aSign || ( (bits32) ( ( a | b )<<1 ) == 0 ); + return ( a == b ) || ( aSign ^ ( a < b ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is less than +the corresponding value `b', and 0 otherwise. The comparison is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float32_lt( float32 a, float32 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) + || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + aSign = extractFloat32Sign( a ); + bSign = extractFloat32Sign( b ); + if ( aSign != bSign ) return aSign && ( (bits32) ( ( a | b )<<1 ) != 0 ); + return ( a != b ) && ( aSign ^ ( a < b ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is equal to the +corresponding value `b', and 0 otherwise. The invalid exception is raised +if either operand is a NaN. Otherwise, the comparison is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float32_eq_signaling( float32 a, float32 b ) +{ + + if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) + || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + return ( a == b ) || ( (bits32) ( ( a | b )<<1 ) == 0 ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is less than or +equal to the corresponding value `b', and 0 otherwise. Quiet NaNs do not +cause an exception. Otherwise, the comparison is performed according to the +IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float32_le_quiet( float32 a, float32 b ) +{ + flag aSign, bSign; + //int16 aExp, bExp; + + if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) + || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) + ) { + if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + aSign = extractFloat32Sign( a ); + bSign = extractFloat32Sign( b ); + if ( aSign != bSign ) return aSign || ( (bits32) ( ( a | b )<<1 ) == 0 ); + return ( a == b ) || ( aSign ^ ( a < b ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the single-precision floating-point value `a' is less than +the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause an +exception. Otherwise, the comparison is performed according to the IEC/IEEE +Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float32_lt_quiet( float32 a, float32 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) + || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) + ) { + if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + aSign = extractFloat32Sign( a ); + bSign = extractFloat32Sign( b ); + if ( aSign != bSign ) return aSign && ( (bits32) ( ( a | b )<<1 ) != 0 ); + return ( a != b ) && ( aSign ^ ( a < b ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the double-precision floating-point value +`a' to the 32-bit two's complement integer format. The conversion is +performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic---which means in particular that the conversion is rounded +according to the current rounding mode. If `a' is a NaN, the largest +positive integer is returned. Otherwise, if the conversion overflows, the +largest integer with the same sign as `a' is returned. +------------------------------------------------------------------------------- +*/ +int32 float64_to_int32( float64 a ) +{ + flag aSign; + int16 aExp, shiftCount; + bits64 aSig; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + aSign = extractFloat64Sign( a ); + if ( ( aExp == 0x7FF ) && aSig ) aSign = 0; + if ( aExp ) aSig |= LIT64( 0x0010000000000000 ); + shiftCount = 0x42C - aExp; + if ( 0 < shiftCount ) shift64RightJamming( aSig, shiftCount, &aSig ); + return roundAndPackInt32( aSign, aSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the double-precision floating-point value +`a' to the 32-bit two's complement integer format. The conversion is +performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic, except that the conversion is always rounded toward zero. If +`a' is a NaN, the largest positive integer is returned. Otherwise, if the +conversion overflows, the largest integer with the same sign as `a' is +returned. +------------------------------------------------------------------------------- +*/ +int32 float64_to_int32_round_to_zero( float64 a ) +{ + flag aSign; + int16 aExp, shiftCount; + bits64 aSig, savedASig; + int32 z; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + aSign = extractFloat64Sign( a ); + shiftCount = 0x433 - aExp; + if ( shiftCount < 21 ) { + if ( ( aExp == 0x7FF ) && aSig ) aSign = 0; + goto invalid; + } + else if ( 52 < shiftCount ) { + if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; + return 0; + } + aSig |= LIT64( 0x0010000000000000 ); + savedASig = aSig; + aSig >>= shiftCount; + z = aSig; + if ( aSign ) z = - z; + if ( ( z < 0 ) ^ aSign ) { + invalid: + float_exception_flags |= float_flag_invalid; + return aSign ? 0x80000000 : 0x7FFFFFFF; + } + if ( ( aSig<>= shiftCount; + z = aSig; + if ( aSign ) z = - z; + if ( ( z < 0 ) ^ aSign ) { + invalid: + float_exception_flags |= float_flag_invalid; + return aSign ? 0x80000000 : 0x7FFFFFFF; + } + if ( ( aSig<>1; + if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask; + } + else if ( roundingMode != float_round_to_zero ) { + if ( extractFloat64Sign( z ) ^ ( roundingMode == float_round_up ) ) { + z += roundBitsMask; + } + } + z &= ~ roundBitsMask; + if ( z != a ) float_exception_flags |= float_flag_inexact; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns the result of adding the absolute values of the double-precision +floating-point values `a' and `b'. If `zSign' is true, the sum is negated +before being returned. `zSign' is ignored if the result is a NaN. The +addition is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +static float64 addFloat64Sigs( float64 a, float64 b, flag zSign ) +{ + int16 aExp, bExp, zExp; + bits64 aSig, bSig, zSig; + int16 expDiff; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + bSig = extractFloat64Frac( b ); + bExp = extractFloat64Exp( b ); + expDiff = aExp - bExp; + aSig <<= 9; + bSig <<= 9; + if ( 0 < expDiff ) { + if ( aExp == 0x7FF ) { + if ( aSig ) return propagateFloat64NaN( a, b ); + return a; + } + if ( bExp == 0 ) { + --expDiff; + } + else { + bSig |= LIT64( 0x2000000000000000 ); + } + shift64RightJamming( bSig, expDiff, &bSig ); + zExp = aExp; + } + else if ( expDiff < 0 ) { + if ( bExp == 0x7FF ) { + if ( bSig ) return propagateFloat64NaN( a, b ); + return packFloat64( zSign, 0x7FF, 0 ); + } + if ( aExp == 0 ) { + ++expDiff; + } + else { + aSig |= LIT64( 0x2000000000000000 ); + } + shift64RightJamming( aSig, - expDiff, &aSig ); + zExp = bExp; + } + else { + if ( aExp == 0x7FF ) { + if ( aSig | bSig ) return propagateFloat64NaN( a, b ); + return a; + } + if ( aExp == 0 ) return packFloat64( zSign, 0, ( aSig + bSig )>>9 ); + zSig = LIT64( 0x4000000000000000 ) + aSig + bSig; + zExp = aExp; + goto roundAndPack; + } + aSig |= LIT64( 0x2000000000000000 ); + zSig = ( aSig + bSig )<<1; + --zExp; + if ( (sbits64) zSig < 0 ) { + zSig = aSig + bSig; + ++zExp; + } + roundAndPack: + return roundAndPackFloat64( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of subtracting the absolute values of the double- +precision floating-point values `a' and `b'. If `zSign' is true, the +difference is negated before being returned. `zSign' is ignored if the +result is a NaN. The subtraction is performed according to the IEC/IEEE +Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +static float64 subFloat64Sigs( float64 a, float64 b, flag zSign ) +{ + int16 aExp, bExp, zExp; + bits64 aSig, bSig, zSig; + int16 expDiff; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + bSig = extractFloat64Frac( b ); + bExp = extractFloat64Exp( b ); + expDiff = aExp - bExp; + aSig <<= 10; + bSig <<= 10; + if ( 0 < expDiff ) goto aExpBigger; + if ( expDiff < 0 ) goto bExpBigger; + if ( aExp == 0x7FF ) { + if ( aSig | bSig ) return propagateFloat64NaN( a, b ); + float_raise( float_flag_invalid ); + return float64_default_nan; + } + if ( aExp == 0 ) { + aExp = 1; + bExp = 1; + } + if ( bSig < aSig ) goto aBigger; + if ( aSig < bSig ) goto bBigger; + return packFloat64( float_rounding_mode == float_round_down, 0, 0 ); + bExpBigger: + if ( bExp == 0x7FF ) { + if ( bSig ) return propagateFloat64NaN( a, b ); + return packFloat64( zSign ^ 1, 0x7FF, 0 ); + } + if ( aExp == 0 ) { + ++expDiff; + } + else { + aSig |= LIT64( 0x4000000000000000 ); + } + shift64RightJamming( aSig, - expDiff, &aSig ); + bSig |= LIT64( 0x4000000000000000 ); + bBigger: + zSig = bSig - aSig; + zExp = bExp; + zSign ^= 1; + goto normalizeRoundAndPack; + aExpBigger: + if ( aExp == 0x7FF ) { + if ( aSig ) return propagateFloat64NaN( a, b ); + return a; + } + if ( bExp == 0 ) { + --expDiff; + } + else { + bSig |= LIT64( 0x4000000000000000 ); + } + shift64RightJamming( bSig, expDiff, &bSig ); + aSig |= LIT64( 0x4000000000000000 ); + aBigger: + zSig = aSig - bSig; + zExp = aExp; + normalizeRoundAndPack: + --zExp; + return normalizeRoundAndPackFloat64( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of adding the double-precision floating-point values `a' +and `b'. The operation is performed according to the IEC/IEEE Standard for +Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float64 float64_add( float64 a, float64 b ) +{ + flag aSign, bSign; + + aSign = extractFloat64Sign( a ); + bSign = extractFloat64Sign( b ); + if ( aSign == bSign ) { + return addFloat64Sigs( a, b, aSign ); + } + else { + return subFloat64Sigs( a, b, aSign ); + } + +} + +/* +------------------------------------------------------------------------------- +Returns the result of subtracting the double-precision floating-point values +`a' and `b'. The operation is performed according to the IEC/IEEE Standard +for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float64 float64_sub( float64 a, float64 b ) +{ + flag aSign, bSign; + + aSign = extractFloat64Sign( a ); + bSign = extractFloat64Sign( b ); + if ( aSign == bSign ) { + return subFloat64Sigs( a, b, aSign ); + } + else { + return addFloat64Sigs( a, b, aSign ); + } + +} + +/* +------------------------------------------------------------------------------- +Returns the result of multiplying the double-precision floating-point values +`a' and `b'. The operation is performed according to the IEC/IEEE Standard +for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float64 float64_mul( float64 a, float64 b ) +{ + flag aSign, bSign, zSign; + int16 aExp, bExp, zExp; + bits64 aSig, bSig, zSig0, zSig1; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + aSign = extractFloat64Sign( a ); + bSig = extractFloat64Frac( b ); + bExp = extractFloat64Exp( b ); + bSign = extractFloat64Sign( b ); + zSign = aSign ^ bSign; + if ( aExp == 0x7FF ) { + if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) { + return propagateFloat64NaN( a, b ); + } + if ( ( bExp | bSig ) == 0 ) { + float_raise( float_flag_invalid ); + return float64_default_nan; + } + return packFloat64( zSign, 0x7FF, 0 ); + } + if ( bExp == 0x7FF ) { + if ( bSig ) return propagateFloat64NaN( a, b ); + if ( ( aExp | aSig ) == 0 ) { + float_raise( float_flag_invalid ); + return float64_default_nan; + } + return packFloat64( zSign, 0x7FF, 0 ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloat64( zSign, 0, 0 ); + normalizeFloat64Subnormal( aSig, &aExp, &aSig ); + } + if ( bExp == 0 ) { + if ( bSig == 0 ) return packFloat64( zSign, 0, 0 ); + normalizeFloat64Subnormal( bSig, &bExp, &bSig ); + } + zExp = aExp + bExp - 0x3FF; + aSig = ( aSig | LIT64( 0x0010000000000000 ) )<<10; + bSig = ( bSig | LIT64( 0x0010000000000000 ) )<<11; + mul64To128( aSig, bSig, &zSig0, &zSig1 ); + zSig0 |= ( zSig1 != 0 ); + if ( 0 <= (sbits64) ( zSig0<<1 ) ) { + zSig0 <<= 1; + --zExp; + } + return roundAndPackFloat64( zSign, zExp, zSig0 ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of dividing the double-precision floating-point value `a' +by the corresponding value `b'. The operation is performed according to +the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float64 float64_div( float64 a, float64 b ) +{ + flag aSign, bSign, zSign; + int16 aExp, bExp, zExp; + bits64 aSig, bSig, zSig; + bits64 rem0, rem1; + bits64 term0, term1; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + aSign = extractFloat64Sign( a ); + bSig = extractFloat64Frac( b ); + bExp = extractFloat64Exp( b ); + bSign = extractFloat64Sign( b ); + zSign = aSign ^ bSign; + if ( aExp == 0x7FF ) { + if ( aSig ) return propagateFloat64NaN( a, b ); + if ( bExp == 0x7FF ) { + if ( bSig ) return propagateFloat64NaN( a, b ); + float_raise( float_flag_invalid ); + return float64_default_nan; + } + return packFloat64( zSign, 0x7FF, 0 ); + } + if ( bExp == 0x7FF ) { + if ( bSig ) return propagateFloat64NaN( a, b ); + return packFloat64( zSign, 0, 0 ); + } + if ( bExp == 0 ) { + if ( bSig == 0 ) { + if ( ( aExp | aSig ) == 0 ) { + float_raise( float_flag_invalid ); + return float64_default_nan; + } + float_raise( float_flag_divbyzero ); + return packFloat64( zSign, 0x7FF, 0 ); + } + normalizeFloat64Subnormal( bSig, &bExp, &bSig ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloat64( zSign, 0, 0 ); + normalizeFloat64Subnormal( aSig, &aExp, &aSig ); + } + zExp = aExp - bExp + 0x3FD; + aSig = ( aSig | LIT64( 0x0010000000000000 ) )<<10; + bSig = ( bSig | LIT64( 0x0010000000000000 ) )<<11; + if ( bSig <= ( aSig + aSig ) ) { + aSig >>= 1; + ++zExp; + } + zSig = estimateDiv128To64( aSig, 0, bSig ); + if ( ( zSig & 0x1FF ) <= 2 ) { + mul64To128( bSig, zSig, &term0, &term1 ); + sub128( aSig, 0, term0, term1, &rem0, &rem1 ); + while ( (sbits64) rem0 < 0 ) { + --zSig; + add128( rem0, rem1, 0, bSig, &rem0, &rem1 ); + } + zSig |= ( rem1 != 0 ); + } + return roundAndPackFloat64( zSign, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the remainder of the double-precision floating-point value `a' +with respect to the corresponding value `b'. The operation is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float64 float64_rem( float64 a, float64 b ) +{ + flag aSign, bSign, zSign; + int16 aExp, bExp, expDiff; + bits64 aSig, bSig; + bits64 q, alternateASig; + sbits64 sigMean; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + aSign = extractFloat64Sign( a ); + bSig = extractFloat64Frac( b ); + bExp = extractFloat64Exp( b ); + bSign = extractFloat64Sign( b ); + if ( aExp == 0x7FF ) { + if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) { + return propagateFloat64NaN( a, b ); + } + float_raise( float_flag_invalid ); + return float64_default_nan; + } + if ( bExp == 0x7FF ) { + if ( bSig ) return propagateFloat64NaN( a, b ); + return a; + } + if ( bExp == 0 ) { + if ( bSig == 0 ) { + float_raise( float_flag_invalid ); + return float64_default_nan; + } + normalizeFloat64Subnormal( bSig, &bExp, &bSig ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return a; + normalizeFloat64Subnormal( aSig, &aExp, &aSig ); + } + expDiff = aExp - bExp; + aSig = ( aSig | LIT64( 0x0010000000000000 ) )<<11; + bSig = ( bSig | LIT64( 0x0010000000000000 ) )<<11; + if ( expDiff < 0 ) { + if ( expDiff < -1 ) return a; + aSig >>= 1; + } + q = ( bSig <= aSig ); + if ( q ) aSig -= bSig; + expDiff -= 64; + while ( 0 < expDiff ) { + q = estimateDiv128To64( aSig, 0, bSig ); + q = ( 2 < q ) ? q - 2 : 0; + aSig = - ( ( bSig>>2 ) * q ); + expDiff -= 62; + } + expDiff += 64; + if ( 0 < expDiff ) { + q = estimateDiv128To64( aSig, 0, bSig ); + q = ( 2 < q ) ? q - 2 : 0; + q >>= 64 - expDiff; + bSig >>= 2; + aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; + } + else { + aSig >>= 2; + bSig >>= 2; + } + do { + alternateASig = aSig; + ++q; + aSig -= bSig; + } while ( 0 <= (sbits64) aSig ); + sigMean = aSig + alternateASig; + if ( ( sigMean < 0 ) || ( ( sigMean == 0 ) && ( q & 1 ) ) ) { + aSig = alternateASig; + } + zSign = ( (sbits64) aSig < 0 ); + if ( zSign ) aSig = - aSig; + return normalizeRoundAndPackFloat64( aSign ^ zSign, bExp, aSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the square root of the double-precision floating-point value `a'. +The operation is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +float64 float64_sqrt( float64 a ) +{ + flag aSign; + int16 aExp, zExp; + bits64 aSig, zSig; + bits64 rem0, rem1, term0, term1; //, shiftedRem; + //float64 z; + + aSig = extractFloat64Frac( a ); + aExp = extractFloat64Exp( a ); + aSign = extractFloat64Sign( a ); + if ( aExp == 0x7FF ) { + if ( aSig ) return propagateFloat64NaN( a, a ); + if ( ! aSign ) return a; + float_raise( float_flag_invalid ); + return float64_default_nan; + } + if ( aSign ) { + if ( ( aExp | aSig ) == 0 ) return a; + float_raise( float_flag_invalid ); + return float64_default_nan; + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return 0; + normalizeFloat64Subnormal( aSig, &aExp, &aSig ); + } + zExp = ( ( aExp - 0x3FF )>>1 ) + 0x3FE; + aSig |= LIT64( 0x0010000000000000 ); + zSig = estimateSqrt32( aExp, aSig>>21 ); + zSig <<= 31; + aSig <<= 9 - ( aExp & 1 ); + zSig = estimateDiv128To64( aSig, 0, zSig ) + zSig + 2; + if ( ( zSig & 0x3FF ) <= 5 ) { + if ( zSig < 2 ) { + zSig = LIT64( 0xFFFFFFFFFFFFFFFF ); + } + else { + aSig <<= 2; + mul64To128( zSig, zSig, &term0, &term1 ); + sub128( aSig, 0, term0, term1, &rem0, &rem1 ); + while ( (sbits64) rem0 < 0 ) { + --zSig; + shortShift128Left( 0, zSig, 1, &term0, &term1 ); + term1 |= 1; + add128( rem0, rem1, term0, term1, &rem0, &rem1 ); + } + zSig |= ( ( rem0 | rem1 ) != 0 ); + } + } + shift64RightJamming( zSig, 1, &zSig ); + return roundAndPackFloat64( 0, zExp, zSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is equal to the +corresponding value `b', and 0 otherwise. The comparison is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float64_eq( float64 a, float64 b ) +{ + + if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) + || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) + ) { + if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + return ( a == b ) || ( (bits64) ( ( a | b )<<1 ) == 0 ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is less than or +equal to the corresponding value `b', and 0 otherwise. The comparison is +performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float64_le( float64 a, float64 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) + || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + aSign = extractFloat64Sign( a ); + bSign = extractFloat64Sign( b ); + if ( aSign != bSign ) return aSign || ( (bits64) ( ( a | b )<<1 ) == 0 ); + return ( a == b ) || ( aSign ^ ( a < b ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is less than +the corresponding value `b', and 0 otherwise. The comparison is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float64_lt( float64 a, float64 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) + || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + aSign = extractFloat64Sign( a ); + bSign = extractFloat64Sign( b ); + if ( aSign != bSign ) return aSign && ( (bits64) ( ( a | b )<<1 ) != 0 ); + return ( a != b ) && ( aSign ^ ( a < b ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is equal to the +corresponding value `b', and 0 otherwise. The invalid exception is raised +if either operand is a NaN. Otherwise, the comparison is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float64_eq_signaling( float64 a, float64 b ) +{ + + if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) + || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + return ( a == b ) || ( (bits64) ( ( a | b )<<1 ) == 0 ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is less than or +equal to the corresponding value `b', and 0 otherwise. Quiet NaNs do not +cause an exception. Otherwise, the comparison is performed according to the +IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float64_le_quiet( float64 a, float64 b ) +{ + flag aSign, bSign; + //int16 aExp, bExp; + + if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) + || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) + ) { + if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + aSign = extractFloat64Sign( a ); + bSign = extractFloat64Sign( b ); + if ( aSign != bSign ) return aSign || ( (bits64) ( ( a | b )<<1 ) == 0 ); + return ( a == b ) || ( aSign ^ ( a < b ) ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the double-precision floating-point value `a' is less than +the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause an +exception. Otherwise, the comparison is performed according to the IEC/IEEE +Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag float64_lt_quiet( float64 a, float64 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) + || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) + ) { + if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + aSign = extractFloat64Sign( a ); + bSign = extractFloat64Sign( b ); + if ( aSign != bSign ) return aSign && ( (bits64) ( ( a | b )<<1 ) != 0 ); + return ( a != b ) && ( aSign ^ ( a < b ) ); + +} + +#ifdef FLOATX80 + +/* +------------------------------------------------------------------------------- +Returns the result of converting the extended double-precision floating- +point value `a' to the 32-bit two's complement integer format. The +conversion is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic---which means in particular that the conversion +is rounded according to the current rounding mode. If `a' is a NaN, the +largest positive integer is returned. Otherwise, if the conversion +overflows, the largest integer with the same sign as `a' is returned. +------------------------------------------------------------------------------- +*/ +int32 floatx80_to_int32( floatx80 a ) +{ + flag aSign; + int32 aExp, shiftCount; + bits64 aSig; + + aSig = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + aSign = extractFloatx80Sign( a ); + if ( ( aExp == 0x7FFF ) && (bits64) ( aSig<<1 ) ) aSign = 0; + shiftCount = 0x4037 - aExp; + if ( shiftCount <= 0 ) shiftCount = 1; + shift64RightJamming( aSig, shiftCount, &aSig ); + return roundAndPackInt32( aSign, aSig ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of converting the extended double-precision floating- +point value `a' to the 32-bit two's complement integer format. The +conversion is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic, except that the conversion is always rounded +toward zero. If `a' is a NaN, the largest positive integer is returned. +Otherwise, if the conversion overflows, the largest integer with the same +sign as `a' is returned. +------------------------------------------------------------------------------- +*/ +int32 floatx80_to_int32_round_to_zero( floatx80 a ) +{ + flag aSign; + int32 aExp, shiftCount; + bits64 aSig, savedASig; + int32 z; + + aSig = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + aSign = extractFloatx80Sign( a ); + shiftCount = 0x403E - aExp; + if ( shiftCount < 32 ) { + if ( ( aExp == 0x7FFF ) && (bits64) ( aSig<<1 ) ) aSign = 0; + goto invalid; + } + else if ( 63 < shiftCount ) { + if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; + return 0; + } + savedASig = aSig; + aSig >>= shiftCount; + z = aSig; + if ( aSign ) z = - z; + if ( ( z < 0 ) ^ aSign ) { + invalid: + float_exception_flags |= float_flag_invalid; + return aSign ? 0x80000000 : 0x7FFFFFFF; + } + if ( ( aSig<>1; + if ( ( z.low & roundBitsMask ) == 0 ) z.low &= ~ lastBitMask; + } + else if ( roundingMode != float_round_to_zero ) { + if ( extractFloatx80Sign( z ) ^ ( roundingMode == float_round_up ) ) { + z.low += roundBitsMask; + } + } + z.low &= ~ roundBitsMask; + if ( z.low == 0 ) { + ++z.high; + z.low = LIT64( 0x8000000000000000 ); + } + if ( z.low != a.low ) float_exception_flags |= float_flag_inexact; + return z; + +} + +/* +------------------------------------------------------------------------------- +Returns the result of adding the absolute values of the extended double- +precision floating-point values `a' and `b'. If `zSign' is true, the sum is +negated before being returned. `zSign' is ignored if the result is a NaN. +The addition is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign ) +{ + int32 aExp, bExp, zExp; + bits64 aSig, bSig, zSig0, zSig1; + int32 expDiff; + + aSig = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + bSig = extractFloatx80Frac( b ); + bExp = extractFloatx80Exp( b ); + expDiff = aExp - bExp; + if ( 0 < expDiff ) { + if ( aExp == 0x7FFF ) { + if ( (bits64) ( aSig<<1 ) ) return propagateFloatx80NaN( a, b ); + return a; + } + if ( bExp == 0 ) --expDiff; + shift64ExtraRightJamming( bSig, 0, expDiff, &bSig, &zSig1 ); + zExp = aExp; + } + else if ( expDiff < 0 ) { + if ( bExp == 0x7FFF ) { + if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); + return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); + } + if ( aExp == 0 ) ++expDiff; + shift64ExtraRightJamming( aSig, 0, - expDiff, &aSig, &zSig1 ); + zExp = bExp; + } + else { + if ( aExp == 0x7FFF ) { + if ( (bits64) ( ( aSig | bSig )<<1 ) ) { + return propagateFloatx80NaN( a, b ); + } + return a; + } + zSig1 = 0; + zSig0 = aSig + bSig; + if ( aExp == 0 ) { + normalizeFloatx80Subnormal( zSig0, &zExp, &zSig0 ); + goto roundAndPack; + } + zExp = aExp; + goto shiftRight1; + } + + zSig0 = aSig + bSig; + + if ( (sbits64) zSig0 < 0 ) goto roundAndPack; + shiftRight1: + shift64ExtraRightJamming( zSig0, zSig1, 1, &zSig0, &zSig1 ); + zSig0 |= LIT64( 0x8000000000000000 ); + ++zExp; + roundAndPack: + return + roundAndPackFloatx80( + floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of subtracting the absolute values of the extended +double-precision floating-point values `a' and `b'. If `zSign' is true, +the difference is negated before being returned. `zSign' is ignored if the +result is a NaN. The subtraction is performed according to the IEC/IEEE +Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign ) +{ + int32 aExp, bExp, zExp; + bits64 aSig, bSig, zSig0, zSig1; + int32 expDiff; + floatx80 z; + + aSig = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + bSig = extractFloatx80Frac( b ); + bExp = extractFloatx80Exp( b ); + expDiff = aExp - bExp; + if ( 0 < expDiff ) goto aExpBigger; + if ( expDiff < 0 ) goto bExpBigger; + if ( aExp == 0x7FFF ) { + if ( (bits64) ( ( aSig | bSig )<<1 ) ) { + return propagateFloatx80NaN( a, b ); + } + float_raise( float_flag_invalid ); + z.low = floatx80_default_nan_low; + z.high = floatx80_default_nan_high; + return z; + } + if ( aExp == 0 ) { + aExp = 1; + bExp = 1; + } + zSig1 = 0; + if ( bSig < aSig ) goto aBigger; + if ( aSig < bSig ) goto bBigger; + return packFloatx80( float_rounding_mode == float_round_down, 0, 0 ); + bExpBigger: + if ( bExp == 0x7FFF ) { + if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); + return packFloatx80( zSign ^ 1, 0x7FFF, LIT64( 0x8000000000000000 ) ); + } + if ( aExp == 0 ) ++expDiff; + shift128RightJamming( aSig, 0, - expDiff, &aSig, &zSig1 ); + bBigger: + sub128( bSig, 0, aSig, zSig1, &zSig0, &zSig1 ); + zExp = bExp; + zSign ^= 1; + goto normalizeRoundAndPack; + aExpBigger: + if ( aExp == 0x7FFF ) { + if ( (bits64) ( aSig<<1 ) ) return propagateFloatx80NaN( a, b ); + return a; + } + if ( bExp == 0 ) --expDiff; + shift128RightJamming( bSig, 0, expDiff, &bSig, &zSig1 ); + aBigger: + sub128( aSig, 0, bSig, zSig1, &zSig0, &zSig1 ); + zExp = aExp; + normalizeRoundAndPack: + return + normalizeRoundAndPackFloatx80( + floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of adding the extended double-precision floating-point +values `a' and `b'. The operation is performed according to the IEC/IEEE +Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_add( floatx80 a, floatx80 b ) +{ + flag aSign, bSign; + + aSign = extractFloatx80Sign( a ); + bSign = extractFloatx80Sign( b ); + if ( aSign == bSign ) { + return addFloatx80Sigs( a, b, aSign ); + } + else { + return subFloatx80Sigs( a, b, aSign ); + } + +} + +/* +------------------------------------------------------------------------------- +Returns the result of subtracting the extended double-precision floating- +point values `a' and `b'. The operation is performed according to the +IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_sub( floatx80 a, floatx80 b ) +{ + flag aSign, bSign; + + aSign = extractFloatx80Sign( a ); + bSign = extractFloatx80Sign( b ); + if ( aSign == bSign ) { + return subFloatx80Sigs( a, b, aSign ); + } + else { + return addFloatx80Sigs( a, b, aSign ); + } + +} + +/* +------------------------------------------------------------------------------- +Returns the result of multiplying the extended double-precision floating- +point values `a' and `b'. The operation is performed according to the +IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_mul( floatx80 a, floatx80 b ) +{ + flag aSign, bSign, zSign; + int32 aExp, bExp, zExp; + bits64 aSig, bSig, zSig0, zSig1; + floatx80 z; + + aSig = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + aSign = extractFloatx80Sign( a ); + bSig = extractFloatx80Frac( b ); + bExp = extractFloatx80Exp( b ); + bSign = extractFloatx80Sign( b ); + zSign = aSign ^ bSign; + if ( aExp == 0x7FFF ) { + if ( (bits64) ( aSig<<1 ) + || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) { + return propagateFloatx80NaN( a, b ); + } + if ( ( bExp | bSig ) == 0 ) goto invalid; + return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); + } + if ( bExp == 0x7FFF ) { + if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); + if ( ( aExp | aSig ) == 0 ) { + invalid: + float_raise( float_flag_invalid ); + z.low = floatx80_default_nan_low; + z.high = floatx80_default_nan_high; + return z; + } + return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloatx80( zSign, 0, 0 ); + normalizeFloatx80Subnormal( aSig, &aExp, &aSig ); + } + if ( bExp == 0 ) { + if ( bSig == 0 ) return packFloatx80( zSign, 0, 0 ); + normalizeFloatx80Subnormal( bSig, &bExp, &bSig ); + } + zExp = aExp + bExp - 0x3FFE; + mul64To128( aSig, bSig, &zSig0, &zSig1 ); + if ( 0 < (sbits64) zSig0 ) { + shortShift128Left( zSig0, zSig1, 1, &zSig0, &zSig1 ); + --zExp; + } + return + roundAndPackFloatx80( + floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns the result of dividing the extended double-precision floating-point +value `a' by the corresponding value `b'. The operation is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_div( floatx80 a, floatx80 b ) +{ + flag aSign, bSign, zSign; + int32 aExp, bExp, zExp; + bits64 aSig, bSig, zSig0, zSig1; + bits64 rem0, rem1, rem2, term0, term1, term2; + floatx80 z; + + aSig = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + aSign = extractFloatx80Sign( a ); + bSig = extractFloatx80Frac( b ); + bExp = extractFloatx80Exp( b ); + bSign = extractFloatx80Sign( b ); + zSign = aSign ^ bSign; + if ( aExp == 0x7FFF ) { + if ( (bits64) ( aSig<<1 ) ) return propagateFloatx80NaN( a, b ); + if ( bExp == 0x7FFF ) { + if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); + goto invalid; + } + return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); + } + if ( bExp == 0x7FFF ) { + if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); + return packFloatx80( zSign, 0, 0 ); + } + if ( bExp == 0 ) { + if ( bSig == 0 ) { + if ( ( aExp | aSig ) == 0 ) { + invalid: + float_raise( float_flag_invalid ); + z.low = floatx80_default_nan_low; + z.high = floatx80_default_nan_high; + return z; + } + float_raise( float_flag_divbyzero ); + return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); + } + normalizeFloatx80Subnormal( bSig, &bExp, &bSig ); + } + if ( aExp == 0 ) { + if ( aSig == 0 ) return packFloatx80( zSign, 0, 0 ); + normalizeFloatx80Subnormal( aSig, &aExp, &aSig ); + } + zExp = aExp - bExp + 0x3FFE; + rem1 = 0; + if ( bSig <= aSig ) { + shift128Right( aSig, 0, 1, &aSig, &rem1 ); + ++zExp; + } + zSig0 = estimateDiv128To64( aSig, rem1, bSig ); + mul64To128( bSig, zSig0, &term0, &term1 ); + sub128( aSig, rem1, term0, term1, &rem0, &rem1 ); + while ( (sbits64) rem0 < 0 ) { + --zSig0; + add128( rem0, rem1, 0, bSig, &rem0, &rem1 ); + } + zSig1 = estimateDiv128To64( rem1, 0, bSig ); + if ( (bits64) ( zSig1<<1 ) <= 8 ) { + mul64To128( bSig, zSig1, &term1, &term2 ); + sub128( rem1, 0, term1, term2, &rem1, &rem2 ); + while ( (sbits64) rem1 < 0 ) { + --zSig1; + add128( rem1, rem2, 0, bSig, &rem1, &rem2 ); + } + zSig1 |= ( ( rem1 | rem2 ) != 0 ); + } + return + roundAndPackFloatx80( + floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns the remainder of the extended double-precision floating-point value +`a' with respect to the corresponding value `b'. The operation is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_rem( floatx80 a, floatx80 b ) +{ + flag aSign, bSign, zSign; + int32 aExp, bExp, expDiff; + bits64 aSig0, aSig1, bSig; + bits64 q, term0, term1, alternateASig0, alternateASig1; + floatx80 z; + + aSig0 = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + aSign = extractFloatx80Sign( a ); + bSig = extractFloatx80Frac( b ); + bExp = extractFloatx80Exp( b ); + bSign = extractFloatx80Sign( b ); + if ( aExp == 0x7FFF ) { + if ( (bits64) ( aSig0<<1 ) + || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) { + return propagateFloatx80NaN( a, b ); + } + goto invalid; + } + if ( bExp == 0x7FFF ) { + if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); + return a; + } + if ( bExp == 0 ) { + if ( bSig == 0 ) { + invalid: + float_raise( float_flag_invalid ); + z.low = floatx80_default_nan_low; + z.high = floatx80_default_nan_high; + return z; + } + normalizeFloatx80Subnormal( bSig, &bExp, &bSig ); + } + if ( aExp == 0 ) { + if ( (bits64) ( aSig0<<1 ) == 0 ) return a; + normalizeFloatx80Subnormal( aSig0, &aExp, &aSig0 ); + } + bSig |= LIT64( 0x8000000000000000 ); + zSign = aSign; + expDiff = aExp - bExp; + aSig1 = 0; + if ( expDiff < 0 ) { + if ( expDiff < -1 ) return a; + shift128Right( aSig0, 0, 1, &aSig0, &aSig1 ); + expDiff = 0; + } + q = ( bSig <= aSig0 ); + if ( q ) aSig0 -= bSig; + expDiff -= 64; + while ( 0 < expDiff ) { + q = estimateDiv128To64( aSig0, aSig1, bSig ); + q = ( 2 < q ) ? q - 2 : 0; + mul64To128( bSig, q, &term0, &term1 ); + sub128( aSig0, aSig1, term0, term1, &aSig0, &aSig1 ); + shortShift128Left( aSig0, aSig1, 62, &aSig0, &aSig1 ); + expDiff -= 62; + } + expDiff += 64; + if ( 0 < expDiff ) { + q = estimateDiv128To64( aSig0, aSig1, bSig ); + q = ( 2 < q ) ? q - 2 : 0; + q >>= 64 - expDiff; + mul64To128( bSig, q<<( 64 - expDiff ), &term0, &term1 ); + sub128( aSig0, aSig1, term0, term1, &aSig0, &aSig1 ); + shortShift128Left( 0, bSig, 64 - expDiff, &term0, &term1 ); + while ( le128( term0, term1, aSig0, aSig1 ) ) { + ++q; + sub128( aSig0, aSig1, term0, term1, &aSig0, &aSig1 ); + } + } + else { + term1 = 0; + term0 = bSig; + } + sub128( term0, term1, aSig0, aSig1, &alternateASig0, &alternateASig1 ); + if ( lt128( alternateASig0, alternateASig1, aSig0, aSig1 ) + || ( eq128( alternateASig0, alternateASig1, aSig0, aSig1 ) + && ( q & 1 ) ) + ) { + aSig0 = alternateASig0; + aSig1 = alternateASig1; + zSign = ! zSign; + } + return + normalizeRoundAndPackFloatx80( + 80, zSign, bExp + expDiff, aSig0, aSig1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns the square root of the extended double-precision floating-point +value `a'. The operation is performed according to the IEC/IEEE Standard +for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_sqrt( floatx80 a ) +{ + flag aSign; + int32 aExp, zExp; + bits64 aSig0, aSig1, zSig0, zSig1; + bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3; + bits64 shiftedRem0, shiftedRem1; + floatx80 z; + + aSig0 = extractFloatx80Frac( a ); + aExp = extractFloatx80Exp( a ); + aSign = extractFloatx80Sign( a ); + if ( aExp == 0x7FFF ) { + if ( (bits64) ( aSig0<<1 ) ) return propagateFloatx80NaN( a, a ); + if ( ! aSign ) return a; + goto invalid; + } + if ( aSign ) { + if ( ( aExp | aSig0 ) == 0 ) return a; + invalid: + float_raise( float_flag_invalid ); + z.low = floatx80_default_nan_low; + z.high = floatx80_default_nan_high; + return z; + } + if ( aExp == 0 ) { + if ( aSig0 == 0 ) return packFloatx80( 0, 0, 0 ); + normalizeFloatx80Subnormal( aSig0, &aExp, &aSig0 ); + } + zExp = ( ( aExp - 0x3FFF )>>1 ) + 0x3FFF; + zSig0 = estimateSqrt32( aExp, aSig0>>32 ); + zSig0 <<= 31; + aSig1 = 0; + shift128Right( aSig0, 0, ( aExp & 1 ) + 2, &aSig0, &aSig1 ); + zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0 ) + zSig0 + 4; + if ( 0 <= (sbits64) zSig0 ) zSig0 = LIT64( 0xFFFFFFFFFFFFFFFF ); + shortShift128Left( aSig0, aSig1, 2, &aSig0, &aSig1 ); + mul64To128( zSig0, zSig0, &term0, &term1 ); + sub128( aSig0, aSig1, term0, term1, &rem0, &rem1 ); + while ( (sbits64) rem0 < 0 ) { + --zSig0; + shortShift128Left( 0, zSig0, 1, &term0, &term1 ); + term1 |= 1; + add128( rem0, rem1, term0, term1, &rem0, &rem1 ); + } + shortShift128Left( rem0, rem1, 63, &shiftedRem0, &shiftedRem1 ); + zSig1 = estimateDiv128To64( shiftedRem0, shiftedRem1, zSig0 ); + if ( (bits64) ( zSig1<<1 ) <= 10 ) { + if ( zSig1 == 0 ) zSig1 = 1; + mul64To128( zSig0, zSig1, &term1, &term2 ); + shortShift128Left( term1, term2, 1, &term1, &term2 ); + sub128( rem1, 0, term1, term2, &rem1, &rem2 ); + mul64To128( zSig1, zSig1, &term2, &term3 ); + sub192( rem1, rem2, 0, 0, term2, term3, &rem1, &rem2, &rem3 ); + while ( (sbits64) rem1 < 0 ) { + --zSig1; + shortShift192Left( 0, zSig0, zSig1, 1, &term1, &term2, &term3 ); + term3 |= 1; + add192( + rem1, rem2, rem3, term1, term2, term3, &rem1, &rem2, &rem3 ); + } + zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 ); + } + return + roundAndPackFloatx80( + floatx80_rounding_precision, 0, zExp, zSig0, zSig1 ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is +equal to the corresponding value `b', and 0 otherwise. The comparison is +performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic. +------------------------------------------------------------------------------- +*/ +flag floatx80_eq( floatx80 a, floatx80 b ) +{ + + if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( a )<<1 ) ) + || ( ( extractFloatx80Exp( b ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( b )<<1 ) ) + ) { + if ( floatx80_is_signaling_nan( a ) + || floatx80_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + return + ( a.low == b.low ) + && ( ( a.high == b.high ) + || ( ( a.low == 0 ) + && ( (bits16) ( ( a.high | b.high )<<1 ) == 0 ) ) + ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is +less than or equal to the corresponding value `b', and 0 otherwise. The +comparison is performed according to the IEC/IEEE Standard for Binary +Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag floatx80_le( floatx80 a, floatx80 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( a )<<1 ) ) + || ( ( extractFloatx80Exp( b ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( b )<<1 ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + aSign = extractFloatx80Sign( a ); + bSign = extractFloatx80Sign( b ); + if ( aSign != bSign ) { + return + aSign + || ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) + == 0 ); + } + return + aSign ? le128( b.high, b.low, a.high, a.low ) + : le128( a.high, a.low, b.high, b.low ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is +less than the corresponding value `b', and 0 otherwise. The comparison +is performed according to the IEC/IEEE Standard for Binary Floating-point +Arithmetic. +------------------------------------------------------------------------------- +*/ +flag floatx80_lt( floatx80 a, floatx80 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( a )<<1 ) ) + || ( ( extractFloatx80Exp( b ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( b )<<1 ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + aSign = extractFloatx80Sign( a ); + bSign = extractFloatx80Sign( b ); + if ( aSign != bSign ) { + return + aSign + && ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) + != 0 ); + } + return + aSign ? lt128( b.high, b.low, a.high, a.low ) + : lt128( a.high, a.low, b.high, b.low ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is equal +to the corresponding value `b', and 0 otherwise. The invalid exception is +raised if either operand is a NaN. Otherwise, the comparison is performed +according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag floatx80_eq_signaling( floatx80 a, floatx80 b ) +{ + + if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( a )<<1 ) ) + || ( ( extractFloatx80Exp( b ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( b )<<1 ) ) + ) { + float_raise( float_flag_invalid ); + return 0; + } + return + ( a.low == b.low ) + && ( ( a.high == b.high ) + || ( ( a.low == 0 ) + && ( (bits16) ( ( a.high | b.high )<<1 ) == 0 ) ) + ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is less +than or equal to the corresponding value `b', and 0 otherwise. Quiet NaNs +do not cause an exception. Otherwise, the comparison is performed according +to the IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag floatx80_le_quiet( floatx80 a, floatx80 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( a )<<1 ) ) + || ( ( extractFloatx80Exp( b ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( b )<<1 ) ) + ) { + if ( floatx80_is_signaling_nan( a ) + || floatx80_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + aSign = extractFloatx80Sign( a ); + bSign = extractFloatx80Sign( b ); + if ( aSign != bSign ) { + return + aSign + || ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) + == 0 ); + } + return + aSign ? le128( b.high, b.low, a.high, a.low ) + : le128( a.high, a.low, b.high, b.low ); + +} + +/* +------------------------------------------------------------------------------- +Returns 1 if the extended double-precision floating-point value `a' is less +than the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause +an exception. Otherwise, the comparison is performed according to the +IEC/IEEE Standard for Binary Floating-point Arithmetic. +------------------------------------------------------------------------------- +*/ +flag floatx80_lt_quiet( floatx80 a, floatx80 b ) +{ + flag aSign, bSign; + + if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( a )<<1 ) ) + || ( ( extractFloatx80Exp( b ) == 0x7FFF ) + && (bits64) ( extractFloatx80Frac( b )<<1 ) ) + ) { + if ( floatx80_is_signaling_nan( a ) + || floatx80_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } + return 0; + } + aSign = extractFloatx80Sign( a ); + bSign = extractFloatx80Sign( b ); + if ( aSign != bSign ) { + return + aSign + && ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) + != 0 ); + } + return + aSign ? lt128( b.high, b.low, a.high, a.low ) + : lt128( a.high, a.low, b.high, b.low ); + +} + +#endif + diff -Nru a/arch/arm26/nwfpe/softfloat.h b/arch/arm26/nwfpe/softfloat.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/nwfpe/softfloat.h Fri Jun 13 01:07:45 2003 @@ -0,0 +1,232 @@ + +/* +=============================================================================== + +This C header file is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/softfloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these three paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +#ifndef __SOFTFLOAT_H__ +#define __SOFTFLOAT_H__ + +/* +------------------------------------------------------------------------------- +The macro `FLOATX80' must be defined to enable the extended double-precision +floating-point format `floatx80'. If this macro is not defined, the +`floatx80' type will not be defined, and none of the functions that either +input or output the `floatx80' type will be defined. +------------------------------------------------------------------------------- +*/ +#define FLOATX80 + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point types. +------------------------------------------------------------------------------- +*/ +typedef unsigned long int float32; +typedef unsigned long long float64; +typedef struct { + unsigned short high; + unsigned long long low; +} floatx80; + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point underflow tininess-detection mode. +------------------------------------------------------------------------------- +*/ +extern signed char float_detect_tininess; +enum { + float_tininess_after_rounding = 0, + float_tininess_before_rounding = 1 +}; + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point rounding mode. +------------------------------------------------------------------------------- +*/ +extern signed char float_rounding_mode; +enum { + float_round_nearest_even = 0, + float_round_to_zero = 1, + float_round_down = 2, + float_round_up = 3 +}; + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point exception flags. +------------------------------------------------------------------------------- +extern signed char float_exception_flags; +enum { + float_flag_inexact = 1, + float_flag_underflow = 2, + float_flag_overflow = 4, + float_flag_divbyzero = 8, + float_flag_invalid = 16 +}; + +ScottB: November 4, 1998 +Changed the enumeration to match the bit order in the FPA11. +*/ + +extern signed char float_exception_flags; +enum { + float_flag_invalid = 1, + float_flag_divbyzero = 2, + float_flag_overflow = 4, + float_flag_underflow = 8, + float_flag_inexact = 16 +}; + +/* +------------------------------------------------------------------------------- +Routine to raise any or all of the software IEC/IEEE floating-point +exception flags. +------------------------------------------------------------------------------- +*/ +void float_raise( signed char ); + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE integer-to-floating-point conversion routines. +------------------------------------------------------------------------------- +*/ +float32 int32_to_float32( signed int ); +float64 int32_to_float64( signed int ); +#ifdef FLOATX80 +floatx80 int32_to_floatx80( signed int ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE single-precision conversion routines. +------------------------------------------------------------------------------- +*/ +signed int float32_to_int32( float32 ); +signed int float32_to_int32_round_to_zero( float32 ); +float64 float32_to_float64( float32 ); +#ifdef FLOATX80 +floatx80 float32_to_floatx80( float32 ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE single-precision operations. +------------------------------------------------------------------------------- +*/ +float32 float32_round_to_int( float32 ); +float32 float32_add( float32, float32 ); +float32 float32_sub( float32, float32 ); +float32 float32_mul( float32, float32 ); +float32 float32_div( float32, float32 ); +float32 float32_rem( float32, float32 ); +float32 float32_sqrt( float32 ); +char float32_eq( float32, float32 ); +char float32_le( float32, float32 ); +char float32_lt( float32, float32 ); +char float32_eq_signaling( float32, float32 ); +char float32_le_quiet( float32, float32 ); +char float32_lt_quiet( float32, float32 ); +char float32_is_signaling_nan( float32 ); + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE double-precision conversion routines. +------------------------------------------------------------------------------- +*/ +signed int float64_to_int32( float64 ); +signed int float64_to_int32_round_to_zero( float64 ); +float32 float64_to_float32( float64 ); +#ifdef FLOATX80 +floatx80 float64_to_floatx80( float64 ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE double-precision operations. +------------------------------------------------------------------------------- +*/ +float64 float64_round_to_int( float64 ); +float64 float64_add( float64, float64 ); +float64 float64_sub( float64, float64 ); +float64 float64_mul( float64, float64 ); +float64 float64_div( float64, float64 ); +float64 float64_rem( float64, float64 ); +float64 float64_sqrt( float64 ); +char float64_eq( float64, float64 ); +char float64_le( float64, float64 ); +char float64_lt( float64, float64 ); +char float64_eq_signaling( float64, float64 ); +char float64_le_quiet( float64, float64 ); +char float64_lt_quiet( float64, float64 ); +char float64_is_signaling_nan( float64 ); + +#ifdef FLOATX80 + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE extended double-precision conversion routines. +------------------------------------------------------------------------------- +*/ +signed int floatx80_to_int32( floatx80 ); +signed int floatx80_to_int32_round_to_zero( floatx80 ); +float32 floatx80_to_float32( floatx80 ); +float64 floatx80_to_float64( floatx80 ); + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE extended double-precision rounding precision. Valid +values are 32, 64, and 80. +------------------------------------------------------------------------------- +*/ +extern signed char floatx80_rounding_precision; + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE extended double-precision operations. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_round_to_int( floatx80 ); +floatx80 floatx80_add( floatx80, floatx80 ); +floatx80 floatx80_sub( floatx80, floatx80 ); +floatx80 floatx80_mul( floatx80, floatx80 ); +floatx80 floatx80_div( floatx80, floatx80 ); +floatx80 floatx80_rem( floatx80, floatx80 ); +floatx80 floatx80_sqrt( floatx80 ); +char floatx80_eq( floatx80, floatx80 ); +char floatx80_le( floatx80, floatx80 ); +char floatx80_lt( floatx80, floatx80 ); +char floatx80_eq_signaling( floatx80, floatx80 ); +char floatx80_le_quiet( floatx80, floatx80 ); +char floatx80_lt_quiet( floatx80, floatx80 ); +char floatx80_is_signaling_nan( floatx80 ); + +#endif + +#endif diff -Nru a/arch/arm26/vmlinux-armo.lds.in b/arch/arm26/vmlinux-armo.lds.in --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/vmlinux-armo.lds.in Fri Jun 13 01:07:45 2003 @@ -0,0 +1,128 @@ +/* ld script to make ARM Linux kernel + * taken from the i386 version by Russell King + * Written by Martin Mares + * borrowed from Russels ARM port by Ian Molton + */ + +#include + +OUTPUT_ARCH(arm) +ENTRY(stext) +jiffies = jiffies_64; +SECTIONS +{ + . = TEXTADDR; + .init : { /* Init code and data */ + _stext = .; + __init_begin = .; + _sinittext = .; + *(.init.text) + _einittext = .; + __proc_info_begin = .; + *(.proc.info) + __proc_info_end = .; + __arch_info_begin = .; + *(.arch.info) + __arch_info_end = .; + __tagtable_begin = .; + *(.taglist) + __tagtable_end = .; + *(.init.data) + . = ALIGN(16); + __setup_start = .; + *(.init.setup) + __setup_end = .; + __early_begin = .; + *(__early_param) + __early_end = .; + __start___param = .; + *(__param) + __stop___param = .; + __initcall_start = .; + *(.initcall1.init) + *(.initcall2.init) + *(.initcall3.init) + *(.initcall4.init) + *(.initcall5.init) + *(.initcall6.init) + *(.initcall7.init) + __initcall_end = .; + __con_initcall_start = .; + *(.con_initcall.init) + __con_initcall_end = .; + . = ALIGN(32); + __initramfs_start = .; + usr/built-in.o(.init.ramfs) + __initramfs_end = .; + . = ALIGN(32768); + __init_end = .; + } + + /DISCARD/ : { /* Exit code and data */ + *(.exit.text) + *(.exit.data) + *(.exitcall.exit) + } + + .text : { /* Real text segment */ + _text = .; /* Text and read-only data */ + *(.text) + *(.fixup) + *(.gnu.warning) + *(.rodata) + *(.rodata.*) + *(.glue_7) + *(.glue_7t) + *(.got) /* Global offset table */ + + _etext = .; /* End of text section */ + } + + . = ALIGN(16); + __ex_table : { /* Exception table */ + __start___ex_table = .; + *(__ex_table) + __stop___ex_table = .; + } + + RODATA + + . = ALIGN(8192); + + .data : { + /* + * first, the init task union, aligned + * to an 8192 byte boundary. + */ + *(.init.task) + + /* + * The cacheline aligned data + */ + . = ALIGN(32); + *(.data.cacheline_aligned) + + /* + * and the usual data section + */ + *(.data) + CONSTRUCTORS + + _edata = .; + } + + .bss : { + __bss_start = .; /* BSS */ + *(.bss) + *(COMMON) + _end = . ; + } + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } +} diff -Nru a/arch/arm26/vmlinux.lds.S b/arch/arm26/vmlinux.lds.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm26/vmlinux.lds.S Fri Jun 13 01:07:45 2003 @@ -0,0 +1,12 @@ +#include + +#ifdef CONFIG_ROM_KERNEL + +#include "vmlinux-armo-rom.lds.in" + +#else + +#include "vmlinux-armo.lds.in" + +#endif + diff -Nru a/arch/cris/drivers/ethernet.c b/arch/cris/drivers/ethernet.c --- a/arch/cris/drivers/ethernet.c Fri Jun 13 01:07:35 2003 +++ b/arch/cris/drivers/ethernet.c Fri Jun 13 01:07:35 2003 @@ -292,37 +292,19 @@ */ static int __init -etrax_ethernet_init(struct net_device *dev) +etrax_ethernet_init(void) { - int i; + struct net_device *dev; + int i, err; int anOffset = 0; printk("ETRAX 100LX 10/100MBit ethernet v2.0 (c) 2000-2001 Axis Communications AB\n"); - dev->base_addr = (unsigned int)R_NETWORK_SA_0; /* just to have something to show */ - - printk("%s initialized\n", dev->name); - - /* make Linux aware of the new hardware */ - - if (!dev) { - printk(KERN_WARNING "%s: dev == NULL. Should this happen?\n", - cardname); - dev = init_etherdev(dev, sizeof(struct net_local)); - if (!dev) - panic("init_etherdev failed\n"); - } - - /* setup generic handlers and stuff in the dev struct */ - - ether_setup(dev); - - /* make room for the local structure containing stats etc */ - - dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); - if (dev->priv == NULL) + dev = alloc_etherdev(sizeof(struct net_local)); + if (!dev) return -ENOMEM; - memset(dev->priv, 0, sizeof(struct net_local)); + + dev->base_addr = (unsigned int)R_NETWORK_SA_0; /* just to have something to show */ /* now setup our etrax specific stuff */ @@ -340,10 +322,6 @@ dev->do_ioctl = e100_ioctl; dev->tx_timeout = e100_tx_timeout; - /* set the default MAC address */ - - e100_set_mac_address(dev, &default_mac); - /* Initialise the list of Etrax DMA-descriptors */ /* Initialise receive descriptors */ @@ -371,6 +349,16 @@ myLastRxDesc = &RxDescList[NBR_OF_RX_DESC - 1]; myPrevRxDesc = &RxDescList[NBR_OF_RX_DESC - 1]; + err = register_netdev(dev); + if (err) { + kfree(dev); + return err; + } + + /* set the default MAC address */ + + e100_set_mac_address(dev, &default_mac); + /* Initialize speed indicator stuff. */ current_speed = 10; @@ -1349,19 +1337,10 @@ } } -static struct net_device dev_etrax_ethernet; /* only got one */ - static int etrax_init_module(void) { - struct net_device *d = &dev_etrax_ethernet; - - d->init = etrax_ethernet_init; - - if (register_netdev(d) == 0) - return 0; - else - return -ENODEV; + return etrax_ethernet_init(); } module_init(etrax_init_module); diff -Nru a/arch/cris/drivers/lpslave/e100lpslavenet.c b/arch/cris/drivers/lpslave/e100lpslavenet.c --- a/arch/cris/drivers/lpslave/e100lpslavenet.c Fri Jun 13 01:07:34 2003 +++ b/arch/cris/drivers/lpslave/e100lpslavenet.c Fri Jun 13 01:07:34 2003 @@ -162,37 +162,19 @@ * (detachable devices only). */ static int __init -etrax_ethernet_lpslave_init(struct net_device *dev) +etrax_ethernet_lpslave_init(void) { - int i; + struct net_device *dev; + int i, err; int anOffset = 0; printk("Etrax/100 lpslave ethernet driver v0.3, (c) 1999 Axis Communications AB\n"); - dev->base_addr = 2; - - printk("%s initialized\n", dev->name); - - /* make Linux aware of the new hardware */ - - if (!dev) { - printk(KERN_WARNING "%s: dev == NULL. Should this happen?\n", - cardname); - dev = init_etherdev(dev, sizeof(struct net_local)); - if (!dev) - panic("init_etherdev failed\n"); - } - - /* setup generic handlers and stuff in the dev struct */ - - ether_setup(dev); - - /* make room for the local structure containing stats etc */ - - dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); - if (dev->priv == NULL) + dev = alloc_etherdev(sizeof(struct net_lock)); + if (!dev) return -ENOMEM; - memset(dev->priv, 0, sizeof(struct net_local)); + + dev->base_addr = 2; /* now setup our etrax specific stuff */ @@ -242,7 +224,11 @@ TxDescList[0].buf = virt_to_phys(&host_command); TxDescList[0].next = virt_to_phys(&TxDescList[1]); - return 0; + err = register_netdev(dev); + if (err) + kfree(dev); + + return err; } /* set MAC address of the interface. called from the core after a @@ -1017,19 +1003,10 @@ } #endif /* ETHDEBUG */ -static struct net_device dev_etrax_slave_ethernet; - static int etrax_init_module(void) { - struct net_device *d = &dev_etrax_slave_ethernet; - - d->init = etrax_ethernet_lpslave_init; - - if(register_netdev(d) == 0) - return 0; - else - return -ENODEV; + return etrax_ethernet_lpslave_init(); } module_init(etrax_init_module); diff -Nru a/arch/cris/drivers/serial.c b/arch/cris/drivers/serial.c --- a/arch/cris/drivers/serial.c Fri Jun 13 01:07:40 2003 +++ b/arch/cris/drivers/serial.c Fri Jun 13 01:07:40 2003 @@ -335,13 +335,11 @@ static DECLARE_TASK_QUEUE(tq_serial); -struct tty_driver serial_driver, callout_driver; -static int serial_refcount; +static struct tty_driver *serial_driver; /* serial subtype definitions */ #ifndef SERIAL_TYPE_NORMAL #define SERIAL_TYPE_NORMAL 1 -#define SERIAL_TYPE_CALLOUT 2 #endif /* number of characters left in xmit buffer before we ask for more */ @@ -489,10 +487,6 @@ #define NR_PORTS (sizeof(rs_table)/sizeof(struct e100_serial)) - -static struct tty_struct *serial_table[NR_PORTS]; -static struct termios *serial_termios[NR_PORTS]; -static struct termios *serial_termios_locked[NR_PORTS]; #ifdef CONFIG_ETRAX_SERIAL_PROC_ENTRY #define PROCSTAT(x) x @@ -3012,14 +3006,6 @@ } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - if (info->flags & ASYNC_CALLOUT_ACTIVE) - info->callout_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -3063,8 +3049,7 @@ } wake_up_interruptible(&info->open_wait); } - info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE| - ASYNC_CLOSING); + info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); wake_up_interruptible(&info->close_wait); restore_flags(flags); @@ -3128,7 +3113,7 @@ shutdown(info); info->event = 0; info->count = 0; - info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE); + info->flags &= ~ASYNC_NORMAL_ACTIVE; info->tty = 0; wake_up_interruptible(&info->open_wait); } @@ -3166,44 +3151,18 @@ } /* - * If this is a callout device, then just make sure the normal - * device isn't being used. - */ - if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) { - if (info->flags & ASYNC_NORMAL_ACTIVE) - return -EBUSY; - if ((info->flags & ASYNC_CALLOUT_ACTIVE) && - (info->flags & ASYNC_SESSION_LOCKOUT) && - (info->session != current->session)) - return -EBUSY; - if ((info->flags & ASYNC_CALLOUT_ACTIVE) && - (info->flags & ASYNC_PGRP_LOCKOUT) && - (info->pgrp != current->pgrp)) - return -EBUSY; - info->flags |= ASYNC_CALLOUT_ACTIVE; - return 0; - } - - /* * If non-blocking mode is set, or the port is not enabled, * then make the check up front and then exit. */ if ((filp->f_flags & O_NONBLOCK) || (tty->flags & (1 << TTY_IO_ERROR))) { - if (info->flags & ASYNC_CALLOUT_ACTIVE) - return -EBUSY; info->flags |= ASYNC_NORMAL_ACTIVE; return 0; } - if (info->flags & ASYNC_CALLOUT_ACTIVE) { - if (info->normal_termios.c_cflag & CLOCAL) - do_clocal = 1; - } else { - if (tty->termios->c_cflag & CLOCAL) - do_clocal = 1; - } - + if (tty->termios->c_cflag & CLOCAL) + do_clocal = 1; + /* * Block waiting for the carrier detect and the line to become * free (i.e., not in use by the callout). While we are in @@ -3228,11 +3187,9 @@ while (1) { save_flags(flags); cli(); - if (!(info->flags & ASYNC_CALLOUT_ACTIVE)) { - /* assert RTS and DTR */ - e100_rts(info, 1); - e100_dtr(info, 1); - } + /* assert RTS and DTR */ + e100_rts(info, 1); + e100_dtr(info, 1); restore_flags(flags); set_current_state(TASK_INTERRUPTIBLE); if (tty_hung_up_p(filp) || @@ -3247,8 +3204,7 @@ #endif break; } - if (!(info->flags & ASYNC_CALLOUT_ACTIVE) && - !(info->flags & ASYNC_CLOSING) && do_clocal) + if (!(info->flags & ASYNC_CLOSING) && do_clocal) /* && (do_clocal || DCD_IS_ASSERTED) */ break; if (signal_pending(current)) { @@ -3357,17 +3313,6 @@ return retval; } - if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - if (tty->driver->subtype == SERIAL_TYPE_NORMAL) - *tty->termios = info->normal_termios; - else - *tty->termios = info->callout_termios; - change_speed(info); - } - - info->session = current->session; - info->pgrp = current->pgrp; - #ifdef SERIAL_DEBUG_OPEN printk("rs_open ttyS%d successful...\n", info->line); #endif @@ -3473,12 +3418,37 @@ } /* rs_init inits the driver at boot (using the module_init chain) */ + +static struct tty_operations rs_ops = { + .open = rs_open, + .close = rs_close, + .write = rs_write, + .flush_chars = rs_flush_chars, + .write_room = rs_write_room, + .chars_in_buffer = rs_chars_in_buffer, + .flush_buffer = rs_flush_buffer, + .ioctl = rs_ioctl, + .throttle = rs_throttle, + .unthrottle = rs_unthrottle, + .set_termios = rs_set_termios, + .stop = rs_stop, + .start = rs_start, + .hangup = rs_hangup, + .break_ctl = rs_break, + .send_xchar = rs_send_xchar, + .wait_until_sent = rs_wait_until_sent, + .read_proc = rs_read_proc, +}; static int __init rs_init(void) { int i; struct e100_serial *info; + struct tty_driver *driver = alloc_tty_driver(NR_PORTS); + + if (!driver) + return -ENOMEM; show_serial_version(); @@ -3494,67 +3464,20 @@ /* Initialize the tty_driver structure */ - memset(&serial_driver, 0, sizeof(struct tty_driver)); - serial_driver.magic = TTY_DRIVER_MAGIC; -#if (LINUX_VERSION_CODE > 0x20100) - serial_driver.driver_name = "serial"; -#endif - serial_driver.name = "ttyS"; - serial_driver.major = TTY_MAJOR; - serial_driver.minor_start = 64; - serial_driver.num = NR_PORTS; /* etrax100 has 4 serial ports */ - serial_driver.type = TTY_DRIVER_TYPE_SERIAL; - serial_driver.subtype = SERIAL_TYPE_NORMAL; - serial_driver.init_termios = tty_std_termios; - serial_driver.init_termios.c_cflag = + driver->driver_name = "serial"; + driver->name = "ttyS"; + driver->major = TTY_MAJOR; + driver->minor_start = 64; + driver->type = TTY_DRIVER_TYPE_SERIAL; + driver->subtype = SERIAL_TYPE_NORMAL; + driver->init_termios = tty_std_termios; + driver->init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ - serial_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; - serial_driver.refcount = &serial_refcount; - serial_driver.table = serial_table; - serial_driver.termios = serial_termios; - serial_driver.termios_locked = serial_termios_locked; - - serial_driver.open = rs_open; - serial_driver.close = rs_close; - serial_driver.write = rs_write; - /* should we have an rs_put_char as well here ? */ - serial_driver.flush_chars = rs_flush_chars; - serial_driver.write_room = rs_write_room; - serial_driver.chars_in_buffer = rs_chars_in_buffer; - serial_driver.flush_buffer = rs_flush_buffer; - serial_driver.ioctl = rs_ioctl; - serial_driver.throttle = rs_throttle; - serial_driver.unthrottle = rs_unthrottle; - serial_driver.set_termios = rs_set_termios; - serial_driver.stop = rs_stop; - serial_driver.start = rs_start; - serial_driver.hangup = rs_hangup; -#if (LINUX_VERSION_CODE >= 131394) /* Linux 2.1.66 */ - serial_driver.break_ctl = rs_break; -#endif -#if (LINUX_VERSION_CODE >= 131343) - serial_driver.send_xchar = rs_send_xchar; - serial_driver.wait_until_sent = rs_wait_until_sent; - serial_driver.read_proc = rs_read_proc; -#endif - - /* - * The callout device is just like normal device except for - * major number and the subtype code. - */ - callout_driver = serial_driver; - callout_driver.name = "cua"; - callout_driver.major = TTYAUX_MAJOR; - callout_driver.subtype = SERIAL_TYPE_CALLOUT; -#if (LINUX_VERSION_CODE >= 131343) - callout_driver.read_proc = 0; - callout_driver.proc_entry = 0; -#endif - - if (tty_register_driver(&serial_driver)) + driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + tty_set_operations(driver, &rs_ops); + if (tty_register_driver(driver)) panic("Couldn't register serial driver\n"); - if (tty_register_driver(&callout_driver)) - panic("Couldn't register callout driver\n"); + serial_driver = driver; /* do some initializing for the separate ports */ @@ -3574,8 +3497,6 @@ info->blocked_open = 0; info->tqueue.routine = do_softint; info->tqueue.data = info; - info->callout_termios = callout_driver.init_termios; - info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); info->xmit.buf = NULL; @@ -3596,7 +3517,7 @@ if (info->enabled) { printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n", - serial_driver.name, info->line, (unsigned int)info->port); + serial_driver->name, info->line, (unsigned int)info->port); } } diff -Nru a/arch/cris/drivers/serial.h b/arch/cris/drivers/serial.h --- a/arch/cris/drivers/serial.h Fri Jun 13 01:07:42 2003 +++ b/arch/cris/drivers/serial.h Fri Jun 13 01:07:42 2003 @@ -78,16 +78,12 @@ int type; /* PORT_ETRAX */ int count; /* # of fd on device */ int blocked_open; /* # of blocked opens */ - long session; /* Session of opening process */ - long pgrp; /* pgrp of opening process */ struct circ_buf xmit; struct circ_buf recv; unsigned char *flag_buf; struct tq_struct tqueue; struct async_icount icount; /* error-statistics etc.*/ - struct termios normal_termios; - struct termios callout_termios; #ifdef DECLARE_WAITQUEUE wait_queue_head_t open_wait; wait_queue_head_t close_wait; diff -Nru a/arch/cris/lib/Makefile b/arch/cris/lib/Makefile --- a/arch/cris/lib/Makefile Fri Jun 13 01:07:40 2003 +++ b/arch/cris/lib/Makefile Fri Jun 13 01:07:40 2003 @@ -2,8 +2,6 @@ # Makefile for Etrax-specific library files.. # -L_TARGET = lib.a - EXTRA_AFLAGS := -traditional -obj-y = checksum.o checksumcopy.o string.o usercopy.o memset.o csumcpfruser.o +lib-y = checksum.o checksumcopy.o string.o usercopy.o memset.o csumcpfruser.o diff -Nru a/arch/h8300/lib/Makefile b/arch/h8300/lib/Makefile --- a/arch/h8300/lib/Makefile Fri Jun 13 01:07:33 2003 +++ b/arch/h8300/lib/Makefile Fri Jun 13 01:07:33 2003 @@ -5,5 +5,4 @@ .S.o: $(CC) $(AFLAGS) -D__ASSEMBLY__ -c $< -o $@ -L_TARGET = lib.a -obj-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o +lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Fri Jun 13 01:07:31 2003 +++ b/arch/i386/Kconfig Fri Jun 13 01:07:31 2003 @@ -1135,7 +1135,7 @@ source "drivers/pcmcia/Kconfig" -source "drivers/hotplug/Kconfig" +source "drivers/pci/hotplug/Kconfig" endmenu diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile Fri Jun 13 01:07:31 2003 +++ b/arch/i386/kernel/Makefile Fri Jun 13 01:07:31 2003 @@ -26,6 +26,7 @@ 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_X86_SUMMIT) += summit.o obj-$(CONFIG_EDD) += edd.o obj-$(CONFIG_MODULES) += module.o obj-y += sysenter.o vsyscall.o diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c Fri Jun 13 01:07:44 2003 +++ b/arch/i386/kernel/apic.c Fri Jun 13 01:07:44 2003 @@ -25,6 +25,9 @@ #include #include #include +#include +#include + #include #include @@ -460,9 +463,6 @@ #ifdef CONFIG_PM -#include -#include - static struct { /* 'active' is true if the local APIC was enabled by us and not the BIOS; this signifies that we are also responsible @@ -484,13 +484,11 @@ unsigned int apic_thmr; } apic_pm_state; -static int lapic_suspend(struct device *dev, u32 state, u32 level) +static int lapic_suspend(struct sys_device *dev, u32 state) { unsigned int l, h; unsigned long flags; - if (level != SUSPEND_POWER_DOWN) - return 0; if (!apic_pm_state.active) return 0; @@ -517,13 +515,11 @@ return 0; } -static int lapic_resume(struct device *dev, u32 level) +static int lapic_resume(struct sys_device *dev) { unsigned int l, h; unsigned long flags; - if (level != RESUME_POWER_ON) - return 0; if (!apic_pm_state.active) return 0; @@ -557,38 +553,37 @@ return 0; } -static struct device_driver lapic_driver = { - .name = "lapic", - .bus = &system_bus_type, + +static struct sysdev_class lapic_sysclass = { + set_kset_name("lapic"), .resume = lapic_resume, .suspend = lapic_suspend, }; -/* not static, needed by child devices */ -struct sys_device device_lapic = { - .name = "lapic", - .id = 0, - .dev = { - .name = "lapic", - .driver = &lapic_driver, - }, +static struct sys_device device_lapic = { + .id = 0, + .cls = &lapic_sysclass, }; -EXPORT_SYMBOL(device_lapic); static void __init apic_pm_activate(void) { apic_pm_state.active = 1; } -static int __init init_lapic_devicefs(void) +static int __init init_lapic_sysfs(void) { + int error; + if (!cpu_has_apic) return 0; /* XXX: remove suspend/resume procs if !apic_pm_state.active? */ - driver_register(&lapic_driver); - return sys_device_register(&device_lapic); + + error = sysdev_class_register(&lapic_sysclass); + if (!error) + error = sys_device_register(&device_lapic); + return error; } -device_initcall(init_lapic_devicefs); +device_initcall(init_lapic_sysfs); #else /* CONFIG_PM */ diff -Nru a/arch/i386/kernel/cpu/cpufreq/acpi.c b/arch/i386/kernel/cpu/cpufreq/acpi.c --- a/arch/i386/kernel/cpu/cpufreq/acpi.c Fri Jun 13 01:07:30 2003 +++ b/arch/i386/kernel/cpu/cpufreq/acpi.c Fri Jun 13 01:07:30 2003 @@ -553,8 +553,9 @@ { unsigned int i; unsigned int cpu = policy->cpu; - struct acpi_processor *pr = NULL; + struct acpi_processor *pr = NULL; struct acpi_processor_performance *perf = &performance[policy->cpu]; + struct acpi_device *device; unsigned int result = 0; ACPI_FUNCTION_TRACE("acpi_cpufreq_cpu_init"); @@ -596,6 +597,17 @@ acpi_cpufreq_add_file(pr); + if (acpi_bus_get_device(pr->handle, &device)) + device = NULL; + + printk(KERN_INFO "cpufreq: %s - ACPI performance management activated.\n", + device ? acpi_device_bid(device) : "CPU??"); + for (i = 0; i < pr->performance->state_count; i++) + printk(KERN_INFO "cpufreq: %cP%d: %d MHz, %d mW, %d uS\n", + (i == pr->performance->state?'*':' '), i, + (u32) pr->performance->states[i].core_frequency, + (u32) pr->performance->states[i].power, + (u32) pr->performance->states[i].transition_latency); return_VALUE(result); } @@ -658,16 +670,21 @@ /* test it on one CPU */ for (i=0; iflags.performance) goto found_capable_cpu; } result = -ENODEV; - goto err; + goto err0; found_capable_cpu: + + result = cpufreq_register_driver(&acpi_cpufreq_driver); + if (result) + goto err0; + perf = pr->performance; current_state = perf->state; @@ -676,7 +693,7 @@ if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Disabled P-States due to failure while switching.\n")); result = -ENODEV; - goto err; + goto err1; } } @@ -684,7 +701,7 @@ if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Disabled P-States due to failure while switching.\n")); result = -ENODEV; - goto err; + goto err1; } if (current_state != 0) { @@ -692,18 +709,17 @@ if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Disabled P-States due to failure while switching.\n")); result = -ENODEV; - goto err; + goto err1; } } - result = cpufreq_register_driver(&acpi_cpufreq_driver); - if (result) - goto err; - return_VALUE(0); /* error handling */ - err: + err1: + cpufreq_unregister_driver(&acpi_cpufreq_driver); + + err0: /* unregister struct acpi_processor_performance performance */ for (i=0; icpu != 0) diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c Fri Jun 13 01:07:31 2003 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c Fri Jun 13 01:07:31 2003 @@ -142,7 +142,6 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) { - struct cpuinfo_x86 *c = cpu_data; unsigned int i; if (policy->cpu != 0) diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c Fri Jun 13 01:07:29 2003 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c Fri Jun 13 01:07:29 2003 @@ -10,6 +10,7 @@ * * Errata 5: Processor may fail to execute a FID/VID change in presence of interrupt. * - We cli/sti on stepping A0 CPUs around the FID/VID transition. + * (ADDENDUM: This seems to be needed on more systems, so we do it unconditionally now). * Errata 15: Processors with half frequency multipliers may hang upon wakeup from disconnect. * - We disable half multipliers if ACPI is used on A0 stepping CPUs. */ @@ -208,13 +209,38 @@ } +static void change_FID(int fid) +{ + union msr_fidvidctl fidvidctl; + + if (fidvidctl.bits.FID != fid) { + rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); + fidvidctl.bits.SGTC = latency; + fidvidctl.bits.FID = fid; + fidvidctl.bits.FIDC = 1; + wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); + } +} + + +static void change_VID(int vid) +{ + union msr_fidvidctl fidvidctl; + + if (fidvidctl.bits.VID != vid) { + rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); + fidvidctl.bits.VID = vid; + fidvidctl.bits.VIDC = 1; + wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); + } +} + + static void change_speed (unsigned int index) { u8 fid, vid; struct cpufreq_freqs freqs; union msr_fidvidstatus fidvidstatus; - union msr_fidvidctl fidvidctl; - /* fid are the lower 8 bits of the index we stored into * the cpufreq frequency table in powernow_decode_bios, @@ -228,35 +254,25 @@ rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val); freqs.old = fsb * fid_codes[fidvidstatus.bits.CFID] * 100; - freqs.new = powernow_table[index].frequency; cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); /* Now do the magic poking into the MSRs. */ - if (have_a0 == 1) /* A0 errata 5 */ - __asm__("\tcli\n"); - - /* First change the frequency. */ - if (fidvidctl.bits.FID != fid) { - rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); - fidvidctl.bits.SGTC = latency; /* Stop grant timeout counter */ - fidvidctl.bits.FID = fid; - fidvidctl.bits.FIDC = 1; - wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); - } + __asm__("\tcli\n"); - /* Now change voltage. */ - if (fidvidctl.bits.VID != vid) { - rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); - fidvidctl.bits.VID = vid; - fidvidctl.bits.VIDC = 1; - wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); + if (freqs.old > freqs.new) { + /* Going down, so change FID first */ + change_FID(fid); + change_VID(vid); + } else { + /* Going up, so change VID first */ + change_VID(fid); + change_FID(vid); } - - if (have_a0 == 1) - __asm__("\tsti\n"); + + __asm__("\tsti\n"); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); } diff -Nru a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c --- a/arch/i386/kernel/cpu/mtrr/main.c Fri Jun 13 01:07:29 2003 +++ b/arch/i386/kernel/cpu/mtrr/main.c Fri Jun 13 01:07:29 2003 @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -546,6 +547,58 @@ } } + +struct mtrr_value { + mtrr_type ltype; + unsigned long lbase; + unsigned int lsize; +}; + +static struct mtrr_value * mtrr_state; + +static int mtrr_save(struct sys_device * sysdev, u32 state) +{ + int i; + int size = num_var_ranges * sizeof(struct mtrr_value); + + mtrr_state = kmalloc(size,GFP_KERNEL); + if (mtrr_state) + memset(mtrr_state,0,size); + else + return -ENOMEM; + + for (i = 0; i < num_var_ranges; i++) { + mtrr_if->get(i, + &mtrr_state[i].lbase, + &mtrr_state[i].lsize, + &mtrr_state[i].ltype); + } + return 0; +} + +static int mtrr_restore(struct sys_device * sysdev) +{ + int i; + + for (i = 0; i < num_var_ranges; i++) { + if (mtrr_state[i].lsize) + set_mtrr(i, + mtrr_state[i].lbase, + mtrr_state[i].lsize, + mtrr_state[i].ltype); + } + kfree(mtrr_state); + return 0; +} + + + +static struct sysdev_driver mtrr_sysdev_driver = { + .save = mtrr_save, + .restore = mtrr_restore, +}; + + /** * mtrr_init - initialie mtrrs on the boot CPU * @@ -630,8 +683,11 @@ set_num_var_ranges(); init_table(); init_other_cpus(); + + return sysdev_driver_register(&cpu_sysdev_class, + &mtrr_sysdev_driver); } - return mtrr_if ? -ENXIO : 0; + return -ENXIO; } char *mtrr_strings[MTRR_NUM_TYPES] = @@ -645,5 +701,5 @@ "write-back", /* 6 */ }; -core_initcall(mtrr_init); +subsys_initcall(mtrr_init); diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c --- a/arch/i386/kernel/dmi_scan.c Fri Jun 13 01:07:33 2003 +++ b/arch/i386/kernel/dmi_scan.c Fri Jun 13 01:07:33 2003 @@ -12,6 +12,8 @@ #include unsigned long dmi_broken; +EXPORT_SYMBOL(dmi_broken); + int is_sony_vaio_laptop; int is_unsafe_smbus; diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S Fri Jun 13 01:07:32 2003 +++ b/arch/i386/kernel/entry.S Fri Jun 13 01:07:32 2003 @@ -508,6 +508,15 @@ ENTRY(nmi) cmpl $sysenter_entry,(%esp) je nmi_stack_fixup + pushl %eax + movl %esp,%eax + /* Do not access memory above the end of our stack page, + * it might not exist. + */ + andl $0x1fff,%eax + cmpl $0x1fec,%eax + popl %eax + jae nmi_stack_correct cmpl $sysenter_entry,12(%esp) je nmi_debug_stack_check nmi_stack_correct: diff -Nru a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c --- a/arch/i386/kernel/i8259.c Fri Jun 13 01:07:42 2003 +++ b/arch/i386/kernel/i8259.c Fri Jun 13 01:07:42 2003 @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include @@ -238,35 +238,31 @@ } } -static int i8259A_resume(struct device *dev, u32 level) +static int i8259A_resume(struct sys_device *dev) { - if (level == RESUME_POWER_ON) - init_8259A(0); + init_8259A(0); return 0; } -static struct device_driver i8259A_driver = { - .name = "pic", - .bus = &system_bus_type, - .resume = i8259A_resume, +static struct sysdev_class i8259_sysdev_class = { + set_kset_name("i8259"), + .resume = i8259A_resume, }; static struct sys_device device_i8259A = { - .name = "pic", - .id = 0, - .dev = { - .name = "i8259A PIC", - .driver = &i8259A_driver, - }, + .id = 0, + .cls = &i8259_sysdev_class, }; -static int __init init_8259A_devicefs(void) +static int __init i8259A_init_sysfs(void) { - driver_register(&i8259A_driver); - return sys_device_register(&device_i8259A); + int error = sysdev_class_register(&i8259_sysdev_class); + if (!error) + error = sys_device_register(&device_i8259A); + return error; } -device_initcall(init_8259A_devicefs); +device_initcall(i8259A_init_sysfs); void init_8259A(int auto_eoi) { @@ -385,35 +381,31 @@ spin_unlock_irqrestore(&i8253_lock, flags); } -static int timer_resume(struct device *dev, u32 level) +static int timer_resume(struct sys_device *dev) { - if (level == RESUME_POWER_ON) - setup_timer(); + setup_timer(); return 0; } -static struct device_driver timer_driver = { - .name = "timer", - .bus = &system_bus_type, - .resume = timer_resume, +static struct sysdev_class timer_sysclass = { + set_kset_name("timer"), + .resume = timer_resume, }; static struct sys_device device_timer = { - .name = "timer", - .id = 0, - .dev = { - .name = "timer", - .driver = &timer_driver, - }, + .id = 0, + .cls = &timer_sysclass, }; -static int __init init_timer_devicefs(void) +static int __init init_timer_sysfs(void) { - driver_register(&timer_driver); - return sys_device_register(&device_timer); + int error = sysdev_class_register(&timer_sysclass); + if (!error) + error = sys_device_register(&device_timer); + return error; } -device_initcall(init_timer_devicefs); +device_initcall(init_timer_sysfs); void __init init_IRQ(void) { diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c Fri Jun 13 01:07:33 2003 +++ b/arch/i386/kernel/io_apic.c Fri Jun 13 01:07:33 2003 @@ -352,9 +352,7 @@ unsigned long allowed_mask; unsigned int new_cpu; - if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH && NO_BALANCE_IRQ) - return; - else if (irqbalance_disabled) + if (irqbalance_disabled) return; allowed_mask = cpu_online_map & irq_affinity[irq]; @@ -614,6 +612,9 @@ struct cpuinfo_x86 *c; c = &boot_cpu_data; + /* When not overwritten by the command line ask subarchitecture. */ + if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH) + irqbalance_disabled = NO_BALANCE_IRQ; if (irqbalance_disabled) return 0; @@ -1159,7 +1160,8 @@ entry.delivery_mode = INT_DELIVERY_MODE; entry.dest_mode = INT_DEST_MODE; entry.mask = 0; /* enable IRQ */ - entry.dest.logical.logical_dest = TARGET_CPUS; + entry.dest.logical.logical_dest = + cpu_mask_to_apicid(TARGET_CPUS); idx = find_irq_entry(apic,pin,mp_INT); if (idx == -1) { @@ -1238,7 +1240,7 @@ */ entry.dest_mode = INT_DEST_MODE; entry.mask = 0; /* unmask IRQ now */ - entry.dest.logical.logical_dest = TARGET_CPUS; + entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); entry.delivery_mode = INT_DELIVERY_MODE; entry.polarity = 0; entry.trigger = 0; @@ -2308,7 +2310,7 @@ entry.delivery_mode = INT_DELIVERY_MODE; entry.dest_mode = INT_DEST_MODE; - entry.dest.logical.logical_dest = TARGET_CPUS; + entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); entry.mask = 1; /* Disabled (masked) */ entry.trigger = 1; /* Level sensitive */ entry.polarity = 1; /* Low active */ diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c --- a/arch/i386/kernel/irq.c Fri Jun 13 01:07:30 2003 +++ b/arch/i386/kernel/irq.c Fri Jun 13 01:07:30 2003 @@ -66,8 +66,12 @@ /* * Controller mappings for all interrupt sources: */ -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = - { [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}}; +irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { + [0 ... NR_IRQS-1] = { + .handler = &no_irq_type, + .lock = SPIN_LOCK_UNLOCKED + } +}; static void register_irq_proc (unsigned int irq); @@ -209,7 +213,6 @@ { int status = 1; /* Force the "do bottom halves" bit */ int retval = 0; - struct irqaction *first_action = action; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); @@ -222,30 +225,88 @@ if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); local_irq_disable(); - if (retval != 1) { - static int count = 100; - if (count) { - count--; - if (retval) { - printk("irq event %d: bogus retval mask %x\n", - irq, retval); - } else { - printk("irq %d: nobody cared!\n", irq); - } - dump_stack(); - printk("handlers:\n"); - action = first_action; - do { - printk("[<%p>]", action->handler); - print_symbol(" (%s)", - (unsigned long)action->handler); - printk("\n"); - action = action->next; - } while (action); - } + return retval; +} + +static void __report_bad_irq(int irq, irq_desc_t *desc, irqreturn_t action_ret) +{ + struct irqaction *action; + + if (action_ret != IRQ_HANDLED && action_ret != IRQ_NONE) { + printk(KERN_ERR "irq event %d: bogus return value %x\n", + irq, action_ret); + } else { + printk(KERN_ERR "irq %d: nobody cared!\n", irq); } + dump_stack(); + printk(KERN_ERR "handlers:\n"); + action = desc->action; + do { + printk(KERN_ERR "[<%p>]", action->handler); + print_symbol(" (%s)", + (unsigned long)action->handler); + printk("\n"); + action = action->next; + } while (action); +} + +static void report_bad_irq(int irq, irq_desc_t *desc, irqreturn_t action_ret) +{ + static int count = 100; - return status; + if (count) { + count--; + __report_bad_irq(irq, desc, action_ret); + } +} + +static int noirqdebug; + +static int __init noirqdebug_setup(char *str) +{ + noirqdebug = 1; + printk("IRQ lockup detection disabled\n"); + return 1; +} + +__setup("noirqdebug", noirqdebug_setup); + +/* + * If 99,900 of the previous 100,000 interrupts have not been handled then + * assume that the IRQ is stuck in some manner. Drop a diagnostic and try to + * turn the IRQ off. + * + * (The other 100-of-100,000 interrupts may have been a correctly-functioning + * device sharing an IRQ with the failing one) + * + * Called under desc->lock + */ +static void note_interrupt(int irq, irq_desc_t *desc, irqreturn_t action_ret) +{ + if (action_ret != IRQ_HANDLED) { + desc->irqs_unhandled++; + if (action_ret != IRQ_NONE) + report_bad_irq(irq, desc, action_ret); + } + + desc->irq_count++; + if (desc->irq_count < 100000) + return; + + desc->irq_count = 0; + if (desc->irqs_unhandled > 99900) { + /* + * The interrupt is stuck + */ + __report_bad_irq(irq, desc, action_ret); + /* + * Now kill the IRQ + */ + printk(KERN_EMERG "Disabling IRQ #%d\n", irq); + desc->status |= IRQ_DISABLED; + desc->handler->disable(irq); + } + desc->irqs_unhandled = 0; } /* @@ -418,10 +479,13 @@ * SMP environment. */ for (;;) { + irqreturn_t action_ret; + spin_unlock(&desc->lock); - handle_IRQ_event(irq, ®s, action); + action_ret = handle_IRQ_event(irq, ®s, action); spin_lock(&desc->lock); - + if (!noirqdebug) + note_interrupt(irq, desc, action_ret); if (likely(!(desc->status & IRQ_PENDING))) break; desc->status &= ~IRQ_PENDING; diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c Fri Jun 13 01:07:33 2003 +++ b/arch/i386/kernel/mpparse.c Fri Jun 13 01:07:33 2003 @@ -73,9 +73,6 @@ /* Bitmask of physically existing CPUs */ unsigned long phys_cpu_present_map; -#ifndef CONFIG_X86_GENERICARCH -int x86_summit = 0; -#endif u8 bios_cpu_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; /* diff -Nru a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c --- a/arch/i386/kernel/nmi.c Fri Jun 13 01:07:38 2003 +++ b/arch/i386/kernel/nmi.c Fri Jun 13 01:07:38 2003 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -180,53 +181,48 @@ #ifdef CONFIG_PM -#include static int nmi_pm_active; /* nmi_active before suspend */ -static int lapic_nmi_suspend(struct device *dev, u32 state, u32 level) +static int lapic_nmi_suspend(struct sys_device *dev, u32 state) { - if (level != SUSPEND_POWER_DOWN) - return 0; nmi_pm_active = nmi_active; disable_lapic_nmi_watchdog(); return 0; } -static int lapic_nmi_resume(struct device *dev, u32 level) +static int lapic_nmi_resume(struct sys_device *dev) { - if (level != RESUME_POWER_ON) - return 0; if (nmi_pm_active > 0) enable_lapic_nmi_watchdog(); return 0; } -static struct device_driver lapic_nmi_driver = { - .name = "lapic_nmi", - .bus = &system_bus_type, + +static struct sysdev_class nmi_sysclass = { + set_kset_name("lapic_nmi"), .resume = lapic_nmi_resume, .suspend = lapic_nmi_suspend, }; static struct sys_device device_lapic_nmi = { - .name = "lapic_nmi", - .id = 0, - .dev = { - .name = "lapic_nmi", - .driver = &lapic_nmi_driver, - .parent = &device_lapic.dev, - }, + .id = 0, + .cls = &nmi_sysclass, }; -static int __init init_lapic_nmi_devicefs(void) +static int __init init_lapic_nmi_sysfs(void) { + int error; + if (nmi_active == 0) return 0; - driver_register(&lapic_nmi_driver); - return sys_device_register(&device_lapic_nmi); + + error = sysdev_class_register(&nmi_sysclass); + if (!error) + error = sys_device_register(&device_lapic_nmi); + return error; } /* must come after the local APIC's device_initcall() */ -late_initcall(init_lapic_nmi_devicefs); +late_initcall(init_lapic_nmi_sysfs); #endif /* CONFIG_PM */ diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c Fri Jun 13 01:07:36 2003 +++ b/arch/i386/kernel/setup.c Fri Jun 13 01:07:36 2003 @@ -35,6 +35,7 @@ #include #include #include +#include #include