]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge master.kernel.org:/home/rmk/linux-2.6-arm
authorLinus Torvalds <torvalds@g5.osdl.org>
Sun, 15 Jan 2006 03:43:21 +0000 (19:43 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 15 Jan 2006 03:43:21 +0000 (19:43 -0800)
759 files changed:
Documentation/SubmittingDrivers
Documentation/SubmittingPatches
Documentation/feature-removal-schedule.txt
Documentation/filesystems/tmpfs.txt
Documentation/kernel-parameters.txt
Documentation/scsi/aacraid.txt [new file with mode: 0644]
Documentation/spi/butterfly [new file with mode: 0644]
Documentation/spi/spi-summary [new file with mode: 0644]
MAINTAINERS
arch/arm/Kconfig
arch/arm/common/locomo.c
arch/arm/common/sa1111.c
arch/arm/kernel/ecard.c
arch/arm/mach-integrator/lm.c
arch/i386/Kconfig
arch/i386/Makefile
arch/i386/kernel/traps.c
arch/i386/pci/fixup.c
arch/ia64/configs/gensparse_defconfig
arch/ia64/configs/sn2_defconfig
arch/ia64/hp/sim/simserial.c
arch/ia64/kernel/fsys.S
arch/ia64/kernel/jprobes.S
arch/ia64/kernel/kprobes.c
arch/ia64/kernel/mca_asm.S
arch/ia64/kernel/salinfo.c
arch/ia64/kernel/traps.c
arch/ia64/mm/tlb.c
arch/ia64/sn/include/xtalk/hubdev.h
arch/ia64/sn/kernel/bte_error.c
arch/ia64/sn/kernel/huberror.c
arch/ia64/sn/kernel/io_init.c
arch/ia64/sn/kernel/tiocx.c
arch/ia64/sn/kernel/xpc_channel.c
arch/ia64/sn/kernel/xpc_main.c
arch/ia64/sn/kernel/xpc_partition.c
arch/ia64/sn/pci/pcibr/pcibr_dma.c
arch/ia64/sn/pci/pcibr/pcibr_provider.c
arch/parisc/kernel/drivers.c
arch/powerpc/Makefile
arch/powerpc/boot/Makefile
arch/powerpc/boot/crt0.S
arch/powerpc/boot/hack-coff.c [new file with mode: 0644]
arch/powerpc/boot/main.c
arch/powerpc/boot/prom.c
arch/powerpc/boot/prom.h
arch/powerpc/boot/rs6000.h [new file with mode: 0644]
arch/powerpc/boot/stdio.c [new file with mode: 0644]
arch/powerpc/boot/stdio.h
arch/powerpc/boot/string.S
arch/powerpc/boot/zImage.coff.lds [new file with mode: 0644]
arch/powerpc/configs/mpc834x_sys_defconfig [new file with mode: 0644]
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/cpu_setup_power4.S
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/entry_32.S
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/fpu.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/idle_power4.S
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/lparcfg.c
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/of_device.c
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/prom_parse.c
arch/powerpc/kernel/rtas.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/vio.c
arch/powerpc/lib/locks.c
arch/powerpc/oprofile/common.c
arch/powerpc/platforms/83xx/Kconfig
arch/powerpc/platforms/83xx/mpc834x_sys.c [new file with mode: 0644]
arch/powerpc/platforms/83xx/mpc834x_sys.h [new file with mode: 0644]
arch/powerpc/platforms/83xx/mpc83xx.h [new file with mode: 0644]
arch/powerpc/platforms/83xx/pci.c [new file with mode: 0644]
arch/powerpc/platforms/chrp/pci.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/chrp/time.c
arch/powerpc/platforms/iseries/irq.c
arch/powerpc/platforms/iseries/misc.S
arch/powerpc/platforms/iseries/setup.c
arch/powerpc/platforms/iseries/smp.c
arch/powerpc/platforms/pseries/lpar.c
arch/powerpc/platforms/pseries/reconfig.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/sysdev/Makefile
arch/powerpc/sysdev/fsl_soc.c [new file with mode: 0644]
arch/powerpc/sysdev/fsl_soc.h [new file with mode: 0644]
arch/ppc/4xx_io/serial_sicc.c
arch/ppc/kernel/head_8xx.S
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/platforms/83xx/mpc834x_sys.c
arch/ppc/platforms/85xx/mpc8540_ads.c
arch/ppc/platforms/85xx/mpc8560_ads.c
arch/ppc/platforms/85xx/mpc85xx_cds_common.c
arch/ppc/platforms/85xx/sbc8560.c
arch/ppc/platforms/85xx/stx_gp3.c
arch/ppc/platforms/85xx/tqm85xx.c
arch/ppc/syslib/mpc83xx_devices.c
arch/ppc/syslib/mpc85xx_devices.c
arch/ppc/syslib/ocp.c
arch/s390/crypto/aes_s390.c
arch/s390/crypto/des_s390.c
arch/s390/crypto/sha256_s390.c
arch/s390/kernel/process.c
arch/s390/kernel/setup.c
arch/s390/kernel/time.c
arch/s390/kernel/vtime.c
arch/s390/lib/Makefile
arch/s390/lib/spinlock.c
arch/sh/kernel/cpu/bus.c
arch/um/Makefile
block/genhd.c
drivers/Kconfig
drivers/Makefile
drivers/acpi/ec.c
drivers/base/dd.c
drivers/base/driver.c
drivers/base/firmware_class.c
drivers/base/platform.c
drivers/base/power/shutdown.c
drivers/block/loop.c
drivers/block/pktcdvd.c
drivers/bluetooth/hci_bcsp.c
drivers/char/amiserial.c
drivers/char/drm/r128_state.c
drivers/char/esp.c
drivers/char/generic_serial.c
drivers/char/riscom8.c
drivers/char/serial167.c
drivers/char/specialix.c
drivers/char/synclink.c
drivers/char/watchdog/Kconfig
drivers/char/watchdog/Makefile
drivers/char/watchdog/mpc83xx_wdt.c [new file with mode: 0644]
drivers/char/watchdog/sbc_epx_c3.c [new file with mode: 0644]
drivers/cpufreq/cpufreq.c
drivers/dio/dio-driver.c
drivers/firmware/dell_rbu.c
drivers/i2c/i2c-core.c
drivers/ide/ide-cd.c
drivers/ide/ide-disk.c
drivers/ide/ide-floppy.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
drivers/ide/ide.c
drivers/infiniband/core/cm.c
drivers/infiniband/core/device.c
drivers/infiniband/core/sysfs.c
drivers/infiniband/core/ucm.c
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/hw/mthca/mthca_av.c
drivers/infiniband/hw/mthca/mthca_cmd.c
drivers/infiniband/hw/mthca/mthca_dev.h
drivers/infiniband/hw/mthca/mthca_eq.c
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/hw/mthca/mthca_qp.c
drivers/infiniband/ulp/ipoib/ipoib.h
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
drivers/infiniband/ulp/ipoib/ipoib_verbs.c
drivers/infiniband/ulp/ipoib/ipoib_vlan.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/input/gameport/gameport.c
drivers/input/input.c
drivers/input/mouse/alps.c
drivers/input/mouse/logips2pp.c
drivers/input/mouse/psmouse-base.c
drivers/input/mouse/psmouse.h
drivers/input/mouse/synaptics.c
drivers/input/serio/i8042-x86ia64io.h
drivers/input/serio/serio.c
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/input/touchscreen/ads7846.c [new file with mode: 0644]
drivers/isdn/hisax/avm_pci.c
drivers/isdn/hisax/diva.c
drivers/isdn/hisax/hscx_irq.c
drivers/isdn/hisax/jade_irq.c
drivers/macintosh/macio-adb.c
drivers/macintosh/macio_asic.c
drivers/md/bitmap.c
drivers/md/dm-crypt.c
drivers/md/dm-ioctl.c
drivers/md/dm-snap.c
drivers/md/dm.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/md/raid6main.c
drivers/media/dvb/bt8xx/dvb-bt8xx.c
drivers/media/video/bttv-gpio.c
drivers/media/video/bttv.h
drivers/media/video/tvp5150.c
drivers/message/fusion/Kconfig
drivers/message/fusion/lsi/mpi.h
drivers/message/fusion/lsi/mpi_cnfg.h
drivers/message/fusion/lsi/mpi_history.txt
drivers/message/fusion/lsi/mpi_init.h
drivers/message/fusion/lsi/mpi_ioc.h
drivers/message/fusion/lsi/mpi_log_fc.h [new file with mode: 0644]
drivers/message/fusion/lsi/mpi_log_sas.h [new file with mode: 0644]
drivers/message/fusion/lsi/mpi_sas.h
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptbase.h
drivers/message/fusion/mptctl.c
drivers/message/fusion/mptfc.c
drivers/message/fusion/mptlan.c
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptspi.c
drivers/message/i2o/pci.c
drivers/mfd/mcp-core.c
drivers/mmc/mmc_sysfs.c
drivers/mtd/devices/Kconfig
drivers/mtd/devices/Makefile
drivers/mtd/devices/doc2000.c
drivers/mtd/devices/doc2001.c
drivers/mtd/devices/doc2001plus.c
drivers/mtd/devices/m25p80.c [new file with mode: 0644]
drivers/mtd/devices/mtd_dataflash.c [new file with mode: 0644]
drivers/mtd/nand/diskonchip.c
drivers/net/Kconfig
drivers/net/cs89x0.c
drivers/net/e100.c
drivers/net/sb1000.c
drivers/net/wireless/hostap/hostap_80211_rx.c
drivers/net/wireless/hostap/hostap_hw.c
drivers/net/wireless/ipw2100.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/wavelan.c
drivers/pci/pci-driver.c
drivers/pcmcia/ds.c
drivers/pnp/driver.c
drivers/rapidio/rio-driver.c
drivers/s390/block/dasd.c
drivers/s390/cio/airq.c
drivers/s390/cio/blacklist.c
drivers/s390/cio/ccwgroup.c
drivers/s390/cio/chsc.c
drivers/s390/cio/cio.c
drivers/s390/cio/css.c
drivers/s390/cio/css.h
drivers/s390/cio/device.c
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_id.c
drivers/s390/cio/device_ops.c
drivers/s390/cio/device_pgid.c
drivers/s390/cio/device_status.c
drivers/s390/cio/qdio.c
drivers/s390/net/ctcmain.c
drivers/s390/net/cu3088.c
drivers/s390/net/netiucv.c
drivers/s390/s390_rdev.c
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_def.h
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_fsf.h
drivers/s390/scsi/zfcp_scsi.c
drivers/s390/scsi/zfcp_sysfs_adapter.c
drivers/s390/scsi/zfcp_sysfs_port.c
drivers/s390/scsi/zfcp_sysfs_unit.c
drivers/sbus/char/aurora.c
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-9xxx.h
drivers/scsi/3w-xxxx.c
drivers/scsi/3w-xxxx.h
drivers/scsi/BusLogic.c
drivers/scsi/Makefile
drivers/scsi/aacraid/README [deleted file]
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/commctrl.c
drivers/scsi/aacraid/linit.c
drivers/scsi/aic7xxx/Kconfig.aic7xxx
drivers/scsi/aic7xxx/aic79xx.h
drivers/scsi/aic7xxx/aic79xx.reg
drivers/scsi/aic7xxx/aic79xx.seq
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_inline.h
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.h
drivers/scsi/aic7xxx/aic79xx_pci.c
drivers/scsi/aic7xxx/aic79xx_pci.h
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/aic7xxx/aic7xxx_pci.c
drivers/scsi/aic7xxx/aic7xxx_pci.h
drivers/scsi/aic7xxx_old.c
drivers/scsi/ch.c
drivers/scsi/dpt_i2o.c
drivers/scsi/hosts.c
drivers/scsi/ips.c
drivers/scsi/iscsi_tcp.c
drivers/scsi/iscsi_tcp.h
drivers/scsi/libata-core.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/megaraid.c
drivers/scsi/megaraid.h
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_sas.c
drivers/scsi/qla2xxx/Kconfig
drivers/scsi/qla2xxx/Makefile
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_dbg.h
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_gs.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_sup.c
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/raid_class.c
drivers/scsi/scsi.c
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_proc.c
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/scsi_transport_fc.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/scsi_transport_sas.c
drivers/scsi/scsi_transport_spi.c
drivers/scsi/sd.c
drivers/scsi/sr.c
drivers/scsi/sr_ioctl.c
drivers/scsi/st.c
drivers/serial/68328serial.c
drivers/serial/Kconfig
drivers/serial/Makefile
drivers/serial/ioc3_serial.c [new file with mode: 0644]
drivers/sh/superhyway/superhyway.c
drivers/sn/Kconfig
drivers/sn/Makefile
drivers/sn/ioc3.c [new file with mode: 0644]
drivers/spi/Kconfig [new file with mode: 0644]
drivers/spi/Makefile [new file with mode: 0644]
drivers/spi/spi.c [new file with mode: 0644]
drivers/spi/spi_bitbang.c [new file with mode: 0644]
drivers/spi/spi_butterfly.c [new file with mode: 0644]
drivers/usb/atm/usbatm.c
drivers/usb/gadget/ether.c
drivers/usb/gadget/inode.c
drivers/usb/gadget/serial.c
drivers/usb/gadget/zero.c
drivers/usb/input/Kconfig
drivers/usb/input/hid-core.c
drivers/usb/input/hid-input.c
drivers/usb/input/hid.h
drivers/usb/input/pid.c
drivers/usb/input/wacom.c
drivers/usb/serial/bus.c
drivers/usb/serial/pl2303.c
drivers/video/68328fb.c
drivers/video/acornfb.c
drivers/video/amba-clcd.c
drivers/video/amifb.c
drivers/video/arcfb.c
drivers/video/atafb.c
drivers/video/aty/aty128fb.c
drivers/video/aty/atyfb_base.c
drivers/video/aty/radeon_base.c
drivers/video/au1100fb.c
drivers/video/bw2.c
drivers/video/cg14.c
drivers/video/cg3.c
drivers/video/cg6.c
drivers/video/controlfb.c
drivers/video/fbmem.c
drivers/video/ffb.c
drivers/video/gbefb.c
drivers/video/geode/gx1fb_core.c
drivers/video/igafb.c
drivers/video/imsttfb.c
drivers/video/intelfb/intelfbdrv.c
drivers/video/kyro/fbdev.c
drivers/video/leo.c
drivers/video/matrox/matroxfb_base.c
drivers/video/matrox/matroxfb_crtc2.c
drivers/video/matrox/matroxfb_maven.c
drivers/video/neofb.c
drivers/video/p9100.c
drivers/video/pm3fb.c
drivers/video/pmag-aa-fb.c
drivers/video/pxafb.c
drivers/video/radeonfb.c
drivers/video/sa1100fb.c
drivers/video/sgivwfb.c
drivers/video/sis/sis_main.c
drivers/video/sis/sis_main.h
drivers/video/sstfb.c
drivers/video/tcx.c
drivers/video/vfb.c
drivers/zorro/zorro-driver.c
fs/9p/conv.c
fs/autofs4/root.c
fs/binfmt_elf.c
fs/binfmt_misc.c
fs/bio.c
fs/buffer.c
fs/char_dev.c
fs/compat.c
fs/dcache.c
fs/exec.c
fs/ext2/namei.c
fs/ext3/namei.c
fs/fcntl.c
fs/hugetlbfs/inode.c
fs/isofs/namei.c
fs/jffs2/build.c
fs/jffs2/nodelist.c
fs/lockd/xdr.c
fs/mbcache.c
fs/namei.c
fs/ncpfs/inode.c
fs/ncpfs/ioctl.c
fs/nfsd/nfsxdr.c
fs/pipe.c
fs/proc/proc_devtree.c
fs/proc/proc_misc.c
fs/quota_v2.c
fs/reiserfs/namei.c
fs/smbfs/Makefile
fs/smbfs/inode.c
fs/smbfs/request.c
fs/ufs/balloc.c
fs/ufs/ialloc.c
fs/ufs/inode.c
fs/ufs/super.c
fs/ufs/util.h
include/asm-i386/bitops.h
include/asm-i386/current.h
include/asm-i386/string.h
include/asm-i386/uaccess.h
include/asm-ia64/kprobes.h
include/asm-ia64/sn/ioc3.h [new file with mode: 0644]
include/asm-ia64/sn/sn_sal.h
include/asm-ia64/sn/xp.h
include/asm-ia64/sn/xpc.h [moved from arch/ia64/sn/kernel/xpc.h with 99% similarity]
include/asm-ia64/thread_info.h
include/asm-powerpc/atomic.h
include/asm-powerpc/bitops.h
include/asm-powerpc/cputable.h
include/asm-powerpc/elf.h
include/asm-powerpc/futex.h
include/asm-powerpc/hvcall.h
include/asm-powerpc/lppaca.h
include/asm-powerpc/paca.h
include/asm-powerpc/ppc_asm.h
include/asm-powerpc/prom.h
include/asm-powerpc/spinlock.h
include/asm-powerpc/synch.h
include/asm-powerpc/system.h
include/asm-powerpc/time.h
include/asm-s390/s390_rdev.h
include/asm-s390/sigcontext.h
include/asm-s390/system.h
include/asm-x86_64/fixmap.h
include/asm-x86_64/uaccess.h
include/linux/auxvec.h
include/linux/compiler-gcc3.h
include/linux/compiler-gcc4.h
include/linux/cpuset.h
include/linux/device.h
include/linux/fb.h
include/linux/fs.h
include/linux/hardirq.h
include/linux/ide.h
include/linux/ioc3.h [new file with mode: 0644]
include/linux/kernel.h
include/linux/mempolicy.h
include/linux/mm.h
include/linux/ncp_fs.h
include/linux/netfilter/nf_conntrack_common.h
include/linux/netfilter/x_tables.h [new file with mode: 0644]
include/linux/netfilter/xt_CLASSIFY.h [new file with mode: 0644]
include/linux/netfilter/xt_CONNMARK.h [new file with mode: 0644]
include/linux/netfilter/xt_MARK.h [new file with mode: 0644]
include/linux/netfilter/xt_NFQUEUE.h [new file with mode: 0644]
include/linux/netfilter/xt_comment.h [new file with mode: 0644]
include/linux/netfilter/xt_connbytes.h [new file with mode: 0644]
include/linux/netfilter/xt_connmark.h [new file with mode: 0644]
include/linux/netfilter/xt_conntrack.h [new file with mode: 0644]
include/linux/netfilter/xt_dccp.h [new file with mode: 0644]
include/linux/netfilter/xt_helper.h [new file with mode: 0644]
include/linux/netfilter/xt_length.h [new file with mode: 0644]
include/linux/netfilter/xt_limit.h [new file with mode: 0644]
include/linux/netfilter/xt_mac.h [new file with mode: 0644]
include/linux/netfilter/xt_mark.h [new file with mode: 0644]
include/linux/netfilter/xt_physdev.h [new file with mode: 0644]
include/linux/netfilter/xt_pkttype.h [new file with mode: 0644]
include/linux/netfilter/xt_realm.h [new file with mode: 0644]
include/linux/netfilter/xt_sctp.h [new file with mode: 0644]
include/linux/netfilter/xt_state.h [new file with mode: 0644]
include/linux/netfilter/xt_string.h [new file with mode: 0644]
include/linux/netfilter/xt_tcpmss.h [new file with mode: 0644]
include/linux/netfilter/xt_tcpudp.h [new file with mode: 0644]
include/linux/netfilter_arp/arp_tables.h
include/linux/netfilter_ipv4/ip_conntrack.h
include/linux/netfilter_ipv4/ip_tables.h
include/linux/netfilter_ipv4/ipt_CLASSIFY.h
include/linux/netfilter_ipv4/ipt_CONNMARK.h
include/linux/netfilter_ipv4/ipt_MARK.h
include/linux/netfilter_ipv4/ipt_NFQUEUE.h
include/linux/netfilter_ipv4/ipt_comment.h
include/linux/netfilter_ipv4/ipt_connbytes.h
include/linux/netfilter_ipv4/ipt_connmark.h
include/linux/netfilter_ipv4/ipt_conntrack.h
include/linux/netfilter_ipv4/ipt_dccp.h
include/linux/netfilter_ipv4/ipt_helper.h
include/linux/netfilter_ipv4/ipt_length.h
include/linux/netfilter_ipv4/ipt_limit.h
include/linux/netfilter_ipv4/ipt_mac.h
include/linux/netfilter_ipv4/ipt_mark.h
include/linux/netfilter_ipv4/ipt_physdev.h
include/linux/netfilter_ipv4/ipt_pkttype.h
include/linux/netfilter_ipv4/ipt_realm.h
include/linux/netfilter_ipv4/ipt_state.h
include/linux/netfilter_ipv4/ipt_string.h
include/linux/netfilter_ipv4/ipt_tcpmss.h
include/linux/netfilter_ipv6/ip6_tables.h
include/linux/netfilter_ipv6/ip6t_MARK.h
include/linux/netfilter_ipv6/ip6t_length.h
include/linux/netfilter_ipv6/ip6t_limit.h
include/linux/netfilter_ipv6/ip6t_mac.h
include/linux/netfilter_ipv6/ip6t_mark.h
include/linux/netfilter_ipv6/ip6t_physdev.h
include/linux/pci_ids.h
include/linux/proc_fs.h
include/linux/raid_class.h
include/linux/sched.h
include/linux/shmem_fs.h
include/linux/smb_fs.h
include/linux/socket.h
include/linux/spi/ads7846.h [new file with mode: 0644]
include/linux/spi/flash.h [new file with mode: 0644]
include/linux/spi/spi.h [new file with mode: 0644]
include/linux/spi/spi_bitbang.h [new file with mode: 0644]
include/linux/swap.h
include/linux/tipc.h [new file with mode: 0644]
include/linux/tipc_config.h [new file with mode: 0644]
include/net/genetlink.h
include/net/netfilter/ipv4/nf_conntrack_ipv4.h
include/net/netfilter/nf_conntrack.h
include/net/netfilter/nf_conntrack_tuple.h
include/net/sctp/sctp.h
include/net/tipc/tipc.h [new file with mode: 0644]
include/net/tipc/tipc_bearer.h [new file with mode: 0644]
include/net/tipc/tipc_msg.h [new file with mode: 0644]
include/net/tipc/tipc_port.h [new file with mode: 0644]
include/rdma/ib_verbs.h
include/scsi/iscsi_if.h
include/scsi/scsi.h
include/scsi/scsi_cmnd.h
include/scsi/scsi_host.h
include/scsi/scsi_transport.h
include/scsi/scsi_transport_fc.h
include/scsi/scsi_transport_iscsi.h
include/scsi/scsi_transport_spi.h
init/main.c
ipc/mqueue.c
kernel/cpuset.c
kernel/exit.c
kernel/posix-timers.c
kernel/sched.c
kernel/signal.c
kernel/sysctl.c
kernel/workqueue.c
lib/Kconfig.debug
mm/mempolicy.c
mm/oom_kill.c
mm/shmem.c
net/Kconfig
net/Makefile
net/bridge/netfilter/ebt_log.c
net/core/filter.c
net/ieee80211/ieee80211_module.c
net/ieee80211/ieee80211_rx.c
net/ieee80211/ieee80211_tx.c
net/ieee80211/ieee80211_wx.c
net/ipv4/netfilter/Kconfig
net/ipv4/netfilter/Makefile
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/arpt_mangle.c
net/ipv4/netfilter/arptable_filter.c
net/ipv4/netfilter/ip_conntrack_standalone.c
net/ipv4/netfilter/ip_nat_rule.c
net/ipv4/netfilter/ip_nat_standalone.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ipt_CLUSTERIP.c
net/ipv4/netfilter/ipt_DSCP.c
net/ipv4/netfilter/ipt_ECN.c
net/ipv4/netfilter/ipt_LOG.c
net/ipv4/netfilter/ipt_MASQUERADE.c
net/ipv4/netfilter/ipt_NETMAP.c
net/ipv4/netfilter/ipt_NFQUEUE.c [deleted file]
net/ipv4/netfilter/ipt_REDIRECT.c
net/ipv4/netfilter/ipt_REJECT.c
net/ipv4/netfilter/ipt_SAME.c
net/ipv4/netfilter/ipt_TCPMSS.c
net/ipv4/netfilter/ipt_TOS.c
net/ipv4/netfilter/ipt_TTL.c
net/ipv4/netfilter/ipt_ULOG.c
net/ipv4/netfilter/ipt_addrtype.c
net/ipv4/netfilter/ipt_ah.c
net/ipv4/netfilter/ipt_dscp.c
net/ipv4/netfilter/ipt_ecn.c
net/ipv4/netfilter/ipt_esp.c
net/ipv4/netfilter/ipt_hashlimit.c
net/ipv4/netfilter/ipt_iprange.c
net/ipv4/netfilter/ipt_length.c [deleted file]
net/ipv4/netfilter/ipt_multiport.c
net/ipv4/netfilter/ipt_owner.c
net/ipv4/netfilter/ipt_physdev.c [deleted file]
net/ipv4/netfilter/ipt_recent.c
net/ipv4/netfilter/ipt_tos.c
net/ipv4/netfilter/ipt_ttl.c
net/ipv4/netfilter/iptable_filter.c
net/ipv4/netfilter/iptable_mangle.c
net/ipv4/netfilter/iptable_raw.c
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv4/xfrm4_state.c
net/ipv6/addrconf.c
net/ipv6/ah6.c
net/ipv6/anycast.c
net/ipv6/esp6.c
net/ipv6/icmp.c
net/ipv6/ip6_flowlabel.c
net/ipv6/ipcomp6.c
net/ipv6/mcast.c
net/ipv6/ndisc.c
net/ipv6/netfilter/Kconfig
net/ipv6/netfilter/Makefile
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_HL.c
net/ipv6/netfilter/ip6t_LOG.c
net/ipv6/netfilter/ip6t_MARK.c [deleted file]
net/ipv6/netfilter/ip6t_NFQUEUE.c [deleted file]
net/ipv6/netfilter/ip6t_REJECT.c
net/ipv6/netfilter/ip6t_ah.c
net/ipv6/netfilter/ip6t_dst.c
net/ipv6/netfilter/ip6t_esp.c
net/ipv6/netfilter/ip6t_eui64.c
net/ipv6/netfilter/ip6t_frag.c
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/netfilter/ip6t_hl.c
net/ipv6/netfilter/ip6t_ipv6header.c
net/ipv6/netfilter/ip6t_length.c [deleted file]
net/ipv6/netfilter/ip6t_limit.c [deleted file]
net/ipv6/netfilter/ip6t_mac.c [deleted file]
net/ipv6/netfilter/ip6t_mark.c [deleted file]
net/ipv6/netfilter/ip6t_multiport.c
net/ipv6/netfilter/ip6t_owner.c
net/ipv6/netfilter/ip6t_rt.c
net/ipv6/netfilter/ip6table_filter.c
net/ipv6/netfilter/ip6table_mangle.c
net/ipv6/netfilter/ip6table_raw.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/ipv6/netfilter/nf_conntrack_reasm.c
net/ipv6/xfrm6_state.c
net/ipv6/xfrm6_tunnel.c
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/nf_conntrack_ftp.c
net/netfilter/nf_conntrack_standalone.c
net/netfilter/nfnetlink.c
net/netfilter/x_tables.c [new file with mode: 0644]
net/netfilter/xt_CLASSIFY.c [moved from net/ipv4/netfilter/ipt_CLASSIFY.c with 66% similarity]
net/netfilter/xt_CONNMARK.c [moved from net/ipv4/netfilter/ipt_CONNMARK.c with 73% similarity]
net/netfilter/xt_MARK.c [moved from net/ipv4/netfilter/ipt_MARK.c with 61% similarity]
net/netfilter/xt_NFQUEUE.c [new file with mode: 0644]
net/netfilter/xt_NOTRACK.c [moved from net/ipv4/netfilter/ipt_NOTRACK.c with 69% similarity]
net/netfilter/xt_comment.c [moved from net/ipv4/netfilter/ipt_comment.c with 55% similarity]
net/netfilter/xt_connbytes.c [moved from net/ipv4/netfilter/ipt_connbytes.c with 66% similarity]
net/netfilter/xt_connmark.c [moved from net/ipv4/netfilter/ipt_connmark.c with 70% similarity]
net/netfilter/xt_conntrack.c [moved from net/ipv4/netfilter/ipt_conntrack.c with 63% similarity]
net/netfilter/xt_dccp.c [moved from net/ipv4/netfilter/ipt_dccp.c with 58% similarity]
net/netfilter/xt_helper.c [moved from net/ipv4/netfilter/ipt_helper.c with 72% similarity]
net/netfilter/xt_length.c [new file with mode: 0644]
net/netfilter/xt_limit.c [moved from net/ipv4/netfilter/ipt_limit.c with 78% similarity]
net/netfilter/xt_mac.c [moved from net/ipv4/netfilter/ipt_mac.c with 65% similarity]
net/netfilter/xt_mark.c [moved from net/ipv4/netfilter/ipt_mark.c with 60% similarity]
net/netfilter/xt_physdev.c [moved from net/ipv6/netfilter/ip6t_physdev.c with 57% similarity]
net/netfilter/xt_pkttype.c [moved from net/ipv4/netfilter/ipt_pkttype.c with 55% similarity]
net/netfilter/xt_realm.c [moved from net/ipv4/netfilter/ipt_realm.c with 70% similarity]
net/netfilter/xt_sctp.c [moved from net/ipv4/netfilter/ipt_sctp.c with 62% similarity]
net/netfilter/xt_state.c [moved from net/ipv4/netfilter/ipt_state.c with 53% similarity]
net/netfilter/xt_string.c [moved from net/ipv4/netfilter/ipt_string.c with 66% similarity]
net/netfilter/xt_tcpmss.c [moved from net/ipv4/netfilter/ipt_tcpmss.c with 59% similarity]
net/netfilter/xt_tcpudp.c [new file with mode: 0644]
net/netlink/genetlink.c
net/sched/Kconfig
net/sched/act_ipt.c
net/sctp/ipv6.c
net/sctp/sm_statefuns.c
net/tipc/Kconfig [new file with mode: 0644]
net/tipc/Makefile [new file with mode: 0644]
net/tipc/addr.c [new file with mode: 0644]
net/tipc/addr.h [new file with mode: 0644]
net/tipc/bcast.c [new file with mode: 0644]
net/tipc/bcast.h [new file with mode: 0644]
net/tipc/bearer.c [new file with mode: 0644]
net/tipc/bearer.h [new file with mode: 0644]
net/tipc/cluster.c [new file with mode: 0644]
net/tipc/cluster.h [new file with mode: 0644]
net/tipc/config.c [new file with mode: 0644]
net/tipc/config.h [new file with mode: 0644]
net/tipc/core.c [new file with mode: 0644]
net/tipc/core.h [new file with mode: 0644]
net/tipc/dbg.c [new file with mode: 0644]
net/tipc/dbg.h [new file with mode: 0644]
net/tipc/discover.c [new file with mode: 0644]
net/tipc/discover.h [new file with mode: 0644]
net/tipc/eth_media.c [new file with mode: 0644]
net/tipc/handler.c [new file with mode: 0644]
net/tipc/link.c [new file with mode: 0644]
net/tipc/link.h [new file with mode: 0644]
net/tipc/msg.c [new file with mode: 0644]
net/tipc/msg.h [new file with mode: 0644]
net/tipc/name_distr.c [new file with mode: 0644]
net/tipc/name_distr.h [new file with mode: 0644]
net/tipc/name_table.c [new file with mode: 0644]
net/tipc/name_table.h [new file with mode: 0644]
net/tipc/net.c [new file with mode: 0644]
net/tipc/net.h [new file with mode: 0644]
net/tipc/netlink.c [new file with mode: 0644]
net/tipc/node.c [new file with mode: 0644]
net/tipc/node.h [new file with mode: 0644]
net/tipc/node_subscr.c [new file with mode: 0644]
net/tipc/node_subscr.h [new file with mode: 0644]
net/tipc/port.c [new file with mode: 0644]
net/tipc/port.h [new file with mode: 0644]
net/tipc/ref.c [new file with mode: 0644]
net/tipc/ref.h [new file with mode: 0644]
net/tipc/socket.c [new file with mode: 0644]
net/tipc/subscr.c [new file with mode: 0644]
net/tipc/subscr.h [new file with mode: 0644]
net/tipc/user_reg.c [new file with mode: 0644]
net/tipc/user_reg.h [new file with mode: 0644]
net/tipc/zone.c [new file with mode: 0644]
net/tipc/zone.h [new file with mode: 0644]
security/selinux/avc.c
security/selinux/hooks.c
sound/oss/esssolo1.c
sound/pci/es1968.c

index dd311cff1cc30b78ebb1dbe8593fb47866e0a78b..6bd30fdd0786b9a7c64aa4c34f5a732b4c7096e0 100644 (file)
@@ -143,7 +143,7 @@ KernelNewbies:
        http://kernelnewbies.org/
 
 Linux USB project:
-       http://linux-usb.sourceforge.net/
+       http://www.linux-usb.org/
 
 How to NOT write kernel driver by arjanv@redhat.com
        http://people.redhat.com/arjanv/olspaper.pdf
index 6198e5ebcf65be906f801acd1f5df836c3d4d93c..c2c85bcb3d438b983ccc1535acbbd185867e26c3 100644 (file)
@@ -478,10 +478,11 @@ Andrew Morton, "The perfect patch" (tpp).
 Jeff Garzik, "Linux kernel patch submission format."
   <http://linux.yyz.us/patch-format.html>
 
-Greg Kroah, "How to piss off a kernel subsystem maintainer".
+Greg Kroah-Hartman "How to piss off a kernel subsystem maintainer".
   <http://www.kroah.com/log/2005/03/31/>
   <http://www.kroah.com/log/2005/07/08/>
   <http://www.kroah.com/log/2005/10/19/>
+  <http://www.kroah.com/log/2006/01/11/>
 
 NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!.
   <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2>
index 9474501dd6cc4db9b9b0833d5ef5455ff1e4b1e2..b4a1ea76269857137a659e69102b1223b715f6cf 100644 (file)
@@ -123,6 +123,15 @@ Who:       Christoph Hellwig <hch@lst.de>
 
 ---------------------------
 
+What:  CONFIG_FORCED_INLINING
+When:  June 2006
+Why:   Config option is there to see if gcc is good enough. (in january
+        2006). If it is, the behavior should just be the default. If it's not,
+       the option should just go away entirely.
+Who:    Arjan van de Ven
+
+---------------------------
+
 What:  START_ARRAY ioctl for md
 When:  July 2006
 Files: drivers/md/md.c
index 0d783c504eade32e666e7a19b6fa89f85bfb9416..dbe4d87d26154dfe422bd20b51551509c0a99ef5 100644 (file)
@@ -78,6 +78,18 @@ use up all the memory on the machine; but enhances the scalability of
 that instance in a system with many cpus making intensive use of it.
 
 
+tmpfs has a mount option to set the NUMA memory allocation policy for
+all files in that instance:
+mpol=interleave                prefers to allocate memory from each node in turn
+mpol=default           prefers to allocate memory from the local node
+mpol=bind              prefers to allocate from mpol_nodelist
+mpol=preferred         prefers to allocate from first node in mpol_nodelist
+
+The following mount option is used in conjunction with mpol=interleave,
+mpol=bind or mpol=preferred:
+mpol_nodelist: nodelist suitable for parsing with nodelist_parse.
+
+
 To specify the initial root directory you can use the following mount
 options:
 
index fe11fccf7e41bd7bb1abd38be8c73cb52775cc2d..1cbcf65b764b47137b0db013654e55f224c3c32c 100644 (file)
@@ -471,7 +471,7 @@ running once the system is up.
                        arch/i386/kernel/cpu/cpufreq/elanfreq.c.
 
        elevator=       [IOSCHED]
-                       Format: {"as" | "cfq" | "deadline" | "noop"}
+                       Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
                        See Documentation/block/as-iosched.txt and
                        Documentation/block/deadline-iosched.txt for details.
 
@@ -712,9 +712,17 @@ running once the system is up.
        load_ramdisk=   [RAM] List of ramdisks to load from floppy
                        See Documentation/ramdisk.txt.
 
-       lockd.udpport=  [NFS]
+       lockd.nlm_grace_period=P  [NFS] Assign grace period.
+                       Format: <integer>
+
+       lockd.nlm_tcpport=N     [NFS] Assign TCP port.
+                       Format: <integer>
 
-       lockd.tcpport=  [NFS]
+       lockd.nlm_timeout=T     [NFS] Assign timeout value.
+                       Format: <integer>
+
+       lockd.nlm_udpport=M     [NFS] Assign UDP port.
+                       Format: <integer>
 
        logibm.irq=     [HW,MOUSE] Logitech Bus Mouse Driver
                        Format: <irq>
diff --git a/Documentation/scsi/aacraid.txt b/Documentation/scsi/aacraid.txt
new file mode 100644 (file)
index 0000000..820fd07
--- /dev/null
@@ -0,0 +1,108 @@
+AACRAID Driver for Linux (take two)
+
+Introduction
+-------------------------
+The aacraid driver adds support for Adaptec (http://www.adaptec.com)
+RAID controllers. This is a major rewrite from the original
+Adaptec supplied driver. It has signficantly cleaned up both the code
+and the running binary size (the module is less than half the size of
+the original).
+
+Supported Cards/Chipsets
+-------------------------
+       PCI ID (pci.ids)        OEM     Product
+       9005:0285:9005:028a     Adaptec 2020ZCR (Skyhawk)
+       9005:0285:9005:028e     Adaptec 2020SA (Skyhawk)
+       9005:0285:9005:028b     Adaptec 2025ZCR (Terminator)
+       9005:0285:9005:028f     Adaptec 2025SA (Terminator)
+       9005:0285:9005:0286     Adaptec 2120S (Crusader)
+       9005:0286:9005:028d     Adaptec 2130S (Lancer)
+       9005:0285:9005:0285     Adaptec 2200S (Vulcan)
+       9005:0285:9005:0287     Adaptec 2200S (Vulcan-2m)
+       9005:0286:9005:028c     Adaptec 2230S (Lancer)
+       9005:0286:9005:028c     Adaptec 2230SLP (Lancer)
+       9005:0285:9005:0296     Adaptec 2240S (SabreExpress)
+       9005:0285:9005:0290     Adaptec 2410SA (Jaguar)
+       9005:0285:9005:0293     Adaptec 21610SA (Corsair-16)
+       9005:0285:103c:3227     Adaptec 2610SA (Bearcat)
+       9005:0285:9005:0292     Adaptec 2810SA (Corsair-8)
+       9005:0285:9005:0294     Adaptec Prowler
+       9005:0286:9005:029d     Adaptec 2420SA (Intruder)
+       9005:0286:9005:029c     Adaptec 2620SA (Intruder)
+       9005:0286:9005:029b     Adaptec 2820SA (Intruder)
+       9005:0286:9005:02a7     Adaptec 2830SA (Skyray)
+       9005:0286:9005:02a8     Adaptec 2430SA (Skyray)
+       9005:0285:9005:0288     Adaptec 3230S (Harrier)
+       9005:0285:9005:0289     Adaptec 3240S (Tornado)
+       9005:0285:9005:0298     Adaptec 4000SAS (BlackBird)
+       9005:0285:9005:0297     Adaptec 4005SAS (AvonPark)
+       9005:0285:9005:0299     Adaptec 4800SAS (Marauder-X)
+       9005:0285:9005:029a     Adaptec 4805SAS (Marauder-E)
+       9005:0286:9005:02a2     Adaptec 4810SAS (Hurricane)
+       1011:0046:9005:0364     Adaptec 5400S (Mustang)
+       1011:0046:9005:0365     Adaptec 5400S (Mustang)
+       9005:0283:9005:0283     Adaptec Catapult (3210S with arc firmware)
+       9005:0284:9005:0284     Adaptec Tomcat (3410S with arc firmware)
+       9005:0287:9005:0800     Adaptec Themisto (Jupiter)
+       9005:0200:9005:0200     Adaptec Themisto (Jupiter)
+       9005:0286:9005:0800     Adaptec Callisto (Jupiter)
+       1011:0046:9005:1364     Dell    PERC 2/QC (Quad Channel, Mustang)
+       1028:0001:1028:0001     Dell    PERC 2/Si (Iguana)
+       1028:0003:1028:0003     Dell    PERC 3/Si (SlimFast)
+       1028:0002:1028:0002     Dell    PERC 3/Di (Opal)
+       1028:0004:1028:0004     Dell    PERC 3/DiF (Iguana)
+       1028:0002:1028:00d1     Dell    PERC 3/DiV (Viper)
+       1028:0002:1028:00d9     Dell    PERC 3/DiL (Lexus)
+       1028:000a:1028:0106     Dell    PERC 3/DiJ (Jaguar)
+       1028:000a:1028:011b     Dell    PERC 3/DiD (Dagger)
+       1028:000a:1028:0121     Dell    PERC 3/DiB (Boxster)
+       9005:0285:1028:0287     Dell    PERC 320/DC (Vulcan)
+       9005:0285:1028:0291     Dell    CERC 2 (DellCorsair)
+       1011:0046:103c:10c2     HP      NetRAID-4M (Mustang)
+       9005:0285:17aa:0286     Legend  S220 (Crusader)
+       9005:0285:17aa:0287     Legend  S230 (Vulcan)
+       9005:0285:9005:0290     IBM     ServeRAID 7t (Jaguar)
+       9005:0285:1014:02F2     IBM     ServeRAID 8i (AvonPark)
+       9005:0285:1014:0312     IBM     ServeRAID 8i (AvonParkLite)
+       9005:0286:1014:9580     IBM     ServeRAID 8k/8k-l8 (Aurora)
+       9005:0286:1014:9540     IBM     ServeRAID 8k/8k-l4 (AuroraLite)
+       9005:0286:9005:029f     ICP     ICP9014R0 (Lancer)
+       9005:0286:9005:029e     ICP     ICP9024R0 (Lancer)
+       9005:0286:9005:02a0     ICP     ICP9047MA (Lancer)
+       9005:0286:9005:02a1     ICP     ICP9087MA (Lancer)
+       9005:0286:9005:02a4     ICP     ICP9085LI (Marauder-X)
+       9005:0286:9005:02a5     ICP     ICP5085BR (Marauder-E)
+       9005:0286:9005:02a3     ICP     ICP5085AU (Hurricane)
+       9005:0286:9005:02a6     ICP     ICP9067MA (Intruder-6)
+       9005:0286:9005:02a9     ICP     ICP5087AU (Skyray)
+       9005:0286:9005:02aa     ICP     ICP5047AU (Skyray)
+
+People
+-------------------------
+Alan Cox <alan@redhat.com>
+Christoph Hellwig <hch@infradead.org>  (updates for new-style PCI probing and SCSI host registration,
+                                        small cleanups/fixes)
+Matt Domsch <matt_domsch@dell.com>     (revision ioctl, adapter messages)
+Deanna Bonds                            (non-DASD support, PAE fibs and 64 bit, added new adaptec controllers
+                                        added new ioctls, changed scsi interface to use new error handler,
+                                        increased the number of fibs and outstanding commands to a container)
+
+                                       (fixed 64bit and 64G memory model, changed confusing naming convention
+                                        where fibs that go to the hardware are consistently called hw_fibs and
+                                        not just fibs like the name of the driver tracking structure)
+Mark Salyzyn <Mark_Salyzyn@adaptec.com> Fixed panic issues and added some new product ids for upcoming hbas. Performance tuning, card failover and bug mitigations.
+
+Original Driver
+-------------------------
+Adaptec Unix OEM Product Group
+
+Mailing List
+-------------------------
+linux-scsi@vger.kernel.org (Interested parties troll here)
+Also note this is very different to Brian's original driver
+so don't expect him to support it.
+Adaptec does support this driver.  Contact Adaptec tech support or
+aacraid@adaptec.com
+
+Original by Brian Boerner February 2001
+Rewritten by Alan Cox, November 2001
diff --git a/Documentation/spi/butterfly b/Documentation/spi/butterfly
new file mode 100644 (file)
index 0000000..a2e8c8d
--- /dev/null
@@ -0,0 +1,57 @@
+spi_butterfly - parport-to-butterfly adapter driver
+===================================================
+
+This is a hardware and software project that includes building and using
+a parallel port adapter cable, together with an "AVR Butterfly" to run
+firmware for user interfacing and/or sensors.  A Butterfly is a $US20
+battery powered card with an AVR microcontroller and lots of goodies:
+sensors, LCD, flash, toggle stick, and more.  You can use AVR-GCC to
+develop firmware for this, and flash it using this adapter cable.
+
+You can make this adapter from an old printer cable and solder things
+directly to the Butterfly.  Or (if you have the parts and skills) you
+can come up with something fancier, providing ciruit protection to the
+Butterfly and the printer port, or with a better power supply than two
+signal pins from the printer port.
+
+
+The first cable connections will hook Linux up to one SPI bus, with the
+AVR and a DataFlash chip; and to the AVR reset line.  This is all you
+need to reflash the firmware, and the pins are the standard Atmel "ISP"
+connector pins (used also on non-Butterfly AVR boards).
+
+       Signal    Butterfly       Parport (DB-25)
+       ------    ---------       ---------------
+       SCK     = J403.PB1/SCK  = pin 2/D0
+       RESET   = J403.nRST     = pin 3/D1
+       VCC     = J403.VCC_EXT  = pin 8/D6
+       MOSI    = J403.PB2/MOSI = pin 9/D7
+       MISO    = J403.PB3/MISO = pin 11/S7,nBUSY
+       GND     = J403.GND      = pin 23/GND
+
+Then to let Linux master that bus to talk to the DataFlash chip, you must
+(a) flash new firmware that disables SPI (set PRR.2, and disable pullups
+by clearing PORTB.[0-3]); (b) configure the mtd_dataflash driver; and
+(c) cable in the chipselect.
+
+       Signal    Butterfly       Parport (DB-25)
+       ------    ---------       ---------------
+       VCC     = J400.VCC_EXT  = pin 7/D5
+       SELECT  = J400.PB0/nSS  = pin 17/C3,nSELECT
+       GND     = J400.GND      = pin 24/GND
+
+The "USI" controller, using J405, can be used for a second SPI bus.  That
+would let you talk to the AVR over SPI, running firmware that makes it act
+as an SPI slave, while letting either Linux or the AVR use the DataFlash.
+There are plenty of spare parport pins to wire this one up, such as:
+
+       Signal    Butterfly       Parport (DB-25)
+       ------    ---------       ---------------
+       SCK     = J403.PE4/USCK = pin 5/D3
+       MOSI    = J403.PE5/DI   = pin 6/D4
+       MISO    = J403.PE6/DO   = pin 12/S5,nPAPEROUT
+       GND     = J403.GND      = pin 22/GND
+
+       IRQ     = J402.PF4      = pin 10/S6,ACK
+       GND     = J402.GND(P2)  = pin 25/GND
+
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
new file mode 100644 (file)
index 0000000..a5ffba3
--- /dev/null
@@ -0,0 +1,457 @@
+Overview of Linux kernel SPI support
+====================================
+
+02-Dec-2005
+
+What is SPI?
+------------
+The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial
+link used to connect microcontrollers to sensors, memory, and peripherals.
+
+The three signal wires hold a clock (SCLK, often on the order of 10 MHz),
+and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In,
+Slave Out" (MISO) signals.  (Other names are also used.)  There are four
+clocking modes through which data is exchanged; mode-0 and mode-3 are most
+commonly used.  Each clock cycle shifts data out and data in; the clock
+doesn't cycle except when there is data to shift.
+
+SPI masters may use a "chip select" line to activate a given SPI slave
+device, so those three signal wires may be connected to several chips
+in parallel.  All SPI slaves support chipselects.  Some devices have
+other signals, often including an interrupt to the master.
+
+Unlike serial busses like USB or SMBUS, even low level protocols for
+SPI slave functions are usually not interoperable between vendors
+(except for cases like SPI memory chips).
+
+  - SPI may be used for request/response style device protocols, as with
+    touchscreen sensors and memory chips.
+
+  - It may also be used to stream data in either direction (half duplex),
+    or both of them at the same time (full duplex).
+
+  - Some devices may use eight bit words.  Others may different word
+    lengths, such as streams of 12-bit or 20-bit digital samples.
+
+In the same way, SPI slaves will only rarely support any kind of automatic
+discovery/enumeration protocol.  The tree of slave devices accessible from
+a given SPI master will normally be set up manually, with configuration
+tables.
+
+SPI is only one of the names used by such four-wire protocols, and
+most controllers have no problem handling "MicroWire" (think of it as
+half-duplex SPI, for request/response protocols), SSP ("Synchronous
+Serial Protocol"), PSP ("Programmable Serial Protocol"), and other
+related protocols.
+
+Microcontrollers often support both master and slave sides of the SPI
+protocol.  This document (and Linux) currently only supports the master
+side of SPI interactions.
+
+
+Who uses it?  On what kinds of systems?
+---------------------------------------
+Linux developers using SPI are probably writing device drivers for embedded
+systems boards.  SPI is used to control external chips, and it is also a
+protocol supported by every MMC or SD memory card.  (The older "DataFlash"
+cards, predating MMC cards but using the same connectors and card shape,
+support only SPI.)  Some PC hardware uses SPI flash for BIOS code.
+
+SPI slave chips range from digital/analog converters used for analog
+sensors and codecs, to memory, to peripherals like USB controllers
+or Ethernet adapters; and more.
+
+Most systems using SPI will integrate a few devices on a mainboard.
+Some provide SPI links on expansion connectors; in cases where no
+dedicated SPI controller exists, GPIO pins can be used to create a
+low speed "bitbanging" adapter.  Very few systems will "hotplug" an SPI
+controller; the reasons to use SPI focus on low cost and simple operation,
+and if dynamic reconfiguration is important, USB will often be a more
+appropriate low-pincount peripheral bus.
+
+Many microcontrollers that can run Linux integrate one or more I/O
+interfaces with SPI modes.  Given SPI support, they could use MMC or SD
+cards without needing a special purpose MMC/SD/SDIO controller.
+
+
+How do these driver programming interfaces work?
+------------------------------------------------
+The <linux/spi/spi.h> header file includes kerneldoc, as does the
+main source code, and you should certainly read that.  This is just
+an overview, so you get the big picture before the details.
+
+SPI requests always go into I/O queues.  Requests for a given SPI device
+are always executed in FIFO order, and complete asynchronously through
+completion callbacks.  There are also some simple synchronous wrappers
+for those calls, including ones for common transaction types like writing
+a command and then reading its response.
+
+There are two types of SPI driver, here called:
+
+  Controller drivers ... these are often built in to System-On-Chip
+       processors, and often support both Master and Slave roles.
+       These drivers touch hardware registers and may use DMA.
+       Or they can be PIO bitbangers, needing just GPIO pins.
+
+  Protocol drivers ... these pass messages through the controller
+       driver to communicate with a Slave or Master device on the
+       other side of an SPI link.
+
+So for example one protocol driver might talk to the MTD layer to export
+data to filesystems stored on SPI flash like DataFlash; and others might
+control audio interfaces, present touchscreen sensors as input interfaces,
+or monitor temperature and voltage levels during industrial processing.
+And those might all be sharing the same controller driver.
+
+A "struct spi_device" encapsulates the master-side interface between
+those two types of driver.  At this writing, Linux has no slave side
+programming interface.
+
+There is a minimal core of SPI programming interfaces, focussing on
+using driver model to connect controller and protocol drivers using
+device tables provided by board specific initialization code.  SPI
+shows up in sysfs in several locations:
+
+   /sys/devices/.../CTLR/spiB.C ... spi_device for on bus "B",
+       chipselect C, accessed through CTLR.
+
+   /sys/devices/.../CTLR/spiB.C/modalias ... identifies the driver
+       that should be used with this device (for hotplug/coldplug)
+
+   /sys/bus/spi/devices/spiB.C ... symlink to the physical
+       spiB-C device
+
+   /sys/bus/spi/drivers/D ... driver for one or more spi*.* devices
+
+   /sys/class/spi_master/spiB ... class device for the controller
+       managing bus "B".  All the spiB.* devices share the same
+       physical SPI bus segment, with SCLK, MOSI, and MISO.
+
+
+How does board-specific init code declare SPI devices?
+------------------------------------------------------
+Linux needs several kinds of information to properly configure SPI devices.
+That information is normally provided by board-specific code, even for
+chips that do support some of automated discovery/enumeration.
+
+DECLARE CONTROLLERS
+
+The first kind of information is a list of what SPI controllers exist.
+For System-on-Chip (SOC) based boards, these will usually be platform
+devices, and the controller may need some platform_data in order to
+operate properly.  The "struct platform_device" will include resources
+like the physical address of the controller's first register and its IRQ.
+
+Platforms will often abstract the "register SPI controller" operation,
+maybe coupling it with code to initialize pin configurations, so that
+the arch/.../mach-*/board-*.c files for several boards can all share the
+same basic controller setup code.  This is because most SOCs have several
+SPI-capable controllers, and only the ones actually usable on a given
+board should normally be set up and registered.
+
+So for example arch/.../mach-*/board-*.c files might have code like:
+
+       #include <asm/arch/spi.h>       /* for mysoc_spi_data */
+
+       /* if your mach-* infrastructure doesn't support kernels that can
+        * run on multiple boards, pdata wouldn't benefit from "__init".
+        */
+       static struct mysoc_spi_data __init pdata = { ... };
+
+       static __init board_init(void)
+       {
+               ...
+               /* this board only uses SPI controller #2 */
+               mysoc_register_spi(2, &pdata);
+               ...
+       }
+
+And SOC-specific utility code might look something like:
+
+       #include <asm/arch/spi.h>
+
+       static struct platform_device spi2 = { ... };
+
+       void mysoc_register_spi(unsigned n, struct mysoc_spi_data *pdata)
+       {
+               struct mysoc_spi_data *pdata2;
+
+               pdata2 = kmalloc(sizeof *pdata2, GFP_KERNEL);
+               *pdata2 = pdata;
+               ...
+               if (n == 2) {
+                       spi2->dev.platform_data = pdata2;
+                       register_platform_device(&spi2);
+
+                       /* also: set up pin modes so the spi2 signals are
+                        * visible on the relevant pins ... bootloaders on
+                        * production boards may already have done this, but
+                        * developer boards will often need Linux to do it.
+                        */
+               }
+               ...
+       }
+
+Notice how the platform_data for boards may be different, even if the
+same SOC controller is used.  For example, on one board SPI might use
+an external clock, where another derives the SPI clock from current
+settings of some master clock.
+
+
+DECLARE SLAVE DEVICES
+
+The second kind of information is a list of what SPI slave devices exist
+on the target board, often with some board-specific data needed for the
+driver to work correctly.
+
+Normally your arch/.../mach-*/board-*.c files would provide a small table
+listing the SPI devices on each board.  (This would typically be only a
+small handful.)  That might look like:
+
+       static struct ads7846_platform_data ads_info = {
+               .vref_delay_usecs       = 100,
+               .x_plate_ohms           = 580,
+               .y_plate_ohms           = 410,
+       };
+
+       static struct spi_board_info spi_board_info[] __initdata = {
+       {
+               .modalias       = "ads7846",
+               .platform_data  = &ads_info,
+               .mode           = SPI_MODE_0,
+               .irq            = GPIO_IRQ(31),
+               .max_speed_hz   = 120000 /* max sample rate at 3V */ * 16,
+               .bus_num        = 1,
+               .chip_select    = 0,
+       },
+       };
+
+Again, notice how board-specific information is provided; each chip may need
+several types.  This example shows generic constraints like the fastest SPI
+clock to allow (a function of board voltage in this case) or how an IRQ pin
+is wired, plus chip-specific constraints like an important delay that's
+changed by the capacitance at one pin.
+
+(There's also "controller_data", information that may be useful to the
+controller driver.  An example would be peripheral-specific DMA tuning
+data or chipselect callbacks.  This is stored in spi_device later.)
+
+The board_info should provide enough information to let the system work
+without the chip's driver being loaded.  The most troublesome aspect of
+that is likely the SPI_CS_HIGH bit in the spi_device.mode field, since
+sharing a bus with a device that interprets chipselect "backwards" is
+not possible.
+
+Then your board initialization code would register that table with the SPI
+infrastructure, so that it's available later when the SPI master controller
+driver is registered:
+
+       spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
+
+Like with other static board-specific setup, you won't unregister those.
+
+The widely used "card" style computers bundle memory, cpu, and little else
+onto a card that's maybe just thirty square centimeters.  On such systems,
+your arch/.../mach-.../board-*.c file would primarily provide information
+about the devices on the mainboard into which such a card is plugged.  That
+certainly includes SPI devices hooked up through the card connectors!
+
+
+NON-STATIC CONFIGURATIONS
+
+Developer boards often play by different rules than product boards, and one
+example is the potential need to hotplug SPI devices and/or controllers.
+
+For those cases you might need to use use spi_busnum_to_master() to look
+up the spi bus master, and will likely need spi_new_device() to provide the
+board info based on the board that was hotplugged.  Of course, you'd later
+call at least spi_unregister_device() when that board is removed.
+
+When Linux includes support for MMC/SD/SDIO/DataFlash cards through SPI, those
+configurations will also be dynamic.  Fortunately, those devices all support
+basic device identification probes, so that support should hotplug normally.
+
+
+How do I write an "SPI Protocol Driver"?
+----------------------------------------
+All SPI drivers are currently kernel drivers.  A userspace driver API
+would just be another kernel driver, probably offering some lowlevel
+access through aio_read(), aio_write(), and ioctl() calls and using the
+standard userspace sysfs mechanisms to bind to a given SPI device.
+
+SPI protocol drivers somewhat resemble platform device drivers:
+
+       static struct spi_driver CHIP_driver = {
+               .driver = {
+                       .name           = "CHIP",
+                       .bus            = &spi_bus_type,
+                       .owner          = THIS_MODULE,
+               },
+
+               .probe          = CHIP_probe,
+               .remove         = __devexit_p(CHIP_remove),
+               .suspend        = CHIP_suspend,
+               .resume         = CHIP_resume,
+       };
+
+The driver core will autmatically attempt to bind this driver to any SPI
+device whose board_info gave a modalias of "CHIP".  Your probe() code
+might look like this unless you're creating a class_device:
+
+       static int __devinit CHIP_probe(struct spi_device *spi)
+       {
+               struct CHIP                     *chip;
+               struct CHIP_platform_data       *pdata;
+
+               /* assuming the driver requires board-specific data: */
+               pdata = &spi->dev.platform_data;
+               if (!pdata)
+                       return -ENODEV;
+
+               /* get memory for driver's per-chip state */
+               chip = kzalloc(sizeof *chip, GFP_KERNEL);
+               if (!chip)
+                       return -ENOMEM;
+               dev_set_drvdata(&spi->dev, chip);
+
+               ... etc
+               return 0;
+       }
+
+As soon as it enters probe(), the driver may issue I/O requests to
+the SPI device using "struct spi_message".  When remove() returns,
+the driver guarantees that it won't submit any more such messages.
+
+  - An spi_message is a sequence of of protocol operations, executed
+    as one atomic sequence.  SPI driver controls include:
+
+      + when bidirectional reads and writes start ... by how its
+        sequence of spi_transfer requests is arranged;
+
+      + optionally defining short delays after transfers ... using
+        the spi_transfer.delay_usecs setting;
+
+      + whether the chipselect becomes inactive after a transfer and
+        any delay ... by using the spi_transfer.cs_change flag;
+
+      + hinting whether the next message is likely to go to this same
+        device ... using the spi_transfer.cs_change flag on the last
+       transfer in that atomic group, and potentially saving costs
+       for chip deselect and select operations.
+
+  - Follow standard kernel rules, and provide DMA-safe buffers in
+    your messages.  That way controller drivers using DMA aren't forced
+    to make extra copies unless the hardware requires it (e.g. working
+    around hardware errata that force the use of bounce buffering).
+
+    If standard dma_map_single() handling of these buffers is inappropriate,
+    you can use spi_message.is_dma_mapped to tell the controller driver
+    that you've already provided the relevant DMA addresses.
+
+  - The basic I/O primitive is spi_async().  Async requests may be
+    issued in any context (irq handler, task, etc) and completion
+    is reported using a callback provided with the message.
+    After any detected error, the chip is deselected and processing
+    of that spi_message is aborted.
+
+  - There are also synchronous wrappers like spi_sync(), and wrappers
+    like spi_read(), spi_write(), and spi_write_then_read().  These
+    may be issued only in contexts that may sleep, and they're all
+    clean (and small, and "optional") layers over spi_async().
+
+  - The spi_write_then_read() call, and convenience wrappers around
+    it, should only be used with small amounts of data where the
+    cost of an extra copy may be ignored.  It's designed to support
+    common RPC-style requests, such as writing an eight bit command
+    and reading a sixteen bit response -- spi_w8r16() being one its
+    wrappers, doing exactly that.
+
+Some drivers may need to modify spi_device characteristics like the
+transfer mode, wordsize, or clock rate.  This is done with spi_setup(),
+which would normally be called from probe() before the first I/O is
+done to the device.
+
+While "spi_device" would be the bottom boundary of the driver, the
+upper boundaries might include sysfs (especially for sensor readings),
+the input layer, ALSA, networking, MTD, the character device framework,
+or other Linux subsystems.
+
+Note that there are two types of memory your driver must manage as part
+of interacting with SPI devices.
+
+  - I/O buffers use the usual Linux rules, and must be DMA-safe.
+    You'd normally allocate them from the heap or free page pool.
+    Don't use the stack, or anything that's declared "static".
+
+  - The spi_message and spi_transfer metadata used to glue those
+    I/O buffers into a group of protocol transactions.  These can
+    be allocated anywhere it's convenient, including as part of
+    other allocate-once driver data structures.  Zero-init these.
+
+If you like, spi_message_alloc() and spi_message_free() convenience
+routines are available to allocate and zero-initialize an spi_message
+with several transfers.
+
+
+How do I write an "SPI Master Controller Driver"?
+-------------------------------------------------
+An SPI controller will probably be registered on the platform_bus; write
+a driver to bind to the device, whichever bus is involved.
+
+The main task of this type of driver is to provide an "spi_master".
+Use spi_alloc_master() to allocate the master, and class_get_devdata()
+to get the driver-private data allocated for that device.
+
+       struct spi_master       *master;
+       struct CONTROLLER       *c;
+
+       master = spi_alloc_master(dev, sizeof *c);
+       if (!master)
+               return -ENODEV;
+
+       c = class_get_devdata(&master->cdev);
+
+The driver will initialize the fields of that spi_master, including the
+bus number (maybe the same as the platform device ID) and three methods
+used to interact with the SPI core and SPI protocol drivers.  It will
+also initialize its own internal state.
+
+    master->setup(struct spi_device *spi)
+       This sets up the device clock rate, SPI mode, and word sizes.
+       Drivers may change the defaults provided by board_info, and then
+       call spi_setup(spi) to invoke this routine.  It may sleep.
+
+    master->transfer(struct spi_device *spi, struct spi_message *message)
+       This must not sleep.  Its responsibility is arrange that the
+       transfer happens and its complete() callback is issued; the two
+       will normally happen later, after other transfers complete.
+
+    master->cleanup(struct spi_device *spi)
+       Your controller driver may use spi_device.controller_state to hold
+       state it dynamically associates with that device.  If you do that,
+       be sure to provide the cleanup() method to free that state.
+
+The bulk of the driver will be managing the I/O queue fed by transfer().
+
+That queue could be purely conceptual.  For example, a driver used only
+for low-frequency sensor acess might be fine using synchronous PIO.
+
+But the queue will probably be very real, using message->queue, PIO,
+often DMA (especially if the root filesystem is in SPI flash), and
+execution contexts like IRQ handlers, tasklets, or workqueues (such
+as keventd).  Your driver can be as fancy, or as simple, as you need.
+
+
+THANKS TO
+---------
+Contributors to Linux-SPI discussions include (in alphabetical order,
+by last name):
+
+David Brownell
+Russell King
+Dmitry Pervushin
+Stephen Street
+Mark Underwood
+Andrew Victor
+Vitaly Wool
+
index 0db72a36e2453e1f47007a6db14ad37ae3004829..513f3b6c35b964b5d09f815b39b8c57822df1e5d 100644 (file)
@@ -1300,6 +1300,12 @@ M:       ttb@tentacle.dhs.org and rml@novell.com
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
+INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
+P:      Sylvain Meyer
+M:      sylvain.meyer@worldonline.fr
+L:      linux-fbdev-devel@lists.sourceforge.net
+S:      Maintained
+
 INTEL 810/815 FRAMEBUFFER DRIVER
 P:      Antonino Daplas
 M:      adaplas@pol.net
@@ -1889,11 +1895,11 @@ W:      http://linux-ntfs.sf.net/
 T:     git kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
 S:     Maintained
 
-NVIDIA (RIVA) FRAMEBUFFER DRIVER
-P:     Ani Joshi
-M:     ajoshi@shell.unixbox.com
-L:     linux-nvidia@lists.surfsouth.com
-S:     Maintained
+NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER
+P:      Antonino Daplas
+M:      adaplas@pol.net
+L:      linux-fbdev-devel@lists.sourceforge.net
+S:      Maintained
 
 ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
 P:     Mark Fasheh
@@ -2188,6 +2194,12 @@ L:       rtl@rtlinux.org
 W:     www.rtlinux.org
 S:     Maintained
 
+S3 SAVAGE FRAMEBUFFER DRIVER
+P:      Antonino Daplas
+M:      adaplas@pol.net
+L:      linux-fbdev-devel@lists.sourceforge.net
+S:      Maintained
+
 S390
 P:     Martin Schwidefsky
 M:     schwidefsky@de.ibm.com
@@ -2519,6 +2531,19 @@ P:     Romain Lievin
 M:     roms@lpg.ticalc.org
 S:     Maintained
 
+TIPC NETWORK LAYER
+P:     Per Liden
+M:     per.liden@nospam.ericsson.com
+P:     Jon Maloy
+M:     jon.maloy@nospam.ericsson.com
+P:     Allan Stephens
+M:     allan.stephens@nospam.windriver.com
+L:     tipc-discussion@lists.sourceforge.net
+W:     http://tipc.sourceforge.net/
+W:     http://tipc.cslab.ericsson.net/
+T:     git tipc.cslab.ericsson.net:/pub/git/tipc.git
+S:     Maintained
+
 TLAN NETWORK DRIVER
 P:     Samuel Chessman
 M:     chessman@tux.org
index 006f09218ae7418a870aa1370f78bc15678f218b..5959e36c3b4c52ba2eaeaedf8afe9ecced20c3f2 100644 (file)
@@ -764,6 +764,8 @@ source "drivers/char/Kconfig"
 
 source "drivers/i2c/Kconfig"
 
+source "drivers/spi/Kconfig"
+
 source "drivers/hwmon/Kconfig"
 
 #source "drivers/l3/Kconfig"
index 1b7eaab02b9ec66263b0c66cd15e4522ab72f06f..159ad7ed7a40142c16093588fb0988963c675b29 100644 (file)
@@ -1103,14 +1103,14 @@ static int locomo_bus_remove(struct device *dev)
 struct bus_type locomo_bus_type = {
        .name           = "locomo-bus",
        .match          = locomo_match,
+       .probe          = locomo_bus_probe,
+       .remove         = locomo_bus_remove,
        .suspend        = locomo_bus_suspend,
        .resume         = locomo_bus_resume,
 };
 
 int locomo_driver_register(struct locomo_driver *driver)
 {
-       driver->drv.probe = locomo_bus_probe;
-       driver->drv.remove = locomo_bus_remove;
        driver->drv.bus = &locomo_bus_type;
        return driver_register(&driver->drv);
 }
index d0d6e6d2d649e9887813fc6f3e08debb292e2b81..1475089f9b4265f7b2c9dc86696dea0a4970c027 100644 (file)
@@ -1247,14 +1247,14 @@ static int sa1111_bus_remove(struct device *dev)
 struct bus_type sa1111_bus_type = {
        .name           = "sa1111-rab",
        .match          = sa1111_match,
+       .probe          = sa1111_bus_probe,
+       .remove         = sa1111_bus_remove,
        .suspend        = sa1111_bus_suspend,
        .resume         = sa1111_bus_resume,
 };
 
 int sa1111_driver_register(struct sa1111_driver *driver)
 {
-       driver->drv.probe = sa1111_bus_probe;
-       driver->drv.remove = sa1111_bus_remove;
        driver->drv.bus = &sa1111_bus_type;
        return driver_register(&driver->drv);
 }
index 96fd91926c9bde875173dab2b95f50dbfe13b69c..74ea29c3205eb6b476a2c725858bf70895f9288f 100644 (file)
@@ -1147,9 +1147,11 @@ static void ecard_drv_shutdown(struct device *dev)
        struct ecard_driver *drv = ECARD_DRV(dev->driver);
        struct ecard_request req;
 
-       if (drv->shutdown)
-               drv->shutdown(ec);
-       ecard_release(ec);
+       if (dev->driver) {
+               if (drv->shutdown)
+                       drv->shutdown(ec);
+               ecard_release(ec);
+       }
 
        /*
         * If this card has a loader, call the reset handler.
@@ -1164,9 +1166,6 @@ static void ecard_drv_shutdown(struct device *dev)
 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);
 }
@@ -1195,6 +1194,9 @@ struct bus_type ecard_bus_type = {
        .name           = "ecard",
        .dev_attrs      = ecard_dev_attrs,
        .match          = ecard_match,
+       .probe          = ecard_drv_probe,
+       .remove         = ecard_drv_remove,
+       .shutdown       = ecard_drv_shutdown,
 };
 
 static int ecard_bus_init(void)
index 5b41e3a724e1d34f35aacd1a94372781a2c4710a..622cdc4212dd6f096ca7880f85d42334f0581da1 100644 (file)
@@ -22,20 +22,6 @@ static int lm_match(struct device *dev, struct device_driver *drv)
        return 1;
 }
 
-static struct bus_type lm_bustype = {
-       .name           = "logicmodule",
-       .match          = lm_match,
-//     .suspend        = lm_suspend,
-//     .resume         = lm_resume,
-};
-
-static int __init lm_init(void)
-{
-       return bus_register(&lm_bustype);
-}
-
-postcore_initcall(lm_init);
-
 static int lm_bus_probe(struct device *dev)
 {
        struct lm_device *lmdev = to_lm_device(dev);
@@ -49,16 +35,30 @@ static int lm_bus_remove(struct device *dev)
        struct lm_device *lmdev = to_lm_device(dev);
        struct lm_driver *lmdrv = to_lm_driver(dev->driver);
 
-       lmdrv->remove(lmdev);
+       if (lmdrv->remove)
+               lmdrv->remove(lmdev);
        return 0;
 }
 
+static struct bus_type lm_bustype = {
+       .name           = "logicmodule",
+       .match          = lm_match,
+       .probe          = lm_bus_probe,
+       .remove         = lm_bus_remove,
+//     .suspend        = lm_bus_suspend,
+//     .resume         = lm_bus_resume,
+};
+
+static int __init lm_init(void)
+{
+       return bus_register(&lm_bustype);
+}
+
+postcore_initcall(lm_init);
+
 int lm_driver_register(struct lm_driver *drv)
 {
        drv->drv.bus = &lm_bustype;
-       drv->drv.probe = lm_bus_probe;
-       drv->drv.remove = lm_bus_remove;
-
        return driver_register(&drv->drv);
 }
 
index d5d0df7f04fcbcf631d9c22884552f4bedaffaea..cbde675bc95c869d6bd06dc21b36a338a00c61b4 100644 (file)
@@ -702,6 +702,15 @@ config PHYSICAL_START
 
          Don't change this unless you know what you are doing.
 
+config HOTPLUG_CPU
+       bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
+       depends on SMP && HOTPLUG && EXPERIMENTAL
+       ---help---
+         Say Y here to experiment with turning CPUs off and on.  CPUs
+         can be controlled through /sys/devices/system/cpu.
+
+         Say N.
+
 endmenu
 
 
@@ -988,15 +997,6 @@ config SCx200
          This support is also available as a module.  If compiled as a
          module, it will be called scx200.
 
-config HOTPLUG_CPU
-       bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
-       depends on SMP && HOTPLUG && EXPERIMENTAL
-       ---help---
-         Say Y here to experiment with turning CPUs off and on.  CPUs
-         can be controlled through /sys/devices/system/cpu.
-
-         Say N.
-
 source "drivers/pcmcia/Kconfig"
 
 source "drivers/pci/hotplug/Kconfig"
index d3c0409d201cebcd2a258c1ab2bb1983959e5d23..bd2d53a9dd2b393ec7a1f3952f889e211fdd139e 100644 (file)
@@ -42,9 +42,9 @@ include $(srctree)/arch/i386/Makefile.cpu
 cflags-$(CONFIG_REGPARM) += $(shell if [ $(call cc-version) -ge 0300 ] ; then \
                             echo "-mregparm=3"; fi ;)
 
-# Disable unit-at-a-time mode, it makes gcc use a lot more stack
-# due to the lack of sharing of stacklots.
-CFLAGS += $(call cc-option,-fno-unit-at-a-time)
+# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
+# a lot more stack due to the lack of sharing of stacklots:
+CFLAGS                         += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
 
 CFLAGS += $(cflags-y)
 
index b9f0030a2ebbc38494bfaee9ae47656672ac0336..0aaebf3e1cfa321a6b20f6ade450063f3554e0f7 100644 (file)
@@ -112,33 +112,38 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
                p < (void *)tinfo + THREAD_SIZE - 3;
 }
 
+static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
+{
+       printk(log_lvl);
+       printk(" [<%08lx>] ", addr);
+       print_symbol("%s", addr);
+       printk("\n");
+}
+
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
-                               unsigned long *stack, unsigned long ebp)
+                               unsigned long *stack, unsigned long ebp,
+                               char *log_lvl)
 {
        unsigned long addr;
 
 #ifdef CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
                addr = *(unsigned long *)(ebp + 4);
-               printk(KERN_EMERG " [<%08lx>] ", addr);
-               print_symbol("%s", addr);
-               printk("\n");
+               print_addr_and_symbol(addr, log_lvl);
                ebp = *(unsigned long *)ebp;
        }
 #else
        while (valid_stack_ptr(tinfo, stack)) {
                addr = *stack++;
-               if (__kernel_text_address(addr)) {
-                       printk(KERN_EMERG " [<%08lx>]", addr);
-                       print_symbol(" %s", addr);
-                       printk("\n");
-               }
+               if (__kernel_text_address(addr))
+                       print_addr_and_symbol(addr, log_lvl);
        }
 #endif
        return ebp;
 }
 
-void show_trace(struct task_struct *task, unsigned long * stack)
+static void show_trace_log_lvl(struct task_struct *task,
+                              unsigned long *stack, char *log_lvl)
 {
        unsigned long ebp;
 
@@ -157,7 +162,7 @@ void show_trace(struct task_struct *task, unsigned long * stack)
                struct thread_info *context;
                context = (struct thread_info *)
                        ((unsigned long)stack & (~(THREAD_SIZE - 1)));
-               ebp = print_context_stack(context, stack, ebp);
+               ebp = print_context_stack(context, stack, ebp, log_lvl);
                stack = (unsigned long*)context->previous_esp;
                if (!stack)
                        break;
@@ -165,7 +170,13 @@ void show_trace(struct task_struct *task, unsigned long * stack)
        }
 }
 
-void show_stack(struct task_struct *task, unsigned long *esp)
+void show_trace(struct task_struct *task, unsigned long * stack)
+{
+       show_trace_log_lvl(task, stack, "");
+}
+
+static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
+                              char *log_lvl)
 {
        unsigned long *stack;
        int i;
@@ -178,16 +189,26 @@ void show_stack(struct task_struct *task, unsigned long *esp)
        }
 
        stack = esp;
-       printk(KERN_EMERG);
+       printk(log_lvl);
        for(i = 0; i < kstack_depth_to_print; i++) {
                if (kstack_end(stack))
                        break;
-               if (i && ((i % 8) == 0))
-                       printk("\n" KERN_EMERG "       ");
+               if (i && ((i % 8) == 0)) {
+                       printk("\n");
+                       printk(log_lvl);
+                       printk("       ");
+               }
                printk("%08lx ", *stack++);
        }
-       printk("\n" KERN_EMERG "Call Trace:\n");
-       show_trace(task, esp);
+       printk("\n");
+       printk(log_lvl);
+       printk("Call Trace:\n");
+       show_trace_log_lvl(task, esp, log_lvl);
+}
+
+void show_stack(struct task_struct *task, unsigned long *esp)
+{
+       show_stack_log_lvl(task, esp, "");
 }
 
 /*
@@ -238,7 +259,7 @@ void show_registers(struct pt_regs *regs)
                u8 __user *eip;
 
                printk("\n" KERN_EMERG "Stack: ");
-               show_stack(NULL, (unsigned long*)esp);
+               show_stack_log_lvl(NULL, (unsigned long *)esp, KERN_EMERG);
 
                printk(KERN_EMERG "Code: ");
 
index 65f67070db644ab72f43b8e9699d97517cf396ad..83c3645ccc43b08e085da6ba78f99b3f1f9ac0f4 100644 (file)
@@ -449,3 +449,19 @@ static void __devinit pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_TI, 0x8032,
                         pci_post_fixup_toshiba_ohci1394);
+
+
+/*
+ * Prevent the BIOS trapping accesses to the Cyrix CS5530A video device
+ * configuration space.
+ */
+static void __devinit pci_early_fixup_cyrix_5530(struct pci_dev *dev)
+{
+       u8 r;
+       /* clear 'F4 Video Configuration Trap' bit */
+       pci_read_config_byte(dev, 0x42, &r);
+       r &= 0xfd;
+       pci_write_config_byte(dev, 0x42, r);
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
+                       pci_early_fixup_cyrix_5530);
index 80f8663bc6d98c8bd70220bbd1fa0625613de6fe..1d07d8072ec21aebbc5fc2c21318c8bccb98d77f 100644 (file)
@@ -701,6 +701,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_SGI_L1_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
 CONFIG_SERIAL_SGI_IOC4=y
+CONFIG_SERIAL_SGI_IOC3=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -1046,6 +1047,7 @@ CONFIG_INFINIBAND_IPOIB=m
 # SN Devices
 #
 CONFIG_SGI_IOC4=y
+CONFIG_SGI_IOC3=y
 
 #
 # File systems
index ff8bb3770c9da0487c91bfa96261ced45d68e43a..3cb503b659e684f2fa45e9a31128730e0b02ee23 100644 (file)
@@ -659,6 +659,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_SGI_L1_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
 CONFIG_SERIAL_SGI_IOC4=y
+CONFIG_SERIAL_SGI_IOC3=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -899,6 +900,7 @@ CONFIG_INFINIBAND_SRP=m
 # SN Devices
 #
 CONFIG_SGI_IOC4=y
+CONFIG_SGI_IOC3=y
 
 #
 # File systems
index a346e1833bf2335b224a298469911233dab809fa..626cdc83668b1bc17a2823deefeadae287b86ef1 100644 (file)
@@ -108,7 +108,6 @@ static struct async_struct *IRQ_ports[NR_IRQS];
 static struct console *console;
 
 static unsigned char *tmp_buf;
-static DECLARE_MUTEX(tmp_buf_sem);
 
 extern struct console *console_drivers; /* from kernel/printk.c */
 
@@ -167,15 +166,9 @@ static  void receive_chars(struct tty_struct *tty, struct pt_regs *regs)
                        }
                }
                seen_esc = 0;
-               if (tty->flip.count >= TTY_FLIPBUF_SIZE) break;
 
-               *tty->flip.char_buf_ptr = ch;
-
-               *tty->flip.flag_buf_ptr = 0;
-
-               tty->flip.flag_buf_ptr++;
-               tty->flip.char_buf_ptr++;
-               tty->flip.count++;
+               if (tty_insert_flip_char(tty, ch, TTY_NORMAL) == 0)
+                       break;
        }
        tty_flip_buffer_push(tty);
 }
index 2ddbac6f49993b4c0026ea6d12803f80b144f620..ce423910ca976553b363ca42ee29f923423c563a 100644 (file)
@@ -903,5 +903,6 @@ fsyscall_table:
        data8 0
        data8 0
        data8 0
+       data8 0                                                 // 1280
 
        .org fsyscall_table + 8*NR_syscalls     // guard against failures to increase NR_syscalls
index 2323377e36950ee236a662bcddada08c2f423d45..5cd6226f44f291c2a9a4fd2fa42374148fc65ab9 100644 (file)
@@ -60,3 +60,30 @@ END(jprobe_break)
 GLOBAL_ENTRY(jprobe_inst_return)
        br.call.sptk.many b0=jprobe_break
 END(jprobe_inst_return)
+
+GLOBAL_ENTRY(invalidate_stacked_regs)
+       movl r16=invalidate_restore_cfm
+       ;;
+       mov b6=r16
+       ;;
+       br.ret.sptk.many b6
+       ;;
+invalidate_restore_cfm:
+       mov r16=ar.rsc
+       ;;
+       mov ar.rsc=r0
+       ;;
+       loadrs
+       ;;
+       mov ar.rsc=r16
+       ;;
+       br.cond.sptk.many rp
+END(invalidate_stacked_regs)
+
+GLOBAL_ENTRY(flush_register_stack)
+       // flush dirty regs to backing store (must be first in insn group)
+       flushrs
+       ;;
+       br.ret.sptk.many rp
+END(flush_register_stack)
+
index 346fedf9ea479a361ea7cdca2173b442b2302adb..50ae8c7d453d5075641a191dcfdf5bf0d4087ece 100644 (file)
@@ -766,11 +766,56 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
        return ret;
 }
 
+struct param_bsp_cfm {
+       unsigned long ip;
+       unsigned long *bsp;
+       unsigned long cfm;
+};
+
+static void ia64_get_bsp_cfm(struct unw_frame_info *info, void *arg)
+{
+       unsigned long ip;
+       struct param_bsp_cfm *lp = arg;
+
+       do {
+               unw_get_ip(info, &ip);
+               if (ip == 0)
+                       break;
+               if (ip == lp->ip) {
+                       unw_get_bsp(info, (unsigned long*)&lp->bsp);
+                       unw_get_cfm(info, (unsigned long*)&lp->cfm);
+                       return;
+               }
+       } while (unw_unwind(info) >= 0);
+       lp->bsp = 0;
+       lp->cfm = 0;
+       return;
+}
+
 int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
 {
        struct jprobe *jp = container_of(p, struct jprobe, kp);
        unsigned long addr = ((struct fnptr *)(jp->entry))->ip;
        struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
+       struct param_bsp_cfm pa;
+       int bytes;
+
+       /*
+        * Callee owns the argument space and could overwrite it, eg
+        * tail call optimization. So to be absolutely safe
+        * we save the argument space before transfering the control
+        * to instrumented jprobe function which runs in
+        * the process context
+        */
+       pa.ip = regs->cr_iip;
+       unw_init_running(ia64_get_bsp_cfm, &pa);
+       bytes = (char *)ia64_rse_skip_regs(pa.bsp, pa.cfm & 0x3f)
+                               - (char *)pa.bsp;
+       memcpy( kcb->jprobes_saved_stacked_regs,
+               pa.bsp,
+               bytes );
+       kcb->bsp = pa.bsp;
+       kcb->cfm = pa.cfm;
 
        /* save architectural state */
        kcb->jprobe_saved_regs = *regs;
@@ -792,8 +837,20 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
 int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
 {
        struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
+       int bytes;
 
+       /* restoring architectural state */
        *regs = kcb->jprobe_saved_regs;
+
+       /* restoring the original argument space */
+       flush_register_stack();
+       bytes = (char *)ia64_rse_skip_regs(kcb->bsp, kcb->cfm & 0x3f)
+                               - (char *)kcb->bsp;
+       memcpy( kcb->bsp,
+               kcb->jprobes_saved_stacked_regs,
+               bytes );
+       invalidate_stacked_regs();
+
        preempt_enable_no_resched();
        return 1;
 }
index db32fc1d39356321950de04b0a586df9ac5dff37..403a80a58c13bf9ef89118ae4f4b7063d28df7e0 100644 (file)
@@ -847,7 +847,7 @@ ia64_state_restore:
        ;;
        mov cr.iim=temp3
        mov cr.iha=temp4
-       dep r22=0,r22,62,2      // pal_min_state, physical, uncached
+       dep r22=0,r22,62,1      // pal_min_state, physical, uncached
        mov IA64_KR(CURRENT)=r21
        ld8 r8=[temp1]          // os_status
        ld8 r10=[temp2]         // context
index a87a162a30865198b179142a90bd1ac548642814..9d5a823479a3f2dd8d6aef4e56edee4a1d309743 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Creates entries in /proc/sal for various system features.
  *
- * Copyright (c) 2003 Silicon Graphics, Inc.  All rights reserved.
+ * Copyright (c) 2003, 2006 Silicon Graphics, Inc.  All rights reserved.
  * Copyright (c) 2003 Hewlett-Packard Co
  *     Bjorn Helgaas <bjorn.helgaas@hp.com>
  *
  *   mca.c may not pass a buffer, a NULL buffer just indicates that a new
  *   record is available in SAL.
  *   Replace some NR_CPUS by cpus_online, for hotplug cpu.
+ *
+ * Jan  5 2006        kaos@sgi.com
+ *   Handle hotplug cpus coming online.
+ *   Handle hotplug cpus going offline while they still have outstanding records.
+ *   Use the cpu_* macros consistently.
+ *   Replace the counting semaphore with a mutex and a test if the cpumask is non-empty.
+ *   Modify the locking to make the test for "work to do" an atomic operation.
  */
 
 #include <linux/capability.h>
+#include <linux/cpu.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
 #include <linux/module.h>
@@ -132,8 +140,8 @@ enum salinfo_state {
 };
 
 struct salinfo_data {
-       volatile cpumask_t      cpu_event;      /* which cpus have outstanding events */
-       struct semaphore        sem;            /* count of cpus with outstanding events (bits set in cpu_event) */
+       cpumask_t               cpu_event;      /* which cpus have outstanding events */
+       struct semaphore        mutex;
        u8                      *log_buffer;
        u64                     log_size;
        u8                      *oemdata;       /* decoded oem data */
@@ -174,6 +182,21 @@ struct salinfo_platform_oemdata_parms {
        int ret;
 };
 
+/* Kick the mutex that tells user space that there is work to do.  Instead of
+ * trying to track the state of the mutex across multiple cpus, in user
+ * context, interrupt context, non-maskable interrupt context and hotplug cpu,
+ * it is far easier just to grab the mutex if it is free then release it.
+ *
+ * This routine must be called with data_saved_lock held, to make the down/up
+ * operation atomic.
+ */
+static void
+salinfo_work_to_do(struct salinfo_data *data)
+{
+       down_trylock(&data->mutex);
+       up(&data->mutex);
+}
+
 static void
 salinfo_platform_oemdata_cpu(void *context)
 {
@@ -212,9 +235,9 @@ salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe)
 
        BUG_ON(type >= ARRAY_SIZE(salinfo_log_name));
 
+       if (irqsafe)
+               spin_lock_irqsave(&data_saved_lock, flags);
        if (buffer) {
-               if (irqsafe)
-                       spin_lock_irqsave(&data_saved_lock, flags);
                for (i = 0, data_saved = data->data_saved; i < saved_size; ++i, ++data_saved) {
                        if (!data_saved->buffer)
                                break;
@@ -232,13 +255,11 @@ salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe)
                        data_saved->size = size;
                        data_saved->buffer = buffer;
                }
-               if (irqsafe)
-                       spin_unlock_irqrestore(&data_saved_lock, flags);
        }
-
-       if (!test_and_set_bit(smp_processor_id(), &data->cpu_event)) {
-               if (irqsafe)
-                       up(&data->sem);
+       cpu_set(smp_processor_id(), data->cpu_event);
+       if (irqsafe) {
+               salinfo_work_to_do(data);
+               spin_unlock_irqrestore(&data_saved_lock, flags);
        }
 }
 
@@ -249,20 +270,17 @@ static struct timer_list salinfo_timer;
 static void
 salinfo_timeout_check(struct salinfo_data *data)
 {
-       int i;
+       unsigned long flags;
        if (!data->open)
                return;
-       for_each_online_cpu(i) {
-               if (test_bit(i, &data->cpu_event)) {
-                       /* double up() is not a problem, user space will see no
-                        * records for the additional "events".
-                        */
-                       up(&data->sem);
-               }
+       if (!cpus_empty(data->cpu_event)) {
+               spin_lock_irqsave(&data_saved_lock, flags);
+               salinfo_work_to_do(data);
+               spin_unlock_irqrestore(&data_saved_lock, flags);
        }
 }
 
-static void 
+static void
 salinfo_timeout (unsigned long arg)
 {
        salinfo_timeout_check(salinfo_data + SAL_INFO_TYPE_MCA);
@@ -290,16 +308,20 @@ salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t
        int i, n, cpu = -1;
 
 retry:
-       if (down_trylock(&data->sem)) {
+       if (cpus_empty(data->cpu_event) && down_trylock(&data->mutex)) {
                if (file->f_flags & O_NONBLOCK)
                        return -EAGAIN;
-               if (down_interruptible(&data->sem))
+               if (down_interruptible(&data->mutex))
                        return -EINTR;
        }
 
        n = data->cpu_check;
        for (i = 0; i < NR_CPUS; i++) {
-               if (test_bit(n, &data->cpu_event) && cpu_online(n)) {
+               if (cpu_isset(n, data->cpu_event)) {
+                       if (!cpu_online(n)) {
+                               cpu_clear(n, data->cpu_event);
+                               continue;
+                       }
                        cpu = n;
                        break;
                }
@@ -310,9 +332,6 @@ retry:
        if (cpu == -1)
                goto retry;
 
-       /* events are sticky until the user says "clear" */
-       up(&data->sem);
-
        /* for next read, start checking at next CPU */
        data->cpu_check = cpu;
        if (++data->cpu_check == NR_CPUS)
@@ -381,10 +400,8 @@ salinfo_log_release(struct inode *inode, struct file *file)
 static void
 call_on_cpu(int cpu, void (*fn)(void *), void *arg)
 {
-       cpumask_t save_cpus_allowed, new_cpus_allowed;
-       memcpy(&save_cpus_allowed, &current->cpus_allowed, sizeof(save_cpus_allowed));
-       memset(&new_cpus_allowed, 0, sizeof(new_cpus_allowed));
-       set_bit(cpu, &new_cpus_allowed);
+       cpumask_t save_cpus_allowed = current->cpus_allowed;
+       cpumask_t new_cpus_allowed = cpumask_of_cpu(cpu);
        set_cpus_allowed(current, new_cpus_allowed);
        (*fn)(arg);
        set_cpus_allowed(current, save_cpus_allowed);
@@ -433,10 +450,10 @@ retry:
        if (!data->saved_num)
                call_on_cpu(cpu, salinfo_log_read_cpu, data);
        if (!data->log_size) {
-               data->state = STATE_NO_DATA;
-               clear_bit(cpu, &data->cpu_event);
+               data->state = STATE_NO_DATA;
+               cpu_clear(cpu, data->cpu_event);
        } else {
-               data->state = STATE_LOG_RECORD;
+               data->state = STATE_LOG_RECORD;
        }
 }
 
@@ -473,27 +490,31 @@ static int
 salinfo_log_clear(struct salinfo_data *data, int cpu)
 {
        sal_log_record_header_t *rh;
+       unsigned long flags;
+       spin_lock_irqsave(&data_saved_lock, flags);
        data->state = STATE_NO_DATA;
-       if (!test_bit(cpu, &data->cpu_event))
+       if (!cpu_isset(cpu, data->cpu_event)) {
+               spin_unlock_irqrestore(&data_saved_lock, flags);
                return 0;
-       down(&data->sem);
-       clear_bit(cpu, &data->cpu_event);
+       }
+       cpu_clear(cpu, data->cpu_event);
        if (data->saved_num) {
-               unsigned long flags;
-               spin_lock_irqsave(&data_saved_lock, flags);
-               shift1_data_saved(data, data->saved_num - 1 );
+               shift1_data_saved(data, data->saved_num - 1);
                data->saved_num = 0;
-               spin_unlock_irqrestore(&data_saved_lock, flags);
        }
+       spin_unlock_irqrestore(&data_saved_lock, flags);
        rh = (sal_log_record_header_t *)(data->log_buffer);
        /* Corrected errors have already been cleared from SAL */
        if (rh->severity != sal_log_severity_corrected)
                call_on_cpu(cpu, salinfo_log_clear_cpu, data);
        /* clearing a record may make a new record visible */
        salinfo_log_new_read(cpu, data);
-       if (data->state == STATE_LOG_RECORD &&
-           !test_and_set_bit(cpu,  &data->cpu_event))
-               up(&data->sem);
+       if (data->state == STATE_LOG_RECORD) {
+               spin_lock_irqsave(&data_saved_lock, flags);
+               cpu_set(cpu, data->cpu_event);
+               salinfo_work_to_do(data);
+               spin_unlock_irqrestore(&data_saved_lock, flags);
+       }
        return 0;
 }
 
@@ -550,6 +571,53 @@ static struct file_operations salinfo_data_fops = {
        .write   = salinfo_log_write,
 };
 
+#ifdef CONFIG_HOTPLUG_CPU
+static int __devinit
+salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
+{
+       unsigned int i, cpu = (unsigned long)hcpu;
+       unsigned long flags;
+       struct salinfo_data *data;
+       switch (action) {
+       case CPU_ONLINE:
+               spin_lock_irqsave(&data_saved_lock, flags);
+               for (i = 0, data = salinfo_data;
+                    i < ARRAY_SIZE(salinfo_data);
+                    ++i, ++data) {
+                       cpu_set(cpu, data->cpu_event);
+                       salinfo_work_to_do(data);
+               }
+               spin_unlock_irqrestore(&data_saved_lock, flags);
+               break;
+       case CPU_DEAD:
+               spin_lock_irqsave(&data_saved_lock, flags);
+               for (i = 0, data = salinfo_data;
+                    i < ARRAY_SIZE(salinfo_data);
+                    ++i, ++data) {
+                       struct salinfo_data_saved *data_saved;
+                       int j;
+                       for (j = ARRAY_SIZE(data->data_saved) - 1, data_saved = data->data_saved + j;
+                            j >= 0;
+                            --j, --data_saved) {
+                               if (data_saved->buffer && data_saved->cpu == cpu) {
+                                       shift1_data_saved(data, j);
+                               }
+                       }
+                       cpu_clear(cpu, data->cpu_event);
+               }
+               spin_unlock_irqrestore(&data_saved_lock, flags);
+               break;
+       }
+       return NOTIFY_OK;
+}
+
+static struct notifier_block salinfo_cpu_notifier =
+{
+       .notifier_call = salinfo_cpu_callback,
+       .priority = 0,
+};
+#endif /* CONFIG_HOTPLUG_CPU */
+
 static int __init
 salinfo_init(void)
 {
@@ -557,7 +625,7 @@ salinfo_init(void)
        struct proc_dir_entry **sdir = salinfo_proc_entries; /* keeps track of every entry */
        struct proc_dir_entry *dir, *entry;
        struct salinfo_data *data;
-       int i, j, online;
+       int i, j;
 
        salinfo_dir = proc_mkdir("sal", NULL);
        if (!salinfo_dir)
@@ -572,7 +640,7 @@ salinfo_init(void)
        for (i = 0; i < ARRAY_SIZE(salinfo_log_name); i++) {
                data = salinfo_data + i;
                data->type = i;
-               sema_init(&data->sem, 0);
+               init_MUTEX(&data->mutex);
                dir = proc_mkdir(salinfo_log_name[i], salinfo_dir);
                if (!dir)
                        continue;
@@ -592,12 +660,8 @@ salinfo_init(void)
                *sdir++ = entry;
 
                /* we missed any events before now */
-               online = 0;
-               for_each_online_cpu(j) {
-                       set_bit(j, &data->cpu_event);
-                       ++online;
-               }
-               sema_init(&data->sem, online);
+               for_each_online_cpu(j)
+                       cpu_set(j, data->cpu_event);
 
                *sdir++ = dir;
        }
@@ -609,6 +673,10 @@ salinfo_init(void)
        salinfo_timer.function = &salinfo_timeout;
        add_timer(&salinfo_timer);
 
+#ifdef CONFIG_HOTPLUG_CPU
+       register_cpu_notifier(&salinfo_cpu_notifier);
+#endif
+
        return 0;
 }
 
index d3e0ecb56d627c0a0514f9bfdefefd1467df0a59..55391901b0137f17184a7e8203d5087581ecd14e 100644 (file)
@@ -530,12 +530,15 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
                if (fsys_mode(current, &regs)) {
                        extern char __kernel_syscall_via_break[];
                        /*
-                        * Got a trap in fsys-mode: Taken Branch Trap and Single Step trap
-                        * need special handling; Debug trap is not supposed to happen.
+                        * Got a trap in fsys-mode: Taken Branch Trap
+                        * and Single Step trap need special handling;
+                        * Debug trap is ignored (we disable it here
+                        * and re-enable it in the lower-privilege trap).
                         */
                        if (unlikely(vector == 29)) {
-                               die("Got debug trap in fsys-mode---not supposed to happen!",
-                                   &regs, 0);
+                               set_thread_flag(TIF_DB_DISABLED);
+                               ia64_psr(&regs)->db = 0;
+                               ia64_psr(&regs)->lp = 1;
                                return;
                        }
                        /* re-do the system call via break 0x100000: */
@@ -589,10 +592,19 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
              case 34:
                if (isr & 0x2) {
                        /* Lower-Privilege Transfer Trap */
+
+                       /* If we disabled debug traps during an fsyscall,
+                        * re-enable them here.
+                        */
+                       if (test_thread_flag(TIF_DB_DISABLED)) {
+                               clear_thread_flag(TIF_DB_DISABLED);
+                               ia64_psr(&regs)->db = 1;
+                       }
+
                        /*
-                        * Just clear PSR.lp and then return immediately: all the
-                        * interesting work (e.g., signal delivery is done in the kernel
-                        * exit path).
+                        * Just clear PSR.lp and then return immediately:
+                        * all the interesting work (e.g., signal delivery)
+                        * is done in the kernel exit path.
                         */
                        ia64_psr(&regs)->lp = 0;
                        return;
index 41105d45442366940006aac1945c425fa93ec8bf..6a4eec9113e8383efd029253a9a038637d6819d0 100644 (file)
@@ -90,7 +90,7 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
 {
        static DEFINE_SPINLOCK(ptcg_lock);
 
-       if (mm != current->active_mm) {
+       if (mm != current->active_mm || !current->mm) {
                flush_tlb_all();
                return;
        }
index 71c2b271b4c687daabd4e886023fe85dacfeeb94..4d417c301201c4a5364a6776d4d965fd1a397571 100644 (file)
 #define IIO_NUM_ITTES   7
 #define HUB_NUM_BIG_WINDOW      (IIO_NUM_ITTES - 1)
 
-struct sn_flush_device_list {
+/* This struct is shared between the PROM and the kernel.
+ * Changes to this struct will require corresponding changes to the kernel.
+ */
+struct sn_flush_device_common {
        int sfdl_bus;
        int sfdl_slot;
        int sfdl_pin;
-       struct bar_list {
+       struct common_bar_list {
                unsigned long start;
                unsigned long end;
        } sfdl_bar_list[6];
@@ -40,14 +43,19 @@ struct sn_flush_device_list {
        uint32_t sfdl_persistent_busnum;
        uint32_t sfdl_persistent_segment;
        struct pcibus_info *sfdl_pcibus_info;
+};
+
+/* This struct is kernel only and is not used by the PROM */
+struct sn_flush_device_kernel {
        spinlock_t sfdl_flush_lock;
+       struct sn_flush_device_common *common;
 };
 
 /*
- * **widget_p - Used as an array[wid_num][device] of sn_flush_device_list.
+ * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel.
  */
 struct sn_flush_nasid_entry  {
-       struct sn_flush_device_list **widget_p; /* Used as a array of wid_num */
+       struct sn_flush_device_kernel **widget_p; // Used as an array of wid_num
        uint64_t iio_itte[8];
 };
 
index fcbc748ae4337e7497eafd8c328ef6a4fe376051..f1ec1370b3e37afc87fe9237763b4adc62054e9e 100644 (file)
@@ -33,7 +33,7 @@ void bte_error_handler(unsigned long);
  * Wait until all BTE related CRBs are completed
  * and then reset the interfaces.
  */
-void shub1_bte_error_handler(unsigned long _nodepda)
+int shub1_bte_error_handler(unsigned long _nodepda)
 {
        struct nodepda_s *err_nodepda = (struct nodepda_s *)_nodepda;
        struct timer_list *recovery_timer = &err_nodepda->bte_recovery_timer;
@@ -53,7 +53,7 @@ void shub1_bte_error_handler(unsigned long _nodepda)
            (err_nodepda->bte_if[1].bh_error == BTE_SUCCESS)) {
                BTE_PRINTK(("eh:%p:%d Nothing to do.\n", err_nodepda,
                            smp_processor_id()));
-               return;
+               return 1;
        }
 
        /* Determine information about our hub */
@@ -81,7 +81,7 @@ void shub1_bte_error_handler(unsigned long _nodepda)
                mod_timer(recovery_timer, HZ * 5);
                BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
                            smp_processor_id()));
-               return;
+               return 1;
        }
        if (icmr.ii_icmr_fld_s.i_crb_vld != 0) {
 
@@ -99,7 +99,7 @@ void shub1_bte_error_handler(unsigned long _nodepda)
                                BTE_PRINTK(("eh:%p:%d Valid %d, Giving up\n",
                                            err_nodepda, smp_processor_id(),
                                            i));
-                               return;
+                               return 1;
                        }
                }
        }
@@ -124,6 +124,42 @@ void shub1_bte_error_handler(unsigned long _nodepda)
        REMOTE_HUB_S(nasid, IIO_IBCR, ibcr.ii_ibcr_regval);
 
        del_timer(recovery_timer);
+       return 0;
+}
+
+/*
+ * Wait until all BTE related CRBs are completed
+ * and then reset the interfaces.
+ */
+int shub2_bte_error_handler(unsigned long _nodepda)
+{
+       struct nodepda_s *err_nodepda = (struct nodepda_s *)_nodepda;
+       struct timer_list *recovery_timer = &err_nodepda->bte_recovery_timer;
+       struct bteinfo_s *bte;
+       nasid_t nasid;
+       u64 status;
+       int i;
+
+       nasid = cnodeid_to_nasid(err_nodepda->bte_if[0].bte_cnode);
+
+       /*
+        * Verify that all the BTEs are complete
+        */
+       for (i = 0; i < BTES_PER_NODE; i++) {
+               bte = &err_nodepda->bte_if[i];
+               status = BTE_LNSTAT_LOAD(bte);
+               if ((status & IBLS_ERROR) || !(status & IBLS_BUSY))
+                       continue;
+               mod_timer(recovery_timer, HZ * 5);
+               BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
+                           smp_processor_id()));
+               return 1;
+       }
+       if (ia64_sn_bte_recovery(nasid))
+               panic("bte_error_handler(): Fatal BTE Error");
+
+       del_timer(recovery_timer);
+       return 0;
 }
 
 /*
@@ -135,7 +171,6 @@ void bte_error_handler(unsigned long _nodepda)
        struct nodepda_s *err_nodepda = (struct nodepda_s *)_nodepda;
        spinlock_t *recovery_lock = &err_nodepda->bte_recovery_lock;
        int i;
-       nasid_t nasid;
        unsigned long irq_flags;
        volatile u64 *notify;
        bte_result_t bh_error;
@@ -160,12 +195,15 @@ void bte_error_handler(unsigned long _nodepda)
        }
 
        if (is_shub1()) {
-               shub1_bte_error_handler(_nodepda);
+               if (shub1_bte_error_handler(_nodepda)) {
+                       spin_unlock_irqrestore(recovery_lock, irq_flags);
+                       return;
+               }
        } else {
-               nasid = cnodeid_to_nasid(err_nodepda->bte_if[0].bte_cnode);
-
-               if (ia64_sn_bte_recovery(nasid))
-                       panic("bte_error_handler(): Fatal BTE Error");
+               if (shub2_bte_error_handler(_nodepda)) {
+                       spin_unlock_irqrestore(recovery_lock, irq_flags);
+                       return;
+               }
        }
 
        for (i = 0; i < BTES_PER_NODE; i++) {
index 5c5eb01c50f02b53f97513eda0e1e65e3daa2c00..56ab6bae00ee2184c0faecdde66956879e5d66e9 100644 (file)
@@ -32,13 +32,14 @@ static irqreturn_t hub_eint_handler(int irq, void *arg, struct pt_regs *ep)
        ret_stuff.v0 = 0;
        hubdev_info = (struct hubdev_info *)arg;
        nasid = hubdev_info->hdi_nasid;
-       SAL_CALL_NOLOCK(ret_stuff, SN_SAL_HUB_ERROR_INTERRUPT,
+
+       if (is_shub1()) {
+               SAL_CALL_NOLOCK(ret_stuff, SN_SAL_HUB_ERROR_INTERRUPT,
                        (u64) nasid, 0, 0, 0, 0, 0, 0);
 
-       if ((int)ret_stuff.v0)
-               panic("hubii_eint_handler(): Fatal TIO Error");
+               if ((int)ret_stuff.v0)
+                       panic("hubii_eint_handler(): Fatal TIO Error");
 
-       if (is_shub1()) {
                if (!(nasid & 1)) /* Not a TIO, handle CRB errors */
                        (void)hubiio_crb_error_handler(hubdev_info);
        } else 
index 318087e35b66c2ad2cef6114469d4e873d5fe6b1..258d9d7aff98f759d0af721756310d76b4063199 100644 (file)
@@ -76,11 +76,12 @@ static struct sn_pcibus_provider sn_pci_default_provider = {
 };
 
 /*
- * Retrieve the DMA Flush List given nasid.  This list is needed 
- * to implement the WAR - Flush DMA data on PIO Reads.
+ * Retrieve the DMA Flush List given nasid, widget, and device.
+ * This list is needed to implement the WAR - Flush DMA data on PIO Reads.
  */
-static inline uint64_t
-sal_get_widget_dmaflush_list(u64 nasid, u64 widget_num, u64 address)
+static inline u64
+sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,
+                            u64 address)
 {
 
        struct ia64_sal_retval ret_stuff;
@@ -88,17 +89,17 @@ sal_get_widget_dmaflush_list(u64 nasid, u64 widget_num, u64 address)
        ret_stuff.v0 = 0;
 
        SAL_CALL_NOLOCK(ret_stuff,
-                       (u64) SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST,
-                       (u64) nasid, (u64) widget_num, (u64) address, 0, 0, 0,
-                       0);
-       return ret_stuff.v0;
+                       (u64) SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST,
+                       (u64) nasid, (u64) widget_num,
+                       (u64) device_num, (u64) address, 0, 0, 0);
+       return ret_stuff.status;
 
 }
 
 /*
  * Retrieve the hub device info structure for the given nasid.
  */
-static inline uint64_t sal_get_hubdev_info(u64 handle, u64 address)
+static inline u64 sal_get_hubdev_info(u64 handle, u64 address)
 {
 
        struct ia64_sal_retval ret_stuff;
@@ -114,7 +115,7 @@ static inline uint64_t sal_get_hubdev_info(u64 handle, u64 address)
 /*
  * Retrieve the pci bus information given the bus number.
  */
-static inline uint64_t sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)
+static inline u64 sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)
 {
 
        struct ia64_sal_retval ret_stuff;
@@ -130,7 +131,7 @@ static inline uint64_t sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)
 /*
  * Retrieve the pci device information given the bus and device|function number.
  */
-static inline uint64_t
+static inline u64
 sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev, 
                        u64 sn_irq_info)
 {
@@ -170,12 +171,12 @@ sn_pcidev_info_get(struct pci_dev *dev)
  */
 static void sn_fixup_ionodes(void)
 {
-
-       struct sn_flush_device_list *sn_flush_device_list;
+       struct sn_flush_device_kernel *sn_flush_device_kernel;
+       struct sn_flush_device_kernel *dev_entry;
        struct hubdev_info *hubdev;
-       uint64_t status;
-       uint64_t nasid;
-       int i, widget;
+       u64 status;
+       u64 nasid;
+       int i, widget, device;
 
        /*
         * Get SGI Specific HUB chipset information.
@@ -186,7 +187,7 @@ static void sn_fixup_ionodes(void)
                nasid = cnodeid_to_nasid(i);
                hubdev->max_segment_number = 0xffffffff;
                hubdev->max_pcibus_number = 0xff;
-               status = sal_get_hubdev_info(nasid, (uint64_t) __pa(hubdev));
+               status = sal_get_hubdev_info(nasid, (u64) __pa(hubdev));
                if (status)
                        continue;
 
@@ -213,38 +214,49 @@ static void sn_fixup_ionodes(void)
 
                hubdev->hdi_flush_nasid_list.widget_p =
                    kmalloc((HUB_WIDGET_ID_MAX + 1) *
-                           sizeof(struct sn_flush_device_list *), GFP_KERNEL);
-
+                           sizeof(struct sn_flush_device_kernel *),
+                           GFP_KERNEL);
                memset(hubdev->hdi_flush_nasid_list.widget_p, 0x0,
                       (HUB_WIDGET_ID_MAX + 1) *
-                      sizeof(struct sn_flush_device_list *));
+                      sizeof(struct sn_flush_device_kernel *));
 
                for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) {
-                       sn_flush_device_list = kmalloc(DEV_PER_WIDGET *
-                                                      sizeof(struct
-                                                             sn_flush_device_list),
-                                                      GFP_KERNEL);
-                       memset(sn_flush_device_list, 0x0,
+                       sn_flush_device_kernel = kmalloc(DEV_PER_WIDGET *
+                                                        sizeof(struct
+                                                       sn_flush_device_kernel),
+                                                       GFP_KERNEL);
+                       if (!sn_flush_device_kernel)
+                               BUG();
+                       memset(sn_flush_device_kernel, 0x0,
                               DEV_PER_WIDGET *
-                              sizeof(struct sn_flush_device_list));
-
-                       status =
-                           sal_get_widget_dmaflush_list(nasid, widget,
-                                                        (uint64_t)
-                                                        __pa
-                                                        (sn_flush_device_list));
-                       if (status) {
-                               kfree(sn_flush_device_list);
-                               continue;
+                              sizeof(struct sn_flush_device_kernel));
+
+                       dev_entry = sn_flush_device_kernel;
+                       for (device = 0; device < DEV_PER_WIDGET;
+                            device++,dev_entry++) {
+                               dev_entry->common = kmalloc(sizeof(struct
+                                                       sn_flush_device_common),
+                                                           GFP_KERNEL);
+                               if (!dev_entry->common)
+                                       BUG();
+                               memset(dev_entry->common, 0x0, sizeof(struct
+                                                      sn_flush_device_common));
+
+                               status = sal_get_device_dmaflush_list(nasid,
+                                                                       widget,
+                                                                       device,
+                                                     (u64)(dev_entry->common));
+                               if (status)
+                                       BUG();
+
+                               spin_lock_init(&dev_entry->sfdl_flush_lock);
                        }
 
-                       spin_lock_init(&sn_flush_device_list->sfdl_flush_lock);
-                       hubdev->hdi_flush_nasid_list.widget_p[widget] =
-                           sn_flush_device_list;
-               }
-
+                       if (sn_flush_device_kernel)
+                               hubdev->hdi_flush_nasid_list.widget_p[widget] =
+                                                      sn_flush_device_kernel;
+               }
        }
-
 }
 
 /*
index 493fb3f38dc37af5a7bc919cea2a98a9e06ed326..6a7939b16a1cc1045803e2ad56c2755ce4082616 100644 (file)
@@ -77,12 +77,6 @@ static void tiocx_bus_release(struct device *dev)
        kfree(to_cx_dev(dev));
 }
 
-struct bus_type tiocx_bus_type = {
-       .name = "tiocx",
-       .match = tiocx_match,
-       .uevent = tiocx_uevent,
-};
-
 /**
  * cx_device_match - Find cx_device in the id table.
  * @ids: id table from driver
@@ -149,6 +143,14 @@ static int cx_driver_remove(struct device *dev)
        return 0;
 }
 
+struct bus_type tiocx_bus_type = {
+       .name = "tiocx",
+       .match = tiocx_match,
+       .uevent = tiocx_uevent,
+       .probe = cx_device_probe,
+       .remove = cx_driver_remove,
+};
+
 /**
  * cx_driver_register - Register the driver.
  * @cx_driver: driver table (cx_drv struct) from driver
@@ -162,8 +164,6 @@ int cx_driver_register(struct cx_drv *cx_driver)
 {
        cx_driver->driver.name = cx_driver->name;
        cx_driver->driver.bus = &tiocx_bus_type;
-       cx_driver->driver.probe = cx_device_probe;
-       cx_driver->driver.remove = cx_driver_remove;
 
        return driver_register(&cx_driver->driver);
 }
index abf4fc2a87bba20e98014172412be96f84c92f91..0c0a6890240996e97b3b5960302219014b616902 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2005 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2004-2006 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 
@@ -24,7 +24,7 @@
 #include <linux/slab.h>
 #include <asm/sn/bte.h>
 #include <asm/sn/sn_sal.h>
-#include "xpc.h"
+#include <asm/sn/xpc.h>
 
 
 /*
@@ -779,6 +779,12 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags)
 
        /* both sides are disconnected now */
 
+       if (ch->flags & XPC_C_CONNECTCALLOUT) {
+               spin_unlock_irqrestore(&ch->lock, *irq_flags);
+               xpc_disconnect_callout(ch, xpcDisconnected);
+               spin_lock_irqsave(&ch->lock, *irq_flags);
+       }
+
        /* it's now safe to free the channel's message queues */
        xpc_free_msgqueues(ch);
 
@@ -1645,7 +1651,7 @@ xpc_disconnect_channel(const int line, struct xpc_channel *ch,
 
 
 void
-xpc_disconnecting_callout(struct xpc_channel *ch)
+xpc_disconnect_callout(struct xpc_channel *ch, enum xpc_retval reason)
 {
        /*
         * Let the channel's registerer know that the channel is being
@@ -1654,15 +1660,13 @@ xpc_disconnecting_callout(struct xpc_channel *ch)
         */
 
        if (ch->func != NULL) {
-               dev_dbg(xpc_chan, "ch->func() called, reason=xpcDisconnecting,"
-                       " partid=%d, channel=%d\n", ch->partid, ch->number);
+               dev_dbg(xpc_chan, "ch->func() called, reason=%d, partid=%d, "
+                       "channel=%d\n", reason, ch->partid, ch->number);
 
-               ch->func(xpcDisconnecting, ch->partid, ch->number, NULL,
-                                                               ch->key);
+               ch->func(reason, ch->partid, ch->number, NULL, ch->key);
 
-               dev_dbg(xpc_chan, "ch->func() returned, reason="
-                       "xpcDisconnecting, partid=%d, channel=%d\n",
-                       ch->partid, ch->number);
+               dev_dbg(xpc_chan, "ch->func() returned, reason=%d, partid=%d, "
+                       "channel=%d\n", reason, ch->partid, ch->number);
        }
 }
 
index b617236524c690ea2eb95122e26b9ad133d30819..8930586e0eb4203c64b85201b5b2ab7310bd3166 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2005 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2004-2006 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 
@@ -59,7 +59,7 @@
 #include <asm/sn/sn_sal.h>
 #include <asm/kdebug.h>
 #include <asm/uaccess.h>
-#include "xpc.h"
+#include <asm/sn/xpc.h>
 
 
 /* define two XPC debug device structures to be used with dev_dbg() et al */
@@ -82,6 +82,9 @@ struct device *xpc_part = &xpc_part_dbg_subname;
 struct device *xpc_chan = &xpc_chan_dbg_subname;
 
 
+static int xpc_kdebug_ignore;
+
+
 /* systune related variables for /proc/sys directories */
 
 static int xpc_hb_interval = XPC_HB_DEFAULT_INTERVAL;
@@ -162,6 +165,8 @@ static ctl_table xpc_sys_dir[] = {
 };
 static struct ctl_table_header *xpc_sysctl;
 
+/* non-zero if any remote partition disengage request was timed out */
+int xpc_disengage_request_timedout;
 
 /* #of IRQs received */
 static atomic_t xpc_act_IRQ_rcvd;
@@ -773,7 +778,7 @@ xpc_daemonize_kthread(void *args)
                        ch->flags |= XPC_C_DISCONNECTCALLOUT;
                        spin_unlock_irqrestore(&ch->lock, irq_flags);
 
-                       xpc_disconnecting_callout(ch);
+                       xpc_disconnect_callout(ch, xpcDisconnecting);
                } else {
                        spin_unlock_irqrestore(&ch->lock, irq_flags);
                }
@@ -921,9 +926,9 @@ static void
 xpc_do_exit(enum xpc_retval reason)
 {
        partid_t partid;
-       int active_part_count;
+       int active_part_count, printed_waiting_msg = 0;
        struct xpc_partition *part;
-       unsigned long printmsg_time;
+       unsigned long printmsg_time, disengage_request_timeout = 0;
 
 
        /* a 'rmmod XPC' and a 'reboot' cannot both end up here together */
@@ -953,7 +958,8 @@ xpc_do_exit(enum xpc_retval reason)
 
        /* wait for all partitions to become inactive */
 
-       printmsg_time = jiffies;
+       printmsg_time = jiffies + (XPC_DISENGAGE_PRINTMSG_INTERVAL * HZ);
+       xpc_disengage_request_timedout = 0;
 
        do {
                active_part_count = 0;
@@ -969,20 +975,39 @@ xpc_do_exit(enum xpc_retval reason)
                        active_part_count++;
 
                        XPC_DEACTIVATE_PARTITION(part, reason);
-               }
 
-               if (active_part_count == 0) {
-                       break;
+                       if (part->disengage_request_timeout >
+                                               disengage_request_timeout) {
+                               disengage_request_timeout =
+                                               part->disengage_request_timeout;
+                       }
                }
 
-               if (jiffies >= printmsg_time) {
-                       dev_info(xpc_part, "waiting for partitions to "
-                               "deactivate/disengage, active count=%d, remote "
-                               "engaged=0x%lx\n", active_part_count,
-                               xpc_partition_engaged(1UL << partid));
-
-                       printmsg_time = jiffies +
+               if (xpc_partition_engaged(-1UL)) {
+                       if (time_after(jiffies, printmsg_time)) {
+                               dev_info(xpc_part, "waiting for remote "
+                                       "partitions to disengage, timeout in "
+                                       "%ld seconds\n",
+                                       (disengage_request_timeout - jiffies)
+                                                                       / HZ);
+                               printmsg_time = jiffies +
                                        (XPC_DISENGAGE_PRINTMSG_INTERVAL * HZ);
+                               printed_waiting_msg = 1;
+                       }
+
+               } else if (active_part_count > 0) {
+                       if (printed_waiting_msg) {
+                               dev_info(xpc_part, "waiting for local partition"
+                                       " to disengage\n");
+                               printed_waiting_msg = 0;
+                       }
+
+               } else {
+                       if (!xpc_disengage_request_timedout) {
+                               dev_info(xpc_part, "all partitions have "
+                                       "disengaged\n");
+                       }
+                       break;
                }
 
                /* sleep for a 1/3 of a second or so */
@@ -1000,11 +1025,13 @@ xpc_do_exit(enum xpc_retval reason)
        del_timer_sync(&xpc_hb_timer);
        DBUG_ON(xpc_vars->heartbeating_to_mask != 0);
 
-       /* take ourselves off of the reboot_notifier_list */
-       (void) unregister_reboot_notifier(&xpc_reboot_notifier);
+       if (reason == xpcUnloading) {
+               /* take ourselves off of the reboot_notifier_list */
+               (void) unregister_reboot_notifier(&xpc_reboot_notifier);
 
-       /* take ourselves off of the die_notifier list */
-       (void) unregister_die_notifier(&xpc_die_notifier);
+               /* take ourselves off of the die_notifier list */
+               (void) unregister_die_notifier(&xpc_die_notifier);
+       }
 
        /* close down protections for IPI operations */
        xpc_restrict_IPI_ops();
@@ -1020,7 +1047,35 @@ xpc_do_exit(enum xpc_retval reason)
 
 
 /*
- * Called when the system is about to be either restarted or halted.
+ * This function is called when the system is being rebooted.
+ */
+static int
+xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
+{
+       enum xpc_retval reason;
+
+
+       switch (event) {
+       case SYS_RESTART:
+               reason = xpcSystemReboot;
+               break;
+       case SYS_HALT:
+               reason = xpcSystemHalt;
+               break;
+       case SYS_POWER_OFF:
+               reason = xpcSystemPoweroff;
+               break;
+       default:
+               reason = xpcSystemGoingDown;
+       }
+
+       xpc_do_exit(reason);
+       return NOTIFY_DONE;
+}
+
+
+/*
+ * Notify other partitions to disengage from all references to our memory.
  */
 static void
 xpc_die_disengage(void)
@@ -1028,7 +1083,7 @@ xpc_die_disengage(void)
        struct xpc_partition *part;
        partid_t partid;
        unsigned long engaged;
-       long time, print_time, disengage_request_timeout;
+       long time, printmsg_time, disengage_request_timeout;
 
 
        /* keep xpc_hb_checker thread from doing anything (just in case) */
@@ -1055,57 +1110,53 @@ xpc_die_disengage(void)
                }
        }
 
-       print_time = rtc_time();
-       disengage_request_timeout = print_time +
+       time = rtc_time();
+       printmsg_time = time +
+               (XPC_DISENGAGE_PRINTMSG_INTERVAL * sn_rtc_cycles_per_second);
+       disengage_request_timeout = time +
                (xpc_disengage_request_timelimit * sn_rtc_cycles_per_second);
 
        /* wait for all other partitions to disengage from us */
 
-       while ((engaged = xpc_partition_engaged(-1UL)) &&
-                       (time = rtc_time()) < disengage_request_timeout) {
+       while (1) {
+               engaged = xpc_partition_engaged(-1UL);
+               if (!engaged) {
+                       dev_info(xpc_part, "all partitions have disengaged\n");
+                       break;
+               }
 
-               if (time >= print_time) {
+               time = rtc_time();
+               if (time >= disengage_request_timeout) {
+                       for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {
+                               if (engaged & (1UL << partid)) {
+                                       dev_info(xpc_part, "disengage from "
+                                               "remote partition %d timed "
+                                               "out\n", partid);
+                               }
+                       }
+                       break;
+               }
+
+               if (time >= printmsg_time) {
                        dev_info(xpc_part, "waiting for remote partitions to "
-                               "disengage, engaged=0x%lx\n", engaged);
-                       print_time = time + (XPC_DISENGAGE_PRINTMSG_INTERVAL *
+                               "disengage, timeout in %ld seconds\n",
+                               (disengage_request_timeout - time) /
+                                               sn_rtc_cycles_per_second);
+                       printmsg_time = time +
+                                       (XPC_DISENGAGE_PRINTMSG_INTERVAL *
                                                sn_rtc_cycles_per_second);
                }
        }
-       dev_info(xpc_part, "finished waiting for remote partitions to "
-                               "disengage, engaged=0x%lx\n", engaged);
-}
-
-
-/*
- * This function is called when the system is being rebooted.
- */
-static int
-xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
-{
-       enum xpc_retval reason;
-
-
-       switch (event) {
-       case SYS_RESTART:
-               reason = xpcSystemReboot;
-               break;
-       case SYS_HALT:
-               reason = xpcSystemHalt;
-               break;
-       case SYS_POWER_OFF:
-               reason = xpcSystemPoweroff;
-               break;
-       default:
-               reason = xpcSystemGoingDown;
-       }
-
-       xpc_do_exit(reason);
-       return NOTIFY_DONE;
 }
 
 
 /*
- * This function is called when the system is being rebooted.
+ * This function is called when the system is being restarted or halted due
+ * to some sort of system failure. If this is the case we need to notify the
+ * other partitions to disengage from all references to our memory.
+ * This function can also be called when our heartbeater could be offlined
+ * for a time. In this case we need to notify other partitions to not worry
+ * about the lack of a heartbeat.
  */
 static int
 xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
@@ -1115,11 +1166,25 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
        case DIE_MACHINE_HALT:
                xpc_die_disengage();
                break;
+
+       case DIE_KDEBUG_ENTER:
+               /* Should lack of heartbeat be ignored by other partitions? */
+               if (!xpc_kdebug_ignore) {
+                       break;
+               }
+               /* fall through */
        case DIE_MCA_MONARCH_ENTER:
        case DIE_INIT_MONARCH_ENTER:
                xpc_vars->heartbeat++;
                xpc_vars->heartbeat_offline = 1;
                break;
+
+       case DIE_KDEBUG_LEAVE:
+               /* Is lack of heartbeat being ignored by other partitions? */
+               if (!xpc_kdebug_ignore) {
+                       break;
+               }
+               /* fall through */
        case DIE_MCA_MONARCH_LEAVE:
        case DIE_INIT_MONARCH_LEAVE:
                xpc_vars->heartbeat++;
@@ -1344,3 +1409,7 @@ module_param(xpc_disengage_request_timelimit, int, 0);
 MODULE_PARM_DESC(xpc_disengage_request_timelimit, "Number of seconds to wait "
                "for disengage request to complete.");
 
+module_param(xpc_kdebug_ignore, int, 0);
+MODULE_PARM_DESC(xpc_kdebug_ignore, "Should lack of heartbeat be ignored by "
+               "other partitions when dropping into kdebug.");
+
index cdd6431853a1b4cc7cfaafa1d30612ed215b104e..88a730e6cfdbc524e9a867f58c6cddb52e57b086 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2005 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2004-2006 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 
@@ -28,7 +28,7 @@
 #include <asm/sn/sn_sal.h>
 #include <asm/sn/nodepda.h>
 #include <asm/sn/addrs.h>
-#include "xpc.h"
+#include <asm/sn/xpc.h>
 
 
 /* XPC is exiting flag */
@@ -771,7 +771,8 @@ xpc_identify_act_IRQ_req(int nasid)
                }
        }
 
-       if (!xpc_partition_disengaged(part)) {
+       if (part->disengage_request_timeout > 0 &&
+                                       !xpc_partition_disengaged(part)) {
                /* still waiting on other side to disengage from us */
                return;
        }
@@ -873,6 +874,9 @@ xpc_partition_disengaged(struct xpc_partition *part)
                         * request in a timely fashion, so assume it's dead.
                         */
 
+                       dev_info(xpc_part, "disengage from remote partition %d "
+                               "timed out\n", partid);
+                       xpc_disengage_request_timedout = 1;
                        xpc_clear_partition_engaged(1UL << partid);
                        disengaged = 1;
                }
index 34093476e9652fc03938edeadeddb4596d439d34..e68332d93171cfd17e317fb7a18ecb1f99f7fc5b 100644 (file)
@@ -218,7 +218,9 @@ void sn_dma_flush(uint64_t addr)
        uint64_t flags;
        uint64_t itte;
        struct hubdev_info *hubinfo;
-       volatile struct sn_flush_device_list *p;
+       volatile struct sn_flush_device_kernel *p;
+       volatile struct sn_flush_device_common *common;
+
        struct sn_flush_nasid_entry *flush_nasid_list;
 
        if (!sn_ioif_inited)
@@ -268,17 +270,17 @@ void sn_dma_flush(uint64_t addr)
        p = &flush_nasid_list->widget_p[wid_num][0];
 
        /* find a matching BAR */
-       for (i = 0; i < DEV_PER_WIDGET; i++) {
+       for (i = 0; i < DEV_PER_WIDGET; i++,p++) {
+               common = p->common;
                for (j = 0; j < PCI_ROM_RESOURCE; j++) {
-                       if (p->sfdl_bar_list[j].start == 0)
+                       if (common->sfdl_bar_list[j].start == 0)
                                break;
-                       if (addr >= p->sfdl_bar_list[j].start
-                           && addr <= p->sfdl_bar_list[j].end)
+                       if (addr >= common->sfdl_bar_list[j].start
+                           && addr <= common->sfdl_bar_list[j].end)
                                break;
                }
-               if (j < PCI_ROM_RESOURCE && p->sfdl_bar_list[j].start != 0)
+               if (j < PCI_ROM_RESOURCE && common->sfdl_bar_list[j].start != 0)
                        break;
-               p++;
        }
 
        /* if no matching BAR, return without doing anything. */
@@ -304,24 +306,24 @@ void sn_dma_flush(uint64_t addr)
                if ((1 << XWIDGET_PART_REV_NUM_REV(revnum)) & PV907516) {
                        return;
                } else {
-                       pcireg_wrb_flush_get(p->sfdl_pcibus_info,
-                                            (p->sfdl_slot - 1));
+                       pcireg_wrb_flush_get(common->sfdl_pcibus_info,
+                                            (common->sfdl_slot - 1));
                }
        } else {
-               spin_lock_irqsave(&((struct sn_flush_device_list *)p)->
-                                 sfdl_flush_lock, flags);
-
-               *p->sfdl_flush_addr = 0;
+               spin_lock_irqsave((spinlock_t *)&p->sfdl_flush_lock,
+                                 flags);
+               *common->sfdl_flush_addr = 0;
 
                /* force an interrupt. */
-               *(volatile uint32_t *)(p->sfdl_force_int_addr) = 1;
+               *(volatile uint32_t *)(common->sfdl_force_int_addr) = 1;
 
                /* wait for the interrupt to come back. */
-               while (*(p->sfdl_flush_addr) != 0x10f)
+               while (*(common->sfdl_flush_addr) != 0x10f)
                        cpu_relax();
 
                /* okay, everything is synched up. */
-               spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock, flags);
+               spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock,
+                                      flags);
        }
        return;
 }
index 1f500c81002c88869a47935cad3237eaad10bca3..e328e948175d9e3f69795176318864b883b1fe32 100644 (file)
@@ -92,7 +92,8 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
        cnodeid_t near_cnode;
        struct hubdev_info *hubdev_info;
        struct pcibus_info *soft;
-       struct sn_flush_device_list *sn_flush_device_list;
+       struct sn_flush_device_kernel *sn_flush_device_kernel;
+       struct sn_flush_device_common *common;
 
        if (! IS_PCI_BRIDGE_ASIC(prom_bussoft->bs_asic_type)) {
                return NULL;
@@ -137,20 +138,19 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
        hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);
 
        if (hubdev_info->hdi_flush_nasid_list.widget_p) {
-               sn_flush_device_list = hubdev_info->hdi_flush_nasid_list.
+               sn_flush_device_kernel = hubdev_info->hdi_flush_nasid_list.
                    widget_p[(int)soft->pbi_buscommon.bs_xid];
-               if (sn_flush_device_list) {
+               if (sn_flush_device_kernel) {
                        for (j = 0; j < DEV_PER_WIDGET;
-                            j++, sn_flush_device_list++) {
-                               if (sn_flush_device_list->sfdl_slot == -1)
+                            j++, sn_flush_device_kernel++) {
+                               common = sn_flush_device_kernel->common;
+                               if (common->sfdl_slot == -1)
                                        continue;
-                               if ((sn_flush_device_list->
-                                    sfdl_persistent_segment ==
+                               if ((common->sfdl_persistent_segment ==
                                     soft->pbi_buscommon.bs_persist_segment) &&
-                                    (sn_flush_device_list->
-                                    sfdl_persistent_busnum ==
+                                    (common->sfdl_persistent_busnum ==
                                     soft->pbi_buscommon.bs_persist_busnum))
-                                       sn_flush_device_list->sfdl_pcibus_info =
+                                       common->sfdl_pcibus_info =
                                            soft;
                        }
                }
index 1eaa0d37f677feffe7e2c8fd4f3439f3bbe6ce41..2d804e2d16d11f64d7482f3d78d36a65fbaf6689 100644 (file)
@@ -173,8 +173,6 @@ int register_parisc_driver(struct parisc_driver *driver)
        WARN_ON(driver->drv.probe != NULL);
        WARN_ON(driver->drv.remove != NULL);
 
-       driver->drv.probe = parisc_driver_probe;
-       driver->drv.remove = parisc_driver_remove;
        driver->drv.name = driver->name;
 
        return driver_register(&driver->drv);
@@ -575,6 +573,8 @@ struct bus_type parisc_bus_type = {
        .name = "parisc",
        .match = parisc_generic_match,
        .dev_attrs = parisc_device_attrs,
+       .probe = parisc_driver_probe,
+       .remove = parisc_driver_remove,
 };
 
 /**
index d3654a264ef7533a8811f9e170fb4f7b4c5499ab..44dd82b791d17075f2ff44ea1ed2eb47c1024759 100644 (file)
@@ -139,17 +139,14 @@ drivers-$(CONFIG_CPM2)            += arch/ppc/8260_io/
 
 drivers-$(CONFIG_OPROFILE)     += arch/powerpc/oprofile/
 
-defaultimage-$(CONFIG_PPC32)   := zImage
+# Default to zImage, override when needed
+defaultimage-y                 := zImage
 defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
-defaultimage-$(CONFIG_PPC_PSERIES) := zImage
 KBUILD_IMAGE := $(defaultimage-y)
 all: $(KBUILD_IMAGE)
 
 CPPFLAGS_vmlinux.lds   := -Upowerpc
 
-# All the instructions talk about "make bzImage".
-bzImage: zImage
-
 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage
 
 .PHONY: $(BOOT_TARGETS)
index b53d677f6742d521867e9512be1e86e45041eae4..788dec4c7ef37410b0bca04814ecab189d1e45d9 100644 (file)
@@ -25,8 +25,8 @@ HOSTCC                := gcc
 BOOTCFLAGS     := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \
                   $(shell $(CROSS32CC) -print-file-name=include) -fPIC
 BOOTAFLAGS     := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
-BOOTLFLAGS     := -T $(srctree)/$(src)/zImage.lds
 OBJCOPYFLAGS    := contents,alloc,load,readonly,data
+OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000
 
 zlib       := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c
 zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h
@@ -35,7 +35,7 @@ zliblinuxheader := zlib.h zconf.h zutil.h
 $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
 #$(addprefix $(obj)/,main.o): $(addprefix $(obj)/,zlib.h)
 
-src-boot := string.S prom.c main.c div64.S crt0.S
+src-boot := crt0.S string.S prom.c stdio.c main.c div64.S
 src-boot += $(zlib)
 src-boot := $(addprefix $(obj)/, $(src-boot))
 obj-boot := $(addsuffix .o, $(basename $(src-boot)))
@@ -70,7 +70,7 @@ quiet_cmd_bootas = BOOTAS  $@
       cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
 
 quiet_cmd_bootld = BOOTLD  $@
-      cmd_bootld = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(2)
+      cmd_bootld = $(CROSS32LD) -T $(srctree)/$(src)/$(3) -o $@ $(2)
 
 $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c
        $(call if_changed_dep,bootcc)
@@ -87,12 +87,14 @@ obj-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.o, $(section)))
 src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section)))
 gz-sec  = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section)))
 
-hostprogs-y            := addnote addRamDisk
-targets                += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \
-                          $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \
-                          $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \
-                          $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \
-                          vmlinux.initrd
+hostprogs-y            := addnote addRamDisk hack-coff
+
+targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \
+          zImage.coff zImage.initrd.coff \
+          $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \
+          $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \
+          $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \
+          vmlinux.initrd
 extra-y                        := initrd.o
 
 quiet_cmd_ramdisk = RAMDISK $@
@@ -114,6 +116,10 @@ quiet_cmd_addsection = ADDSEC  $@
 quiet_cmd_addnote = ADDNOTE $@
       cmd_addnote = $(obj)/addnote $@
 
+quiet_cmd_gencoff = COFF    $@
+      cmd_gencoff = $(OBJCOPY) $(OBJCOPY_COFF_ARGS) $@ && \
+                   $(obj)/hack-coff $@
+
 $(call gz-sec, $(required)): $(obj)/kernel-%.gz: %
        $(call if_changed,gzip)
 
@@ -127,22 +133,35 @@ $(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c
        $(call if_changed_dep,bootcc)
        $(call cmd,addsection)
 
-$(obj)/zImage.vmode: obj-boot += $(call obj-sec, $(required))
+$(obj)/zImage.vmode $(obj)/zImage.coff: obj-boot += $(call obj-sec, $(required))
 $(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) $(srctree)/$(src)/zImage.lds
-       $(call cmd,bootld,$(obj-boot))
+       $(call cmd,bootld,$(obj-boot),zImage.lds)
 
-$(obj)/zImage.initrd.vmode: obj-boot += $(call obj-sec, $(required) $(initrd))
+$(obj)/zImage.initrd.vmode $(obj)/zImage.initrd.coff: obj-boot += $(call obj-sec, $(required) $(initrd))
 $(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(srctree)/$(src)/zImage.lds
-       $(call cmd,bootld,$(obj-boot))
+       $(call cmd,bootld,$(obj-boot),zImage.lds)
+
+# For 32-bit powermacs, build the COFF images as well as the ELF images.
+coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff
+coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff
 
-$(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote
+$(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y)
        @cp -f $< $@
        $(call if_changed,addnote)
 
-$(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote
+$(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote $(coffrdimg-y-y)
        @cp -f $< $@
        $(call if_changed,addnote)
 
+$(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff
+       $(call cmd,bootld,$(obj-boot),zImage.coff.lds)
+       $(call cmd,gencoff)
+
+$(obj)/zImage.initrd.coff: $(call obj-sec, $(required) $(initrd)) $(obj-boot) \
+                          $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff
+       $(call cmd,bootld,$(obj-boot),zImage.coff.lds)
+       $(call cmd,gencoff)
+
 #-----------------------------------------------------------
 # build u-boot images
 #-----------------------------------------------------------
index d2f2ace56cd34df5e1203a85ce5248e763e3133a..e0192c26037b918f1e195d41d2f5ec9176606535 100644 (file)
 #include "ppc_asm.h"
 
        .text
+       /* a procedure descriptor used when booting this as a COFF file */
+_zimage_start_opd:
+       .long   _zimage_start, 0, 0, 0
+
        .globl  _zimage_start
 _zimage_start:
+       /* Work out the offset between the address we were linked at
+          and the address where we're running. */
        bl      1f
-
-1:
-       mflr    r0
+1:     mflr    r0
        lis     r9,1b@ha
        addi    r9,r9,1b@l
        subf.   r0,r9,r0
-       beq     3f
+       beq     3f              /* if running at same address as linked */
 
+       /* The .got2 section contains a list of addresses, so add
+          the address offset onto each entry. */
        lis     r9,__got2_start@ha
        addi    r9,r9,__got2_start@l
        lis     r8,__got2_end@ha
@@ -32,15 +38,14 @@ _zimage_start:
        srwi.   r8,r8,2
        mtctr   r8
        add     r9,r0,r9
-2:
-       lwz     r8,0(r9)
+2:     lwz     r8,0(r9)
        add     r8,r8,r0
        stw     r8,0(r9)
        addi    r9,r9,4
        bdnz    2b
 
-3:
-       lis     r9,_start@h
+       /* Do a cache flush for our text, in case OF didn't */
+3:     lis     r9,_start@h
        add     r9,r0,r9
        lis     r8,_etext@ha
        addi    r8,r8,_etext@l
diff --git a/arch/powerpc/boot/hack-coff.c b/arch/powerpc/boot/hack-coff.c
new file mode 100644 (file)
index 0000000..5e5a657
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * hack-coff.c - hack the header of an xcoff file to fill in
+ * a few fields needed by the Open Firmware xcoff loader on
+ * Power Macs but not initialized by objcopy.
+ *
+ * Copyright (C) Paul Mackerras 1997.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include "rs6000.h"
+
+#define AOUT_MAGIC     0x010b
+
+#define get_16be(x)    ((((unsigned char *)(x))[0] << 8) \
+                        + ((unsigned char *)(x))[1])
+#define put_16be(x, v) (((unsigned char *)(x))[0] = (v) >> 8, \
+                        ((unsigned char *)(x))[1] = (v) & 0xff)
+#define get_32be(x)    ((((unsigned char *)(x))[0] << 24) \
+                        + (((unsigned char *)(x))[1] << 16) \
+                        + (((unsigned char *)(x))[2] << 8) \
+                        + ((unsigned char *)(x))[3])
+
+int
+main(int ac, char **av)
+{
+    int fd;
+    int i, nsect;
+    int aoutsz;
+    struct external_filehdr fhdr;
+    AOUTHDR aout;
+    struct external_scnhdr shdr;
+
+    if (ac != 2) {
+       fprintf(stderr, "Usage: hack-coff coff-file\n");
+       exit(1);
+    }
+    if ((fd = open(av[1], 2)) == -1) {
+       perror(av[2]);
+       exit(1);
+    }
+    if (read(fd, &fhdr, sizeof(fhdr)) != sizeof(fhdr))
+       goto readerr;
+    i = get_16be(fhdr.f_magic);
+    if (i != U802TOCMAGIC && i != U802WRMAGIC && i != U802ROMAGIC) {
+       fprintf(stderr, "%s: not an xcoff file\n", av[1]);
+       exit(1);
+    }
+    aoutsz = get_16be(fhdr.f_opthdr);
+    if (read(fd, &aout, aoutsz) != aoutsz)
+       goto readerr;
+    nsect = get_16be(fhdr.f_nscns);
+    for (i = 0; i < nsect; ++i) {
+       if (read(fd, &shdr, sizeof(shdr)) != sizeof(shdr))
+           goto readerr;
+       if (strcmp(shdr.s_name, ".text") == 0) {
+           put_16be(aout.o_snentry, i+1);
+           put_16be(aout.o_sntext, i+1);
+       } else if (strcmp(shdr.s_name, ".data") == 0) {
+           put_16be(aout.o_sndata, i+1);
+       } else if (strcmp(shdr.s_name, ".bss") == 0) {
+           put_16be(aout.o_snbss, i+1);
+       }
+    }
+    put_16be(aout.magic, AOUT_MAGIC);
+    if (lseek(fd, (long) sizeof(struct external_filehdr), 0) == -1
+       || write(fd, &aout, aoutsz) != aoutsz) {
+       fprintf(stderr, "%s: write error\n", av[1]);
+       exit(1);
+    }
+    close(fd);
+    exit(0);
+
+readerr:
+    fprintf(stderr, "%s: read error or file too short\n", av[1]);
+    exit(1);
+}
index 64ec93116fa6cfb2d1eb6eed1578b80b61965487..55ec5986725079c24c56bef079c5f822700b9f0b 100644 (file)
@@ -21,8 +21,8 @@ extern void flush_cache(void *, unsigned long);
 
 
 /* Value picked to match that used by yaboot */
-#define PROG_START     0x01400000
-#define RAM_END                (512<<20) // Fixme: use OF */
+#define PROG_START     0x01400000      /* only used on 64-bit systems */
+#define RAM_END                (512<<20)       /* Fixme: use OF */
 #define        ONE_MB          0x100000
 
 extern char _start[];
@@ -160,6 +160,17 @@ static int is_elf64(void *hdr)
        elfoffset = (unsigned long)elf64ph->p_offset;
        vmlinux.size = (unsigned long)elf64ph->p_filesz + elfoffset;
        vmlinux.memsize = (unsigned long)elf64ph->p_memsz + elfoffset;
+
+#if defined(PROG_START)
+       /*
+        * Maintain a "magic" minimum address. This keeps some older
+        * firmware platforms running.
+        */
+
+       if (claim_base < PROG_START)
+               claim_base = PROG_START;
+#endif
+
        return 1;
 }
 
@@ -206,12 +217,18 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp)
                exit();
        if (getprop(chosen_handle, "stdout", &stdout, sizeof(stdout)) != 4)
                exit();
-       stderr = stdout;
-       if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4)
-               exit();
 
        printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", _start, sp);
 
+       /*
+        * The first available claim_base must be above the end of the
+        * the loaded kernel wrapper file (_start to _end includes the
+        * initrd image if it is present) and rounded up to a nice
+        * 1 MB boundary for good measure.
+        */
+
+       claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB);
+
        vmlinuz.addr = (unsigned long)_vmlinux_start;
        vmlinuz.size = (unsigned long)(_vmlinux_end - _vmlinux_start);
 
@@ -228,25 +245,6 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp)
                exit();
        }
 
-       /*
-        * The first available claim_base must be above the end of the
-        * the loaded kernel wrapper file (_start to _end includes the
-        * initrd image if it is present) and rounded up to a nice
-        * 1 MB boundary for good measure.
-        */
-
-       claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB);
-
-#if defined(PROG_START)
-       /*
-        * Maintain a "magic" minimum address. This keeps some older
-        * firmware platforms running.
-        */
-
-       if (claim_base < PROG_START)
-               claim_base = PROG_START;
-#endif
-
        /* We need to claim the memsize plus the file offset since gzip
         * will expand the header (file offset), then the kernel, then
         * possible rubbish we don't care about. But the kernel bss must
index 4bea2f4dcb067412be7610b23308a0d9c996302b..fa0057736f6b391bfc5fa96bfd5fdbebc217754d 100644 (file)
 #include "prom.h"
 
 int (*prom)(void *);
+phandle chosen_handle;
+ihandle stdout;
 
-void *chosen_handle;
-
-void *stdin;
-void *stdout;
-void *stderr;
-
-
-int
-write(void *handle, void *ptr, int nb)
-{
-       struct prom_args {
-               char *service;
-               int nargs;
-               int nret;
-               void *ihandle;
-               void *addr;
-               int len;
-               int actual;
-       } args;
-
-       args.service = "write";
-       args.nargs = 3;
-       args.nret = 1;
-       args.ihandle = handle;
-       args.addr = ptr;
-       args.len = nb;
-       args.actual = -1;
-       (*prom)(&args);
-       return args.actual;
-}
-
-int
-read(void *handle, void *ptr, int nb)
+int call_prom(const char *service, int nargs, int nret, ...)
 {
+       int i;
        struct prom_args {
-               char *service;
+               const char *service;
                int nargs;
                int nret;
-               void *ihandle;
-               void *addr;
-               int len;
-               int actual;
-       } args;
-
-       args.service = "read";
-       args.nargs = 3;
-       args.nret = 1;
-       args.ihandle = handle;
-       args.addr = ptr;
-       args.len = nb;
-       args.actual = -1;
-       (*prom)(&args);
-       return args.actual;
-}
-
-void
-exit()
-{
-       struct prom_args {
-               char *service;
-       } args;
-
-       for (;;) {
-               args.service = "exit";
-               (*prom)(&args);
-       }
-}
-
-void
-pause(void)
-{
-       struct prom_args {
-               char *service;
+               unsigned int args[12];
        } args;
+       va_list list;
 
-       args.service = "enter";
-       (*prom)(&args);
-}
+       args.service = service;
+       args.nargs = nargs;
+       args.nret = nret;
 
-void *
-finddevice(const char *name)
-{
-       struct prom_args {
-               char *service;
-               int nargs;
-               int nret;
-               const char *devspec;
-               void *phandle;
-       } args;
+       va_start(list, nret);
+       for (i = 0; i < nargs; i++)
+               args.args[i] = va_arg(list, unsigned int);
+       va_end(list);
 
-       args.service = "finddevice";
-       args.nargs = 1;
-       args.nret = 1;
-       args.devspec = name;
-       args.phandle = (void *) -1;
-       (*prom)(&args);
-       return args.phandle;
-}
+       for (i = 0; i < nret; i++)
+               args.args[nargs+i] = 0;
 
-void *
-claim(unsigned long virt, unsigned long size, unsigned long align)
-{
-       struct prom_args {
-               char *service;
-               int nargs;
-               int nret;
-               unsigned int virt;
-               unsigned int size;
-               unsigned int align;
-               void *ret;
-       } args;
+       if (prom(&args) < 0)
+               return -1;
 
-       args.service = "claim";
-       args.nargs = 3;
-       args.nret = 1;
-       args.virt = virt;
-       args.size = size;
-       args.align = align;
-       (*prom)(&args);
-       return args.ret;
+       return (nret > 0)? args.args[nargs]: 0;
 }
 
-int
-getprop(void *phandle, const char *name, void *buf, int buflen)
+int call_prom_ret(const char *service, int nargs, int nret,
+                 unsigned int *rets, ...)
 {
+       int i;
        struct prom_args {
-               char *service;
+               const char *service;
                int nargs;
                int nret;
-               void *phandle;
-               const char *name;
-               void *buf;
-               int buflen;
-               int size;
+               unsigned int args[12];
        } args;
+       va_list list;
 
-       args.service = "getprop";
-       args.nargs = 4;
-       args.nret = 1;
-       args.phandle = phandle;
-       args.name = name;
-       args.buf = buf;
-       args.buflen = buflen;
-       args.size = -1;
-       (*prom)(&args);
-       return args.size;
-}
+       args.service = service;
+       args.nargs = nargs;
+       args.nret = nret;
 
-int
-putc(int c, void *f)
-{
-       char ch = c;
+       va_start(list, rets);
+       for (i = 0; i < nargs; i++)
+               args.args[i] = va_arg(list, unsigned int);
+       va_end(list);
 
-       if (c == '\n')
-               putc('\r', f);
-       return write(f, &ch, 1) == 1? c: -1;
-}
+       for (i = 0; i < nret; i++)
+               args.args[nargs+i] = 0;
 
-int
-putchar(int c)
-{
-       return putc(c, stdout);
-}
+       if (prom(&args) < 0)
+               return -1;
 
-int
-fputs(char *str, void *f)
-{
-       int n = strlen(str);
+       if (rets != (void *) 0)
+               for (i = 1; i < nret; ++i)
+                       rets[i-1] = args.args[nargs+i];
 
-       return write(f, str, n) == n? 0: -1;
+       return (nret > 0)? args.args[nargs]: 0;
 }
 
-size_t strnlen(const char * s, size_t count)
+int write(void *handle, void *ptr, int nb)
 {
-       const char *sc;
-
-       for (sc = s; count-- && *sc != '\0'; ++sc)
-               /* nothing */;
-       return sc - s;
+       return call_prom("write", 3, 1, handle, ptr, nb);
 }
 
-extern unsigned int __div64_32(unsigned long long *dividend,
-                              unsigned int divisor);
-
-/* The unnecessary pointer compare is there
- * to check for type safety (n must be 64bit)
+/*
+ * Older OF's require that when claiming a specific range of addresses,
+ * we claim the physical space in the /memory node and the virtual
+ * space in the chosen mmu node, and then do a map operation to
+ * map virtual to physical.
  */
-# define do_div(n,base) ({                                             \
-       unsigned int __base = (base);                                   \
-       unsigned int __rem;                                             \
-       (void)(((typeof((n)) *)0) == ((unsigned long long *)0));        \
-       if (((n) >> 32) == 0) {                                         \
-               __rem = (unsigned int)(n) % __base;                     \
-               (n) = (unsigned int)(n) / __base;                       \
-       } else                                                          \
-               __rem = __div64_32(&(n), __base);                       \
-       __rem;                                                          \
- })
+static int need_map = -1;
+static ihandle chosen_mmu;
+static phandle memory;
 
-static int skip_atoi(const char **s)
+/* returns true if s2 is a prefix of s1 */
+static int string_match(const char *s1, const char *s2)
 {
-       int i, c;
-
-       for (i = 0; '0' <= (c = **s) && c <= '9'; ++*s)
-               i = i*10 + c - '0';
-       return i;
+       for (; *s2; ++s2)
+               if (*s1++ != *s2)
+                       return 0;
+       return 1;
 }
 
-#define ZEROPAD        1               /* pad with zero */
-#define SIGN   2               /* unsigned/signed long */
-#define PLUS   4               /* show plus */
-#define SPACE  8               /* space if plus */
-#define LEFT   16              /* left justified */
-#define SPECIAL        32              /* 0x */
-#define LARGE  64              /* use 'ABCDEF' instead of 'abcdef' */
-
-static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)
+static int check_of_version(void)
 {
-       char c,sign,tmp[66];
-       const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";