Pull thinkpad into release branch
Len Brown [Sun, 29 Apr 2007 03:11:19 +0000 (23:11 -0400)]
Conflicts:

drivers/misc/Kconfig

Signed-off-by: Len Brown <len.brown@intel.com>

476 files changed:
.mailmap
Documentation/ABI/obsolete/dv1394 [new file with mode: 0644]
Documentation/cpusets.txt
Documentation/feature-removal-schedule.txt
Documentation/gpio.txt
Documentation/kernel-parameters.txt
Documentation/networking/ax25.txt
Documentation/networking/ip-sysctl.txt
Documentation/power/pci.txt
Documentation/sony-laptop.txt
Documentation/video4linux/meye.txt
Documentation/x86_64/boot-options.txt
MAINTAINERS
Makefile
arch/alpha/kernel/core_mcpcia.c
arch/alpha/kernel/err_titan.c
arch/alpha/kernel/module.c
arch/alpha/kernel/sys_nautilus.c
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_sio.c
arch/alpha/kernel/sys_sx164.c
arch/alpha/kernel/sys_titan.c
arch/arm/configs/s3c2410_defconfig
arch/arm/kernel/dma.c
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/tools/mach-types
arch/cris/arch-v32/drivers/pci/bios.c
arch/frv/mb93090-mb00/pci-vdk.c
arch/i386/boot/video.S
arch/i386/kernel/alternative.c
arch/i386/kernel/apic.c
arch/i386/kernel/cpu/amd.c
arch/i386/kernel/cpu/cpufreq/longhaul.c
arch/i386/kernel/hpet.c
arch/i386/kernel/io_apic.c
arch/i386/kernel/microcode.c
arch/i386/kernel/nmi.c
arch/i386/kernel/vmi.c
arch/i386/kernel/vmlinux.lds.S
arch/i386/lib/usercopy.c
arch/i386/mm/highmem.c
arch/i386/pci/common.c
arch/ia64/kernel/msi_ia64.c
arch/ia64/kernel/setup.c
arch/ia64/kernel/smpboot.c
arch/ia64/mm/init.c
arch/ia64/pci/pci.c
arch/ia64/sn/kernel/bte_error.c
arch/ia64/sn/pci/pcibr/pcibr_dma.c
arch/mips/Kconfig
arch/mips/gt64120/momenco_ocelot/prom.c
arch/mips/gt64120/momenco_ocelot/setup.c
arch/mips/kernel/entry.S
arch/mips/kernel/genex.S
arch/mips/kernel/r2300_switch.S
arch/mips/kernel/r4k_switch.S
arch/mips/kernel/signal-common.h
arch/mips/kernel/signal.c
arch/mips/kernel/signal32.c
arch/mips/kernel/smtc.c
arch/mips/kernel/traps.c
arch/mips/mm/fault.c
arch/mips/oprofile/op_model_mipsxx.c
arch/mips/pci/pci-ev64120.c
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/sb1250/setup.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
arch/powerpc/sysdev/dcr.c
arch/powerpc/sysdev/qe_lib/qe.c
arch/ppc/8xx_io/commproc.c
arch/ppc/configs/ads8272_defconfig
arch/ppc/platforms/mpc8272ads_setup.c
arch/ppc/platforms/mpc866ads_setup.c
arch/ppc/platforms/mpc885ads_setup.c
arch/s390/kernel/kprobes.c
arch/sh/kernel/sh_ksyms.c
arch/sparc/kernel/pcic.c
arch/sparc/kernel/sys_sunos.c
arch/sparc/lib/atomic32.c
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_iommu.c
arch/sparc64/kernel/sbus.c
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/sys_sunos32.c
arch/sparc64/kernel/systbls.S
arch/sparc64/solaris/misc.c
arch/um/drivers/chan_kern.c
arch/um/drivers/mconsole_kern.c
arch/um/drivers/ubd_kern.c
arch/um/include/mconsole.h
arch/um/include/sysdep-x86_64/ptrace.h
arch/um/kernel/mem.c
arch/um/os-Linux/skas/mem.c
arch/um/os-Linux/skas/process.c
arch/um/os-Linux/sys-i386/registers.c
arch/um/os-Linux/sys-x86_64/registers.c
arch/um/sys-i386/delay.c
arch/um/sys-i386/ldt.c
arch/um/sys-x86_64/delay.c
arch/x86_64/boot/video.S
arch/x86_64/kernel/acpi/sleep.c
arch/x86_64/kernel/early-quirks.c
arch/x86_64/kernel/functionlist
arch/x86_64/kernel/hpet.c
arch/x86_64/kernel/i8259.c
arch/x86_64/kernel/k8.c
arch/x86_64/kernel/nmi.c
arch/x86_64/kernel/pci-gart.c
arch/x86_64/kernel/vmlinux.lds.S
arch/x86_64/mm/pageattr.c
block/cfq-iosched.c
block/elevator.c
block/genhd.c
block/ll_rw_blk.c
crypto/scatterwalk.c
drivers/acpi/tables.c
drivers/acpi/thermal.c
drivers/ata/ahci.c
drivers/ata/libata-acpi.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
drivers/ata/libata.h
drivers/ata/pata_pdc202xx_old.c
drivers/ata/pata_sis.c
drivers/base/core.c
drivers/base/driver.c
drivers/base/power/main.c
drivers/block/cciss.c
drivers/block/paride/pcd.c
drivers/block/paride/pf.c
drivers/block/pktcdvd.c
drivers/char/Kconfig
drivers/char/agp/intel-agp.c
drivers/char/drm/Makefile
drivers/char/drm/ffb_context.c [deleted file]
drivers/char/drm/ffb_drv.c [deleted file]
drivers/char/drm/ffb_drv.h [deleted file]
drivers/char/generic_serial.c
drivers/char/mem.c
drivers/char/mxser.c
drivers/char/mxser_new.c
drivers/char/sonypi.c
drivers/char/vt_ioctl.c
drivers/clocksource/acpi_pm.c
drivers/cpufreq/cpufreq.c
drivers/eisa/pci_eisa.c
drivers/hid/hid-core.c
drivers/hwmon/w83627ehf.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-pasemi.c
drivers/ide/Kconfig
drivers/ide/ide-cd.c
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide.c
drivers/ide/pci/delkin_cb.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/pdc202xx_new.c
drivers/ieee1394/Kconfig
drivers/ieee1394/dv1394.c
drivers/infiniband/hw/cxgb3/cxio_hal.c
drivers/infiniband/hw/cxgb3/iwch_cm.c
drivers/infiniband/hw/mthca/mthca_mr.c
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/infiniband/ulp/iser/iser_initiator.c
drivers/infiniband/ulp/iser/iser_verbs.c
drivers/input/touchscreen/ucb1400_ts.c
drivers/isdn/gigaset/bas-gigaset.c
drivers/isdn/gigaset/common.c
drivers/isdn/gigaset/ev-layer.c
drivers/isdn/gigaset/isocdata.c
drivers/isdn/gigaset/ser-gigaset.c
drivers/isdn/gigaset/usb-gigaset.c
drivers/isdn/hisax/isar.c
drivers/kvm/mmu.c
drivers/kvm/vmx.c
drivers/macintosh/smu.c
drivers/md/bitmap.c
drivers/md/md.c
drivers/md/raid5.c
drivers/media/common/ir-functions.c
drivers/media/dvb/dvb-core/dmxdev.c
drivers/media/dvb/dvb-core/dvb_demux.c
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/dvb/dvb-usb/dvb-usb-remote.c
drivers/media/dvb/frontends/isl6421.c
drivers/media/dvb/frontends/tda10086.c
drivers/media/dvb/pluto2/pluto2.c
drivers/media/radio/Kconfig
drivers/media/video/Kconfig
drivers/media/video/meye.c
drivers/media/video/meye.h
drivers/media/video/msp3400-driver.c
drivers/media/video/saa7115.c
drivers/media/video/tuner-core.c
drivers/message/fusion/mptsas.c
drivers/message/i2o/i2o_block.c
drivers/mfd/sm501.c
drivers/misc/Kconfig
drivers/misc/asus-laptop.c
drivers/misc/sony-laptop.c
drivers/net/Kconfig
drivers/net/atl1/atl1_hw.c
drivers/net/atl1/atl1_main.c
drivers/net/b44.c
drivers/net/bnx2.c
drivers/net/bnx2.h
drivers/net/cxgb3/common.h
drivers/net/cxgb3/cxgb3_defs.h
drivers/net/cxgb3/cxgb3_main.c
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/cxgb3/mc5.c
drivers/net/cxgb3/regs.h
drivers/net/cxgb3/sge.c
drivers/net/cxgb3/t3_hw.c
drivers/net/cxgb3/version.h
drivers/net/cxgb3/xgmac.c
drivers/net/depca.c
drivers/net/e1000/e1000_main.c
drivers/net/forcedeth.c
drivers/net/hamradio/baycom_ser_fdx.c
drivers/net/ifb.c
drivers/net/irda/pxaficp_ir.c
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/netxen/netxen_nic_init.c
drivers/net/ppp_async.c
drivers/net/ppp_generic.c
drivers/net/qla3xxx.c
drivers/net/qla3xxx.h
drivers/net/r8169.c
drivers/net/sc92031.c
drivers/net/sis190.c
drivers/net/sis900.c
drivers/net/skge.c
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/spider_net.c
drivers/net/sun3lance.c
drivers/net/sungem.c
drivers/net/sunhme.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/tg3.c
drivers/net/tg3.h
drivers/net/wan/lmc/lmc_media.h [deleted file]
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/bcm43xx/bcm43xx_phy.c
drivers/net/wireless/bcm43xx/bcm43xx_radio.c
drivers/net/wireless/zd1211rw/zd_chip.c
drivers/net/wireless/zd1211rw/zd_chip.h
drivers/net/wireless/zd1211rw/zd_rf_al2230.c
drivers/net/wireless/zd1211rw/zd_usb.c
drivers/oprofile/event_buffer.c
drivers/oprofile/oprofilefs.c
drivers/parport/parport_sunbpp.c
drivers/pci/msi.c
drivers/pci/pcie/portdrv_pci.c
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/pcmcia/au1000_generic.c
drivers/pcmcia/omap_cf.c
drivers/pnp/system.c
drivers/rtc/rtc-cmos.c
drivers/s390/block/dasd_diag.c
drivers/s390/cio/device_status.c
drivers/s390/crypto/ap_bus.c
drivers/sbus/char/openprom.c
drivers/sbus/char/vfc_dev.c
drivers/scsi/3w-xxxx.c
drivers/scsi/gdth.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/qlogicpti.c
drivers/scsi/scsi_error.c
drivers/serial/8250.c
drivers/serial/icom.c
drivers/serial/icom.h
drivers/spi/spi.c
drivers/spi/spi_s3c24xx.c
drivers/tc/zs.c
drivers/usb/core/quirks.c
drivers/usb/gadget/omap_udc.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/uhci-debug.c
drivers/usb/host/uhci-hcd.c
drivers/usb/host/uhci-q.c
drivers/usb/net/pegasus.c
drivers/usb/net/pegasus.h
drivers/usb/serial/airprime.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/generic.c
drivers/usb/storage/unusual_devs.h
drivers/video/Kconfig
drivers/video/cg3.c
drivers/video/ffb.c
fs/9p/v9fs_vfs.h
fs/9p/vfs_file.c
fs/9p/vfs_inode.c
fs/aio.c
fs/autofs4/root.c
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/char_dev.c
fs/compat_ioctl.c
fs/exec.c
fs/ext3/inode.c
fs/ext4/inode.c
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/inode.c
fs/hostfs/hostfs_kern.c
fs/nfs/dir.c
fs/nfs/direct.c
fs/nfs/inode.c
fs/nfs/write.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfs4acl.c
fs/nfsd/nfs4state.c
fs/ocfs2/dlm/dlmdomain.c
fs/ocfs2/dlm/dlmmaster.c
fs/ocfs2/dlm/dlmthread.c
fs/proc/Makefile
fs/proc/internal.h
fs/proc/root.c
fs/reiserfs/item_ops.c
fs/reiserfs/xattr.c
fs/splice.c
fs/ufs/inode.c
include/asm-alpha/compiler.h
include/asm-alpha/core_mcpcia.h
include/asm-alpha/io.h
include/asm-arm/arch-ixp4xx/io.h
include/asm-arm/system.h
include/asm-arm/unistd.h
include/asm-generic/pgtable.h
include/asm-i386/cpufeature.h
include/asm-i386/msr.h
include/asm-i386/paravirt.h
include/asm-i386/termbits.h
include/asm-ia64/processor.h
include/asm-ia64/sn/pcibr_provider.h
include/asm-mips/bug.h
include/asm-mips/checksum.h
include/asm-mips/fpu.h
include/asm-mips/irqflags.h
include/asm-mips/marvell.h
include/asm-mips/sibyte/sb1250_scd.h
include/asm-mips/smtc_ipi.h
include/asm-mips/thread_info.h
include/asm-powerpc/immap_qe.h
include/asm-powerpc/systbl.h
include/asm-s390/checksum.h
include/asm-sh/hp6xx.h
include/asm-sh/system.h
include/asm-sparc/a.out.h
include/asm-sparc/mostek.h
include/asm-sparc64/a.out.h
include/asm-sparc64/mostek.h
include/asm-um/common.lds.S
include/asm-um/delay.h
include/asm-um/pgtable-2level.h
include/asm-x86_64/hw_irq.h
include/linux/ata.h
include/linux/compiler.h
include/linux/cpu.h
include/linux/device.h
include/linux/eventpoll.h
include/linux/hrtimer.h
include/linux/ide.h
include/linux/io.h
include/linux/ipc.h
include/linux/ipv6.h
include/linux/kdev_t.h
include/linux/libata.h
include/linux/nfs_page.h
include/linux/pipe_fs_i.h
include/linux/plist.h
include/linux/raid/md_k.h
include/linux/skbuff.h
include/linux/sony-laptop.h [new file with mode: 0644]
include/linux/sysctl.h
include/linux/taskstats.h
include/linux/utsname.h
include/linux/wireless.h
include/media/saa7146_vv.h
include/net/fib_rules.h
include/net/ip6_fib.h
include/net/iw_handler.h
include/net/neighbour.h
include/net/pkt_cls.h
ipc/util.c
kernel/cpu.c
kernel/exit.c
kernel/hrtimer.c
kernel/irq/devres.c
kernel/module.c
kernel/params.c
kernel/power/disk.c
kernel/power/swsusp.c
kernel/power/user.c
kernel/sched.c
kernel/sysctl.c
kernel/time.c
kernel/time/clockevents.c
kernel/time/jiffies.c
kernel/time/ntp.c
kernel/timer.c
mm/bounce.c
mm/filemap_xip.c
mm/madvise.c
mm/migrate.c
mm/nommu.c
mm/oom_kill.c
mm/rmap.c
mm/shmem.c
mm/slab.c
net/8021q/vlan_dev.c
net/appletalk/ddp.c
net/atm/clip.c
net/ax25/Kconfig
net/bluetooth/hidp/core.c
net/bridge/br_stp_if.c
net/core/dev.c
net/core/fib_rules.c
net/core/neighbour.c
net/core/netpoll.c
net/core/pktgen.c
net/core/rtnetlink.c
net/core/skbuff.c
net/core/wireless.c
net/dccp/dccp.h
net/dccp/proto.c
net/dccp/timer.c
net/decnet/dn_fib.c
net/decnet/dn_rules.c
net/ipv4/fib_frontend.c
net/ipv4/fib_rules.c
net/ipv4/fib_semantics.c
net/ipv4/fib_trie.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ipt_CLUSTERIP.c
net/ipv4/netfilter/ipt_ULOG.c
net/ipv4/tcp_cong.c
net/ipv4/tcp_output.c
net/ipv4/xfrm4_mode_beet.c
net/ipv6/addrconf.c
net/ipv6/exthdrs.c
net/ipv6/fib6_rules.c
net/ipv6/ip6_fib.c
net/ipv6/ip6_input.c
net/ipv6/raw.c
net/ipv6/route.c
net/ipv6/udp.c
net/irda/af_irda.c
net/key/af_key.c
net/netlink/af_netlink.c
net/sched/Makefile
net/sched/act_mirred.c
net/sched/cls_basic.c
net/sched/cls_tcindex.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sctp/socket.c
net/sctp/ulpqueue.c
net/socket.c
net/sunrpc/clnt.c
net/sunrpc/svcauth_unix.c
net/sunrpc/svcsock.c
net/sunrpc/xprt.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c
scripts/basic/fixdep.c

index bf62dbe..ebf9bf8 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -67,6 +67,8 @@ Koushik <raghavendra.koushik@neterion.com>
 Leonid I Ananiev <leonid.i.ananiev@intel.com>
 Linas Vepstas <linas@austin.ibm.com>
 Matthieu CASTET <castet.matthieu@free.fr>
+Michael Buesch <mb@bu3sch.de>
+Michael Buesch <mbuesch@freenet.de>
 Michel Dänzer <michel@tungstengraphics.com>
 Mitesh shah <mshah@teja.com>
 Morten Welinder <terra@gnome.org>
diff --git a/Documentation/ABI/obsolete/dv1394 b/Documentation/ABI/obsolete/dv1394
new file mode 100644 (file)
index 0000000..2ee3686
--- /dev/null
@@ -0,0 +1,9 @@
+What:          dv1394 (a.k.a. "OHCI-DV I/O support" for FireWire)
+Contact:       linux1394-devel@lists.sourceforge.net
+Description:
+       New application development should use raw1394 + userspace libraries
+       instead, notably libiec61883 which is functionally equivalent.
+
+Users:
+       ffmpeg/libavformat (used by a variety of media players)
+       dvgrab v1.x (replaced by dvgrab2 on top of raw1394 and resp. libraries)
index 842f0d1..f2c0a68 100644 (file)
@@ -557,6 +557,9 @@ Set some flags:
 Add some cpus:
 # /bin/echo 0-7 > cpus
 
+Add some mems:
+# /bin/echo 0-7 > mems
+
 Now attach your shell to this cpuset:
 # /bin/echo $$ > tasks
 
index 0bc8b0b..19b4c96 100644 (file)
@@ -39,17 +39,6 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
 
 ---------------------------
 
-What:  dv1394 driver (CONFIG_IEEE1394_DV1394)
-When:  June 2007
-Why:   Replaced by raw1394 + userspace libraries, notably libiec61883.  This
-       shift of application support has been indicated on www.linux1394.org
-       and developers' mailinglists for quite some time.  Major applications
-       have been converted, with the exception of ffmpeg and hence xine.
-       Piped output of dvgrab2 is a partial equivalent to dv1394.
-Who:   Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
-
----------------------------
-
 What:  Video4Linux API 1 ioctls and video_decoder.h from Video devices.
 When:  December 2006
 Why:   V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
index 989f113..f8528db 100644 (file)
@@ -27,7 +27,7 @@ The exact capabilities of GPIOs vary between systems.  Common options:
   - Output values are writable (high=1, low=0).  Some chips also have
     options about how that value is driven, so that for example only one
     value might be driven ... supporting "wire-OR" and similar schemes
-    for the other value.
+    for the other value (notably, "open drain" signaling).
 
   - Input values are likewise readable (1, 0).  Some chips support readback
     of pins configured as "output", which is very useful in such "wire-OR"
@@ -247,6 +247,35 @@ with gpio_get_value(), for example to initialize or update driver state
 when the IRQ is edge-triggered.
 
 
+Emulating Open Drain Signals
+----------------------------
+Sometimes shared signals need to use "open drain" signaling, where only the
+low signal level is actually driven.  (That term applies to CMOS transistors;
+"open collector" is used for TTL.)  A pullup resistor causes the high signal
+level.  This is sometimes called a "wire-AND"; or more practically, from the
+negative logic (low=true) perspective this is a "wire-OR".
+
+One common example of an open drain signal is a shared active-low IRQ line.
+Also, bidirectional data bus signals sometimes use open drain signals.
+
+Some GPIO controllers directly support open drain outputs; many don't.  When
+you need open drain signaling but your hardware doesn't directly support it,
+there's a common idiom you can use to emulate it with any GPIO pin that can
+be used as either an input or an output:
+
+ LOW:  gpio_direction_output(gpio, 0) ... this drives the signal
+       and overrides the pullup.
+
+ HIGH: gpio_direction_input(gpio) ... this turns off the output,
+       so the pullup (or some other device) controls the signal.
+
+If you are "driving" the signal high but gpio_get_value(gpio) reports a low
+value (after the appropriate rise time passes), you know some other component
+is driving the shared signal low.  That's not necessarily an error.  As one
+common example, that's how I2C clocks are stretched:  a slave that needs a
+slower clock delays the rising edge of SCK, and the I2C master adjusts its
+signaling rate accordingly.
+
 
 What do these conventions omit?
 ===============================
index ef2ffde..12533a9 100644 (file)
@@ -142,7 +142,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        Format: <int>
                        2: use 2nd APIC table, if available
                        1,0: use 1st APIC table
-                       default: 2
+                       default: 0
 
        acpi_sleep=     [HW,ACPI] Sleep options
                        Format: { s3_bios, s3_mode }
index 37c25b0..8257dbf 100644 (file)
@@ -1,16 +1,10 @@
 To use the amateur radio protocols within Linux you will need to get a
-suitable copy of the AX.25 Utilities. More detailed information about these
-and associated programs can be found on http://zone.pspt.fi/~jsn/.
-
-For more information about the AX.25, NET/ROM and ROSE protocol stacks, see
-the AX25-HOWTO written by Terry Dawson <terry@perf.no.itg.telstra.com.au>
-who is also the AX.25 Utilities maintainer.
+suitable copy of the AX.25 Utilities. More detailed information about
+AX.25, NET/ROM and ROSE, associated programs and and utilities can be
+found on http://www.linux-ax25.org.
 
 There is an active mailing list for discussing Linux amateur radio matters
-called linux-hams. To subscribe to it, send a message to
+called linux-hams@vger.kernel.org. To subscribe to it, send a message to
 majordomo@vger.kernel.org with the words "subscribe linux-hams" in the body
-of the message, the subject field is ignored.
-
-Jonathan G4KLX
-
-g4klx@g4klx.demon.co.uk
+of the message, the subject field is ignored.  You don't need to be
+subscribed to post but of course that means you might miss an answer.
index d3aae1f..702d1d8 100644 (file)
@@ -851,6 +851,15 @@ accept_redirects - BOOLEAN
        Functional default: enabled if local forwarding is disabled.
                            disabled if local forwarding is enabled.
 
+accept_source_route - INTEGER
+       Accept source routing (routing extension header).
+
+       > 0: Accept routing header.
+       = 0: Accept only routing header type 2.
+       < 0: Do not accept routing header.
+
+       Default: 0
+
 autoconf - BOOLEAN
        Autoconfigure addresses using Prefix Information in Router 
        Advertisements.
index c750f9f..b6a3cbf 100644 (file)
@@ -102,31 +102,28 @@ pci_save_state
 --------------
 
 Usage:
-       pci_save_state(dev, buffer);
+       pci_save_state(struct pci_dev *dev);
 
 Description:
-       Save first 64 bytes of PCI config space. Buffer must be allocated by
-       caller.
+       Save first 64 bytes of PCI config space, along with any additional
+       PCI-Express or PCI-X information.
 
 
 pci_restore_state
 -----------------
 
 Usage:
-       pci_restore_state(dev, buffer);
+       pci_restore_state(struct pci_dev *dev);
 
 Description:
-       Restore previously saved config space. (First 64 bytes only);
-
-       If buffer is NULL, then restore what information we know about the
-       device from bootup: BARs and interrupt line.
+       Restore previously saved config space.
 
 
 pci_set_power_state
 -------------------
 
 Usage:
-       pci_set_power_state(dev, state);
+       pci_set_power_state(struct pci_dev *dev, pci_power_t state);
 
 Description:
        Transition device to low power state using PCI PM Capabilities
@@ -142,7 +139,7 @@ pci_enable_wake
 ---------------
 
 Usage:
-       pci_enable_wake(dev, state, enable);
+       pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
 
 Description:
        Enable device to generate PME# during low power state using PCI PM 
index dfd26df..7a5c1a8 100644 (file)
@@ -3,12 +3,18 @@ Sony Notebook Control Driver (SNC) Readme
        Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net>
        Copyright (C) 2007 Mattia Dongili <malattia@linux.it>
 
-This mini-driver drives the SNC device present in the ACPI BIOS of
-the Sony Vaio laptops.
+This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the
+Sony Vaio laptops. This driver mixes both devices functions under the same
+(hopefully consistent) interface. This also means that the sonypi driver is
+obsoleted by sony-laptop now.
 
-It gives access to some extra laptop functionalities. In its current
-form, this driver let the user set or query the screen brightness
-through the backlight subsystem and remove/apply power to some devices.
+Fn keys (hotkeys):
+------------------
+Some models report hotkeys through the SNC or SPIC devices, such events are
+reported both through the ACPI subsystem as acpi events and through the INPUT
+subsystem. See the logs of acpid or /proc/acpi/event and
+/proc/bus/input/devices to find out what those events are and which input
+devices are created by the driver.
 
 Backlight control:
 ------------------
@@ -39,6 +45,8 @@ The files are:
        audiopower              power on/off the internal sound card
        lanpower                power on/off the internal ethernet card
                                (only in debug mode)
+       bluetoothpower          power on/off the internal bluetooth device
+       fanspeed                get/set the fan speed
 
 Note that some files may be missing if they are not supported
 by your particular laptop model.
@@ -76,9 +84,9 @@ The sony-laptop driver creates, for some of those methods (the most
 current ones found on several Vaio models), an entry under
 /sys/devices/platform/sony-laptop, just like the 'cdpower' one.
 You can create other entries corresponding to your own laptop methods by
-further editing the source (see the 'sony_acpi_values' table, and add a new
+further editing the source (see the 'sony_nc_values' table, and add a new
 entry to this table with your get/set method names using the
-HANDLE_NAMES macro).
+SNC_HANDLE_NAMES macro).
 
 Your mission, should you accept it, is to try finding out what
 those entries are for, by reading/writing random values from/to those
@@ -87,6 +95,9 @@ files and find out what is the impact on your laptop.
 Should you find anything interesting, please report it back to me,
 I will not disavow all knowledge of your actions :)
 
+See also http://www.linux.it/~malattia/wiki/index.php/Sony_drivers for other
+useful info.
+
 Bugs/Limitations:
 -----------------
 
index ecb3416..5e51c59 100644 (file)
@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme
        Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
 
 This driver enable the use of video4linux compatible applications with the
-Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O
-Control Device" driver (which can be found in the "Character drivers"
-section of the kernel configuration utility) to be compiled and installed
-(using its "camera=1" parameter).
+Motion Eye camera. This driver requires the "Sony Laptop Extras" driver (which
+can be found in the "Misc devices" section of the kernel configuration utility)
+to be compiled and installed (using its "camera=1" parameter).
 
 It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
 
index 625a21d..85f51e5 100644 (file)
@@ -293,7 +293,3 @@ Debugging
                        stuck (default)
 
 Miscellaneous
-
-  noreplacement  Don't replace instructions with more appropriate ones
-                for the CPU. This may be useful on asymmetric MP systems
-                where some CPUs have less capabilities than others.
index 7d42183..d0243d0 100644 (file)
@@ -198,10 +198,25 @@ L:        linux-sound@vger.kernel.org
 W:     http://www.stud.uni-karlsruhe.de/~uh1b/
 S:     Maintained
 
+IPS SCSI RAID DRIVER
+P:     Adaptec OEM Raid Solutions
+M:     aacraid@adaptec.com
+L:     linux-scsi@vger.kernel.org
+W:     http://www.adaptec.com/
+S:     Maintained
+
+DPT_I2O SCSI RAID DRIVER
+P:     Adaptec OEM Raid Solutions
+M:     aacraid@adaptec.com
+L:     linux-scsi@vger.kernel.org
+W:     http://www.adaptec.com/
+S:     Maintained
+
 AACRAID SCSI RAID DRIVER
 P:     Adaptec OEM Raid Solutions
+M:     aacraid@adaptec.com
 L:     linux-scsi@vger.kernel.org
-W:     http://linux.dell.com/storage.shtml
+W:     http://www.adaptec.com/
 S:     Supported
 
 ACPI
@@ -1303,7 +1318,7 @@ S:        Maintained
 ETHERNET BRIDGE
 P:     Stephen Hemminger
 M:     shemminger@linux-foundation.org
-L:     bridge@lists.osdl.org
+L:     bridge@lists.linux-foundation.org
 W:     http://bridge.sourceforge.net/
 S:     Maintained
 
@@ -1340,6 +1355,11 @@ M:       kevin.curtis@farsite.co.uk
 W:     http://www.farsite.co.uk/
 S:     Supported
 
+FAULT INJECTION SUPPORT
+P:     Akinobu Mita
+M:     akinobu.mita@gmail.com
+S:     Supported
+
 FRAMEBUFFER LAYER
 P:     Antonino Daplas
 M:     adaplas@gmail.com
@@ -1389,7 +1409,7 @@ M:        hch@infradead.org
 W:     ftp://ftp.openlinux.org/pub/people/hch/vxfs
 S:     Maintained
 
-FUJITSU FR-V PORT
+FUJITSU FR-V (FRV) PORT
 P:     David Howells
 M:     dhowells@redhat.com
 S:     Maintained
@@ -1585,12 +1605,6 @@ L:       i2c@lm-sensors.org
 T:     quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/
 S:     Maintained
 
-I2O
-P:     Markus Lidel
-M:     markus.lidel@shadowconnect.com
-W:     http://i2o.shadowconnect.com/
-S:     Maintained
-
 i386 BOOT CODE
 P:     Riley H. Williams
 M:     Riley@Williams.Name
@@ -1672,7 +1686,7 @@ S:        Maintained
 
 IEEE 1394 SUBSYSTEM
 P:     Ben Collins
-M:     bcollins@debian.org
+M:     ben.collins@ubuntu.com
 P:     Stefan Richter
 M:     stefanr@s5r6.in-berlin.de
 L:     linux1394-devel@lists.sourceforge.net
@@ -1680,25 +1694,11 @@ W:      http://www.linux1394.org/
 T:     git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
 S:     Maintained
 
-IEEE 1394 IPV4 DRIVER (eth1394)
-P:     Stefan Richter
-M:     stefanr@s5r6.in-berlin.de
-L:     linux1394-devel@lists.sourceforge.net
-S:     Odd Fixes
-
-IEEE 1394 PCILYNX DRIVER
-P:     Jody McIntyre
-M:     scjody@modernduck.com
-P:     Stefan Richter
-M:     stefanr@s5r6.in-berlin.de
-L:     linux1394-devel@lists.sourceforge.net
-S:     Odd Fixes
-
-IEEE 1394 RAW I/O DRIVER
-P:     Ben Collins
-M:     bcollins@debian.org
+IEEE 1394 RAW I/O DRIVER (raw1394)
 P:     Dan Dennedy
 M:     dan@dennedy.org
+P:     Stefan Richter
+M:     stefanr@s5r6.in-berlin.de
 L:     linux1394-devel@lists.sourceforge.net
 S:     Maintained
 
@@ -1933,7 +1933,7 @@ P:        Vivek Goyal
 M:     vgoyal@in.ibm.com
 P:     Haren Myneni
 M:     hbabu@us.ibm.com
-L:     fastboot@lists.osdl.org
+L:     fastboot@lists.linux-foundation.org
 L:     linux-kernel@vger.kernel.org
 W:     http://lse.sourceforge.net/kdump/
 S:     Maintained
@@ -1960,7 +1960,7 @@ S:        Maintained
 
 KERNEL JANITORS
 P:     Several
-L:     kernel-janitors@lists.osdl.org
+L:     kernel-janitors@lists.linux-foundation.org
 W:     http://www.kerneljanitors.org/
 S:     Maintained
 
@@ -1983,7 +1983,7 @@ P:        Eric Biederman
 M:     ebiederm@xmission.com
 W:     http://www.xmission.com/~ebiederm/files/kexec/
 L:     linux-kernel@vger.kernel.org
-L:     fastboot@lists.osdl.org
+L:     fastboot@lists.linux-foundation.org
 S:     Maintained
 
 KPROBES
@@ -2321,7 +2321,7 @@ S:        Maintained
 NETEM NETWORK EMULATOR
 P:     Stephen Hemminger
 M:     shemminger@linux-foundation.org
-L:     netem@lists.osdl.org
+L:     netem@lists.linux-foundation.org
 S:     Maintained
 
 NETFILTER/IPTABLES/IPCHAINS
@@ -2919,9 +2919,12 @@ L:       linux-scsi@vger.kernel.org
 S:     Maintained
 
 SCTP PROTOCOL
+P:     Vlad Yasevich
+M:     vladislav.yasevich@hp.com
 P:     Sridhar Samudrala
 M:     sri@us.ibm.com
 L:     lksctp-developers@lists.sourceforge.net
+W:     http://lksctp.sourceforge.net
 S:     Supported
 
 SCx200 CPU SUPPORT
@@ -3047,7 +3050,7 @@ S:        Supported
 SOFTWARE SUSPEND:
 P:     Pavel Machek
 M:     pavel@suse.cz
-L:     linux-pm@lists.osdl.org
+L:     linux-pm@lists.linux-foundation.org
 S:     Maintained
 
 SONIC NETWORK DRIVER
index 2f57f57..d970cb1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 21
-EXTRAVERSION = -rc5
+EXTRAVERSION =
 NAME = Nocturnal Monster Puppy
 
 # *DOCUMENTATION*
index 8d01907..381fec0 100644 (file)
@@ -40,8 +40,6 @@
 # define DBG_CFG(args)
 #endif
 
-#define MCPCIA_MAX_HOSES 4
-
 /*
  * Given a bus, device, and function number, compute resulting
  * configuration space address and setup the MCPCIA_HAXR2 register
index febe71c..543d96d 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/smp.h>
 #include <asm/err_common.h>
 #include <asm/err_ev6.h>
+#include <asm/irq_regs.h>
 
 #include "err_impl.h"
 #include "proto.h"
index aac6d4b..bd03dc9 100644 (file)
@@ -285,12 +285,12 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
                reloc_overflow:
                        if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION)
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs section %d\n",
-                                me->name, sym->st_shndx);
+                                "module %s: Relocation (type %lu) overflow vs section %d\n",
+                                me->name, r_type, sym->st_shndx);
                        else
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs %s\n",
-                                me->name, strtab + sym->st_name);
+                                "module %s: Relocation (type %lu) overflow vs %s\n",
+                                me->name, r_type, strtab + sym->st_name);
                        return -ENOEXEC;
                }
        }
index e7594a7..920196b 100644 (file)
@@ -70,6 +70,12 @@ nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        /* Preserve the IRQ set up by the console.  */
 
        u8 irq;
+       /* UP1500: AGP INTA is actually routed to IRQ 5, not IRQ 10 as
+          console reports. Check the device id of AGP bridge to distinguish
+          UP1500 from UP1000/1100. Note: 'pin' is 2 due to bridge swizzle. */
+       if (slot == 1 && pin == 2 &&
+           dev->bus->self && dev->bus->self->device == 0x700f)
+               return 5;
        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
        return irq;
 }
index de6ba34..eb2a1d6 100644 (file)
@@ -66,6 +66,13 @@ noritake_startup_irq(unsigned int irq)
        return 0;
 }
 
+static void
+noritake_end_irq(unsigned int irq)
+{
+        if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+                noritake_enable_irq(irq);
+}
+
 static struct hw_interrupt_type noritake_irq_type = {
        .typename       = "NORITAKE",
        .startup        = noritake_startup_irq,
@@ -73,7 +80,7 @@ static struct hw_interrupt_type noritake_irq_type = {
        .enable         = noritake_enable_irq,
        .disable        = noritake_disable_irq,
        .ack            = noritake_disable_irq,
-       .end            = noritake_enable_irq,
+       .end            = noritake_end_irq,
 };
 
 static void 
index 581d08c..672cb2d 100644 (file)
@@ -52,6 +52,9 @@ rawhide_update_irq_hw(int hose, int mask)
        *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose));
 }
 
+#define hose_exists(h) \
+  (((h) < MCPCIA_MAX_HOSES) && (cached_irq_masks[(h)] != 0))
+
 static inline void 
 rawhide_enable_irq(unsigned int irq)
 {
@@ -59,6 +62,9 @@ rawhide_enable_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask = 1 << irq;
 
@@ -76,6 +82,9 @@ rawhide_disable_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask = ~(1 << irq) | hose_irq_masks[hose];
 
@@ -93,6 +102,9 @@ rawhide_mask_and_ack_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask1 = 1 << irq;
        mask = ~mask1 | hose_irq_masks[hose];
@@ -169,6 +181,9 @@ rawhide_init_irq(void)
 
        mcpcia_init_hoses();
 
+       /* Clear them all; only hoses that exist will be non-zero. */
+       for (i = 0; i < MCPCIA_MAX_HOSES; i++) cached_irq_masks[i] = 0;
+
        for (hose = hose_head; hose; hose = hose->next) {
                unsigned int h = hose->index;
                unsigned int mask = hose_irq_masks[h];
index a654014..14b5a75 100644 (file)
@@ -84,12 +84,16 @@ alphabook1_init_arch(void)
 static void __init
 sio_pci_route(void)
 {
-#if defined(ALPHA_RESTORE_SRM_SETUP)
-       /* First, read and save the original setting. */
+       unsigned int orig_route_tab;
+
+       /* First, ALWAYS read and print the original setting. */
        pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60,
-                                 &saved_config.orig_route_tab);
+                                 &orig_route_tab);
        printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__,
-              saved_config.orig_route_tab, alpha_mv.sys.sio.route_tab);
+              orig_route_tab, alpha_mv.sys.sio.route_tab);
+
+#if defined(ALPHA_RESTORE_SRM_SETUP)
+       saved_config.orig_route_tab = orig_route_tab;
 #endif
 
        /* Now override with desired setting. */
@@ -334,7 +338,7 @@ struct alpha_machine_vector avanti_mv __initmv = {
        .pci_swizzle            = common_swizzle,
 
        .sys = { .sio = {
-               .route_tab      = 0x0b0a0e0f,
+               .route_tab      = 0x0b0a050f, /* leave 14 for IDE, 9 for SND */
        }}
 };
 ALIAS_MV(avanti)
index 94ad68b..41d4ad4 100644 (file)
@@ -132,7 +132,7 @@ sx164_init_arch(void)
 
        if (amask(AMASK_MAX) != 0
            && alpha_using_srm
-           && (cpu->pal_revision & 0xffff) == 0x117) {
+           && (cpu->pal_revision & 0xffff) <= 0x117) {
                __asm__ __volatile__(
                "lda    $16,8($31)\n"
                "call_pal 9\n"          /* Allow PALRES insns in kernel mode */
index 29ab7db..f009b7b 100644 (file)
@@ -257,8 +257,7 @@ titan_dispatch_irqs(u64 mask)
         */
        while (mask) {
                /* convert to SRM vector... priority is <63> -> <0> */
-               __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask));
-               vector = 63 - vector;
+               vector = 63 - __kernel_ctlz(mask);
                mask &= ~(1UL << vector);       /* clear it out          */
                vector = 0x900 + (vector << 4); /* convert to SRM vector */
                
index d4ca0f0..a850da3 100644 (file)
@@ -1,10 +1,11 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.21-rc1
-# Wed Feb 21 16:48:01 2007
+# Linux kernel version: 2.6.21-rc6
+# Mon Apr  9 10:12:58 2007
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
 # CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_NO_IOPORT=y
@@ -45,6 +46,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_IKCONFIG is not set
 CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
@@ -531,7 +533,6 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
-CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 CONFIG_ATA_OVER_ETH=m
 
@@ -560,7 +561,6 @@ CONFIG_IDE_GENERIC=y
 CONFIG_BLK_DEV_IDE_BAST=y
 # CONFIG_IDE_CHIPSETS is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
-# CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
 
 #
@@ -941,6 +941,7 @@ CONFIG_LEDS_CLASS=m
 # LED drivers
 #
 CONFIG_LEDS_S3C24XX=m
+CONFIG_LEDS_H1940=m
 
 #
 # LED Triggers
@@ -1125,6 +1126,7 @@ CONFIG_USB_MON=y
 # CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1169,7 +1171,6 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_DS1672 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_PCF8563 is not set
-# CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_RS5C348 is not set
 # CONFIG_RTC_DRV_RS5C372 is not set
 CONFIG_RTC_DRV_S3C=y
index 5a0f4bc..ba99a20 100644 (file)
@@ -228,6 +228,7 @@ int dma_channel_active(dmach_t channel)
 {
        return dma_chan[channel].active;
 }
+EXPORT_SYMBOL(dma_channel_active);
 
 void set_dma_page(dmach_t channel, char pagenr)
 {
index f7d342c..40586e2 100644 (file)
@@ -320,16 +320,16 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
        at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0)
                        | AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
 
-       at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5)
-                       | AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5));
+       at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3)
+                       | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
 
-       at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7));
+       at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
 
        if (data->bus_width_16)
                mode = AT91_SMC_DBW_16;
        else
                mode = AT91_SMC_DBW_8;
-       at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(1));
+       at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(2));
 
        /* enable pin */
        if (data->enable_pin)
index bd78058..b1142ce 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Tue Jan 16 16:52:56 2007
+# Last update: Mon Apr 16 21:01:04 2007
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -1190,13 +1190,12 @@ g500                    MACH_G500               G500                    1178
 bug                    MACH_BUG                BUG                     1179
 mx33ads                        MACH_MX33ADS            MX33ADS                 1180
 chub                   MACH_CHUB               CHUB                    1181
-gta01                  MACH_GTA01              GTA01                   1182
+neo1973_gta01          MACH_NEO1973_GTA01      NEO1973_GTA01           1182
 w90n740                        MACH_W90N740            W90N740                 1183
 medallion_sa2410       MACH_MEDALLION_SA2410   MEDALLION_SA2410        1184
 ia_cpu_9200_2          MACH_IA_CPU_9200_2      IA_CPU_9200_2           1185
 dimmrm9200             MACH_DIMMRM9200         DIMMRM9200              1186
 pm9261                 MACH_PM9261             PM9261                  1187
-mx21                   MACH_MX21               MX21                    1188
 ml7304                 MACH_ML7304             ML7304                  1189
 ucp250                 MACH_UCP250             UCP250                  1190
 intboard               MACH_INTBOARD           INTBOARD                1191
@@ -1242,3 +1241,97 @@ xscale_treo680           MACH_XSCALE_TREO680     XSCALE_TREO680          1230
 tecon_tmezon           MACH_TECON_TMEZON       TECON_TMEZON            1231
 zylonite               MACH_ZYLONITE           ZYLONITE                1233
 gene1270               MACH_GENE1270           GENE1270                1234
+zir2412                        MACH_ZIR2412            ZIR2412                 1235
+mx31lite               MACH_MX31LITE           MX31LITE                1236
+t700wx                 MACH_T700WX             T700WX                  1237
+vf100                  MACH_VF100              VF100                   1238
+nsb2                   MACH_NSB2               NSB2                    1239
+nxhmi_bb               MACH_NXHMI_BB           NXHMI_BB                1240
+nxhmi_re               MACH_NXHMI_RE           NXHMI_RE                1241
+n4100pro               MACH_N4100PRO           N4100PRO                1242
+sam9260                        MACH_SAM9260            SAM9260                 1243
+omap_treo600           MACH_OMAP_TREO600       OMAP_TREO600            1244
+indy2410               MACH_INDY2410           INDY2410                1245
+nelt_a                 MACH_NELT_A             NELT_A                  1246
+n311                   MACH_N311               N311                    1248
+at91sam9260vgk         MACH_AT91SAM9260VGK     AT91SAM9260VGK          1249
+at91leppe              MACH_AT91LEPPE          AT91LEPPE               1250
+at91lepccn             MACH_AT91LEPCCN         AT91LEPCCN              1251
+apc7100                        MACH_APC7100            APC7100                 1252
+stargazer              MACH_STARGAZER          STARGAZER               1253
+sonata                 MACH_SONATA             SONATA                  1254
+schmoogie              MACH_SCHMOOGIE          SCHMOOGIE               1255
+aztool                 MACH_AZTOOL             AZTOOL                  1256
+mioa701                        MACH_MIOA701            MIOA701                 1257
+sxni9260               MACH_SXNI9260           SXNI9260                1258
+mxc27520evb            MACH_MXC27520EVB        MXC27520EVB             1259
+armadillo5x0           MACH_ARMADILLO5X0       ARMADILLO5X0            1260
+mb9260                 MACH_MB9260             MB9260                  1261
+mb9263                 MACH_MB9263             MB9263                  1262
+ipac9302               MACH_IPAC9302           IPAC9302                1263
+cc9p9360js             MACH_CC9P9360JS         CC9P9360JS              1264
+gallium                        MACH_GALLIUM            GALLIUM                 1265
+msc2410                        MACH_MSC2410            MSC2410                 1266
+ghi270                 MACH_GHI270             GHI270                  1267
+davinci_leonardo       MACH_DAVINCI_LEONARDO   DAVINCI_LEONARDO        1268
+oiab                   MACH_OIAB               OIAB                    1269
+smdk6400               MACH_SMDK6400           SMDK6400                1270
+nokia_n800             MACH_NOKIA_N800         NOKIA_N800              1271
+greenphone             MACH_GREENPHONE         GREENPHONE              1272
+compex42x              MACH_COMPEXWP18         COMPEXWP18              1273
+xmate                  MACH_XMATE              XMATE                   1274
+energizer              MACH_ENERGIZER          ENERGIZER               1275
+ime1                   MACH_IME1               IME1                    1276
+sweda_tms              MACH_SWEDATMS           SWEDATMS                1277
+ntnp435c               MACH_NTNP435C           NTNP435C                1278
+spectro2               MACH_SPECTRO2           SPECTRO2                1279
+h6039                  MACH_H6039              H6039                   1280
+ep80219                        MACH_EP80219            EP80219                 1281
+samoa_ii               MACH_SAMOA_II           SAMOA_II                1282
+cwmxl                  MACH_CWMXL              CWMXL                   1283
+as9200                 MACH_AS9200             AS9200                  1284
+sfx1149                        MACH_SFX1149            SFX1149                 1285
+navi010                        MACH_NAVI010            NAVI010                 1286
+multmdp                        MACH_MULTMDP            MULTMDP                 1287
+scb9520                        MACH_SCB9520            SCB9520                 1288
+htcathena              MACH_HTCATHENA          HTCATHENA               1289
+xp179                  MACH_XP179              XP179                   1290
+h4300                  MACH_H4300              H4300                   1291
+goramo_mlr             MACH_GORAMO_MLR         GORAMO_MLR              1292
+mxc30020evb            MACH_MXC30020EVB        MXC30020EVB             1293
+adsbitsymx             MACH_ADSBITSIMX         ADSBITSIMX              1294
+adsportalplus          MACH_ADSPORTALPLUS      ADSPORTALPLUS           1295
+mmsp2plus              MACH_MMSP2PLUS          MMSP2PLUS               1296
+em_x270                        MACH_EM_X270            EM_X270                 1297
+tpp302                 MACH_TPP302             TPP302                  1298
+tpp104                 MACH_TPM104             TPM104                  1299
+tpm102                 MACH_TPM102             TPM102                  1300
+tpm109                 MACH_TPM109             TPM109                  1301
+fbxo1                  MACH_FBXO1              FBXO1                   1302
+hxd8                   MACH_HXD8               HXD8                    1303
+neo1973_gta02          MACH_NEO1973_GTA02      NEO1973_GTA02           1304
+emtest                 MACH_EMTEST             EMTEST                  1305
+ad6900                 MACH_AD6900             AD6900                  1306
+europa                 MACH_EUROPA             EUROPA                  1307
+metroconnect           MACH_METROCONNECT       METROCONNECT            1308
+ez_s2410               MACH_EZ_S2410           EZ_S2410                1309
+ez_s2440               MACH_EZ_S2440           EZ_S2440                1310
+ez_ep9312              MACH_EZ_EP9312          EZ_EP9312               1311
+ez_ep9315              MACH_EZ_EP9315          EZ_EP9315               1312
+ez_x7                  MACH_EZ_X7              EZ_X7                   1313
+godotdb                        MACH_GODOTDB            GODOTDB                 1314
+mistral                        MACH_MISTRAL            MISTRAL                 1315
+msm                    MACH_MSM                MSM                     1316
+ct5910                 MACH_CT5910             CT5910                  1317
+ct5912                 MACH_CT5912             CT5912                  1318
+hynet_ine              MACH_HYNET_INE          HYNET_INE               1319
+hynet_app              MACH_HYNET_APP          HYNET_APP               1320
+msm7200                        MACH_MSM7200            MSM7200                 1321
+msm7600                        MACH_MSM7600            MSM7600                 1322
+ceb255                 MACH_CEB255             CEB255                  1323
+ciel                   MACH_CIEL               CIEL                    1324
+slm5650                        MACH_SLM5650            SLM5650                 1325
+at91sam9rlek           MACH_AT91SAM9RLEK       AT91SAM9RLEK            1326
+comtech_router         MACH_COMTECH_ROUTER     COMTECH_ROUTER          1327
+sbc2410x               MACH_SBC2410X           SBC2410X                1328
+at4x0bd                        MACH_AT4X0BD            AT4X0BD                 1329
index a2b9c60..5b79a7a 100644 (file)
@@ -100,7 +100,9 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
        if ((err = pcibios_enable_resources(dev, mask)) < 0)
                return err;
 
-       return pcibios_enable_irq(dev);
+       if (!dev->msi_enabled)
+               pcibios_enable_irq(dev);
+       return 0;
 }
 
 int pcibios_assign_resources(void)
index f7279d7..0b581e3 100644 (file)
@@ -466,6 +466,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
 
        if ((err = pcibios_enable_resources(dev, mask)) < 0)
                return err;
-       pcibios_enable_irq(dev);
+       if (!dev->msi_enabled)
+               pcibios_enable_irq(dev);
        return 0;
 }
index 2c5b5cc..8143c95 100644 (file)
@@ -571,6 +571,16 @@ setr1:     lodsw
        jmp     _m_s
 
 check_vesa:
+#ifdef CONFIG_FIRMWARE_EDID
+       leaw    modelist+1024, %di
+       movw    $0x4f00, %ax
+       int     $0x10
+       cmpw    $0x004f, %ax
+       jnz     setbad
+
+       movw    4(%di), %ax
+       movw    %ax, vbe_version
+#endif
        leaw    modelist+1024, %di
        subb    $VIDEO_FIRST_VESA>>8, %bh
        movw    %bx, %cx                        # Get mode information structure
@@ -1945,6 +1955,9 @@ store_edid:
        rep
        stosl
 
+       cmpw    $0x0200, vbe_version            # only do EDID on >= VBE2.0
+       jl      no_edid
+
        pushw   %es                             # save ES
        xorw    %di, %di                        # Report Capability
        pushw   %di
@@ -1987,6 +2000,7 @@ do_restore:       .byte   0       # Screen contents altered during mode change
 svga_prefix:   .byte   VIDEO_FIRST_BIOS>>8     # Default prefix for BIOS modes
 graphic_mode:  .byte   0       # Graphic mode with a linear frame buffer
 dac_size:      .byte   6       # DAC bit depth
+vbe_version:   .word   0       # VBE bios version
 
 # Status messages
 keymsg:                .ascii  "Press <RETURN> to see video modes available, "
index 9eca21b..426f59b 100644 (file)
@@ -5,15 +5,9 @@
 #include <asm/alternative.h>
 #include <asm/sections.h>
 
-static int no_replacement    = 0;
 static int smp_alt_once      = 0;
 static int debug_alternative = 0;
 
-static int __init noreplacement_setup(char *s)
-{
-       no_replacement = 1;
-       return 1;
-}
 static int __init bootonly(char *str)
 {
        smp_alt_once = 1;
@@ -25,7 +19,6 @@ static int __init debug_alt(char *str)
        return 1;
 }
 
-__setup("noreplacement", noreplacement_setup);
 __setup("smp-alt-boot", bootonly);
 __setup("debug-alternative", debug_alt);
 
@@ -252,9 +245,6 @@ void alternatives_smp_module_add(struct module *mod, char *name,
        struct smp_alt_module *smp;
        unsigned long flags;
 
-       if (no_replacement)
-               return;
-
        if (smp_alt_once) {
                if (boot_cpu_has(X86_FEATURE_UP))
                        alternatives_smp_unlock(locks, locks_end,
@@ -289,7 +279,7 @@ void alternatives_smp_module_del(struct module *mod)
        struct smp_alt_module *item;
        unsigned long flags;
 
-       if (no_replacement || smp_alt_once)
+       if (smp_alt_once)
                return;
 
        spin_lock_irqsave(&smp_alt, flags);
@@ -320,7 +310,7 @@ void alternatives_smp_switch(int smp)
        return;
 #endif
 
-       if (no_replacement || smp_alt_once)
+       if (smp_alt_once)
                return;
        BUG_ON(!smp && (num_online_cpus() > 1));
 
@@ -386,13 +376,6 @@ extern struct paravirt_patch __start_parainstructions[],
 void __init alternative_instructions(void)
 {
        unsigned long flags;
-       if (no_replacement) {
-               printk(KERN_INFO "(SMP-)alternatives turned off\n");
-               free_init_pages("SMP alternatives",
-                               (unsigned long)__smp_alt_begin,
-                               (unsigned long)__smp_alt_end);
-               return;
-       }
 
        local_irq_save(flags);
        apply_alternatives(__alt_instructions, __alt_instructions_end);
index e884152..93aa911 100644 (file)
@@ -272,32 +272,6 @@ static void __devinit setup_APIC_timer(void)
 }
 
 /*
- * Detect systems with known broken BIOS implementations
- */
-static int __init lapic_check_broken_bios(struct dmi_system_id *d)
-{
-       printk(KERN_NOTICE "%s detected: disabling lapic timer.\n",
-                      d->ident);
-       local_apic_timer_disabled = 1;
-       return 0;
-}
-
-static struct dmi_system_id __initdata broken_bios_dmi_table[] = {
-       {
-               /*
-                * BIOS exports only C1 state, but uses deeper power
-                * modes behind the kernels back.
-                */
-                 .callback = lapic_check_broken_bios,
-                 .ident = "HP nx6325",
-                 .matches = {
-                       DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6325"),
-                 },
-        },
-        {}
-};
-
-/*
  * In this functions we calibrate APIC bus clocks to the external timer.
  *
  * We want to do the calibration only once since we want to have local timer
@@ -372,12 +346,12 @@ void __init setup_boot_APIC_clock(void)
        long delta, deltapm;
        int pm_referenced = 0;
 
-       /* Detect know broken systems */
-       dmi_check_system(broken_bios_dmi_table);
+       if (boot_cpu_has(X86_FEATURE_LAPIC_TIMER_BROKEN))
+               local_apic_timer_disabled = 1;
 
        /*
         * The local apic timer can be disabled via the kernel
-        * commandline or from the dmi quirk above. Register the lapic
+        * commandline or from the test above. Register the lapic
         * timer as a dummy clock event source on SMP systems, so the
         * broadcast mechanism is used. On UP systems simply ignore it.
         */
index 41cfea5..2d47db4 100644 (file)
 extern void vide(void);
 __asm__(".align 4\nvide: ret");
 
+#define ENABLE_C1E_MASK         0x18000000
+#define CPUID_PROCESSOR_SIGNATURE       1
+#define CPUID_XFAM              0x0ff00000
+#define CPUID_XFAM_K8           0x00000000
+#define CPUID_XFAM_10H          0x00100000
+#define CPUID_XFAM_11H          0x00200000
+#define CPUID_XMOD              0x000f0000
+#define CPUID_XMOD_REV_F        0x00040000
+
+/* AMD systems with C1E don't have a working lAPIC timer. Check for that. */
+static __cpuinit int amd_apic_timer_broken(void)
+{
+       u32 lo, hi;
+       u32 eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
+       switch (eax & CPUID_XFAM) {
+       case CPUID_XFAM_K8:
+               if ((eax & CPUID_XMOD) < CPUID_XMOD_REV_F)
+                       break;
+       case CPUID_XFAM_10H:
+       case CPUID_XFAM_11H:
+               rdmsr(MSR_K8_ENABLE_C1E, lo, hi);
+               if (lo & ENABLE_C1E_MASK)
+                       return 1;
+                break;
+        default:
+                /* err on the side of caution */
+               return 1;
+        }
+       return 0;
+}
+
 static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 {
        u32 l, h;
@@ -241,6 +272,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 
        if (cpuid_eax(0x80000000) >= 0x80000006)
                num_cache_leaves = 3;
+
+       if (amd_apic_timer_broken())
+               set_bit(X86_FEATURE_LAPIC_TIMER_BROKEN, c->x86_capability);
 }
 
 static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)
index a1f1b71..2b030d6 100644 (file)
@@ -758,7 +758,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
                                NULL, (void *)&pr);
 
        /* Check ACPI support for C3 state */
-       if (pr != NULL && longhaul_version != TYPE_LONGHAUL_V1) {
+       if (pr != NULL && longhaul_version == TYPE_POWERSAVER) {
                cx = &pr->power.states[ACPI_STATE_C3];
                if (cx->address > 0 && cx->latency <= 1000) {
                        longhaul_flags |= USE_ACPI_C3;
index f3ab61e..17d7345 100644 (file)
@@ -3,6 +3,8 @@
 #include <linux/errno.h>
 #include <linux/hpet.h>
 #include <linux/init.h>
+#include <linux/sysdev.h>
+#include <linux/pm.h>
 
 #include <asm/hpet.h>
 #include <asm/io.h>
@@ -197,7 +199,7 @@ static int hpet_next_event(unsigned long delta,
        cnt += delta;
        hpet_writel(cnt, HPET_T0_CMP);
 
-       return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0);
+       return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0) ? -ETIME : 0;
 }
 
 /*
@@ -307,6 +309,7 @@ int __init hpet_enable(void)
 out_nohpet:
        iounmap(hpet_virt_address);
        hpet_virt_address = NULL;
+       boot_hpet_disable = 1;
        return 0;
 }
 
@@ -521,3 +524,68 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 #endif
+
+
+/*
+ * Suspend/resume part
+ */
+
+#ifdef CONFIG_PM
+
+static int hpet_suspend(struct sys_device *sys_device, pm_message_t state)
+{
+       unsigned long cfg = hpet_readl(HPET_CFG);
+
+       cfg &= ~(HPET_CFG_ENABLE|HPET_CFG_LEGACY);
+       hpet_writel(cfg, HPET_CFG);
+
+       return 0;
+}
+
+static int hpet_resume(struct sys_device *sys_device)
+{
+       unsigned int id;
+
+       hpet_start_counter();
+
+       id = hpet_readl(HPET_ID);
+
+       if (id & HPET_ID_LEGSUP)
+               hpet_enable_int();
+
+       return 0;
+}
+
+static struct sysdev_class hpet_class = {
+       set_kset_name("hpet"),
+       .suspend        = hpet_suspend,
+       .resume         = hpet_resume,
+};
+
+static struct sys_device hpet_device = {
+       .id             = 0,
+       .cls            = &hpet_class,
+};
+
+
+static __init int hpet_register_sysfs(void)
+{
+       int err;
+
+       if (!is_hpet_capable())
+               return 0;
+
+       err = sysdev_class_register(&hpet_class);
+
+       if (!err) {
+               err = sysdev_register(&hpet_device);
+               if (err)
+                       sysdev_class_unregister(&hpet_class);
+       }
+
+       return err;
+}
+
+device_initcall(hpet_register_sysfs);
+
+#endif
index e4408ff..b3ab8ff 100644 (file)
@@ -736,7 +736,7 @@ failed:
        return 0;
 }
 
-int __init irqbalance_disable(char *str)
+int __devinit irqbalance_disable(char *str)
 {
        irqbalance_disabled = 1;
        return 1;
index b8f1663..cbe7ec8 100644 (file)
@@ -567,6 +567,53 @@ static int cpu_request_microcode(int cpu)
        return error;
 }
 
+static int apply_microcode_on_cpu(int cpu)
+{
+       struct cpuinfo_x86 *c = cpu_data + cpu;
+       struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
+       cpumask_t old;
+       unsigned int val[2];
+       int err = 0;
+
+       if (!uci->mc)
+               return -EINVAL;
+
+       old = current->cpus_allowed;
+       set_cpus_allowed(current, cpumask_of_cpu(cpu));
+
+       /* Check if the microcode we have in memory matches the CPU */
+       if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 ||
+           cpu_has(c, X86_FEATURE_IA64) || uci->sig != cpuid_eax(0x00000001))
+               err = -EINVAL;
+
+       if (!err && ((c->x86_model >= 5) || (c->x86 > 6))) {
+               /* get processor flags from MSR 0x17 */
+               rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]);
+               if (uci->pf != (1 << ((val[1] >> 18) & 7)))
+                       err = -EINVAL;
+       }
+
+       if (!err) {
+               wrmsr(MSR_IA32_UCODE_REV, 0, 0);
+               /* see notes above for revision 1.07.  Apparent chip bug */
+               sync_core();
+               /* get the current revision from MSR 0x8B */
+               rdmsr(MSR_IA32_UCODE_REV, val[0], val[1]);
+               if (uci->rev != val[1])
+                       err = -EINVAL;
+       }
+
+       if (!err)
+               apply_microcode(cpu);
+       else
+               printk(KERN_ERR "microcode: Could not apply microcode to CPU%d:"
+                       " sig=0x%x, pf=0x%x, rev=0x%x\n",
+                       cpu, uci->sig, uci->pf, uci->rev);
+
+       set_cpus_allowed(current, old);
+       return err;
+}
+
 static void microcode_init_cpu(int cpu)
 {
        cpumask_t old;
@@ -577,7 +624,8 @@ static void microcode_init_cpu(int cpu)
        set_cpus_allowed(current, cpumask_of_cpu(cpu));
        mutex_lock(&microcode_mutex);
        collect_cpu_info(cpu);
-       if (uci->valid && system_state == SYSTEM_RUNNING)
+       if (uci->valid && system_state == SYSTEM_RUNNING &&
+           !suspend_cpu_hotplug)
                cpu_request_microcode(cpu);
        mutex_unlock(&microcode_mutex);
        set_cpus_allowed(current, old);
@@ -663,13 +711,24 @@ static int mc_sysdev_add(struct sys_device *sys_dev)
                return 0;
 
        pr_debug("Microcode:CPU %d added\n", cpu);
-       memset(uci, 0, sizeof(*uci));
+       /* If suspend_cpu_hotplug is set, the system is resuming and we should
+        * use the data from before the suspend.
+        */
+       if (suspend_cpu_hotplug) {
+               err = apply_microcode_on_cpu(cpu);
+               if (err)
+                       microcode_fini_cpu(cpu);
+       }
+       if (!uci->valid)
+               memset(uci, 0, sizeof(*uci));
 
        err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group);
        if (err)
                return err;
 
-       microcode_init_cpu(cpu);
+       if (!uci->valid)
+               microcode_init_cpu(cpu);
+
        return 0;
 }
 
@@ -680,7 +739,11 @@ static int mc_sysdev_remove(struct sys_device *sys_dev)
        if (!cpu_online(cpu))
                return 0;
        pr_debug("Microcode:CPU %d removed\n", cpu);
-       microcode_fini_cpu(cpu);
+       /* If suspend_cpu_hotplug is set, the system is suspending and we should
+        * keep the microcode in memory for the resume.
+        */
+       if (!suspend_cpu_hotplug)
+               microcode_fini_cpu(cpu);
        sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
        return 0;
 }
index 1470242..84c3497 100644 (file)
@@ -41,16 +41,17 @@ int nmi_watchdog_enabled;
  *   different subsystems this reservation system just tries to coordinate
  *   things a little
  */
-static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner);
-static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[3]);
-
-static cpumask_t backtrace_mask = CPU_MASK_NONE;
 
 /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's
  * offset from MSR_P4_BSU_ESCR0.  It will be the max for all platforms (for now)
  */
 #define NMI_MAX_COUNTER_BITS 66
+#define NMI_MAX_COUNTER_LONGS BITS_TO_LONGS(NMI_MAX_COUNTER_BITS)
+
+static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[NMI_MAX_COUNTER_LONGS]);
 
+static cpumask_t backtrace_mask = CPU_MASK_NONE;
 /* nmi_active:
  * >0: the lapic NMI watchdog is active, but can be disabled
  * <0: the lapic NMI watchdog has not been set up, and cannot
@@ -122,64 +123,129 @@ static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr)
 /* checks for a bit availability (hack for oprofile) */
 int avail_to_resrv_perfctr_nmi_bit(unsigned int counter)
 {
+       int cpu;
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
-
-       return (!test_bit(counter, &__get_cpu_var(perfctr_nmi_owner)));
+       for_each_possible_cpu (cpu) {
+               if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
+                       return 0;
+       }
+       return 1;
 }
 
 /* checks the an msr for availability */
 int avail_to_resrv_perfctr_nmi(unsigned int msr)
 {
        unsigned int counter;
+       int cpu;
 
        counter = nmi_perfctr_msr_to_bit(msr);
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
-       return (!test_bit(counter, &__get_cpu_var(perfctr_nmi_owner)));
+       for_each_possible_cpu (cpu) {
+               if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
+                       return 0;
+       }
+       return 1;
 }
 
-int reserve_perfctr_nmi(unsigned int msr)
+static int __reserve_perfctr_nmi(int cpu, unsigned int msr)
 {
        unsigned int counter;
+       if (cpu < 0)
+               cpu = smp_processor_id();
 
        counter = nmi_perfctr_msr_to_bit(msr);
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
-       if (!test_and_set_bit(counter, &__get_cpu_var(perfctr_nmi_owner)))
+       if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
                return 1;
        return 0;
 }
 
-void release_perfctr_nmi(unsigned int msr)
+static void __release_perfctr_nmi(int cpu, unsigned int msr)
 {
        unsigned int counter;
+       if (cpu < 0)
+               cpu = smp_processor_id();
 
        counter = nmi_perfctr_msr_to_bit(msr);
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
-       clear_bit(counter, &__get_cpu_var(perfctr_nmi_owner));
+       clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]);
 }
 
-int reserve_evntsel_nmi(unsigned int msr)
+int reserve_perfctr_nmi(unsigned int msr)
+{
+       int cpu, i;
+       for_each_possible_cpu (cpu) {
+               if (!__reserve_perfctr_nmi(cpu, msr)) {
+                       for_each_possible_cpu (i) {
+                               if (i >= cpu)
+                                       break;
+                               __release_perfctr_nmi(i, msr);
+                       }
+                       return 0;
+               }
+       }
+       return 1;
+}
+
+void release_perfctr_nmi(unsigned int msr)
+{
+       int cpu;
+       for_each_possible_cpu (cpu) {
+               __release_perfctr_nmi(cpu, msr);
+       }
+}
+
+int __reserve_evntsel_nmi(int cpu, unsigned int msr)
 {
        unsigned int counter;
+       if (cpu < 0)
+               cpu = smp_processor_id();
 
        counter = nmi_evntsel_msr_to_bit(msr);
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
-       if (!test_and_set_bit(counter, &__get_cpu_var(evntsel_nmi_owner)[0]))
+       if (!test_and_set_bit(counter, &per_cpu(evntsel_nmi_owner, cpu)[0]))
                return 1;
        return 0;
 }
 
-void release_evntsel_nmi(unsigned int msr)
+static void __release_evntsel_nmi(int cpu, unsigned int msr)
 {
        unsigned int counter;
+       if (cpu < 0)
+               cpu = smp_processor_id();
 
        counter = nmi_evntsel_msr_to_bit(msr);
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
-       clear_bit(counter, &__get_cpu_var(evntsel_nmi_owner)[0]);
+       clear_bit(counter, &per_cpu(evntsel_nmi_owner, cpu)[0]);
+}
+
+int reserve_evntsel_nmi(unsigned int msr)
+{
+       int cpu, i;
+       for_each_possible_cpu (cpu) {
+               if (!__reserve_evntsel_nmi(cpu, msr)) {
+                       for_each_possible_cpu (i) {
+                               if (i >= cpu)
+                                       break;
+                               __release_evntsel_nmi(i, msr);
+                       }
+                       return 0;
+               }
+       }
+       return 1;
+}
+
+void release_evntsel_nmi(unsigned int msr)
+{
+       int cpu;
+       for_each_possible_cpu (cpu) {
+               __release_evntsel_nmi(cpu, msr);
+       }
 }
 
 static __cpuinit inline int nmi_known_cpu(void)
@@ -263,7 +329,7 @@ static int __init check_nmi_watchdog(void)
        for_each_possible_cpu(cpu)
                prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count;
        local_irq_enable();
-       mdelay((10*1000)/nmi_hz); // wait 10 ticks
+       mdelay((20*1000)/nmi_hz); // wait 20 ticks
 
        for_each_possible_cpu(cpu) {
 #ifdef CONFIG_SMP
@@ -507,10 +573,10 @@ static int setup_k7_watchdog(void)
 
        perfctr_msr = MSR_K7_PERFCTR0;
        evntsel_msr = MSR_K7_EVNTSEL0;
-       if (!reserve_perfctr_nmi(perfctr_msr))
+       if (!__reserve_perfctr_nmi(-1, perfctr_msr))
                goto fail;
 
-       if (!reserve_evntsel_nmi(evntsel_msr))
+       if (!__reserve_evntsel_nmi(-1, evntsel_msr))
                goto fail1;
 
        wrmsrl(perfctr_msr, 0UL);
@@ -533,7 +599,7 @@ static int setup_k7_watchdog(void)
        wd->check_bit = 1ULL<<63;
        return 1;
 fail1:
-       release_perfctr_nmi(perfctr_msr);
+       __release_perfctr_nmi(-1, perfctr_msr);
 fail:
        return 0;
 }
@@ -544,8 +610,8 @@ static void stop_k7_watchdog(void)
 
        wrmsr(wd->evntsel_msr, 0, 0);
 
-       release_evntsel_nmi(wd->evntsel_msr);
-       release_perfctr_nmi(wd->perfctr_msr);
+       __release_evntsel_nmi(-1, wd->evntsel_msr);
+       __release_perfctr_nmi(-1, wd->perfctr_msr);
 }
 
 #define P6_EVNTSEL0_ENABLE     (1 << 22)
@@ -563,10 +629,10 @@ static int setup_p6_watchdog(void)
 
        perfctr_msr = MSR_P6_PERFCTR0;
        evntsel_msr = MSR_P6_EVNTSEL0;
-       if (!reserve_perfctr_nmi(perfctr_msr))
+       if (!__reserve_perfctr_nmi(-1, perfctr_msr))
                goto fail;
 
-       if (!reserve_evntsel_nmi(evntsel_msr))
+       if (!__reserve_evntsel_nmi(-1, evntsel_msr))
                goto fail1;
 
        wrmsrl(perfctr_msr, 0UL);
@@ -590,7 +656,7 @@ static int setup_p6_watchdog(void)
        wd->check_bit = 1ULL<<39;
        return 1;
 fail1:
-       release_perfctr_nmi(perfctr_msr);
+       __release_perfctr_nmi(-1, perfctr_msr);
 fail:
        return 0;
 }
@@ -601,8 +667,8 @@ static void stop_p6_watchdog(void)
 
        wrmsr(wd->evntsel_msr, 0, 0);
 
-       release_evntsel_nmi(wd->evntsel_msr);
-       release_perfctr_nmi(wd->perfctr_msr);
+       __release_evntsel_nmi(-1, wd->evntsel_msr);
+       __release_perfctr_nmi(-1, wd->perfctr_msr);
 }
 
 /* Note that these events don't tick when the CPU idles. This means
@@ -668,10 +734,10 @@ static int setup_p4_watchdog(void)
                cccr_val = P4_CCCR_OVF_PMI1 | P4_CCCR_ESCR_SELECT(4);
        }
 
-       if (!reserve_perfctr_nmi(perfctr_msr))
+       if (!__reserve_perfctr_nmi(-1, perfctr_msr))
                goto fail;
 
-       if (!reserve_evntsel_nmi(evntsel_msr))
+       if (!__reserve_evntsel_nmi(-1, evntsel_msr))
                goto fail1;
 
        evntsel = P4_ESCR_EVENT_SELECT(0x3F)
@@ -695,7 +761,7 @@ static int setup_p4_watchdog(void)
        wd->check_bit = 1ULL<<39;
        return 1;
 fail1:
-       release_perfctr_nmi(perfctr_msr);
+       __release_perfctr_nmi(-1, perfctr_msr);
 fail:
        return 0;
 }
@@ -707,8 +773,8 @@ static void stop_p4_watchdog(void)
        wrmsr(wd->cccr_msr, 0, 0);
        wrmsr(wd->evntsel_msr, 0, 0);
 
-       release_evntsel_nmi(wd->evntsel_msr);
-       release_perfctr_nmi(wd->perfctr_msr);
+       __release_evntsel_nmi(-1, wd->evntsel_msr);
+       __release_perfctr_nmi(-1, wd->perfctr_msr);
 }
 
 #define ARCH_PERFMON_NMI_EVENT_SEL     ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL
@@ -736,10 +802,10 @@ static int setup_intel_arch_watchdog(void)
        perfctr_msr = MSR_ARCH_PERFMON_PERFCTR0;
        evntsel_msr = MSR_ARCH_PERFMON_EVENTSEL0;
 
-       if (!reserve_perfctr_nmi(perfctr_msr))
+       if (!__reserve_perfctr_nmi(-1, perfctr_msr))
                goto fail;
 
-       if (!reserve_evntsel_nmi(evntsel_msr))
+       if (!__reserve_evntsel_nmi(-1, evntsel_msr))
                goto fail1;
 
        wrmsrl(perfctr_msr, 0UL);
@@ -764,7 +830,7 @@ static int setup_intel_arch_watchdog(void)
        wd->check_bit = 1ULL << (eax.split.bit_width - 1);
        return 1;
 fail1:
-       release_perfctr_nmi(perfctr_msr);
+       __release_perfctr_nmi(-1, perfctr_msr);
 fail:
        return 0;
 }
@@ -787,8 +853,8 @@ static void stop_intel_arch_watchdog(void)
                return;
 
        wrmsr(wd->evntsel_msr, 0, 0);
-       release_evntsel_nmi(wd->evntsel_msr);
-       release_perfctr_nmi(wd->perfctr_msr);
+       __release_evntsel_nmi(-1, wd->evntsel_msr);
+       __release_perfctr_nmi(-1, wd->perfctr_msr);
 }
 
 void setup_apic_nmi_watchdog (void *unused)
index fb07a1a..697a70e 100644 (file)
@@ -69,6 +69,7 @@ struct {
        void (*flush_tlb)(int);
        void (*set_initial_ap_state)(int, int);
        void (*halt)(void);
+       void (*set_lazy_mode)(int mode);
 } vmi_ops;
 
 /* XXX move this to alternative.h */
@@ -574,6 +575,26 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
 }
 #endif
 
+static void vmi_set_lazy_mode(int mode)
+{
+       static DEFINE_PER_CPU(int, lazy_mode);
+
+       if (!vmi_ops.set_lazy_mode)
+               return;
+
+       /* Modes should never nest or overlap */
+       BUG_ON(__get_cpu_var(lazy_mode) && !(mode == PARAVIRT_LAZY_NONE ||
+                                            mode == PARAVIRT_LAZY_FLUSH));
+
+       if (mode == PARAVIRT_LAZY_FLUSH) {
+               vmi_ops.set_lazy_mode(0);
+               vmi_ops.set_lazy_mode(__get_cpu_var(lazy_mode));
+       } else {
+               vmi_ops.set_lazy_mode(mode);
+               __get_cpu_var(lazy_mode) = mode;
+       }
+}
+
 static inline int __init check_vmi_rom(struct vrom_header *rom)
 {
        struct pci_header *pci;
@@ -691,11 +712,14 @@ static void *vmi_get_function(int vmicall)
 do {                                                           \
        reloc = call_vrom_long_func(vmi_rom, get_reloc,         \
                                    VMI_CALL_##vmicall);        \
-       if (rel->type != VMI_RELOCATION_NONE) {                 \
-               BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);   \
+       if (rel->type == VMI_RELOCATION_CALL_REL)               \
                paravirt_ops.opname = (void *)rel->eip;         \
-       } else if (rel->type == VMI_RELOCATION_NOP)             \
+       else if (rel->type == VMI_RELOCATION_NOP)               \
                paravirt_ops.opname = (void *)vmi_nop;          \
+       else if (rel->type != VMI_RELOCATION_NONE)              \
+               printk(KERN_WARNING "VMI: Unknown relocation "  \
+                                   "type %d for " #vmicall"\n",\
+                                       rel->type);             \
 } while (0)
 
 /*
@@ -804,7 +828,7 @@ static inline int __init activate_vmi(void)
        para_wrap(load_esp0, vmi_load_esp0, set_kernel_stack, UpdateKernelStack);
        para_fill(set_iopl_mask, SetIOPLMask);
        para_fill(io_delay, IODelay);
-       para_fill(set_lazy_mode, SetLazyMode);
+       para_wrap(set_lazy_mode, vmi_set_lazy_mode, set_lazy_mode, SetLazyMode);
 
        /* user and kernel flush are just handled with different flags to FlushTLB */
        para_wrap(flush_tlb_user, vmi_flush_tlb_user, flush_tlb, FlushTLB);
index ca51610..6f38f81 100644 (file)
@@ -26,7 +26,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
 ENTRY(phys_startup_32)
 jiffies = jiffies_64;
-_proxy_pda = 0;
+_proxy_pda = 1;
 
 PHDRS {
        text PT_LOAD FLAGS(5);  /* R_E */
index d22cfc9..086b372 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/blkdev.h>
 #include <linux/module.h>
 #include <linux/backing-dev.h>
+#include <linux/interrupt.h>
 #include <asm/uaccess.h>
 #include <asm/mmx.h>
 
@@ -719,6 +720,14 @@ unsigned long __copy_to_user_ll(void __user *to, const void *from,
 #ifndef CONFIG_X86_WP_WORKS_OK
        if (unlikely(boot_cpu_data.wp_works_ok == 0) &&
                        ((unsigned long )to) < TASK_SIZE) {
+               /*
+                * When we are in an atomic section (see
+                * mm/filemap.c:file_read_actor), return the full
+                * length to take the slow path.
+                */
+               if (in_atomic())
+                       return n;
+
                /* 
                 * CPU does not honor the WP bit when writing
                 * from supervisory mode, and due to preemption or SMP,
index bb2de10..ac70d09 100644 (file)
@@ -42,6 +42,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
 
        vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
        set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
+       arch_flush_lazy_mmu_mode();
 
        return (void*) vaddr;
 }
@@ -82,6 +83,7 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
        idx = type + KM_TYPE_NR*smp_processor_id();
        vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
        set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot));
+       arch_flush_lazy_mmu_mode();
 
        return (void*) vaddr;
 }
index 1bb0693..3f78d4d 100644 (file)
@@ -193,6 +193,14 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
        },
        {
                .callback = set_bf_sort,
+               .ident = "Dell PowerEdge R900",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R900"),
+               },
+       },
+       {
+               .callback = set_bf_sort,
                .ident = "HP ProLiant BL20p G3",
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "HP"),
@@ -426,11 +434,13 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
        if ((err = pcibios_enable_resources(dev, mask)) < 0)
                return err;
 
-       return pcibios_enable_irq(dev);
+       if (!dev->msi_enabled)
+               return pcibios_enable_irq(dev);
+       return 0;
 }
 
 void pcibios_disable_device (struct pci_dev *dev)
 {
-       if (pcibios_disable_irq)
+       if (!dev->msi_enabled && pcibios_disable_irq)
                pcibios_disable_irq(dev);
 }
index e722090..c81080d 100644 (file)
@@ -68,7 +68,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 {
        struct msi_msg  msg;
        unsigned long   dest_phys_id;
-       unsigned int    irq, vector;
+       int     irq, vector;
 
        irq = create_irq();
        if (irq < 0)
@@ -76,7 +76,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 
        set_irq_msi(irq, desc);
        dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map));
-       vector = irq;
+       vector = irq_to_vector(irq);
 
        msg.address_hi = 0;
        msg.address_lo =
@@ -110,7 +110,7 @@ static void ia64_ack_msi_irq(unsigned int irq)
 
 static int ia64_msi_retrigger_irq(unsigned int irq)
 {
-       unsigned int vector = irq;
+       unsigned int vector = irq_to_vector(irq);
        ia64_resend_irq(vector);
 
        return 1;
index 69b9bb3..dc7dd76 100644 (file)
@@ -640,7 +640,7 @@ show_cpuinfo (struct seq_file *m, void *v)
                   "features   : %s\n"
                   "cpu number : %lu\n"
                   "cpu regs   : %u\n"
-                  "cpu MHz    : %lu.%06lu\n"
+                  "cpu MHz    : %lu.%03lu\n"
                   "itc MHz    : %lu.%06lu\n"
                   "BogoMIPS   : %lu.%02lu\n",
                   cpunum, c->vendor, c->family, c->model,
index b21ddec..ff7df43 100644 (file)
@@ -375,6 +375,7 @@ static void __devinit
 smp_callin (void)
 {
        int cpuid, phys_id, itc_master;
+       struct cpuinfo_ia64 *last_cpuinfo, *this_cpuinfo;
        extern void ia64_init_itm(void);
        extern volatile int time_keeper_id;
 
@@ -424,7 +425,21 @@ smp_callin (void)
         * Get our bogomips.
         */
        ia64_init_itm();
-       calibrate_delay();
+
+       /*
+        * Delay calibration can be skipped if new processor is identical to the
+        * previous processor.
+        */
+       last_cpuinfo = cpu_data(cpuid - 1);
+       this_cpuinfo = local_cpu_data;
+       if (last_cpuinfo->itc_freq != this_cpuinfo->itc_freq ||
+           last_cpuinfo->proc_freq != this_cpuinfo->proc_freq ||
+           last_cpuinfo->features != this_cpuinfo->features ||
+           last_cpuinfo->revision != this_cpuinfo->revision ||
+           last_cpuinfo->family != this_cpuinfo->family ||
+           last_cpuinfo->archrev != this_cpuinfo->archrev ||
+           last_cpuinfo->model != this_cpuinfo->model)
+               calibrate_delay();
        local_cpu_data->loops_per_jiffy = loops_per_jiffy;
 
 #ifdef CONFIG_IA32_SUPPORT
index c8da621..4f36987 100644 (file)
@@ -155,7 +155,7 @@ ia64_set_rbs_bot (void)
 
        if (stack_size > MAX_USER_STACK_SIZE)
                stack_size = MAX_USER_STACK_SIZE;
-       current->thread.rbs_bot = STACK_TOP - stack_size;
+       current->thread.rbs_bot = PAGE_ALIGN(current->mm->start_stack - stack_size);
 }
 
 /*
index 474d179..0e83f3b 100644 (file)
@@ -557,14 +557,17 @@ pcibios_enable_device (struct pci_dev *dev, int mask)
        if (ret < 0)
                return ret;
 
-       return acpi_pci_irq_enable(dev);
+       if (!dev->msi_enabled)
+               return acpi_pci_irq_enable(dev);
+       return 0;
 }
 
 void
 pcibios_disable_device (struct pci_dev *dev)
 {
        BUG_ON(atomic_read(&dev->enable_cnt));
-       acpi_pci_irq_disable(dev);
+       if (!dev->msi_enabled)
+               acpi_pci_irq_disable(dev);
 }
 
 void
index f1ec137..b6fcf81 100644 (file)
@@ -78,7 +78,7 @@ int shub1_bte_error_handler(unsigned long _nodepda)
                 * There are errors which still need to be cleaned up by
                 * hubiio_crb_error_handler
                 */
-               mod_timer(recovery_timer, HZ * 5);
+               mod_timer(recovery_timer, jiffies + (HZ * 5));
                BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
                            smp_processor_id()));
                return 1;
@@ -95,7 +95,7 @@ int shub1_bte_error_handler(unsigned long _nodepda)
                        icrbd.ii_icrb0_d_regval =
                            REMOTE_HUB_L(nasid, IIO_ICRB_D(i));
                        if (icrbd.d_bteop) {
-                               mod_timer(recovery_timer, HZ * 5);
+                               mod_timer(recovery_timer, jiffies + (HZ * 5));
                                BTE_PRINTK(("eh:%p:%d Valid %d, Giving up\n",
                                            err_nodepda, smp_processor_id(),
                                            i));
@@ -150,7 +150,7 @@ int shub2_bte_error_handler(unsigned long _nodepda)
                status = BTE_LNSTAT_LOAD(bte);
                if ((status & IBLS_ERROR) || !(status & IBLS_BUSY))
                        continue;
-               mod_timer(recovery_timer, HZ * 5);
+               mod_timer(recovery_timer, jiffies + (HZ * 5));
                BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
                            smp_processor_id()));
                return 1;
index 1ee977f..95af40c 100644 (file)
@@ -96,10 +96,14 @@ pcibr_dmamap_ate32(struct pcidev_info *info,
        }
 
        /*
-        * If we're mapping for MSI, set the MSI bit in the ATE
+        * If we're mapping for MSI, set the MSI bit in the ATE.  If it's a
+        * TIOCP based pci bus, we also need to set the PIO bit in the ATE.
         */
-       if (dma_flags & SN_DMA_MSI)
+       if (dma_flags & SN_DMA_MSI) {
                ate |= PCI32_ATE_MSI;
+               if (IS_TIOCP_SOFT(pcibus_info))
+                       ate |= PCI32_ATE_PIO;
+       }
 
        ate_write(pcibus_info, ate_index, ate_count, ate);
 
index 656f0ca..c78b143 100644 (file)
@@ -1606,7 +1606,7 @@ config MIPS_MT_FPAFF
 
 config MIPS_MT_SMTC_INSTANT_REPLAY
        bool "Low-latency Dispatch of Deferred SMTC IPIs"
-       depends on MIPS_MT_SMTC
+       depends on MIPS_MT_SMTC && !PREEMPT
        default y
        help
          SMTC pseudo-interrupts between TCs are deferred and queued
index 78f393b..c71c852 100644 (file)
@@ -32,7 +32,6 @@ void __init prom_init(void)
        char **arg = (char **) fw_arg1;
        char **env = (char **) fw_arg2;
        struct callvectors *cv = (struct callvectors *) fw_arg3;
-       uint32_t tmp;
        int i;
 
        /* save the PROM vectors for debugging use */
index 94f94eb..98b6fb3 100644 (file)
@@ -79,7 +79,7 @@ static char reset_reason;
 static void __init setup_l3cache(unsigned long size);
 
 /* setup code for a handoff from a version 1 PMON 2000 PROM */
-void PMON_v1_setup()
+static void PMON_v1_setup(void)
 {
        /* A wired TLB entry for the GT64120A and the serial port. The
           GT64120A is going to be hit on every IRQ anyway - there's
index 0b78fcb..686249c 100644 (file)
@@ -121,7 +121,11 @@ FEXPORT(restore_partial)           # restore partial frame
        SAVE_AT
        SAVE_TEMP
        LONG_L  v0, PT_STATUS(sp)
-       and     v0, 1
+#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
+       and     v0, ST0_IEP
+#else
+       and     v0, ST0_IE
+#endif
        beqz    v0, 1f
        jal     trace_hardirqs_on
        b       2f
index 83843a2..297bd56 100644 (file)
@@ -128,6 +128,37 @@ handle_vcei:
 
        .align  5
 NESTED(handle_int, PT_SIZE, sp)
+#ifdef CONFIG_TRACE_IRQFLAGS
+       /*
+        * Check to see if the interrupted code has just disabled
+        * interrupts and ignore this interrupt for now if so.
+        *
+        * local_irq_disable() disables interrupts and then calls
+        * trace_hardirqs_off() to track the state. If an interrupt is taken
+        * after interrupts are disabled but before the state is updated
+        * it will appear to restore_all that it is incorrectly returning with
+        * interrupts disabled
+        */
+       .set    push
+       .set    noat
+       mfc0    k0, CP0_STATUS
+#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
+       and     k0, ST0_IEP
+       bnez    k0, 1f
+
+       mfc0    k0, EP0_EPC
+       .set    noreorder
+       j       k0
+       rfe
+#else
+       and     k0, ST0_IE
+       bnez    k0, 1f
+
+       eret
+#endif
+1:
+       .set pop
+#endif
        SAVE_ALL
        CLI
        TRACE_IRQS_OFF
index 28c2e2e..656bde2 100644 (file)
@@ -49,7 +49,8 @@ LEAF(resume)
 #ifndef CONFIG_CPU_HAS_LLSC
        sw      zero, ll_bit
 #endif
-       mfc0    t2, CP0_STATUS
+       mfc0    t1, CP0_STATUS
+       sw      t1, THREAD_STATUS(a0)
        cpu_save_nonscratch a0
        sw      ra, THREAD_REG31(a0)
 
@@ -59,8 +60,8 @@ LEAF(resume)
        lw      t3, TASK_THREAD_INFO(a0)
        lw      t0, TI_FLAGS(t3)
        li      t1, _TIF_USEDFPU
-       and     t1, t0
-       beqz    t1, 1f
+       and     t2, t0, t1
+       beqz    t2, 1f
        nor     t1, zero, t1
 
        and     t0, t0, t1
@@ -73,13 +74,10 @@ LEAF(resume)
        li      t1, ~ST0_CU1
        and     t0, t0, t1
        sw      t0, ST_OFF(t3)
-       /* clear thread_struct CU1 bit */
-       and     t2, t1
 
        fpu_save_single a0, t0                  # clobbers t0
 
 1:
-       sw      t2, THREAD_STATUS(a0)
        /*
         * The order of restoring the registers takes care of the race
         * updating $28, $29 and kernelsp without disabling ints.
index c7698fd..cc566cf 100644 (file)
@@ -48,7 +48,8 @@
 #ifndef CONFIG_CPU_HAS_LLSC
        sw      zero, ll_bit
 #endif
-       mfc0    t2, CP0_STATUS
+       mfc0    t1, CP0_STATUS
+       LONG_S  t1, THREAD_STATUS(a0)
        cpu_save_nonscratch a0
        LONG_S  ra, THREAD_REG31(a0)
 
@@ -58,8 +59,8 @@
        PTR_L   t3, TASK_THREAD_INFO(a0)
        LONG_L  t0, TI_FLAGS(t3)
        li      t1, _TIF_USEDFPU
-       and     t1, t0
-       beqz    t1, 1f
+       and     t2, t0, t1
+       beqz    t2, 1f
        nor     t1, zero, t1
 
        and     t0, t0, t1
        li      t1, ~ST0_CU1
        and     t0, t0, t1
        LONG_S  t0, ST_OFF(t3)
-       /* clear thread_struct CU1 bit */
-       and     t2, t1
 
        fpu_save_double a0 t0 t1                # c0_status passed in t0
                                                # clobbers t1
 1:
-       LONG_S  t2, THREAD_STATUS(a0)
 
        /*
         * The order of restoring the registers takes care of the race
index 297dfcb..c0faabd 100644 (file)
@@ -34,4 +34,13 @@ extern int install_sigtramp(unsigned int __user *tramp, unsigned int syscall);
 /* Check and clear pending FPU exceptions in saved CSR */
 extern int fpcsr_pending(unsigned int __user *fpcsr);
 
+/* Make sure we will not lose FPU ownership */
+#ifdef CONFIG_PREEMPT
+#define lock_fpu_owner()       preempt_disable()
+#define unlock_fpu_owner()     preempt_enable()
+#else
+#define lock_fpu_owner()       pagefault_disable()
+#define unlock_fpu_owner()     pagefault_enable()
+#endif
+
 #endif /* __SIGNAL_COMMON_H */
index 8c3c5a5..07d6730 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/ptrace.h>
 #include <linux/unistd.h>
 #include <linux/compiler.h>
+#include <linux/uaccess.h>
 
 #include <asm/abi.h>
 #include <asm/asm.h>
@@ -27,7 +28,6 @@
 #include <asm/cacheflush.h>
 #include <asm/fpu.h>
 #include <asm/sim.h>
-#include <asm/uaccess.h>
 #include <asm/ucontext.h>
 #include <asm/cpu-features.h>
 #include <asm/war.h>
@@ -78,6 +78,46 @@ struct rt_sigframe {
 /*
  * Helper routines
  */
+static int protected_save_fp_context(struct sigcontext __user *sc)
+{
+       int err;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(1);
+               err = save_fp_context(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __put_user(0, &sc->sc_fpregs[0]) |
+                       __put_user(0, &sc->sc_fpregs[31]) |
+                       __put_user(0, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
+static int protected_restore_fp_context(struct sigcontext __user *sc)
+{
+       int err, tmp;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(0);
+               err = restore_fp_context(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __get_user(tmp, &sc->sc_fpregs[0]) |
+                       __get_user(tmp, &sc->sc_fpregs[31]) |
+                       __get_user(tmp, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
 int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
 {
        int err = 0;
@@ -113,10 +153,7 @@ int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
                 * Save FPU state to signal context. Signal handler
                 * will "inherit" current FPU state.
                 */
-               own_fpu(1);
-               enable_fp_in_kernel();
-               err |= save_fp_context(sc);
-               disable_fp_in_kernel();
+               err |= protected_save_fp_context(sc);
        }
        return err;
 }
@@ -148,7 +185,7 @@ check_and_restore_fp_context(struct sigcontext __user *sc)
        err = sig = fpcsr_pending(&sc->sc_fpc_csr);
        if (err > 0)
                err = 0;
-       err |= restore_fp_context(sc);
+       err |= protected_restore_fp_context(sc);
        return err ?: sig;
 }
 
@@ -187,11 +224,8 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
 
        if (used_math) {
                /* restore fpu context if we have used it before */
-               own_fpu(0);
-               enable_fp_in_kernel();
                if (!err)
                        err = check_and_restore_fp_context(sc);
-               disable_fp_in_kernel();
        } else {
                /* signal handler may have used FPU.  Give it up. */
                lose_fpu(0);
index 151fd2f..b9a0144 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/compat.h>
 #include <linux/suspend.h>
 #include <linux/compiler.h>
+#include <linux/uaccess.h>
 
 #include <asm/abi.h>
 #include <asm/asm.h>
@@ -29,7 +30,6 @@
 #include <linux/bitops.h>
 #include <asm/cacheflush.h>
 #include <asm/sim.h>
-#include <asm/uaccess.h>
 #include <asm/ucontext.h>
 #include <asm/system.h>
 #include <asm/fpu.h>
@@ -176,6 +176,46 @@ struct rt_sigframe32 {
 /*
  * sigcontext handlers
  */
+static int protected_save_fp_context32(struct sigcontext32 __user *sc)
+{
+       int err;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(1);
+               err = save_fp_context32(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __put_user(0, &sc->sc_fpregs[0]) |
+                       __put_user(0, &sc->sc_fpregs[31]) |
+                       __put_user(0, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
+static int protected_restore_fp_context32(struct sigcontext32 __user *sc)
+{
+       int err, tmp;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(0);
+               err = restore_fp_context32(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __get_user(tmp, &sc->sc_fpregs[0]) |
+                       __get_user(tmp, &sc->sc_fpregs[31]) |
+                       __get_user(tmp, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
 static int setup_sigcontext32(struct pt_regs *regs,
                              struct sigcontext32 __user *sc)
 {
@@ -209,10 +249,7 @@ static int setup_sigcontext32(struct pt_regs *regs,
                 * Save FPU state to signal context.  Signal handler
                 * will "inherit" current FPU state.
                 */
-               own_fpu(1);
-               enable_fp_in_kernel();
-               err |= save_fp_context32(sc);
-               disable_fp_in_kernel();
+               err |= protected_save_fp_context32(sc);
        }
        return err;
 }
@@ -225,7 +262,7 @@ check_and_restore_fp_context32(struct sigcontext32 __user *sc)
        err = sig = fpcsr_pending(&sc->sc_fpc_csr);
        if (err > 0)
                err = 0;
-       err |= restore_fp_context32(sc);
+       err |= protected_restore_fp_context32(sc);
        return err ?: sig;
 }
 
@@ -261,11 +298,8 @@ static int restore_sigcontext32(struct pt_regs *regs,
 
        if (used_math) {
                /* restore fpu context if we have used it before */
-               own_fpu(0);
-               enable_fp_in_kernel();
                if (!err)
                        err = check_and_restore_fp_context32(sc);
-               disable_fp_in_kernel();
        } else {
                /* signal handler may have used FPU.  Give it up. */
                lose_fpu(0);
index f253eda..5dcfab6 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/sched.h>
 #include <linux/cpumask.h>
 #include <linux/interrupt.h>
+#include <linux/kernel_stat.h>
 #include <linux/module.h>
 
 #include <asm/cpu.h>
@@ -14,6 +15,7 @@
 #include <asm/hazards.h>
 #include <asm/mmu_context.h>
 #include <asm/smp.h>
+#include <asm/mips-boards/maltaint.h>
 #include <asm/mipsregs.h>
 #include <asm/cacheflush.h>
 #include <asm/time.h>
@@ -75,7 +77,7 @@ static struct smtc_ipi_q freeIPIq;
 
 void ipi_decode(struct smtc_ipi *);
 static void post_direct_ipi(int cpu, struct smtc_ipi *pipi);
-static void setup_cross_vpe_interrupts(void);
+static void setup_cross_vpe_interrupts(unsigned int nvpe);
 void init_smtc_stats(void);
 
 /* Global SMTC Status */
@@ -168,7 +170,10 @@ __setup("tintq=", tintq);
 
 int imstuckcount[2][8];
 /* vpemask represents IM/IE bits of per-VPE Status registers, low-to-high */
-int vpemask[2][8] = {{0,1,1,0,0,0,0,1},{0,1,0,0,0,0,0,1}};
+int vpemask[2][8] = {
+       {0, 0, 1, 0, 0, 0, 0, 1},
+       {0, 0, 0, 0, 0, 0, 0, 1}
+};
 int tcnoprog[NR_CPUS];
 static atomic_t idle_hook_initialized = {0};
 static int clock_hang_reported[NR_CPUS];
@@ -501,8 +506,7 @@ void mipsmt_prepare_cpus(void)
 
        /* If we have multiple VPEs running, set up the cross-VPE interrupt */
 
-       if (nvpe > 1)
-               setup_cross_vpe_interrupts();
+       setup_cross_vpe_interrupts(nvpe);
 
        /* Set up queue of free IPI "messages". */
        nipi = NR_CPUS * IPIBUF_PER_CPU;
@@ -607,7 +611,12 @@ void smtc_cpus_done(void)
 int setup_irq_smtc(unsigned int irq, struct irqaction * new,
                        unsigned long hwmask)
 {
+       unsigned int vpe = current_cpu_data.vpe_id;
+
        irq_hwmask[irq] = hwmask;
+#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
+       vpemask[vpe][irq - MIPSCPU_INT_BASE] = 1;
+#endif
 
        return setup_irq(irq, new);
 }
@@ -812,12 +821,15 @@ void ipi_decode(struct smtc_ipi *pipi)
        smtc_ipi_nq(&freeIPIq, pipi);
        switch (type_copy) {
        case SMTC_CLOCK_TICK:
+               irq_enter();
+               kstat_this_cpu.irqs[MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR]++;
                /* Invoke Clock "Interrupt" */
                ipi_timer_latch[dest_copy] = 0;
 #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
                clock_hang_reported[dest_copy] = 0;
 #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */
                local_timer_interrupt(0, NULL);
+               irq_exit();
                break;
        case LINUX_SMP_IPI:
                switch ((int)arg_copy) {
@@ -965,8 +977,11 @@ static void ipi_irq_dispatch(void)
 
 static struct irqaction irq_ipi;
 
-static void setup_cross_vpe_interrupts(void)
+static void setup_cross_vpe_interrupts(unsigned int nvpe)
 {
+       if (nvpe < 1)
+               return;
+
        if (!cpu_has_vint)
                panic("SMTC Kernel requires Vectored Interupt support");
 
@@ -984,10 +999,17 @@ static void setup_cross_vpe_interrupts(void)
 
 /*
  * SMTC-specific hacks invoked from elsewhere in the kernel.
+ *
+ * smtc_ipi_replay is called from raw_local_irq_restore which is only ever
+ * called with interrupts disabled.  We do rely on interrupts being disabled
+ * here because using spin_lock_irqsave()/spin_unlock_irqrestore() would
+ * result in a recursive call to raw_local_irq_restore().
  */
 
-void smtc_ipi_replay(void)
+static void __smtc_ipi_replay(void)
 {
+       unsigned int cpu = smp_processor_id();
+
        /*
         * To the extent that we've ever turned interrupts off,
         * we may have accumulated deferred IPIs.  This is subtle.
@@ -1002,17 +1024,30 @@ void smtc_ipi_replay(void)
         * is clear, and we'll handle it as a real pseudo-interrupt
         * and not a pseudo-pseudo interrupt.
         */
-       if (IPIQ[smp_processor_id()].depth > 0) {
-               struct smtc_ipi *pipi;
-               extern void self_ipi(struct smtc_ipi *);
+       if (IPIQ[cpu].depth > 0) {
+               while (1) {
+                       struct smtc_ipi_q *q = &IPIQ[cpu];
+                       struct smtc_ipi *pipi;
+                       extern void self_ipi(struct smtc_ipi *);
+
+                       spin_lock(&q->lock);
+                       pipi = __smtc_ipi_dq(q);
+                       spin_unlock(&q->lock);
+                       if (!pipi)
+                               break;
 
-               while ((pipi = smtc_ipi_dq(&IPIQ[smp_processor_id()]))) {
                        self_ipi(pipi);
-                       smtc_cpu_stats[smp_processor_id()].selfipis++;
+                       smtc_cpu_stats[cpu].selfipis++;
                }
        }
 }
 
+void smtc_ipi_replay(void)
+{
+       raw_local_irq_disable();
+       __smtc_ipi_replay();
+}
+
 EXPORT_SYMBOL(smtc_ipi_replay);
 
 void smtc_idle_loop_hook(void)
@@ -1117,7 +1152,13 @@ void smtc_idle_loop_hook(void)
         * is in use, there should never be any.
         */
 #ifndef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY
-       smtc_ipi_replay();
+       {
+               unsigned long flags;
+
+               local_irq_save(flags);
+               __smtc_ipi_replay();
+               local_irq_restore(flags);
+       }
 #endif /* CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY */
 }
 
index 7d76a85..493cb29 100644 (file)
@@ -650,7 +650,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
        unsigned int opcode, bcode;
        siginfo_t info;
 
-       if (get_user(opcode, (unsigned int __user *) exception_epc(regs)))
+       if (__get_user(opcode, (unsigned int __user *) exception_epc(regs)))
                goto out_sigsegv;
 
        /*
@@ -700,7 +700,7 @@ asmlinkage void do_tr(struct pt_regs *regs)
        unsigned int opcode, tcode = 0;
        siginfo_t info;
 
-       if (get_user(opcode, (unsigned int __user *) exception_epc(regs)))
+       if (__get_user(opcode, (unsigned int __user *) exception_epc(regs)))
                goto out_sigsegv;
 
        /* Immediate versions don't provide a code.  */
@@ -757,11 +757,12 @@ asmlinkage void do_cpu(struct pt_regs *regs)
 {
        unsigned int cpid;
 
+       die_if_kernel("do_cpu invoked from kernel context!", regs);
+
        cpid = (regs->cp0_cause >> CAUSEB_CE) & 3;
 
        switch (cpid) {
        case 0:
-               die_if_kernel("do_cpu invoked from kernel context!", regs);
                if (!cpu_has_llsc)
                        if (!simulate_llsc(regs))
                                return;
@@ -772,9 +773,6 @@ asmlinkage void do_cpu(struct pt_regs *regs)
                break;
 
        case 1:
-               if (!test_thread_flag(TIF_ALLOW_FP_IN_KERNEL))
-                       die_if_kernel("do_cpu invoked from kernel context!",
-                                     regs);
                if (used_math())        /* Using the FPU again.  */
                        own_fpu(1);
                else {                  /* First time FPU user.  */
@@ -782,19 +780,7 @@ asmlinkage void do_cpu(struct pt_regs *regs)
                        set_used_math();
                }
 
-               if (raw_cpu_has_fpu) {
-                       if (test_thread_flag(TIF_ALLOW_FP_IN_KERNEL)) {
-                               local_irq_disable();
-                               if (cpu_has_fpu)
-                                       regs->cp0_status |= ST0_CU1;
-                               /*
-                                * We must return without enabling
-                                * interrupts to ensure keep FPU
-                                * ownership until resume.
-                                */
-                               return;
-                       }
-               } else {
+               if (!raw_cpu_has_fpu) {
                        int sig;
                        sig = fpu_emulator_cop1Handler(regs,
                                                &current->thread.fpu, 0);
@@ -836,7 +822,6 @@ asmlinkage void do_cpu(struct pt_regs *regs)
 
        case 2:
        case 3:
-               die_if_kernel("do_cpu invoked from kernel context!", regs);
                break;
        }
 
index 6f90e7e..f9c595d 100644 (file)
@@ -42,7 +42,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
        siginfo_t info;
 
 #if 0
-       printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", smp_processor_id(),
+       printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(),
               current->comm, current->pid, field, address, write,
               field, regs->cp0_epc);
 #endif
@@ -165,7 +165,7 @@ no_context:
 
        printk(KERN_ALERT "CPU %d Unable to handle kernel paging request at "
               "virtual address %0*lx, epc == %0*lx, ra == %0*lx\n",
-              smp_processor_id(), field, address, field, regs->cp0_epc,
+              raw_smp_processor_id(), field, address, field, regs->cp0_epc,
               field,  regs->regs[31]);
        die("Oops", regs);
 
@@ -228,7 +228,7 @@ vmalloc_fault:
                pmd_t *pmd, *pmd_k;
                pte_t *pte_k;
 
-               pgd = (pgd_t *) pgd_current[smp_processor_id()] + offset;
+               pgd = (pgd_t *) pgd_current[raw_smp_processor_id()] + offset;
                pgd_k = init_mm.pgd + offset;
 
                if (!pgd_present(*pgd_k))
index 69a8bcf..4f94fa2 100644 (file)
@@ -35,7 +35,7 @@
 #define vpe_id()       smp_processor_id()
 #else
 #define WHAT           0
-#define vpe_id()       smp_processor_id()
+#define vpe_id()       0
 #endif
 
 #define __define_perf_accessors(r, n, np)                              \
index 9cd859e..a84f594 100644 (file)
@@ -1,4 +1,5 @@
 #include <linux/pci.h>
+#include <asm/irq.h>
 
 int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
index 20af0f1..ba0c4b7 100644 (file)
@@ -141,11 +141,11 @@ static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask)
        unsigned long flags;
        unsigned int irq_dirty;
 
-       i = first_cpu(mask);
-       if (next_cpu(i, mask) <= NR_CPUS) {
+       if (cpus_weight(mask) != 1) {
                printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
                return;
        }
+       i = first_cpu(mask);
 
        /* Convert logical CPU to physical CPU */
        cpu = cpu_logical_map(i);
index 87188f0..f4a6169 100644 (file)
@@ -141,6 +141,18 @@ static int __init setup_bcm112x(void)
                periph_rev = 3;
                pass_str = "A2";
                break;
+       case K_SYS_REVISION_BCM112x_A3:
+               periph_rev = 3;
+               pass_str = "A3";
+               break;
+       case K_SYS_REVISION_BCM112x_A4:
+               periph_rev = 3;
+               pass_str = "A4";
+               break;
+       case K_SYS_REVISION_BCM112x_B0:
+               periph_rev = 3;
+               pass_str = "B0";
+               break;
        default:
                printk("Unknown %s rev %x\n", soc_str, soc_pass);
                ret = 1;
index c751925..fbfff95 100644 (file)
@@ -128,7 +128,7 @@ static void mpc52xx_main_mask(unsigned int virq)
 
        pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
 
-       io_be_setbit(&intr->main_mask, 15 - l2irq);
+       io_be_setbit(&intr->main_mask, 16 - l2irq);
 }
 
 static void mpc52xx_main_unmask(unsigned int virq)
@@ -141,7 +141,7 @@ static void mpc52xx_main_unmask(unsigned int virq)
 
        pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
 
-       io_be_clrbit(&intr->main_mask, 15 - l2irq);
+       io_be_clrbit(&intr->main_mask, 16 - l2irq);
 }
 
 static struct irq_chip mpc52xx_main_irqchip = {
index dffeeae..1fc5819 100644 (file)
@@ -129,7 +129,7 @@ void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c)
 
        if (h.token == NULL)
                return;
-       h.token -= dcr_n * h.stride;
+       h.token += dcr_n * h.stride;
        iounmap(h.token);
        h.token = NULL;
 }
index e3d71e0..43f6cc9 100644 (file)
@@ -251,13 +251,13 @@ static int qe_sdma_init(void)
 
        /* allocate 2 internal temporary buffers (512 bytes size each) for
         * the SDMA */
-       sdma_buf_offset = qe_muram_alloc(512 * 2, 64);
+       sdma_buf_offset = qe_muram_alloc(512 * 2, 4096);
        if (IS_MURAM_ERR(sdma_buf_offset))
                return -ENOMEM;
 
        out_be32(&sdma->sdebcr, sdma_buf_offset & QE_SDEBCR_BA_MASK);
-       out_be32(&sdma->sdmr, (QE_SDMR_GLB_1_MSK | (0x1 >>
-                                       QE_SDMR_CEN_SHIFT)));
+       out_be32(&sdma->sdmr, (QE_SDMR_GLB_1_MSK |
+                                       (0x1 << QE_SDMR_CEN_SHIFT)));
 
        return 0;
 }
index 3b23bcb..7a8722b 100644 (file)
 #include <asm/tlbflush.h>
 #include <asm/rheap.h>
 
+#define immr_map(member)                                               \
+({                                                                     \
+       u32 offset = offsetof(immap_t, member);                         \
+       void *addr = ioremap (IMAP_ADDR + offset,                       \
+                             sizeof( ((immap_t*)0)->member));          \
+       addr;                                                           \
+})
+
+#define immr_map_size(member, size)                                    \
+({                                                                     \
+       u32 offset = offsetof(immap_t, member);                         \
+       void *addr = ioremap (IMAP_ADDR + offset, size);                \
+       addr;                                                           \
+})
+
 static void m8xx_cpm_dpinit(void);
 static uint    host_buffer;    /* One page of host buffer */
 static uint    host_end;       /* end + 1 */
@@ -364,11 +379,16 @@ static rh_block_t cpm_boot_dpmem_rh_block[16];
 static rh_info_t cpm_dpmem_info;
 
 #define CPM_DPMEM_ALIGNMENT    8
+static u8* dpram_vbase;
+static uint dpram_pbase;
 
 void m8xx_cpm_dpinit(void)
 {
        spin_lock_init(&cpm_dpmem_lock);
 
+       dpram_vbase = immr_map_size(im_cpm.cp_dpmem, CPM_DATAONLY_BASE + CPM_DATAONLY_SIZE);
+       dpram_pbase = (uint)&((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem;
+
        /* Initialize the info header */
        rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT,
                        sizeof(cpm_boot_dpmem_rh_block) /
@@ -442,3 +462,9 @@ void *cpm_dpram_addr(uint offset)
        return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
 }
 EXPORT_SYMBOL(cpm_dpram_addr);
+
+uint cpm_dpram_phys(u8* addr)
+{
+       return (dpram_pbase + (uint)(addr - dpram_vbase));
+}
+EXPORT_SYMBOL(cpm_dpram_phys);
index d1db7d1..6619f91 100644 (file)
@@ -1,42 +1,69 @@
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-rc5
+# Wed Apr  4 20:55:16 2007
 #
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_HAVE_DEC_LOCK=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_GENERIC_NVRAM=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
 CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_HOTPLUG is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+# CONFIG_HOTPLUG is not set
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 # CONFIG_EPOLL is not set
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -44,66 +71,124 @@ CONFIG_IOSCHED_CFQ=y
 # CONFIG_MODULES is not set
 
 #
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
 # Processor
 #
 CONFIG_6xx=y
 # CONFIG_40x is not set
 # CONFIG_44x is not set
-# CONFIG_POWER3 is not set
-# CONFIG_POWER4 is not set
 # CONFIG_8xx is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_KEXEC is not set
 # CONFIG_CPU_FREQ is not set
+# CONFIG_WANT_EARLY_SERIAL is not set
 CONFIG_EMBEDDEDBOOT=y
 CONFIG_PPC_STD_MMU=y
 
 #
 # Platform options
 #
-# CONFIG_PPC_MULTIPLATFORM is not set
+
+#
+# Freescale Ethernet driver platform-specific options
+#
+# CONFIG_PPC_PREP is not set
 # CONFIG_APUS is not set
+# CONFIG_KATANA is not set
 # CONFIG_WILLOW is not set
-# CONFIG_PCORE is not set
+# CONFIG_CPCI690 is not set
 # CONFIG_POWERPMC250 is not set
-# CONFIG_EV64260 is not set
+# CONFIG_CHESTNUT is not set
 # CONFIG_SPRUCE is not set
+# CONFIG_HDPU is not set
+# CONFIG_EV64260 is not set
 # CONFIG_LOPEC is not set
-# CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
 # CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
-# CONFIG_ADIR is not set
-# CONFIG_K2 is not set
+# CONFIG_RADSTONE_PPC7D is not set
 # CONFIG_PAL4 is not set
-# CONFIG_GEMINI is not set
 # CONFIG_EST8260 is not set
 # CONFIG_SBC82xx is not set
 # CONFIG_SBS8260 is not set
-# CONFIG_RPX6 is not set
+# CONFIG_RPX8260 is not set
 # CONFIG_TQM8260 is not set
 CONFIG_ADS8272=y
+# CONFIG_PQ2FADS is not set
+# CONFIG_LITE5200 is not set
+# CONFIG_MPC834x_SYS is not set
+# CONFIG_EV64360 is not set
 CONFIG_PQ2ADS=y
 CONFIG_8260=y
 CONFIG_8272=y
 CONFIG_CPM2=y
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
 # CONFIG_HIGHMEM is not set
-CONFIG_KERNEL_ELF=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
 
 #
 # Bus options
 #
+CONFIG_ZONE_DMA=y
+# CONFIG_PPC_I8259 is not set
+CONFIG_PPC_INDIRECT_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
+CONFIG_PCI_8260=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
 
 #
 # Advanced setup
@@ -120,12 +205,110 @@ CONFIG_TASK_SIZE=0x80000000
 CONFIG_BOOT_LOAD=0x00400000
 
 #
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
 # Device Drivers
 #
 
 #
 # Generic Driver Options
 #
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -140,6 +323,7 @@ CONFIG_BOOT_LOAD=0x00400000
 #
 # Plug and Play support
 #
+# CONFIG_PNPACPI is not set
 
 #
 # Block devices
@@ -149,14 +333,23 @@ CONFIG_BOOT_LOAD=0x00400000
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_CARMEL is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=32768
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_LBD is not set
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -166,7 +359,14 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -176,6 +376,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -190,70 +391,12 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
+# CONFIG_WINDFARM is not set
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
+# Network device support
 #
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -266,13 +409,31 @@ CONFIG_NETDEVICES=y
 # CONFIG_ARCNET is not set
 
 #
+# PHY device support
+#
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+CONFIG_DAVICOM_PHY=y
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_FIXED_PHY is not set
+
+#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
-# CONFIG_OAKNET is not set
+CONFIG_MII=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 
 #
@@ -281,6 +442,9 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
 # CONFIG_NET_PCI is not set
+CONFIG_FS_ENET=y
+# CONFIG_FS_ENET_HAS_SCC is not set
+CONFIG_FS_ENET_HAS_FCC=y
 
 #
 # Ethernet (1000 Mbit)
@@ -292,14 +456,24 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -321,6 +495,8 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -336,6 +512,7 @@ CONFIG_NET_ETHERNET=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -347,14 +524,6 @@ CONFIG_INPUT=y
 # CONFIG_INPUT_EVBUG is not set
 
 #
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-# CONFIG_SERIO is not set
-# CONFIG_SERIO_I8042 is not set
-
-#
 # Input Device Drivers
 #
 # CONFIG_INPUT_KEYBOARD is not set
@@ -364,6 +533,12 @@ CONFIG_SOUND_GAMEPORT=y
 # CONFIG_INPUT_MISC is not set
 
 #
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
 # Character devices
 #
 # CONFIG_VT is not set
@@ -377,10 +552,21 @@ CONFIG_SOUND_GAMEPORT=y
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_CPM=y
+CONFIG_SERIAL_CPM_CONSOLE=y
+CONFIG_SERIAL_CPM_SCC1=y
+# CONFIG_SERIAL_CPM_SCC2 is not set
+# CONFIG_SERIAL_CPM_SCC3 is not set
+CONFIG_SERIAL_CPM_SCC4=y
+# CONFIG_SERIAL_CPM_SMC1 is not set
+# CONFIG_SERIAL_CPM_SMC2 is not set
+# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -391,29 +577,53 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_NVRAM is not set
 CONFIG_GEN_RTC=y
 # CONFIG_GEN_RTC_X is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
 # I2C support
 #
 # CONFIG_I2C is not set
 
 #
-# Misc devices
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
 
 #
 # Multimedia devices
@@ -428,7 +638,9 @@ CONFIG_GEN_RTC=y
 #
 # Graphics support
 #
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 
 #
 # Sound
@@ -436,35 +648,110 @@ CONFIG_GEN_RTC=y
 # CONFIG_SOUND is not set
 
 #
+# HID Devices
+#
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
 # USB support
 #
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB is not set
 
 #
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
 
 #
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# Auxiliary Display support
+#
+
+#
+# Virtualization
+#
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -475,7 +762,8 @@ CONFIG_FS_MBCACHE=y
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
 # CONFIG_NTFS_FS is not set
 
 #
@@ -483,12 +771,13 @@ CONFIG_FS_MBCACHE=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -511,20 +800,26 @@ CONFIG_RAMFS=y
 # Network File Systems
 #
 CONFIG_NFS_FS=y
-# CONFIG_NFS_V3 is not set
-# CONFIG_NFS_V4 is not set
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
-# CONFIG_EXPORTFS is not set
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -537,46 +832,99 @@ CONFIG_PARTITION_ADVANCED=y
 # CONFIG_MAC_PARTITION is not set
 # CONFIG_MSDOS_PARTITION is not set
 # CONFIG_LDM_PARTITION is not set
-# CONFIG_NEC98_PARTITION is not set
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 
 #
 # Native Language Support
 #
 # CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
 # CONFIG_SCC_ENET is not set
-CONFIG_FEC_ENET=y
-# CONFIG_USE_MDIO is not set
+# CONFIG_FEC_ENET is not set
 
 #
 # CPM2 Options
 #
-CONFIG_SCC_CONSOLE=y
-CONFIG_FCC1_ENET=y
-# CONFIG_FCC2_ENET is not set
-# CONFIG_FCC3_ENET is not set
 
 #
 # Library routines
 #
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+# CONFIG_PROFILING is not set
 
 #
 # Kernel hacking
 #
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_KGDB_CONSOLE is not set
 
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
 # Cryptographic options
 #
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+
+#
+# Hardware crypto devices
+#
index 0bc0676..47f4b38 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/fs_enet_pd.h>
 #include <linux/platform_device.h>
+#include <linux/phy.h>
 
 #include <asm/io.h>
 #include <asm/mpc8260.h>
 
 #include "pq2ads_pd.h"
 
-static void init_fcc1_ioports(void);
-static void init_fcc2_ioports(void);
-static void init_scc1_uart_ioports(void);
-static void init_scc4_uart_ioports(void);
+static void init_fcc1_ioports(struct fs_platform_info*);
+static void init_fcc2_ioports(struct fs_platform_info*);
+static void init_scc1_uart_ioports(struct fs_uart_platform_info*);
+static void init_scc4_uart_ioports(struct fs_uart_platform_info*);
 
 static struct fs_uart_platform_info mpc8272_uart_pdata[] = {
        [fsid_scc1_uart] = {
@@ -103,7 +104,7 @@ static struct fs_platform_info mpc82xx_enet_pdata[] = {
        },
 };
 
-static void init_fcc1_ioports(struct fs_platform_info*)
+static void init_fcc1_ioports(struct fs_platform_info* pdata)
 {
        struct io_port *io;
        u32 tempval;
@@ -144,7 +145,7 @@ static void init_fcc1_ioports(struct fs_platform_info*)
        iounmap(immap);
 }
 
-static void init_fcc2_ioports(struct fs_platform_info*)
+static void init_fcc2_ioports(struct fs_platform_info* pdata)
 {
        cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
        u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32));
@@ -229,7 +230,7 @@ static void mpc8272ads_fixup_uart_pdata(struct platform_device *pdev,
        }
 }
 
-static void init_scc1_uart_ioports(struct fs_uart_platform_info*)
+static void init_scc1_uart_ioports(struct fs_uart_platform_info* pdata)
 {
        cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
 
@@ -246,7 +247,7 @@ static void init_scc1_uart_ioports(struct fs_uart_platform_info*)
        iounmap(immap);
 }
 
-static void init_scc4_uart_ioports(struct fs_uart_platform_info*)
+static void init_scc4_uart_ioports(struct fs_uart_platform_info* pdata)
 {
        cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
 
index 5b05d4b..7ce5364 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/fs_enet_pd.h>
 #include <linux/fs_uart_pd.h>
 #include <linux/mii.h>
+#include <linux/phy.h>
 
 #include <asm/delay.h>
 #include <asm/io.h>
 
 extern unsigned char __res[];
 
-static void setup_fec1_ioports(void);
-static void setup_scc1_ioports(void);
-static void setup_smc1_ioports(void);
-static void setup_smc2_ioports(void);
+static void setup_fec1_ioports(struct fs_platform_info*);
+static void setup_scc1_ioports(struct fs_platform_info*);
+static void setup_smc1_ioports(struct fs_uart_platform_info*);
+static void setup_smc2_ioports(struct fs_uart_platform_info*);
 
 static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata;
 
@@ -137,7 +138,7 @@ void __init board_init(void)
        iounmap(bcsr_io);
 }
 
-static void setup_fec1_ioports(struct fs_platform_info*)
+static void setup_fec1_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
 
@@ -145,7 +146,7 @@ static void setup_fec1_ioports(struct fs_platform_info*)
        setbits16(&immap->im_ioport.iop_pddir, 0x1fff);
 }
 
-static void setup_scc1_ioports(struct fs_platform_info*)
+static void setup_scc1_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
@@ -194,7 +195,7 @@ static void setup_scc1_ioports(struct fs_platform_info*)
 
 }
 
-static void setup_smc1_ioports(struct fs_uart_platform_info*)
+static void setup_smc1_ioports(struct fs_uart_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
@@ -216,7 +217,7 @@ static void setup_smc1_ioports(struct fs_uart_platform_info*)
 
 }
 
-static void setup_smc2_ioports(struct fs_uart_platform_info*)
+static void setup_smc2_ioports(struct fs_uart_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
index f8161f3..87deaef 100644 (file)
 #include <asm/ppc_sys.h>
 
 extern unsigned char __res[];
-static void setup_smc1_ioports(void);
-static void setup_smc2_ioports(void);
+static void setup_smc1_ioports(struct fs_uart_platform_info*);
+static void setup_smc2_ioports(struct fs_uart_platform_info*);
 
 static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata;
-static void setup_fec1_ioports(void);
-static void setup_fec2_ioports(void);
-static void setup_scc3_ioports(void);
+static void setup_fec1_ioports(struct fs_platform_info*);
+static void setup_fec2_ioports(struct fs_platform_info*);
+static void setup_scc3_ioports(struct fs_platform_info*);
 
 static struct fs_uart_platform_info mpc885_uart_pdata[] = {
        [fsid_smc1_uart] = {
@@ -161,7 +161,7 @@ void __init board_init(void)
 #endif
 }
 
-static void setup_fec1_ioports(struct fs_platform_info*)
+static void setup_fec1_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
 
@@ -181,7 +181,7 @@ static void setup_fec1_ioports(struct fs_platform_info*)
        clrbits32(&immap->im_cpm.cp_cptr, 0x00000100);
 }
 
-static void setup_fec2_ioports(struct fs_platform_info*)
+static void setup_fec2_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
 
@@ -193,7 +193,7 @@ static void setup_fec2_ioports(struct fs_platform_info*)
        clrbits32(&immap->im_cpm.cp_cptr, 0x00000080);
 }
 
-static void setup_scc3_ioports(struct fs_platform_info*)
+static void setup_scc3_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
@@ -315,7 +315,7 @@ static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev,
        mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1);
 }
 
-static void setup_smc1_ioports(struct fs_uart_platform_info*)
+static void setup_smc1_ioports(struct fs_uart_platform_info* pdata)
 {
         immap_t *immap = (immap_t *) IMAP_ADDR;
         unsigned *bcsr_io;
@@ -335,7 +335,7 @@ static void setup_smc1_ioports(struct fs_uart_platform_info*)
         clrbits16(&immap->im_cpm.cp_pbodr, iobits);
 }
 
-static void setup_smc2_ioports(struct fs_uart_platform_info*)
+static void setup_smc2_ioports(struct fs_uart_platform_info* pdata)
 {
         immap_t *immap = (immap_t *) IMAP_ADDR;
         unsigned *bcsr_io;
index 8af549e..993f353 100644 (file)
@@ -167,7 +167,7 @@ static int __kprobes swap_instruction(void *aref)
         * shall not cross any page boundaries (vmalloc area!) when writing
         * the new instruction.
         */
-       addr = (u32 *)ALIGN((unsigned long)args->ptr, 4);
+       addr = (u32 *)((unsigned long)args->ptr & -4UL);
        if ((unsigned long)args->ptr & 2)
                instr = ((*addr) & 0xffff0000) | args->new;
        else
index fe1b276..6e0d10f 100644 (file)
@@ -82,9 +82,6 @@ DECLARE_EXPORT(__movstr);
 DECLARE_EXPORT(__movmem_i4_even);
 DECLARE_EXPORT(__movmem_i4_odd);
 DECLARE_EXPORT(__movmemSI12_i4);
-DECLARE_EXPORT(__sdivsi3_i4i);
-DECLARE_EXPORT(__udiv_qrnnd_16);
-DECLARE_EXPORT(__udivsi3_i4i);
 #else /* GCC 3.x */
 DECLARE_EXPORT(__movstr_i4_even);
 DECLARE_EXPORT(__movstr_i4_odd);
index 3fa5f95..1c927c5 100644 (file)
@@ -601,7 +601,7 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
 /*
  * Normally called from {do_}pci_scan_bus...
  */
-void __init pcibios_fixup_bus(struct pci_bus *bus)
+void __devinit pcibios_fixup_bus(struct pci_bus *bus)
 {
        struct pci_dev *dev;
        int i, has_io, has_mem;
@@ -842,7 +842,7 @@ static void watchdog_reset() {
 /*
  * Other archs parse arguments here.
  */
-char * __init pcibios_setup(char *str)
+char * __devinit pcibios_setup(char *str)
 {
        return str;
 }
index da6606f..f807172 100644 (file)
@@ -910,7 +910,7 @@ asmlinkage long sunos_sysconf (int name)
                ret = ARG_MAX;
                break;
        case _SC_CHILD_MAX:
-               ret = -1; /* no limit */
+               ret = current->signal->rlim[RLIMIT_NPROC].rlim_cur;
                break;
        case _SC_CLK_TCK:
                ret = HZ;
@@ -919,7 +919,7 @@ asmlinkage long sunos_sysconf (int name)
                ret = NGROUPS_MAX;
                break;
        case _SC_OPEN_MAX:
-               ret = OPEN_MAX;
+               ret = current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
                break;
        case _SC_JOB_CONTROL:
                ret = 1;        /* yes, we do support job control */
index 53ddcd9..559335f 100644 (file)
@@ -52,6 +52,7 @@ int atomic_cmpxchg(atomic_t *v, int old, int new)
        spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
        return ret;
 }
+EXPORT_SYMBOL(atomic_cmpxchg);
 
 int atomic_add_unless(atomic_t *v, int a, int u)
 {
@@ -65,6 +66,7 @@ int atomic_add_unless(atomic_t *v, int a, int u)
        spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
        return ret != u;
 }
+EXPORT_SYMBOL(atomic_add_unless);
 
 /* Atomic operations are already serializing */
 void atomic_set(atomic_t *v, int i)
index 196b4b7..1210988 100644 (file)
@@ -327,7 +327,7 @@ static int __init pcibios_init(void)
 
 subsys_initcall(pcibios_init);
 
-void pcibios_fixup_bus(struct pci_bus *pbus)
+void __devinit pcibios_fixup_bus(struct pci_bus *pbus)
 {
        struct pci_pbm_info *pbm = pbus->sysdata;
 
@@ -405,7 +405,7 @@ void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res,
 }
 EXPORT_SYMBOL(pcibios_bus_to_resource);
 
-char * __init pcibios_setup(char *str)
+char * __devinit pcibios_setup(char *str)
 {
        return str;
 }
index 2e7f142..7aca0f3 100644 (file)
@@ -64,7 +64,7 @@ static void __iommu_flushall(struct pci_iommu *iommu)
 #define IOPTE_IS_DUMMY(iommu, iopte)   \
        ((iopte_val(*iopte) & IOPTE_PAGE) == (iommu)->dummy_page_pa)
 
-static void inline iopte_make_dummy(struct pci_iommu *iommu, iopte_t *iopte)
+static inline void iopte_make_dummy(struct pci_iommu *iommu, iopte_t *iopte)
 {
        unsigned long val = iopte_val(*iopte);
 
index 01d6d86..14f78fb 100644 (file)
 
 #include "iommu_common.h"
 
-/* These should be allocated on an SMP_CACHE_BYTES
- * aligned boundary for optimal performance.
- *
- * On SYSIO, using an 8K page size we have 1GB of SBUS
- * DMA space mapped.  We divide this space into equally
- * sized clusters. We allocate a DMA mapping from the
- * cluster that matches the order of the allocation, or
- * if the order is greater than the number of clusters,
- * we try to allocate from the last cluster.
- */
-
-#define NCLUSTERS      8UL
-#define ONE_GIG                (1UL * 1024UL * 1024UL * 1024UL)
-#define CLUSTER_SIZE   (ONE_GIG / NCLUSTERS)
-#define CLUSTER_MASK   (CLUSTER_SIZE - 1)
-#define CLUSTER_NPAGES (CLUSTER_SIZE >> IO_PAGE_SHIFT)
 #define MAP_BASE       ((u32)0xc0000000)
 
+struct sbus_iommu_arena {
+       unsigned long   *map;
+       unsigned int    hint;
+       unsigned int    limit;
+};
+
 struct sbus_iommu {
-/*0x00*/spinlock_t             lock;
+       spinlock_t              lock;
 
-/*0x08*/iopte_t                        *page_table;
-/*0x10*/unsigned long          strbuf_regs;
-/*0x18*/unsigned long          iommu_regs;
-/*0x20*/unsigned long          sbus_control_reg;
+       struct sbus_iommu_arena arena;
 
-/*0x28*/volatile unsigned long strbuf_flushflag;
+       iopte_t                 *page_table;
+       unsigned long           strbuf_regs;
+       unsigned long           iommu_regs;
+       unsigned long           sbus_control_reg;
 
-       /* If NCLUSTERS is ever decresed to 4 or lower,
-        * you must increase the size of the type of
-        * these counters.  You have been duly warned. -DaveM
-        */
-/*0x30*/struct {
-               u16     next;
-               u16     flush;
-       } alloc_info[NCLUSTERS];
-
-       /* The lowest used consistent mapping entry.  Since
-        * we allocate consistent maps out of cluster 0 this
-        * is relative to the beginning of closter 0.
-        */
-/*0x50*/u32            lowest_consistent_map;
+       volatile unsigned long  strbuf_flushflag;
 };
 
 /* Offsets from iommu_regs */
@@ -91,19 +68,6 @@ static void __iommu_flushall(struct sbus_iommu *iommu)
                tag += 8UL;
        }
        upa_readq(iommu->sbus_control_reg);
-
-       for (entry = 0; entry < NCLUSTERS; entry++) {
-               iommu->alloc_info[entry].flush =
-                       iommu->alloc_info[entry].next;
-       }
-}
-
-static void iommu_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages)
-{
-       while (npages--)
-               upa_writeq(base + (npages << IO_PAGE_SHIFT),
-                          iommu->iommu_regs + IOMMU_FLUSH);
-       upa_readq(iommu->sbus_control_reg);
 }
 
 /* Offsets from strbuf_regs */
@@ -156,178 +120,115 @@ static void sbus_strbuf_flush(struct sbus_iommu *iommu, u32 base, unsigned long
                       base, npages);
 }
 
-static iopte_t *alloc_streaming_cluster(struct sbus_iommu *iommu, unsigned long npages)
+/* Based largely upon the ppc64 iommu allocator.  */
+static long sbus_arena_alloc(struct sbus_iommu *iommu, unsigned long npages)
 {
-       iopte_t *iopte, *limit, *first, *cluster;
-       unsigned long cnum, ent, nent, flush_point, found;
-
-       cnum = 0;
-       nent = 1;
-       while ((1UL << cnum) < npages)
-               cnum++;
-       if(cnum >= NCLUSTERS) {
-               nent = 1UL << (cnum - NCLUSTERS);
-               cnum = NCLUSTERS - 1;
-       }
-       iopte  = iommu->page_table + (cnum * CLUSTER_NPAGES);
-
-       if (cnum == 0)
-               limit = (iommu->page_table +
-                        iommu->lowest_consistent_map);
-       else
-               limit = (iopte + CLUSTER_NPAGES);
-
-       iopte += ((ent = iommu->alloc_info[cnum].next) << cnum);
-       flush_point = iommu->alloc_info[cnum].flush;
-
-       first = iopte;
-       cluster = NULL;
-       found = 0;
-       for (;;) {
-               if (iopte_val(*iopte) == 0UL) {
-                       found++;
-                       if (!cluster)
-                               cluster = iopte;
+       struct sbus_iommu_arena *arena = &iommu->arena;
+       unsigned long n, i, start, end, limit;
+       int pass;
+
+       limit = arena->limit;
+       start = arena->hint;
+       pass = 0;
+
+again:
+       n = find_next_zero_bit(arena->map, limit, start);
+       end = n + npages;
+       if (unlikely(end >= limit)) {
+               if (likely(pass < 1)) {
+                       limit = start;
+                       start = 0;
+                       __iommu_flushall(iommu);
+                       pass++;
+                       goto again;
                } else {
-                       /* Used cluster in the way */
-                       cluster = NULL;
-                       found = 0;
+                       /* Scanned the whole thing, give up. */
+                       return -1;
                }
+       }
 
-               if (found == nent)
-                       break;
-
-               iopte += (1 << cnum);
-               ent++;
-               if (iopte >= limit) {
-                       iopte = (iommu->page_table + (cnum * CLUSTER_NPAGES));
-                       ent = 0;
-
-                       /* Multiple cluster allocations must not wrap */
-                       cluster = NULL;
-                       found = 0;
+       for (i = n; i < end; i++) {
+               if (test_bit(i, arena->map)) {
+                       start = i + 1;
+                       goto again;
                }
-               if (ent == flush_point)
-                       __iommu_flushall(iommu);
-               if (iopte == first)
-                       goto bad;
        }
 
-       /* ent/iopte points to the last cluster entry we're going to use,
-        * so save our place for the next allocation.
-        */
-       if ((iopte + (1 << cnum)) >= limit)
-               ent = 0;
-       else
-               ent = ent + 1;
-       iommu->alloc_info[cnum].next = ent;
-       if (ent == flush_point)
-               __iommu_flushall(iommu);
-
-       /* I've got your streaming cluster right here buddy boy... */
-       return cluster;
-
-bad:
-       printk(KERN_EMERG "sbus: alloc_streaming_cluster of npages(%ld) failed!\n",
-              npages);
-       return NULL;
+       for (i = n; i < end; i++)
+               __set_bit(i, arena->map);
+
+       arena->hint = end;
+
+       return n;
 }
 
-static void free_streaming_cluster(struct sbus_iommu *iommu, u32 base, unsigned long npages)
+static void sbus_arena_free(struct sbus_iommu_arena *arena, unsigned long base, unsigned long npages)
 {
-       unsigned long cnum, ent, nent;
-       iopte_t *iopte;
+       unsigned long i;
 
-       cnum = 0;
-       nent = 1;
-       while ((1UL << cnum) < npages)
-               cnum++;
-       if(cnum >= NCLUSTERS) {
-               nent = 1UL << (cnum - NCLUSTERS);
-               cnum = NCLUSTERS - 1;
-       }
-       ent = (base & CLUSTER_MASK) >> (IO_PAGE_SHIFT + cnum);
-       iopte = iommu->page_table + ((base - MAP_BASE) >> IO_PAGE_SHIFT);
-       do {
-               iopte_val(*iopte) = 0UL;
-               iopte += 1 << cnum;
-       } while(--nent);
-
-       /* If the global flush might not have caught this entry,
-        * adjust the flush point such that we will flush before
-        * ever trying to reuse it.
-        */
-#define between(X,Y,Z) (((Z) - (Y)) >= ((X) - (Y)))
-       if (between(ent, iommu->alloc_info[cnum].next, iommu->alloc_info[cnum].flush))
-               iommu->alloc_info[cnum].flush = ent;
-#undef between
+       for (i = base; i < (base + npages); i++)
+               __clear_bit(i, arena->map);
 }
 
-/* We allocate consistent mappings from the end of cluster zero. */
-static iopte_t *alloc_consistent_cluster(struct sbus_iommu *iommu, unsigned long npages)
+static void sbus_iommu_table_init(struct sbus_iommu *iommu, unsigned int tsbsize)
 {
-       iopte_t *iopte;
+       unsigned long tsbbase, order, sz, num_tsb_entries;
 
-       iopte = iommu->page_table + (1 * CLUSTER_NPAGES);
-       while (iopte > iommu->page_table) {
-               iopte--;
-               if (!(iopte_val(*iopte) & IOPTE_VALID)) {
-                       unsigned long tmp = npages;
+       num_tsb_entries = tsbsize / sizeof(iopte_t);
 
-                       while (--tmp) {
-                               iopte--;
-                               if (iopte_val(*iopte) & IOPTE_VALID)
-                                       break;
-                       }
-                       if (tmp == 0) {
-                               u32 entry = (iopte - iommu->page_table);
+       /* Setup initial software IOMMU state. */
+       spin_lock_init(&iommu->lock);
 
-                               if (entry < iommu->lowest_consistent_map)
-                                       iommu->lowest_consistent_map = entry;
-                               return iopte;
-                       }
-               }
+       /* Allocate and initialize the free area map.  */
+       sz = num_tsb_entries / 8;
+       sz = (sz + 7UL) & ~7UL;
+       iommu->arena.map = kzalloc(sz, GFP_KERNEL);
+       if (!iommu->arena.map) {
+               prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n");
+               prom_halt();
+       }
+       iommu->arena.limit = num_tsb_entries;
+
+       /* Now allocate and setup the IOMMU page table itself.  */
+       order = get_order(tsbsize);
+       tsbbase = __get_free_pages(GFP_KERNEL, order);
+       if (!tsbbase) {
+               prom_printf("IOMMU: Error, gfp(tsb) failed.\n");
+               prom_halt();
        }
-       return NULL;
+       iommu->page_table = (iopte_t *)tsbbase;
+       memset(iommu->page_table, 0, tsbsize);
 }
 
-static void free_consistent_cluster(struct sbus_iommu *iommu, u32 base, unsigned long npages)
+static inline iopte_t *alloc_npages(struct sbus_iommu *iommu, unsigned long npages)
 {
-       iopte_t *iopte = iommu->page_table + ((base - MAP_BASE) >> IO_PAGE_SHIFT);
+       long entry;
 
-       if ((iopte - iommu->page_table) == iommu->lowest_consistent_map) {
-               iopte_t *walk = iopte + npages;
-               iopte_t *limit;
+       entry = sbus_arena_alloc(iommu, npages);
+       if (unlikely(entry < 0))
+               return NULL;
 
-               limit = iommu->page_table + CLUSTER_NPAGES;
-               while (walk < limit) {
-                       if (iopte_val(*walk) != 0UL)
-                               break;
-                       walk++;
-               }
-               iommu->lowest_consistent_map =
-                       (walk - iommu->page_table);
-       }
+       return iommu->page_table + entry;
+}
 
-       while (npages--)
-               *iopte++ = __iopte(0UL);
+static inline void free_npages(struct sbus_iommu *iommu, dma_addr_t base, unsigned long npages)
+{
+       sbus_arena_free(&iommu->arena, base >> IO_PAGE_SHIFT, npages);
 }
 
 void *sbus_alloc_consistent(struct sbus_dev *sdev, size_t size, dma_addr_t *dvma_addr)
 {
-       unsigned long order, first_page, flags;
        struct sbus_iommu *iommu;
        iopte_t *iopte;
+       unsigned long flags, order, first_page;
        void *ret;
        int npages;
 
-       if (size <= 0 || sdev == NULL || dvma_addr == NULL)
-               return NULL;
-
        size = IO_PAGE_ALIGN(size);
        order = get_order(size);
        if (order >= 10)
                return NULL;
+
        first_page = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
        if (first_page == 0UL)
                return NULL;
@@ -336,108 +237,121 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, size_t size, dma_addr_t *dvma
        iommu = sdev->bus->iommu;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       iopte = alloc_consistent_cluster(iommu, size >> IO_PAGE_SHIFT);
-       if (iopte == NULL) {
-               spin_unlock_irqrestore(&iommu->lock, flags);
+       iopte = alloc_npages(iommu, size >> IO_PAGE_SHIFT);
+       spin_unlock_irqrestore(&iommu->lock, flags);
+
+       if (unlikely(iopte == NULL)) {
                free_pages(first_page, order);
                return NULL;
        }
 
-       /* Ok, we're committed at this point. */
-       *dvma_addr = MAP_BASE + ((iopte - iommu->page_table) << IO_PAGE_SHIFT);
+       *dvma_addr = (MAP_BASE +
+                     ((iopte - iommu->page_table) << IO_PAGE_SHIFT));
        ret = (void *) first_page;
        npages = size >> IO_PAGE_SHIFT;
+       first_page = __pa(first_page);
        while (npages--) {
-               *iopte++ = __iopte(IOPTE_VALID | IOPTE_CACHE | IOPTE_WRITE |
-                                  (__pa(first_page) & IOPTE_PAGE));
+               iopte_val(*iopte) = (IOPTE_VALID | IOPTE_CACHE |
+                                    IOPTE_WRITE |
+                                    (first_page & IOPTE_PAGE));
+               iopte++;
                first_page += IO_PAGE_SIZE;
        }
-       iommu_flush(iommu, *dvma_addr, size >> IO_PAGE_SHIFT);
-       spin_unlock_irqrestore(&iommu->lock, flags);
 
        return ret;
 }
 
 void sbus_free_consistent(struct sbus_dev *sdev, size_t size, void *cpu, dma_addr_t dvma)
 {
-       unsigned long order, npages;
        struct sbus_iommu *iommu;
-
-       if (size <= 0 || sdev == NULL || cpu == NULL)
-               return;
+       iopte_t *iopte;
+       unsigned long flags, order, npages;
 
        npages = IO_PAGE_ALIGN(size) >> IO_PAGE_SHIFT;
        iommu = sdev->bus->iommu;
+       iopte = iommu->page_table +
+               ((dvma - MAP_BASE) >> IO_PAGE_SHIFT);
+
+       spin_lock_irqsave(&iommu->lock, flags);
+
+       free_npages(iommu, dvma - MAP_BASE, npages);
 
-       spin_lock_irq(&iommu->lock);
-       free_consistent_cluster(iommu, dvma, npages);
-       iommu_flush(iommu, dvma, npages);
-       spin_unlock_irq(&iommu->lock);
+       spin_unlock_irqrestore(&iommu->lock, flags);
 
        order = get_order(size);
        if (order < 10)
                free_pages((unsigned long)cpu, order);
 }
 
-dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *ptr, size_t size, int dir)
+dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *ptr, size_t sz, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long npages, pbase, flags;
-       iopte_t *iopte;
-       u32 dma_base, offset;
-       unsigned long iopte_bits;
+       struct sbus_iommu *iommu;
+       iopte_t *base;
+       unsigned long flags, npages, oaddr;
+       unsigned long i, base_paddr;
+       u32 bus_addr, ret;
+       unsigned long iopte_protection;
+
+       iommu = sdev->bus->iommu;
 
-       if (dir == SBUS_DMA_NONE)
+       if (unlikely(direction == SBUS_DMA_NONE))
                BUG();
 
-       pbase = (unsigned long) ptr;
-       offset = (u32) (pbase & ~IO_PAGE_MASK);
-       size = (IO_PAGE_ALIGN(pbase + size) - (pbase & IO_PAGE_MASK));
-       pbase = (unsigned long) __pa(pbase & IO_PAGE_MASK);
+       oaddr = (unsigned long)ptr;
+       npages = IO_PAGE_ALIGN(oaddr + sz) - (oaddr & IO_PAGE_MASK);
+       npages >>= IO_PAGE_SHIFT;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       npages = size >> IO_PAGE_SHIFT;
-       iopte = alloc_streaming_cluster(iommu, npages);
-       if (iopte == NULL)
-               goto bad;
-       dma_base = MAP_BASE + ((iopte - iommu->page_table) << IO_PAGE_SHIFT);
-       npages = size >> IO_PAGE_SHIFT;
-       iopte_bits = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
-       if (dir != SBUS_DMA_TODEVICE)
-               iopte_bits |= IOPTE_WRITE;
-       while (npages--) {
-               *iopte++ = __iopte(iopte_bits | (pbase & IOPTE_PAGE));
-               pbase += IO_PAGE_SIZE;
-       }
-       npages = size >> IO_PAGE_SHIFT;
+       base = alloc_npages(iommu, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 
-       return (dma_base | offset);
+       if (unlikely(!base))
+               BUG();
 
-bad:
-       spin_unlock_irqrestore(&iommu->lock, flags);
-       BUG();
-       return 0;
+       bus_addr = (MAP_BASE +
+                   ((base - iommu->page_table) << IO_PAGE_SHIFT));
+       ret = bus_addr | (oaddr & ~IO_PAGE_MASK);
+       base_paddr = __pa(oaddr & IO_PAGE_MASK);
+
+       iopte_protection = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
+       if (direction != SBUS_DMA_TODEVICE)
+               iopte_protection |= IOPTE_WRITE;
+
+       for (i = 0; i < npages; i++, base++, base_paddr += IO_PAGE_SIZE)
+               iopte_val(*base) = iopte_protection | base_paddr;
+
+       return ret;
 }
 
-void sbus_unmap_single(struct sbus_dev *sdev, dma_addr_t dma_addr, size_t size, int direction)
+void sbus_unmap_single(struct sbus_dev *sdev, dma_addr_t bus_addr, size_t sz, int direction)
 {
        struct sbus_iommu *iommu = sdev->bus->iommu;
-       u32 dma_base = dma_addr & IO_PAGE_MASK;
-       unsigned long flags;
+       iopte_t *base;
+       unsigned long flags, npages, i;
+
+       if (unlikely(direction == SBUS_DMA_NONE))
+               BUG();
+
+       npages = IO_PAGE_ALIGN(bus_addr + sz) - (bus_addr & IO_PAGE_MASK);
+       npages >>= IO_PAGE_SHIFT;
+       base = iommu->page_table +
+               ((bus_addr - MAP_BASE) >> IO_PAGE_SHIFT);
 
-       size = (IO_PAGE_ALIGN(dma_addr + size) - dma_base);
+       bus_addr &= IO_PAGE_MASK;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       free_streaming_cluster(iommu, dma_base, size >> IO_PAGE_SHIFT);
-       sbus_strbuf_flush(iommu, dma_base, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
+       for (i = 0; i < npages; i++)
+               iopte_val(base[i]) = 0UL;
+       free_npages(iommu, bus_addr - MAP_BASE, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
 #define SG_ENT_PHYS_ADDRESS(SG)        \
        (__pa(page_address((SG)->page)) + (SG)->offset)
 
-static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, int nelems, unsigned long iopte_bits)
+static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg,
+                          int nused, int nelems, unsigned long iopte_protection)
 {
        struct scatterlist *dma_sg = sg;
        struct scatterlist *sg_end = sg + nelems;
@@ -462,7 +376,7 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, in
                        for (;;) {
                                unsigned long tmp;
 
-                               tmp = (unsigned long) SG_ENT_PHYS_ADDRESS(sg);
+                               tmp = SG_ENT_PHYS_ADDRESS(sg);
                                len = sg->length;
                                if (((tmp ^ pteval) >> IO_PAGE_SHIFT) != 0UL) {
                                        pteval = tmp & IO_PAGE_MASK;
@@ -478,7 +392,7 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, in
                                sg++;
                        }
 
-                       pteval = ((pteval & IOPTE_PAGE) | iopte_bits);
+                       pteval = iopte_protection | (pteval & IOPTE_PAGE);
                        while (len > 0) {
                                *iopte++ = __iopte(pteval);
                                pteval += IO_PAGE_SIZE;
@@ -509,103 +423,111 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, in
        }
 }
 
-int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int dir)
+int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sglist, int nelems, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long flags, npages;
-       iopte_t *iopte;
+       struct sbus_iommu *iommu;
+       unsigned long flags, npages, iopte_protection;
+       iopte_t *base;
        u32 dma_base;
        struct scatterlist *sgtmp;
        int used;
-       unsigned long iopte_bits;
-
-       if (dir == SBUS_DMA_NONE)
-               BUG();
 
        /* Fast path single entry scatterlists. */
-       if (nents == 1) {
-               sg->dma_address =
+       if (nelems == 1) {
+               sglist->dma_address =
                        sbus_map_single(sdev,
-                                       (page_address(sg->page) + sg->offset),
-                                       sg->length, dir);
-               sg->dma_length = sg->length;
+                                       (page_address(sglist->page) + sglist->offset),
+                                       sglist->length, direction);
+               sglist->dma_length = sglist->length;
                return 1;
        }
 
-       npages = prepare_sg(sg, nents);
+       iommu = sdev->bus->iommu;
+
+       if (unlikely(direction == SBUS_DMA_NONE))
+               BUG();
+
+       npages = prepare_sg(sglist, nelems);
 
        spin_lock_irqsave(&iommu->lock, flags);
-       iopte = alloc_streaming_cluster(iommu, npages);
-       if (iopte == NULL)
-               goto bad;
-       dma_base = MAP_BASE + ((iopte - iommu->page_table) << IO_PAGE_SHIFT);
+       base = alloc_npages(iommu, npages);
+       spin_unlock_irqrestore(&iommu->lock, flags);
+
+       if (unlikely(base == NULL))
+               BUG();
+
+       dma_base = MAP_BASE +
+               ((base - iommu->page_table) << IO_PAGE_SHIFT);
 
        /* Normalize DVMA addresses. */
-       sgtmp = sg;
-       used = nents;
+       used = nelems;
 
+       sgtmp = sglist;
        while (used && sgtmp->dma_length) {
                sgtmp->dma_address += dma_base;
                sgtmp++;
                used--;
        }
-       used = nents - used;
+       used = nelems - used;
 
-       iopte_bits = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
-       if (dir != SBUS_DMA_TODEVICE)
-               iopte_bits |= IOPTE_WRITE;
+       iopte_protection = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
+       if (direction != SBUS_DMA_TODEVICE)
+               iopte_protection |= IOPTE_WRITE;
+
+       fill_sg(base, sglist, used, nelems, iopte_protection);
 
-       fill_sg(iopte, sg, used, nents, iopte_bits);
 #ifdef VERIFY_SG
-       verify_sglist(sg, nents, iopte, npages);
+       verify_sglist(sglist, nelems, base, npages);
 #endif
-       spin_unlock_irqrestore(&iommu->lock, flags);
 
        return used;
-
-bad:
-       spin_unlock_irqrestore(&iommu->lock, flags);
-       BUG();
-       return 0;
 }
 
-void sbus_unmap_sg(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int direction)
+void sbus_unmap_sg(struct sbus_dev *sdev, struct scatterlist *sglist, int nelems, int direction)
 {
-       unsigned long size, flags;
        struct sbus_iommu *iommu;
-       u32 dvma_base;
-       int i;
+       iopte_t *base;
+       unsigned long flags, i, npages;
+       u32 bus_addr;
 
-       /* Fast path single entry scatterlists. */
-       if (nents == 1) {
-               sbus_unmap_single(sdev, sg->dma_address, sg->dma_length, direction);
-               return;
-       }
+       if (unlikely(direction == SBUS_DMA_NONE))
+               BUG();
+
+       iommu = sdev->bus->iommu;
+
+       bus_addr = sglist->dma_address & IO_PAGE_MASK;
 
-       dvma_base = sg[0].dma_address & IO_PAGE_MASK;
-       for (i = 0; i < nents; i++) {
-               if (sg[i].dma_length == 0)
+       for (i = 1; i < nelems; i++)
+               if (sglist[i].dma_length == 0)
                        break;
-       }
        i--;
-       size = IO_PAGE_ALIGN(sg[i].dma_address + sg[i].dma_length) - dvma_base;
+       npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length) -
+                 bus_addr) >> IO_PAGE_SHIFT;
+
+       base = iommu->page_table +
+               ((bus_addr - MAP_BASE) >> IO_PAGE_SHIFT);
 
-       iommu = sdev->bus->iommu;
        spin_lock_irqsave(&iommu->lock, flags);
-       free_streaming_cluster(iommu, dvma_base, size >> IO_PAGE_SHIFT);
-       sbus_strbuf_flush(iommu, dvma_base, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
+       for (i = 0; i < npages; i++)
+               iopte_val(base[i]) = 0UL;
+       free_npages(iommu, bus_addr - MAP_BASE, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
-void sbus_dma_sync_single_for_cpu(struct sbus_dev *sdev, dma_addr_t base, size_t size, int direction)
+void sbus_dma_sync_single_for_cpu(struct sbus_dev *sdev, dma_addr_t bus_addr, size_t sz, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long flags;
+       struct sbus_iommu *iommu;
+       unsigned long flags, npages;
+
+       iommu = sdev->bus->iommu;
 
-       size = (IO_PAGE_ALIGN(base + size) - (base & IO_PAGE_MASK));
+       npages = IO_PAGE_ALIGN(bus_addr + sz) - (bus_addr & IO_PAGE_MASK);
+       npages >>= IO_PAGE_SHIFT;
+       bus_addr &= IO_PAGE_MASK;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       sbus_strbuf_flush(iommu, base & IO_PAGE_MASK, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
@@ -613,23 +535,25 @@ void sbus_dma_sync_single_for_device(struct sbus_dev *sdev, dma_addr_t base, siz
 {
 }
 
-void sbus_dma_sync_sg_for_cpu(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int direction)
+void sbus_dma_sync_sg_for_cpu(struct sbus_dev *sdev, struct scatterlist *sglist, int nelems, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long flags, size;
-       u32 base;
-       int i;
+       struct sbus_iommu *iommu;
+       unsigned long flags, npages, i;
+       u32 bus_addr;
+
+       iommu = sdev->bus->iommu;
 
-       base = sg[0].dma_address & IO_PAGE_MASK;
-       for (i = 0; i < nents; i++) {
-               if (sg[i].dma_length == 0)
+       bus_addr = sglist[0].dma_address & IO_PAGE_MASK;
+       for (i = 0; i < nelems; i++) {
+               if (!sglist[i].dma_length)
                        break;
        }
        i--;
-       size = IO_PAGE_ALIGN(sg[i].dma_address + sg[i].dma_length) - base;
+       npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length)
+                 - bus_addr) >> IO_PAGE_SHIFT;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       sbus_strbuf_flush(iommu, base, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
@@ -1104,7 +1028,7 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
        struct linux_prom64_registers *pr;
        struct device_node *dp;
        struct sbus_iommu *iommu;
-       unsigned long regs, tsb_base;
+       unsigned long regs;
        u64 control;
        int i;
 
@@ -1132,14 +1056,6 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
 
        memset(iommu, 0, sizeof(*iommu));
 
-       /* We start with no consistent mappings. */
-       iommu->lowest_consistent_map = CLUSTER_NPAGES;
-
-       for (i = 0; i < NCLUSTERS; i++) {
-               iommu->alloc_info[i].flush = 0;
-               iommu->alloc_info[i].next = 0;
-       }
-
        /* Setup spinlock. */
        spin_lock_init(&iommu->lock);
 
@@ -1159,25 +1075,13 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
               sbus->portid, regs);
 
        /* Setup for TSB_SIZE=7, TBW_SIZE=0, MMU_DE=1, MMU_EN=1 */
+       sbus_iommu_table_init(iommu, IO_TSB_SIZE);
+
        control = upa_readq(iommu->iommu_regs + IOMMU_CONTROL);
        control = ((7UL << 16UL)        |
                   (0UL << 2UL)         |
                   (1UL << 1UL)         |
                   (1UL << 0UL));
-
-       /* Using the above configuration we need 1MB iommu page
-        * table (128K ioptes * 8 bytes per iopte).  This is
-        * page order 7 on UltraSparc.
-        */
-       tsb_base = __get_free_pages(GFP_ATOMIC, get_order(IO_TSB_SIZE));
-       if (tsb_base == 0UL) {
-               prom_printf("sbus_iommu_init: Fatal error, cannot alloc TSB table.\n");
-               prom_halt();
-       }
-
-       iommu->page_table = (iopte_t *) tsb_base;
-       memset(iommu->page_table, 0, IO_TSB_SIZE);
-
        upa_writeq(control, iommu->iommu_regs + IOMMU_CONTROL);
 
        /* Clean out any cruft in the IOMMU using
@@ -1195,7 +1099,7 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
        upa_readq(iommu->sbus_control_reg);
 
        /* Give the TSB to SYSIO. */
-       upa_writeq(__pa(tsb_base), iommu->iommu_regs + IOMMU_TSBBASE);
+       upa_writeq(__pa(iommu->page_table), iommu->iommu_regs + IOMMU_TSBBASE);
 
        /* Setup streaming buffer, DE=1 SB_EN=1 */
        control = (1UL << 1UL) | (1UL << 0UL);
index c09ab4b..010a737 100644 (file)
@@ -91,7 +91,6 @@ SIGN1(sys32_select, compat_sys_select, %o0)
 SIGN1(sys32_mkdir, sys_mkdir, %o1)
 SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5)
 SIGN1(sys32_sysfs, compat_sys_sysfs, %o0)
-SIGN3(sys32_ipc, compat_sys_ipc, %o1, %o2, %o3)
 SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1)
 SIGN2(sys32_sendfile64, compat_sys_sendfile64, %o0, %o1)
 SIGN1(sys32_prctl, sys_prctl, %o0)
index 4cff95b..8f7a06e 100644 (file)
@@ -871,7 +871,7 @@ asmlinkage s32 sunos_sysconf (int name)
                ret = ARG_MAX;
                break;
        case _SC_CHILD_MAX:
-               ret = -1; /* no limit */
+               ret = current->signal->rlim[RLIMIT_NPROC].rlim_cur;
                break;
        case _SC_CLK_TCK:
                ret = HZ;
@@ -880,7 +880,7 @@ asmlinkage s32 sunos_sysconf (int name)
                ret = NGROUPS_MAX;
                break;
        case _SC_OPEN_MAX:
-               ret = OPEN_MAX;
+               ret = current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
                break;
        case _SC_JOB_CONTROL:
                ret = 1;        /* yes, we do support job control */
index aaeb5e0..48c36fe 100644 (file)
@@ -62,7 +62,7 @@ sys_call_table32:
 /*200*/        .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
        .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64
 /*210*/        .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, compat_sys_sysinfo
-       .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex
+       .word compat_sys_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex
 /*220*/        .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid
        .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
 /*230*/        .word sys32_select, compat_sys_time, sys32_splice, compat_sys_stime, compat_sys_statfs64
index bca16e8..9fcaad6 100644 (file)
@@ -363,8 +363,10 @@ asmlinkage int solaris_sysconf(int id)
 {
        switch (id) {
        case SOLARIS_CONFIG_NGROUPS:    return NGROUPS_MAX;
-       case SOLARIS_CONFIG_CHILD_MAX:  return -1; /* no limit */
-       case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX;
+       case SOLARIS_CONFIG_CHILD_MAX:
+               return current->signal->rlim[RLIMIT_NPROC].rlim_cur;
+       case SOLARIS_CONFIG_OPEN_FILES:
+               return current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
        case SOLARIS_CONFIG_POSIX_VER:  return 199309;
        case SOLARIS_CONFIG_PAGESIZE:   return PAGE_SIZE;
        case SOLARIS_CONFIG_XOPEN_VER:  return 3;
index 7b8baf1..9fdfad6 100644 (file)
@@ -236,11 +236,11 @@ void free_irqs(void)
        struct chan *chan;
        LIST_HEAD(list);
        struct list_head *ele;
+       unsigned long flags;
 
-       spin_lock_irq(&irqs_to_free_lock);
+       spin_lock_irqsave(&irqs_to_free_lock, flags);
        list_splice_init(&irqs_to_free, &list);
-       INIT_LIST_HEAD(&irqs_to_free);
-       spin_unlock_irq(&irqs_to_free_lock);
+       spin_unlock_irqrestore(&irqs_to_free_lock, flags);
 
        list_for_each(ele, &list){
                chan = list_entry(ele, struct chan, free_list);
@@ -255,13 +255,15 @@ void free_irqs(void)
 
 static void close_one_chan(struct chan *chan, int delay_free_irq)
 {
+       unsigned long flags;
+
        if(!chan->opened)
                return;
 
        if(delay_free_irq){
-               spin_lock_irq(&irqs_to_free_lock);
+               spin_lock_irqsave(&irqs_to_free_lock, flags);
                list_add(&chan->free_list, &irqs_to_free);
-               spin_unlock_irq(&irqs_to_free_lock);
+               spin_unlock_irqrestore(&irqs_to_free_lock, flags);
        }
        else {
                if(chan->input)
index 178b2ef..65ad293 100644 (file)
@@ -615,6 +615,9 @@ void mconsole_remove(struct mc_request *req)
        err_msg = NULL;
        err = (*dev->remove)(n, &err_msg);
        switch(err){
+       case 0:
+               err_msg = "";
+               break;
        case -ENODEV:
                if(err_msg == NULL)
                        err_msg = "Device doesn't exist";
index f98d26e..8bd9204 100644 (file)
@@ -109,10 +109,6 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data)
 
 static DEFINE_MUTEX(ubd_lock);
 
-/* XXX - this made sense in 2.4 days, now it's only used as a boolean, and
- * probably it doesn't make sense even for that. */
-static int do_ubd;
-
 static int ubd_open(struct inode * inode, struct file * filp);
 static int ubd_release(struct inode * inode, struct file * file);
 static int ubd_ioctl(struct inode * inode, struct file * file,
@@ -169,6 +165,7 @@ struct ubd {
        struct platform_device pdev;
        struct request_queue *queue;
        spinlock_t lock;
+       int active;
 };
 
 #define DEFAULT_COW { \
@@ -190,6 +187,7 @@ struct ubd {
        .shared =               0, \
         .cow =                 DEFAULT_COW, \
        .lock =                 SPIN_LOCK_UNLOCKED,     \
+       .active =               0, \
 }
 
 /* Protected by ubd_lock */
@@ -507,7 +505,6 @@ static void ubd_handler(void)
        struct ubd *dev;
        int n;
 
-       do_ubd = 0;
        n = os_read_file(thread_fd, &req, sizeof(req));
        if(n != sizeof(req)){
                printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, "
@@ -517,6 +514,7 @@ static void ubd_handler(void)
 
        rq = req.req;
        dev = rq->rq_disk->private_data;
+       dev->active = 0;
 
        ubd_finish(rq, req.error);
        reactivate_fd(thread_fd, UBD_IRQ);
@@ -1081,11 +1079,12 @@ static void do_ubd_request(request_queue_t *q)
                }
        }
        else {
-               if(do_ubd || (req = elv_next_request(q)) == NULL)
+               struct ubd *dev = q->queuedata;
+               if(dev->active || (req = elv_next_request(q)) == NULL)
                        return;
                err = prepare_request(req, &io_req);
                if(!err){
-                       do_ubd = 1;
+                       dev->active = 1;
                        n = os_write_file(thread_fd, (char *) &io_req,
                                         sizeof(io_req));
                        if(n != sizeof(io_req))
index 2666815..b282839 100644 (file)
@@ -12,6 +12,8 @@
 #define u32 uint32_t
 #endif
 
+#include "sysdep/ptrace.h"
+
 #define MCONSOLE_MAGIC (0xcafebabe)
 #define MCONSOLE_MAX_DATA (512)
 #define MCONSOLE_VERSION 2
index 66cb400..62403bd 100644 (file)
@@ -104,10 +104,6 @@ union uml_pt_regs {
 #endif
 #ifdef UML_CONFIG_MODE_SKAS
        struct skas_regs {
-               /* x86_64 ptrace uses sizeof(user_regs_struct) as its register
-                * file size, while i386 uses FRAME_SIZE.  Therefore, we need
-                * to use UM_FRAME_SIZE here instead of HOST_FRAME_SIZE.
-                */
                unsigned long regs[MAX_REG_NR];
                unsigned long fp[HOST_FP_SIZE];
                 struct faultinfo faultinfo;
index e85d65d..df7d662 100644 (file)
@@ -64,8 +64,6 @@ static void setup_highmem(unsigned long highmem_start,
 
 void mem_init(void)
 {
-       max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT;
-
        /* clear the zero-page */
        memset((void *) empty_zero_page, 0, PAGE_SIZE);
 
@@ -80,6 +78,7 @@ void mem_init(void)
 
        /* this will put all low memory onto the freelists */
        totalram_pages = free_all_bootmem();
+       max_low_pfn = totalram_pages;
 #ifdef CONFIG_HIGHMEM
        totalhigh_pages = highmem >> PAGE_SHIFT;
        totalram_pages += totalhigh_pages;
index b3c11cf..9383e87 100644 (file)
@@ -48,7 +48,7 @@ int multi_op_count = 0;
 static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
 {
        unsigned long regs[MAX_REG_NR];
-       int n;
+       int n, i;
        long ret, offset;
        unsigned long * data;
        unsigned long * syscall;
@@ -66,9 +66,13 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
                 (unsigned long) &__syscall_stub_start);
 
        n = ptrace_setregs(pid, regs);
-       if(n < 0)
+       if(n < 0){
+               printk("Registers - \n");
+               for(i = 0; i < MAX_REG_NR; i++)
+                       printk("\t%d\t0x%lx\n", i, regs[i]);
                panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n",
-                     n);
+                     -n);
+       }
 
        wait_stub_done(pid, 0, "do_syscall_stub");
 
index dda0678..0564422 100644 (file)
@@ -67,7 +67,7 @@ void wait_stub_done(int pid, int sig, char * fname)
 
        if((n < 0) || !WIFSTOPPED(status) ||
           (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){
-               unsigned long regs[HOST_FRAME_SIZE];
+               unsigned long regs[MAX_REG_NR];
 
                if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0)
                        printk("Failed to get registers from stub, "
@@ -76,7 +76,7 @@ void wait_stub_done(int pid, int sig, char * fname)
                        int i;
 
                        printk("Stub registers -\n");
-                       for(i = 0; i < HOST_FRAME_SIZE; i++)
+                       for(i = 0; i < ARRAY_SIZE(regs); i++)
                                printk("\t%d - %lx\n", i, regs[i]);
                }
                panic("%s : failed to wait for SIGUSR1/SIGTRAP, "
@@ -328,7 +328,7 @@ void userspace(union uml_pt_regs *regs)
 int copy_context_skas0(unsigned long new_stack, int pid)
 {
        int err;
-       unsigned long regs[HOST_FRAME_SIZE];
+       unsigned long regs[MAX_REG_NR];
        unsigned long fp_regs[HOST_FP_SIZE];
        unsigned long current_stack = current_stub_stack();
        struct stub_data *data = (struct stub_data *) current_stack;
index 79cd93c..84b44f9 100644 (file)
@@ -15,7 +15,7 @@
 
 /* These are set once at boot time and not changed thereafter */
 
-static unsigned long exec_regs[HOST_FRAME_SIZE];
+static unsigned long exec_regs[MAX_REG_NR];
 static unsigned long exec_fp_regs[HOST_FP_SIZE];
 static unsigned long exec_fpx_regs[HOST_XFP_SIZE];
 static int have_fpx_regs = 1;
@@ -101,6 +101,7 @@ void init_registers(int pid)
 {
        int err;
 
+       memset(exec_regs, 0, sizeof(exec_regs));
        err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs);
        if(err)
                panic("check_ptrace : PTRACE_GETREGS failed, errno = %d",
@@ -124,7 +125,7 @@ void init_registers(int pid)
 
 void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)
 {
-       memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long));
+       memcpy(regs, exec_regs, sizeof(exec_regs));
        if(fp_regs != NULL)
                memcpy(fp_regs, exec_fp_regs,
                       HOST_FP_SIZE * sizeof(unsigned long));
index a2d7e0c..e6fc217 100644 (file)
@@ -14,7 +14,7 @@
 
 /* These are set once at boot time and not changed thereafter */
 
-static unsigned long exec_regs[HOST_FRAME_SIZE];
+static unsigned long exec_regs[MAX_REG_NR];
 static unsigned long exec_fp_regs[HOST_FP_SIZE];
 
 void init_thread_registers(union uml_pt_regs *to)
@@ -72,7 +72,7 @@ void init_registers(int pid)
 
 void get_s